Submission #1474022
Source Code Expand
#include<stdio.h> #include<string.h> #include<iostream> using namespace std; int n,x,i,p[100],c,mod; long long s; int main(){ scanf("%d",&n); s=1; mod=1000000007; for(i=0;i<n;i++){ scanf("%d",&x); c++; if(c*2-1>x){ s=s*c%mod; c--; } } for(i=c;i>1;i--) s=s*i%mod; printf("%d\n",(int)s); }
Submission Info
Submission Time | |
---|---|
Task | A - Robot Racing |
User | vjudge1 |
Language | Bash (GNU bash v4.3.11) |
Score | 0 |
Code Size | 372 Byte |
Status | RE |
Exec Time | 3 ms |
Memory | 572 KB |
Judge Result
Set Name | Sample | Subtask | All | ||||||
---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 500 | 0 / 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 | RE | 3 ms | 568 KB |
0_01.txt | RE | 3 ms | 572 KB |
0_02.txt | RE | 3 ms | 572 KB |
0_03.txt | RE | 3 ms | 572 KB |
1_00.txt | RE | 3 ms | 572 KB |
1_01.txt | RE | 3 ms | 572 KB |
1_02.txt | RE | 3 ms | 568 KB |
1_03.txt | RE | 3 ms | 572 KB |
1_04.txt | RE | 3 ms | 572 KB |
1_05.txt | RE | 3 ms | 572 KB |
1_06.txt | RE | 3 ms | 572 KB |
1_07.txt | RE | 3 ms | 568 KB |
1_08.txt | RE | 3 ms | 568 KB |
1_09.txt | RE | 3 ms | 572 KB |
1_10.txt | RE | 3 ms | 568 KB |
2_00.txt | RE | 3 ms | 572 KB |
2_01.txt | RE | 3 ms | 572 KB |
2_02.txt | RE | 3 ms | 568 KB |
2_03.txt | RE | 3 ms | 572 KB |
2_04.txt | RE | 3 ms | 572 KB |
2_05.txt | RE | 3 ms | 572 KB |
2_06.txt | RE | 3 ms | 572 KB |
2_07.txt | RE | 3 ms | 568 KB |
2_08.txt | RE | 3 ms | 572 KB |
2_09.txt | RE | 3 ms | 572 KB |
2_10.txt | RE | 3 ms | 572 KB |
2_11.txt | RE | 3 ms | 572 KB |
2_12.txt | RE | 3 ms | 572 KB |