Back and forth by macik

using c=System.Console;class w{static void Main(){for(int i,l,s=0,w=0;;){foreach(var v in c.ReadLine().Split()){l=v.Length;var V="".PadLeft(s-=l*w);for(i=0;i<l;i++)V+=v[w<1?i:l-1-i];c.WriteLine(V);w^=1;s+=l*w;}}}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page