| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 28545 | not good but never sad (#68) | LR Springboard (FXCUP2_springboard) | C++98 | 1000 ms | 2084 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "springboard.h"
#include <stdio.h>
#include <algorithm>
#include <vector>
using namespace std;
void Reorder(int N) {
	PutBall((N+1)/2);
	vector<int> cand;
	if (PutBall((N+1)/2) == -1){
		for (int i=(N+1)/2;i<=N;i++) cand.push_back(i);
	}
	else{
		for (int i=0;i<(N+1)/2;i++) cand.push_back(i);
	}
	while (cand.size() > 1){
		int step = (cand.size() + 1) / 2;
		if (cand.back() != N) step = N + 1 - step;
		step %= N+1;
		int r = PutBall(step);
		vector<int> nxt = cand;
		for (int &x : nxt) x = (x + step) % (N+1);
		for (int i=0;i<cand.size();i++){
			if ((cand[i] - nxt[i]) * r < 0){
				cand.erase(cand.begin()+i);
				nxt.erase(nxt.begin()+i);
				i--;
			}
		}
		cand = nxt;
	}
	int push = N-cand[0]+1;
	if (1 <= push && push <= N) PutBall(push);
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
