제출 #310780

#제출 시각아이디문제언어결과실행 시간메모리
310780Fischer보물 찾기 (CEOI13_treasure2)C++14
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "treasure.h" using namespace std; const int maxn = 110; int acc[maxn][maxn]; bool mat[maxn][maxn]; void findTreasure(int n) { for (int i = 1; i <= n; ++i) { for (int j = 1; j <= n; ++j) { if (i <= n/2 && j <= n/2) acc[i][j] = countTreasure(1, 1, i, n) - acc[i][j-1]; else if (i <= n/2) acc[i][j] = countTreasure(1, 1, i, j); else if (j <= n/2) acc[i][j] = countTreasure(1, 1, i, j); else acc[i][j] = countTreasure(1, 1, i, j); } } for (int i = 1; i <= n; ++i) { for (int j = 1; j <= n; ++j) { mat[i][j] = acc[i][j] - acc[i-1][j] - acc[i][j-1] + acc[i-1][j-1]; } } for (int i = 1; i <= n; ++i) { for (int j = 1; j <= n; ++j) { if (mat[i][j]) report(i, j); } } }

컴파일 시 표준 에러 (stderr) 메시지

treasure.cpp: In function 'void findTreasure(int)':
treasure.cpp:25:28: error: 'report' was not declared in this scope; did you mean 'Report'?
   25 |             if (mat[i][j]) report(i, j);
      |                            ^~~~~~
      |                            Report