Submission #991294


Source Code Expand

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt(), m = in.nextInt();
            int a = 0, b = 0;
            for (int i = 0; i < n; i++) {
                for (int j = 0; j < m; j++) {
                    if (in.next().equals("snuke")) {
                        a = i;
                        b = j;
                    }
                }
            }
            out.printf("%s%d\n", (char) ('A' + a), b + 1);
        }

    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

    }
}

Submission Info

Submission Time
Task A - Where's Snuke?
User lewin
Language Java8 (OpenJDK 1.8.0)
Score 0
Code Size 2046 Byte
Status WA
Exec Time 147 ms
Memory 8908 KB

Judge Result

Set Name sample all
Score / Max Score 0 / 0 0 / 100
Status
AC × 1
WA × 1
AC × 3
WA × 6
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 112 ms 8656 KB
01-02.txt AC 128 ms 8788 KB
01-03.txt WA 102 ms 8656 KB
01-04.txt WA 101 ms 8660 KB
01-05.txt WA 103 ms 8908 KB
01-06.txt WA 104 ms 8788 KB
01-07.txt WA 103 ms 8656 KB
sample-01.txt WA 147 ms 8656 KB
sample-02.txt AC 100 ms 8788 KB