Submission #1102

#TimeUsernameProblemLanguageResultExecution timeMemory
1102comicos줄 세우기 (KOI13_jul)C++98
Compilation error
0 ms0 KiB
#include <stdio.h> #define M 1010000 int a [M],d [M]; int main (void) { // freopen ("input29.txt","r",stdin); // freopen ("output.txt","w",stdout); int n,cnt = 1,max = 0; scanf ("%d",&n); for (int i = 1; i <= n; i++) { scanf ("%d",&a[i]); d [a[i]] = i; } for (i = 1; i <= n; i++) { if (d [i] < d[i + 1]) cnt++; else cnt = 1; if (cnt > max) max = cnt; } printf ("%d",n - max); return 0; }

Compilation message (stderr)

jul.cpp: In function 'int main()':
jul.cpp:22: error: name lookup of 'i' changed for new ISO 'for' scoping
jul.cpp:16: error:   using obsolete binding at 'i'