Submission #911899


Source Code Expand

#pragma GCC optimize("O3")
#pragma GCC target("sse4.2")
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 257 Byte
Status AC
Exec Time 98 ms
Memory 1184 KB

Compile Error

./Main.c: In function ‘main’:
./Main.c:3:36: warning: incompatible implicit declaration of built-in function ‘scanf’ [enabled by default]
./Main.c:3:1: warning: format ‘%lld’ expects argument of type ‘long long int *’, but argument 2 has type ‘long int *’ [-Wformat]
./Main.c:3: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 696 KB
01-maximum AC 58 ms 1056 KB
02-longlong-01 AC 98 ms 1048 KB
02-longlong-02 AC 96 ms 1056 KB
03-kborder01 AC 17 ms 672 KB
03-kborder02 AC 17 ms 796 KB
03-kborder03 AC 17 ms 700 KB
50-random01 AC 73 ms 1184 KB
50-random02 AC 66 ms 1052 KB
50-random03 AC 71 ms 1012 KB
50-random04 AC 84 ms 1180 KB
50-random05 AC 75 ms 1052 KB
50-random06 AC 75 ms 1056 KB
50-random07 AC 79 ms 1052 KB
50-random08 AC 81 ms 1048 KB
50-random09 AC 60 ms 1060 KB
50-random10 AC 66 ms 928 KB