제출 #832823

#제출 시각아이디문제언어결과실행 시간메모리
832823Marco_EscandonRectangles (IOI19_rect)C++17
컴파일 에러
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; typedef long long ll; long long count_rectangles(std::vector<std::vector<int> > a) { ll n=a[0].size(); ll cont=0; if(n<3||m<3) return 0; for(int i=1; i<n-1; i++) { ll ma=0; for(int j=i; j<n-1; j++) { ma=max(ma,(ll)a[1][j]); if(a[1][j]>=a[0][j]||a[1][j]>=a[2][j]) break; if(ma<a[1][i-1]&&ma<a[1][j+1]) cont++; } } return cont; }

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

rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:8:13: error: 'm' was not declared in this scope
    8 |     if(n<3||m<3)
      |             ^
rect.cpp:8:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
    8 |     if(n<3||m<3)
      |     ^~
rect.cpp:10:2: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   10 |  for(int i=1; i<n-1; i++)
      |  ^~~