Submission #86154

#TimeUsernameProblemLanguageResultExecution timeMemory
86154facelessTreasure (different grader from official contest) (CEOI13_treasure2)C++14
0 / 100
3 ms560 KiB
#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 - 1, c2 - 1); 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 timeMemoryGrader output
Fetching results...