Submission #667323
Source Code Expand
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import itertools import numpy H = 30 W = 30 class Solver(object): def __init__(self, stage): self.stage = stage self.hands = None # def init_hands(self): # self.hands = [] def naive_solution(self): # self.init_hands() for r, c in itertools.product(range(H), range(W)): cell = self.stage[r, c] if cell <= 0: continue for _ in range(cell): yield (r + 1, c + 1) self.stage[r, c] -= 1 def main(): stage = numpy.array([list(map(int, input().split())) for _ in range(H)]) solver = Solver(stage) for r0, c0 in solver.naive_solution(): print("{} {}".format(r0, c0)) if __name__ == '__main__': main()
Submission Info
Submission Time | |
---|---|
Task | A - 高橋君の山崩しゲーム |
User | hamukichi |
Language | Python (3.4.3) |
Score | 541032 |
Code Size | 849 Byte |
Status | AC |
Exec Time | 7404 ms |
Memory | 26988 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 | 55534 / 100000 | 53221 / 100000 | 54807 / 100000 | 51866 / 100000 | 54778 / 100000 | 54564 / 100000 | 53691 / 100000 | 55284 / 100000 | 53781 / 100000 | 53506 / 100000 | ||||||||||||||||||||
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 | AC | 7404 ms | 26988 KB |
subtask_01_02.txt | AC | 471 ms | 12972 KB |
subtask_01_03.txt | AC | 471 ms | 12988 KB |
subtask_01_04.txt | AC | 477 ms | 12988 KB |
subtask_01_05.txt | AC | 473 ms | 12992 KB |
subtask_01_06.txt | AC | 475 ms | 13000 KB |
subtask_01_07.txt | AC | 482 ms | 12976 KB |
subtask_01_08.txt | AC | 451 ms | 12996 KB |
subtask_01_09.txt | AC | 468 ms | 12992 KB |
subtask_01_10.txt | AC | 486 ms | 12992 KB |