Submission #6004

# Submission time Handle Problem Language Result Execution time Memory
6004 2014-06-14T02:17:29 Z kriii 라멘 (JOI14_ramen) C++
0 / 100
0 ms 1124 KB
#include "ramen.h"
#include <vector>

void Ramen(int N) {
	int l=-1,r=-1;
	if (N % 2) l = r = N-1;
	for (int i=0;i<N;i+=2){
		int x = i, y = i + 1, t;
		if (Compare(i,i+1) == 1) t = x, x = y, y = t;
		if (l == -1 || Compare(x,l) == -1) l = x;
		if (r == -1 || Compare(r,y) == -1) r = y;
	}
	Answer(l,r);
}

Compilation message


# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1124 KB Wrong Answer [1]
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 1124 KB Wrong Answer [1]
2 Halted 0 ms 0 KB -
# 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 -