# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
16796 |
2015-09-29T08:50:45 Z |
kdh9949 |
라멘 (JOI14_ramen) |
C++ |
|
0 ms |
1124 KB |
#include "ramen.h"
int big[201],small[201],mx,mn;
void Ramen(int N) {
if(N==1){
Answer(0,0);
return;
}
for(int i=0;i<N/2;i++){
if(Compare(2*i,2*i+1)==1){
big[i]=2*i;
small[i]=2*i+1;
}
else{
big[i]=2*i+1;
small[i]=2*i;
}
}
if(N%2)big[N/2]=small[N/2]=N-1;
mx=big[0];
mn=small[0];
for(int i=1;i<N/2+N%2;i++){
if(Compare(big[i],mx)==1)mx=big[i];
}
for(int i=1;i<N/2+N%2;i++){
if(Compare(small[i],mn)==-1)mn=small[i];
}
Answer(mn,mx);
}
# |
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 |
# |
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 |