Submission #10369560
Source Code Expand
n,m=map(int,input().split()) arr=[list(map(int,input().split())) for _ in range(m)] count=[1]*(n+1) flag=[False]*(n+1) flag[1]=True for a,b in arr: count[b]+=1 count[a]-=1 if flag[a]==True: flag[b]==True if count[a]==0: flag[a]==False print(flag.count(True))
Submission Info
Submission Time | |
---|---|
Task | B - Box and Ball |
User | tanon710 |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 286 Byte |
Status | WA |
Exec Time | 360 ms |
Memory | 28964 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 1_13.txt, 1_14.txt, 1_15.txt, 1_16.txt, 1_17.txt, 1_18.txt, 1_19.txt, 1_20.txt, 1_21.txt, 1_22.txt, 1_23.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | WA | 17 ms | 3064 KB |
0_01.txt | AC | 17 ms | 3064 KB |
0_02.txt | WA | 17 ms | 3064 KB |
1_00.txt | AC | 17 ms | 3064 KB |
1_01.txt | AC | 17 ms | 3060 KB |
1_02.txt | WA | 17 ms | 3064 KB |
1_03.txt | WA | 17 ms | 3064 KB |
1_04.txt | AC | 355 ms | 25704 KB |
1_05.txt | WA | 349 ms | 28964 KB |
1_06.txt | WA | 338 ms | 24968 KB |
1_07.txt | WA | 360 ms | 28072 KB |
1_08.txt | WA | 220 ms | 18552 KB |
1_09.txt | WA | 234 ms | 19572 KB |
1_10.txt | WA | 76 ms | 8396 KB |
1_11.txt | WA | 144 ms | 12316 KB |
1_12.txt | WA | 28 ms | 4972 KB |
1_13.txt | WA | 301 ms | 23900 KB |
1_14.txt | WA | 167 ms | 13988 KB |
1_15.txt | WA | 294 ms | 22364 KB |
1_16.txt | WA | 23 ms | 4212 KB |
1_17.txt | WA | 352 ms | 27832 KB |
1_18.txt | WA | 325 ms | 25136 KB |
1_19.txt | WA | 356 ms | 27188 KB |
1_20.txt | WA | 334 ms | 25792 KB |
1_21.txt | WA | 273 ms | 22112 KB |
1_22.txt | WA | 351 ms | 27812 KB |
1_23.txt | WA | 102 ms | 10056 KB |