# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
234156 | qaws12 | Treasure (different grader from official contest) (CEOI13_treasure2) | C++98 | 6 ms | 384 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"
#define MAP 101
int map[MAP][MAP];
void findTreasure(int N) {
for (int i = N; i > 0; i-- ) {
for (int j = N; j > 0; j-- ) {
map[i][j] = countTreasure(1,1, i, j);
}
}
for (int i = N; i > 1; i--) {
for (int j = N; j > 1; j--) {
int answer = map[i][j] - map[i - 1][j] - map[i][j - 1] + map[i - 1][j - 1];
if (answer == 1) {
Report(i, j);
}
}
}
for (int i = N;i>1; i--) {
int answer = map[1][i] - map[1][i - 1];
if (answer == 1) {
Report(1, i);
}
answer = map[i][1] - map[i - 1][1];
if (answer == 1) {
Report(i, 1);
}
}
if (map[1][1] == 1) {
Report(1, 1);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |