제출 #1078348

#제출 시각아이디문제언어결과실행 시간메모리
1078348BoasRectangles (IOI19_rect)C++17
컴파일 에러
0 ms0 KiB
#include "rect.h" long long count_rectangles(vvi a) { int n = a.size(); int m = a[0].size(); ll result = 0; for (int r1 = 1; r1 < n - 1; r1++) { for (int r2 = r1; r2 < n - 1; r2++) { for (int c1 = 1; c1 < m - 1; c1++) { for (int c2 = c1; c2 < m - 1; c2++) { bool success = true; for (int i = r1; i <= r2; i++) { for (int j = c1; j <= c2; j++) { if (a[i][j] >= a[i][c1 - 1] || a[i][j] >= a[i][c2 + 1] || a[i][j] >= a[r1 - 1][j] || a[i][j] >= a[r2 + 1][j]) { success = false; break; } } if (!success) { break; } } if (success) { result++; } } } } } return result; }

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

rect.cpp:3:28: error: 'long long int count_rectangles' redeclared as different kind of entity
    3 | long long count_rectangles(vvi a) {
      |                            ^~~
In file included from rect.cpp:1:
rect.h:7:11: note: previous declaration 'long long int count_rectangles(std::vector<std::vector<int> >)'
    7 | long long count_rectangles(std::vector<std::vector<int> > a);
      |           ^~~~~~~~~~~~~~~~
rect.cpp:3:28: error: 'vvi' was not declared in this scope
    3 | long long count_rectangles(vvi a) {
      |                            ^~~