Submission #258639

# Submission time Handle Problem Language Result Execution time Memory
258639 2020-08-06T09:50:00 Z dolphingarlic Treasure (different grader from official contest) (CEOI13_treasure2) C++14
56 / 100
1 ms 384 KB
#include "treasure.h"

int pref[101][101];

void findTreasure(int N) {
    for (int i = N; i; i--) for (int j = N; j; j--) {
        if (i > N / 2) {
            if (j > N / 2) pref[i][j] = countTreasure(1, 1, i, j);
            else pref[i][j] = pref[i][N] - countTreasure(1, j + 1, i, N);
        } else {
            if (j > N / 2) pref[i][j] = pref[N][j] - countTreasure(i + 1, 1, N, j);
            else pref[i][j] = countTreasure(1, 1, i, j);
        }
    }
    for (int i = N; i; i--) for (int j = N; j; j--) {
        if (pref[i][j] + pref[i - 1][j - 1] - pref[i - 1][j] - pref[i][j - 1]) Report(i, j);
    }
}
# Verdict Execution time Memory Grader output
1 Partially correct 0 ms 384 KB Output is partially correct - N = 5, K = 329, score = 8
2 Partially correct 0 ms 384 KB Output is partially correct - N = 10, K = 5475, score = 8
3 Partially correct 0 ms 384 KB Output is partially correct - N = 15, K = 27434, score = 8
4 Partially correct 0 ms 384 KB Output is partially correct - N = 16, K = 36096, score = 8
5 Partially correct 0 ms 384 KB Output is partially correct - N = 55, K = 5087854, score = 4
6 Partially correct 0 ms 384 KB Output is partially correct - N = 66, K = 10605771, score = 4
7 Partially correct 1 ms 384 KB Output is partially correct - N = 77, K = 19608305, score = 4
8 Partially correct 0 ms 384 KB Output is partially correct - N = 88, K = 33570240, score = 4
9 Partially correct 1 ms 384 KB Output is partially correct - N = 99, K = 53679452, score = 4
10 Partially correct 1 ms 384 KB Output is partially correct - N = 100, K = 56010000, score = 4