Submission #1140603
Source Code Expand
using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.IO; using System.Text; using System.Globalization; using System.Diagnostics; class Myon { public Myon() { } public static int Main() { new Myon().calc(); return 0; } Scanner cin; int H, W, K; string[] board; //A問題 public void calc() { cin = new Scanner(); H = cin.nextInt(); W = cin.nextInt(); K = cin.nextInt(); board = new string[H]; for (int i = 0; i < H; i++) { board[i] = cin.next(); } List<List<string>> ans = new List<List<string>>(); for (int y = 0; y < H; y++) { List<string> now = new List<string>(); for (int j = 0; j < W; j++) { int x = j; if (y % 2 == 1) x = (W - 1 - j); if (board[y][x] != '0') now.Add(string.Format("{0} {1}", y, x)); else now = new List<string>(); if(now.Count == 8) { ans.Add(now); now = new List<string>(); } } } Console.WriteLine(ans.Count); foreach (var i1 in ans) { foreach (var st in i1) { Console.WriteLine(st); } } } } 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 s[i++]; } 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 - Multiple Pieces |
User | chokudai |
Language | C# (Mono 4.6.2.0) |
Score | 0 |
Code Size | 2195 Byte |
Status | WA |
Exec Time | 28 ms |
Memory | 13268 KB |
Judge Result
Set Name | test_01 | test_02 | test_03 | test_04 | test_05 | test_06 | test_07 | test_08 | test_09 | test_10 | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 1343058 | 0 / 1343058 | 0 / 1343058 | 0 / 1343058 | 0 / 1343058 | 0 / 1343058 | 0 / 1343058 | 0 / 1343058 | 0 / 1343058 | 0 / 1343058 | ||||||||||||||||||||
Status |
|
|
|
|
|
|
|
|
|
|
Set Name | Test Cases |
---|---|
test_01 | subtask_01_01.txt |
test_02 | subtask_01_02.txt |
test_03 | subtask_01_03.txt |
test_04 | subtask_01_04.txt |
test_05 | subtask_01_05.txt |
test_06 | subtask_01_06.txt |
test_07 | subtask_01_07.txt |
test_08 | subtask_01_08.txt |
test_09 | subtask_01_09.txt |
test_10 | subtask_01_10.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
subtask_01_01.txt | WA | 28 ms | 13268 KB |
subtask_01_02.txt | WA | 27 ms | 9172 KB |
subtask_01_03.txt | WA | 27 ms | 11220 KB |
subtask_01_04.txt | WA | 27 ms | 11220 KB |
subtask_01_05.txt | WA | 27 ms | 11220 KB |
subtask_01_06.txt | WA | 27 ms | 11220 KB |
subtask_01_07.txt | WA | 26 ms | 9172 KB |
subtask_01_08.txt | WA | 27 ms | 11220 KB |
subtask_01_09.txt | WA | 27 ms | 9172 KB |
subtask_01_10.txt | WA | 27 ms | 11220 KB |