Submission #991365
Source Code Expand
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Threading;
using Pair = System.Collections.Generic.KeyValuePair<int, int>;
class Program
{
public Program() { }
static void Main(string[] args)
{
new Program().prog();
}
Scanner cin;
const int MOD = 1000000007;
const int INF = int.MaxValue - 10;
const long INFL = long.MaxValue - 10;
const double EPS = 1e-7;
const double PI = 3.1415926536;
int N;
void prog()
{
cin = new Scanner();
int[,] dir8 = new int[8, 2] { { -1, -1 }, { -1, 0 }, { -1, 1 }, { 0, -1 }, { 0, 1 }, { 1, -1 }, { 1, 0 }, { 1, 1 } };
int[,] dir4 = new int[4, 2] { { -1, 0 }, { 0, -1 }, { 0, 1 }, { 1, 0 } };
int H = cin.nextInt();
int W = cin.nextInt();
for (int i = 0; i < H; i++)
{
for (int j = 0; j < W; j++)
{
string s = cin.next();
if (s == "snuke")
{
Console.Write((char)('A'+j));
Console.WriteLine(i+1);
return;
}
}
}
}
}
class Scanner
{
string[] s;
int i;
char[] cs = new char[] { ' ' };
public Scanner()
{
s = new string[0];
i = 0;
}
public string next()
{
if (i < s.Length) return s[i++];
string st = Console.ReadLine();
while (st == "") st = Console.ReadLine();
s = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
i = 0;
return next();
}
public int nextInt()
{
return int.Parse(next());
}
public long nextLong()
{
return long.Parse(next());
}
public double nextDouble()
{
return double.Parse(next());
}
}
Submission Info
Submission Time |
|
Task |
A - Where's Snuke? |
User |
furuya1223 |
Language |
C# (Mono 4.6.2.0) |
Score |
100 |
Code Size |
1615 Byte |
Status |
AC |
Exec Time |
21 ms |
Memory |
2904 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 |
21 ms |
2904 KB |
01-02.txt |
AC |
20 ms |
2648 KB |
01-03.txt |
AC |
20 ms |
2648 KB |
01-04.txt |
AC |
19 ms |
2648 KB |
01-05.txt |
AC |
19 ms |
2648 KB |
01-06.txt |
AC |
20 ms |
2648 KB |
01-07.txt |
AC |
19 ms |
2648 KB |
sample-01.txt |
AC |
19 ms |
2648 KB |
sample-02.txt |
AC |
19 ms |
2648 KB |