# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
7471 |
2014-08-09T07:46:28 Z |
kipa00 |
행성 탐사 (GA8_planet) |
C++ |
|
0 ms |
1756 KB |
#include "planet.h"
//야! 내가 멍청이다!
//열심히 색칠하시는 분
void ainta() {
int i;
paint(0, 0);
for (i=1; i<=1111; ++i) {
paint(i, 0);
paint(0, i);
}
}
//열심히 종횡조사하시는 분
void sangsoo() {
int i, x = -1, y = -1, ok = 0;
for (i=0; i<=1112; ++i) {
if (ok == 3) break;
if (x >= 0) {
if (ok & 2) count_row(x);
else {
int temp = count_row(x);
if (temp <= 1) {
x += 1;
}
}
} else {
int r = count_row(i);
if (r > 1) {
x = -i + 4444;
ok |= 2;
} else if (r == 1) {
x = (-i * 2) + 4444;
}
}
if (y >= 0) {
if (ok & 1) count_col(y);
else {
int temp = count_col(y);
if (temp <= 1) {
y += 1;
}
}
} else {
int c = count_col(i);
if (c > 1) {
y = -i + 4444;
ok |= 1;
} else if (c == 1) {
y = (-i * 2) + 4444;
}
}
}
report(x % 2222, y % 2222);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1756 KB |
Output isn't correct - count_row(4444)에서 a가 [0, 2221] 구간 안에 없습니다. |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |