Submission #911898


Source Code Expand

long a[99999],m;main(n,k,i,j){for(;scanf("%d%d",&n,&k),n>=0;){for(i=0;i<n;i++)scanf("%lld",a+i);for(m=i=0;i<n;i++)if(m=i<=k||m>a[i-k-1]?m:a[i-k-1],a[i]<m){puts("No");goto n;}puts("Yes");n:;}exit(0);}

Submission Info

Submission Time
Task J - ALPHAのならび
User leafmoon
Language C (GCC 4.6.4)
Score 100
Code Size 199 Byte
Status AC
Exec Time 98 ms
Memory 1180 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:1:36: warning: incompatible implicit declaration of built-in function ‘scanf’ [enabled by default]
./Main.c:1:1: warning: format ‘%lld’ expects argument of type ‘long long int *’, but argument 2 has type ‘long int *’ [-Wformat]
./Main.c:1:191: warning: incompatible implicit declaration of built-in function ‘exit’ [enabled by default]

Judge Result

Set Name All
Score / Max Score 100 / 100
Status
AC × 17
Set Name Test Cases
All 00-sample, 01-maximum, 02-longlong-01, 02-longlong-02, 03-kborder01, 03-kborder02, 03-kborder03, 50-random01, 50-random02, 50-random03, 50-random04, 50-random05, 50-random06, 50-random07, 50-random08, 50-random09, 50-random10
Case Name Status Exec Time Memory
00-sample AC 18 ms 700 KB
01-maximum AC 57 ms 1048 KB
02-longlong-01 AC 98 ms 1052 KB
02-longlong-02 AC 97 ms 1180 KB
03-kborder01 AC 16 ms 804 KB
03-kborder02 AC 18 ms 800 KB
03-kborder03 AC 17 ms 692 KB
50-random01 AC 71 ms 1060 KB
50-random02 AC 67 ms 1052 KB
50-random03 AC 71 ms 1176 KB
50-random04 AC 82 ms 1056 KB
50-random05 AC 75 ms 1052 KB
50-random06 AC 74 ms 1176 KB
50-random07 AC 77 ms 1048 KB
50-random08 AC 81 ms 1056 KB
50-random09 AC 61 ms 1052 KB
50-random10 AC 65 ms 928 KB