Submission #4274064
Source Code Expand
import sys from collections import deque import copy import math def get_read_func(fileobject): if fileobject == None : return raw_input else: return fileobject.readline def main(): if len(sys.argv) > 1: f = open(sys.argv[1]) else: f = None read_func = get_read_func(f); input_raw = read_func().strip().split() [N] = [long(input_raw[0])] A = [] for i in range(N): input_raw = read_func().strip().split() A.append(long(input_raw[0])) s = 0 count = 0 for i in range(N): if A[i] != 0: s += A[i] else: count += s/2 s = 0 count += s/2 print count if __name__ == '__main__': main()
Submission Info
Submission Time | |
---|---|
Task | B - Simplified mahjong |
User | YamagenSakam |
Language | Python (2.7.6) |
Score | 400 |
Code Size | 781 Byte |
Status | AC |
Exec Time | 194 ms |
Memory | 10284 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 400 / 400 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, s1.txt, s2.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | AC | 194 ms | 10284 KB |
02.txt | AC | 189 ms | 10156 KB |
03.txt | AC | 183 ms | 10156 KB |
04.txt | AC | 190 ms | 10156 KB |
05.txt | AC | 187 ms | 10156 KB |
06.txt | AC | 178 ms | 10156 KB |
07.txt | AC | 173 ms | 10156 KB |
08.txt | AC | 175 ms | 10156 KB |
09.txt | AC | 177 ms | 10156 KB |
10.txt | AC | 161 ms | 10156 KB |
11.txt | AC | 181 ms | 10156 KB |
12.txt | AC | 186 ms | 10156 KB |
13.txt | AC | 161 ms | 10156 KB |
14.txt | AC | 170 ms | 10156 KB |
15.txt | AC | 181 ms | 10156 KB |
16.txt | AC | 172 ms | 10156 KB |
17.txt | AC | 188 ms | 10156 KB |
18.txt | AC | 13 ms | 2928 KB |
19.txt | AC | 12 ms | 2928 KB |
20.txt | AC | 12 ms | 2928 KB |
21.txt | AC | 13 ms | 2928 KB |
22.txt | AC | 13 ms | 2928 KB |
s1.txt | AC | 13 ms | 2928 KB |
s2.txt | AC | 13 ms | 2928 KB |