Submission #991321
Source Code Expand
import java.io.*; import java.util.*; public class Main { FastScanner in; PrintWriter out; void solve() { int h = in.nextInt(); int w = in.nextInt(); for (int i = 0; i < h; i++) { for (int j = 0; j < w; j++) { if (in.next().equals("snuke")) { char c = (char) ('A' + j); out.println(c + "" + (i + 1)); } } } } void run() { try { in = new FastScanner(new File("object.in")); out = new PrintWriter(new File("object.out")); solve(); out.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } } void runIO() { in = new FastScanner(System.in); out = new PrintWriter(System.out); solve(); out.close(); } class FastScanner { BufferedReader br; StringTokenizer st; public FastScanner(File f) { try { br = new BufferedReader(new FileReader(f)); } catch (FileNotFoundException e) { e.printStackTrace(); } } public FastScanner(InputStream f) { br = new BufferedReader(new InputStreamReader(f)); } String next() { while (st == null || !st.hasMoreTokens()) { String s = null; try { s = br.readLine(); } catch (IOException e) { e.printStackTrace(); } if (s == null) return null; st = new StringTokenizer(s); } return st.nextToken(); } boolean hasMoreTokens() { while (st == null || !st.hasMoreTokens()) { String s = null; try { s = br.readLine(); } catch (IOException e) { e.printStackTrace(); } if (s == null) return false; st = new StringTokenizer(s); } return true; } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } } public static void main(String[] args) { new Thread(null, new Runnable() { public void run() { new Main().runIO(); } }, "1", 1 << 26).start(); } }
Submission Info
Submission Time | |
---|---|
Task | A - Where's Snuke? |
User | qwerty787788 |
Language | Java8 (OpenJDK 1.8.0) |
Score | 100 |
Code Size | 2049 Byte |
Status | AC |
Exec Time | 1077 ms |
Memory | 8584 KB |
Judge Result
Set Name | sample | all | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 100 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
sample | sample-01.txt, sample-02.txt |
all | sample-01.txt, sample-02.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01-01.txt | AC | 98 ms | 8432 KB |
01-02.txt | AC | 96 ms | 8432 KB |
01-03.txt | AC | 97 ms | 8528 KB |
01-04.txt | AC | 96 ms | 8424 KB |
01-05.txt | AC | 101 ms | 8584 KB |
01-06.txt | AC | 99 ms | 8556 KB |
01-07.txt | AC | 109 ms | 8428 KB |
sample-01.txt | AC | 96 ms | 8428 KB |
sample-02.txt | AC | 1077 ms | 8432 KB |