Submission #1176144
Source Code Expand
N=int(input()) x=[int(i) for i in input().split()] ans=1 index=0 advance=0 devide=10**9+7 while True: if 2*(index-advance)+1 <= x[index]: index+=1 if index==N: break else: ans*=(index-advance+1)#need concern ans%=devide index+=1 advance+=1 if index==N: break for i in range(index-advance,0,-1): ans*=i ans%=devide print(ans)
Submission Info
Submission Time | |
---|---|
Task | A - Robot Racing |
User | toma25 |
Language | Python (3.4.3) |
Score | 900 |
Code Size | 371 Byte |
Status | AC |
Exec Time | 101 ms |
Memory | 14492 KB |
Judge Result
Set Name | Sample | Subtask | All | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 500 / 500 | 400 / 400 | ||||||
Status |
|
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt |
Subtask | 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 |
All | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.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, 2_00.txt, 2_01.txt, 2_02.txt, 2_03.txt, 2_04.txt, 2_05.txt, 2_06.txt, 2_07.txt, 2_08.txt, 2_09.txt, 2_10.txt, 2_11.txt, 2_12.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 17 ms | 3064 KB |
0_01.txt | AC | 17 ms | 3060 KB |
0_02.txt | AC | 17 ms | 3064 KB |
0_03.txt | AC | 17 ms | 3064 KB |
1_00.txt | AC | 17 ms | 3064 KB |
1_01.txt | AC | 17 ms | 3064 KB |
1_02.txt | AC | 17 ms | 3064 KB |
1_03.txt | AC | 17 ms | 3064 KB |
1_04.txt | AC | 17 ms | 3064 KB |
1_05.txt | AC | 17 ms | 3064 KB |
1_06.txt | AC | 17 ms | 3064 KB |
1_07.txt | AC | 17 ms | 3064 KB |
1_08.txt | AC | 17 ms | 3064 KB |
1_09.txt | AC | 17 ms | 2940 KB |
1_10.txt | AC | 17 ms | 3060 KB |
2_00.txt | AC | 101 ms | 13880 KB |
2_01.txt | AC | 93 ms | 13948 KB |
2_02.txt | AC | 97 ms | 14056 KB |
2_03.txt | AC | 97 ms | 13888 KB |
2_04.txt | AC | 97 ms | 14492 KB |
2_05.txt | AC | 96 ms | 13828 KB |
2_06.txt | AC | 94 ms | 13844 KB |
2_07.txt | AC | 94 ms | 13948 KB |
2_08.txt | AC | 89 ms | 13100 KB |
2_09.txt | AC | 91 ms | 13096 KB |
2_10.txt | AC | 92 ms | 13844 KB |
2_11.txt | AC | 94 ms | 13772 KB |
2_12.txt | AC | 91 ms | 13880 KB |