# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
5251 |
2014-02-24T09:50:26 Z |
jihoon |
줄 세우기 (KOI13_jul) |
C++ |
|
152 ms |
8900 KB |
#include<cstdio>
int mx=1;
int dp[1000001][2]={0};
int main(){
int n,i,ia;
scanf("%d",&n);
for(i=0;i<n;i++){
scanf("%d",&dp[i][0]);
}
dp[0][1]=1;
for(i=1;i<n;i++){
if(dp[i][0]>dp[i-1][0]&&(dp[i][0]!=n||i==n-1)&&dp[i][0]!=1){
dp[i][1]=dp[i-1][1]+1;
if(mx<dp[i][1]) mx=dp[i][1];
}else{
dp[i][1]=1;
}
}
printf("%d",n-mx);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
8900 KB |
Output is correct |
2 |
Incorrect |
0 ms |
8900 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
8900 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
8900 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
8900 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
76 ms |
8900 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
152 ms |
8900 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |