Submission #362686

# Submission time Handle Problem Language Result Execution time Memory
362686 2021-02-04T05:54:46 Z nighthallo Treasure (different grader from official contest) (CEOI13_treasure2) C++14
0 / 100
1 ms 364 KB
#include "treasure.h"

void findTreasure (int N) {
    int arr[101][101];

    for(int i = 1 ; i <= N ; i++){
        for(int j = 1 ; j <= N ; j++){
            arr[i][j] = countTreasure(i, j, i, j);
        }
    }
    for(int i = 1 ; i <= N ; i++){
        for(int j = 1 ; j <= N ; j++){
            if(arr[101][101]){
                Report(i, j);
            }
        }
    }
}

Compilation message

treasure.cpp: In function 'void findTreasure(int)':
treasure.cpp:13:28: warning: array subscript 101 is above array bounds of 'int [101]' [-Warray-bounds]
   13 |             if(arr[101][101]){
      |                ~~~~~~~~~~~~^
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 5
2 Incorrect 1 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 6
3 Incorrect 1 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 1
4 Incorrect 0 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 1
5 Incorrect 0 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 3
6 Incorrect 1 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 1
7 Incorrect 1 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 1
8 Incorrect 1 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 72
9 Incorrect 1 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 2
10 Incorrect 1 ms 364 KB Error - no treasure at (r, c) : r = 1, c = 3