Submission #362687

#TimeUsernameProblemLanguageResultExecution timeMemory
362687nighthalloTreasure (different grader from official contest) (CEOI13_treasure2)C++14
0 / 100
1 ms364 KiB
#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] == 1){ Report(i, j); } } } }

Compilation message (stderr)

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] == 1){
      |                ~~~~~~~~~~~~^
#Verdict Execution timeMemoryGrader output
Fetching results...