# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
86153 | faceless | Treasure (different grader from official contest) (CEOI13_treasure2) | C++14 | 2 ms | 592 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "treasure.h"
void find (int r1, int c1, int r2, int c2) {
if (r1 == r2 or c1 == c2)
return;
int cnt = countTreasure (r1, c1, r2, c2);
if (cnt == 0)
return;
if (r1 + 1 == r2 and c1 + 1 == c2) {
Report (r1, c1);
return;
}
int mid1 = (r1 + r2) >> 1;
int mid2 = (c1 + c2) >> 1;
find (r1, c1, mid1, mid2);
find (r1, mid2, mid1, c2);
find (mid1, c1, r2, mid2);
find (mid1, mid2, r2, c2);
}
void findTreasure (int N) {
find (1, 1, N + 1, N + 1);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |