Submission #1474200


Source Code Expand

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <iostream>
#include <math.h>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
const long long int mod=1e9+7;
int N;
int main()
{
   // freopen("in.txt","r",stdin);
    while(scanf("%d",&N)==1)
    {
        int x;
        long long int ans=1;
        int bad=0;
        for(int i=0;i<N;i++)
        {
            scanf("%d",&x);
            ans=(ans*(i+1-bad))%mod;
            if(x<(i-bad)*2+1)
                bad++;
        }
        printf("%I64d\n",ans);
    }


    return 0;
}


Submission Info

Submission Time
Task A - Robot Racing
User vjudge1
Language Bash (GNU bash v4.3.11)
Score 0
Code Size 581 Byte
Status RE
Exec Time 3 ms
Memory 592 KB

Judge Result

Set Name Sample Subtask All
Score / Max Score 0 / 0 0 / 500 0 / 400
Status
RE × 4
RE × 14
RE × 28
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 584 KB
0_01.txt RE 3 ms 580 KB
0_02.txt RE 3 ms 580 KB
0_03.txt RE 3 ms 580 KB
1_00.txt RE 3 ms 580 KB
1_01.txt RE 3 ms 580 KB
1_02.txt RE 3 ms 576 KB
1_03.txt RE 3 ms 580 KB
1_04.txt RE 3 ms 584 KB
1_05.txt RE 3 ms 580 KB
1_06.txt RE 3 ms 584 KB
1_07.txt RE 3 ms 580 KB
1_08.txt RE 3 ms 584 KB
1_09.txt RE 3 ms 576 KB
1_10.txt RE 3 ms 580 KB
2_00.txt RE 3 ms 576 KB
2_01.txt RE 3 ms 576 KB
2_02.txt RE 3 ms 584 KB
2_03.txt RE 3 ms 580 KB
2_04.txt RE 3 ms 584 KB
2_05.txt RE 3 ms 580 KB
2_06.txt RE 3 ms 592 KB
2_07.txt RE 3 ms 580 KB
2_08.txt RE 3 ms 580 KB
2_09.txt RE 3 ms 580 KB
2_10.txt RE 3 ms 588 KB
2_11.txt RE 3 ms 584 KB
2_12.txt RE 3 ms 576 KB