# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
19130 |
2016-02-18T17:02:32 Z |
eaststar |
라멘 (JOI14_ramen) |
C++14 |
|
0 ms |
1124 KB |
#include "ramen.h"
void Ramen(int n){
int i,m=0,M=1;
if(Compare(0,1)>0)M=0,m=1;
for(i=2;i+1<n;i+=2){
if(Compare(i,i+1)>0){
M=(Compare(i,M)>0?i:M);
m=(Compare(i+1,m)<0?i+1:m);
}
else{
M=(Compare(i+1,M)>0?i+1:M);
m=(Compare(i,m)<0?i:m);
}
}
if(n%2){
M=(Compare(n-1,M)>0?n-1:M);
m=(Compare(n-1,m)<0?n-1:m);
}
Answer(m,M);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1124 KB |
Output is correct |
2 |
Incorrect |
0 ms |
1124 KB |
Wrong Answer [1] |
3 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1124 KB |
Output is correct |
2 |
Correct |
0 ms |
1124 KB |
Output is correct |
3 |
Correct |
0 ms |
1124 KB |
Output is correct |
4 |
Correct |
0 ms |
1124 KB |
Output is correct |
5 |
Correct |
0 ms |
1124 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1124 KB |
Output is correct |
2 |
Correct |
0 ms |
1124 KB |
Output is correct |
3 |
Correct |
0 ms |
1124 KB |
Output is correct |
4 |
Correct |
0 ms |
1124 KB |
Output is correct |
5 |
Correct |
0 ms |
1124 KB |
Output is correct |