# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
13874 |
2015-04-09T07:20:27 Z |
gs14004 |
행성 탐사 (GA8_planet) |
C++14 |
|
0 ms |
1752 KB |
#include "planet.h"
const int EE = 2222;
void ainta() {
for (int i=0; i<66; i++) {
paint(i,0);
}
for (int i=0; i<66; i++) {
paint(0,i);
}
for (int i=0; i<7 + 34 - 66 + 7 + 34; i++) {
paint(0,0);
}
}
void sangsoo() {
for(int i=0; i<66; i++){
count_row(42);
}
int posx = 0;
for (int i=0; i<34; i++) {
if(count_row(i * 66 % EE)) posx = 66 * i % EE; // step 2.
}
int s = 0, e = 65;
for(int i=0; i<7; i++){
if(s == e){
count_row(42);
continue;
}
int m = (s+e+1) / 2;
int new_pos = (posx + EE - m) % EE;
if(count_row(new_pos)) s = m;
else e = m-1;
}
posx = (posx + EE - s) % EE;
int posy = 0;
for (int i=0; i<34; i++) {
if(count_col(66 * i % EE)) posy = 66 * i % EE; // step 2.
}
s = 0, e = 65;
for(int i=0; i<7; i++){
if(s == e){
count_row(42);
continue;
}
int m = (s+e+1) / 2;
int new_pos = (posy + EE - m) % EE;
if(count_col(new_pos)) s = m;
else e = m-1;
}
posy = (posy + EE - s) % EE;
report(posx,posy);
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
1752 KB |
Output isn't correct - ?듭씠 ??젮???꾨줈洹몃옩??醫낅즺?⑸땲?? |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Halted |
0 ms |
0 KB |
- |