# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
18870 |
2016-02-16T06:06:27 Z |
choyi0521 |
라멘 (JOI14_ramen) |
C++ |
|
0 ms |
1124 KB |
#include "ramen.h"
void Ramen(int N) {
int l, r;
l = r = N%2?N - 1:-1;
for (int i = 1; i < N; i += 2) {
int x=i-1, y=i;
if (Compare(x, y) == 1) x ^= y ^= x ^= y;
if (l==-1||Compare(l,x) == 1) l = x;
if (r==-1||Compare(y,r) == 1) r = y;
}
Answer(l, r);
}
# |
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 |