답안 #71609

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
71609 2018-08-25T08:32:34 Z 윤교준(#2220) 행성 탐사 (GA8_planet) C++11
96.8 / 100
1282 ms 1288 KB
#include "planet.h"
#include <bits/stdc++.h>
using namespace std;
int rd(int s, int e) { return rand() % (e-s+1) + s; }

inline int f(int i) {
	if(i < 0) return 2222+i;
	if(2222 <= i) return i-2222;
	return i;
}

void ainta() {
	for(int i = 0; i < 104; i++) paint(f(-i), f(-i));
}

void sangsoo() {
	srand(time(0));
	int dx = rd(0, 2221), dy = rd(0, 2221);
	int x = -1, y = -1, ll = -1;

	{
		int i = 0;
		for(int t;; i++) {
			t = count_row(f(i*(i+1)/2 + dx));
			if(t) break;
		}
		int s = i*(i+1)/2 + dx, e = s+i;
		for(int m; s < e;) {
			m = (s+e+1) >> 1; i++;
			if(count_row(f(m))) s = m;
			else e = m-1;
		}
		x = s;
		ll = i+1;
	}

	{
		int i = 0, idx = dy;
		for(int t;; i++) {
			t = count_col(f(idx));
			if(t) break;
			idx += ll+i+1;
		}
		int s = idx, e = idx+ll+i;
		for(int m; s < e;) {
			m = (s+e+1) >> 1;
			if(count_col(f(m))) s = m;
			else e = m-1;
		}
		y = s;
	}

	report(f(x), f(y));
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 102 ms 1016 KB Output is partially correct: max_calls = 106
2 Partially correct 104 ms 1128 KB Output is partially correct: max_calls = 106
3 Partially correct 112 ms 1184 KB Output is partially correct: max_calls = 106
4 Partially correct 113 ms 1184 KB Output is partially correct: max_calls = 106
5 Partially correct 112 ms 1184 KB Output is partially correct: max_calls = 106
6 Partially correct 105 ms 1184 KB Output is partially correct: max_calls = 106
7 Partially correct 103 ms 1184 KB Output is partially correct: max_calls = 106
8 Partially correct 112 ms 1232 KB Output is partially correct: max_calls = 106
9 Partially correct 106 ms 1232 KB Output is partially correct: max_calls = 106
10 Partially correct 109 ms 1232 KB Output is partially correct: max_calls = 106
11 Partially correct 112 ms 1260 KB Output is partially correct: max_calls = 106
12 Partially correct 116 ms 1264 KB Output is partially correct: max_calls = 106
13 Partially correct 116 ms 1264 KB Output is partially correct: max_calls = 106
14 Partially correct 132 ms 1288 KB Output is partially correct: max_calls = 106
15 Partially correct 153 ms 1288 KB Output is partially correct: max_calls = 106
16 Partially correct 110 ms 1288 KB Output is partially correct: max_calls = 106
17 Partially correct 113 ms 1288 KB Output is partially correct: max_calls = 106
18 Partially correct 108 ms 1288 KB Output is partially correct: max_calls = 106
19 Partially correct 118 ms 1288 KB Output is partially correct: max_calls = 106
20 Partially correct 197 ms 1288 KB Output is partially correct: max_calls = 106
# 결과 실행 시간 메모리 Grader output
1 Partially correct 1058 ms 1288 KB Output is partially correct: max_calls = 106
2 Partially correct 1032 ms 1288 KB Output is partially correct: max_calls = 106
3 Partially correct 1020 ms 1288 KB Output is partially correct: max_calls = 106
4 Partially correct 1028 ms 1288 KB Output is partially correct: max_calls = 106
5 Partially correct 1053 ms 1288 KB Output is partially correct: max_calls = 106
6 Partially correct 1008 ms 1288 KB Output is partially correct: max_calls = 106
7 Partially correct 1030 ms 1288 KB Output is partially correct: max_calls = 106
8 Partially correct 1084 ms 1288 KB Output is partially correct: max_calls = 106
9 Partially correct 1068 ms 1288 KB Output is partially correct: max_calls = 106
10 Partially correct 1109 ms 1288 KB Output is partially correct: max_calls = 106
11 Partially correct 297 ms 1288 KB Output is partially correct: max_calls = 106
12 Partially correct 1174 ms 1288 KB Output is partially correct: max_calls = 106
13 Partially correct 1098 ms 1288 KB Output is partially correct: max_calls = 106
14 Partially correct 1131 ms 1288 KB Output is partially correct: max_calls = 106
15 Partially correct 1194 ms 1288 KB Output is partially correct: max_calls = 106
16 Partially correct 1194 ms 1288 KB Output is partially correct: max_calls = 106
17 Partially correct 1282 ms 1288 KB Output is partially correct: max_calls = 106
18 Partially correct 1133 ms 1288 KB Output is partially correct: max_calls = 106
19 Partially correct 1120 ms 1288 KB Output is partially correct: max_calls = 106
20 Partially correct 1064 ms 1288 KB Output is partially correct: max_calls = 106
21 Partially correct 1254 ms 1288 KB Output is partially correct: max_calls = 106
22 Partially correct 1095 ms 1288 KB Output is partially correct: max_calls = 106
23 Partially correct 1128 ms 1288 KB Output is partially correct: max_calls = 106