제출 #383932

#제출 시각아이디문제언어결과실행 시간메모리
383932wp1270보물 찾기 (CEOI13_treasure2)C11
컴파일 에러
0 ms0 KiB
#include "treasure.h" int t[102][102]; void findTreasure(int N) { int center = N / 2; for (int i = center; i <= N; i++) { for (int j = center; j <= N; j++) { t[i][j] = countTreasure(1, 1, i, j); } } for (int i = center; i <= N; i++) { for (int j = 1; j < center; j++) { t[i][j] = t[i][N] - countTreasure(1, j + 1, i, N); } } for (int i = 1; i < center; i++) { for (int j = center; j <= N; j++) { t[i][j] = t[N][j] - countTreasure(i + 1, 1, N, j); } } for (int i = 1; i < center; i++) { for (int j = 1; j < center; j++) { t[i][j] = t[N][j] + t[i][N] + countTreasure(i + 1, j + 1, N, N) - t[N][N]; } } for (int i = 1; i <= N; i++) { for (int j = 1; j <= N; j++) { if (t[i][j] - t[i - 1][j] - t[i][j - 1] + t[i - 1][j - 1]) { Report(i, j); } } } }

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

grader.c: In function 'main':
grader.c:63:19: error: expected expression before 'int'
   63 |         my_assert(int(strlen(A[i]+1)) == N, "each line of the map must contain N zeroes or ones (before loop)");
      |                   ^~~
grader.c:63:9: error: too few arguments to function 'my_assert'
   63 |         my_assert(int(strlen(A[i]+1)) == N, "each line of the map must contain N zeroes or ones (before loop)");
      |         ^~~~~~~~~
grader.c:18:6: note: declared here
   18 | void my_assert (int a, const char* s) {
      |      ^~~~~~~~~