Hi,
Can anyone help me in understanding why the following code is TLE for the
hidden test case:
import java.util.*;
import java.io.*;
public class Solution {
public static void main(String[] args) {
Scanner in = new Scanner(new BufferedReader(new
InputStreamReader(System.in)));
int t = Integer.parseInt(in.nextLine());
for (int i = 1; i <= t; ++i) {
in.nextLine(); //ignore grid size
String path = in.nextLine();
String res = "";
for(int j=0;j<path.length();j++) {
res+=path.charAt(j)=='S'?'E':'S';
}
System.out.println("Case #" + i + ": " + res);
}
}
}
--
You received this message because you are subscribed to the Google Groups
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/9c5814cd-a047-490c-bda9-75d5db226a9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.