제출 #428659

#제출 시각아이디문제언어결과실행 시간메모리
428659HazemRectangles (IOI19_rect)C++14
컴파일 에러
0 ms0 KiB
#include "rect.h" #include <bits/stdc++.h> #define LL long long using namespace std; const int N = 250; int n,m; int col[N][N][N],row[N][N][N]; long long count_rectangles(std::vector<std::vector<int> > a) { n = a.size();m = a[0].size(); assert( n<=3);  if(n<3) return 0; bool q = 1; LL ans = 0; for(int i=1;i<m-1;i++){ int mx = 0; for(int j=i;j<m-1;j++){ mx = max(mx,a[1][j]); q &= (a[1][j]<a[0][j])&&(a[1][j]<a[2][j]); ans += 0ll+(q&(mx<a[1][i-1]&&mx<a[1][j+1])); } } return ans; }

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

rect.cpp:18:2: error: extended character   is not valid in an identifier
   18 |   if(n<3)
      |  ^
rect.cpp: In function 'long long int count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:18:2: error: ' if' was not declared in this scope
   18 |   if(n<3)
      |  ^~~