# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
535214 |
2022-03-09T17:09:32 Z |
rainboy |
라멘 (JOI14_ramen) |
C |
|
1 ms |
284 KB |
#include "ramen.h"
void Ramen(int n) {
int i, x, y;
x = -1, y = -1;
for (i = 0; i < n; i += 2) {
int u = i, v = i + 1 < n ? i + 1 : i, tmp;
if (u != v && Compare(u, v) > 0)
tmp = u, u = v, v = tmp;
if (x == -1 || Compare(x, u) > 0)
x = u;
if (y == -1 || Compare(y, v) < 0)
y = v;
}
Answer(x, y);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
280 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
0 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
0 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
284 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
1 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |