Submission #71546

# Submission time Handle Problem Language Result Execution time Memory
71546 2018-08-25T05:41:27 Z 윤교준(#2220) 행성 탐사 (GA8_planet) C++11
0 / 100
4 ms 888 KB
#include "planet.h"
#include <bits/stdc++.h>
using namespace std;

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 < 101; i++) paint(f(-i), f(-i));
}

void sangsoo() {
	int x = -1, y = -1, ll = -1;

	{
		int i = 0;
		for(int t;; i++) {
			t = count_row(f(i*(i+1)/2));
			if(t) break;
		}
		int s = i*(i+1)/2, 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+2;
	}

	{
		int i = 0, idx = 0;
		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(x, y);
}
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 888 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 888 KB Output isn't correct
2 Halted 0 ms 0 KB -