# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
234156 | qaws12 | Treasure (different grader from official contest) (CEOI13_treasure2) | C++98 | 6 ms | 384 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |