Submission #428659

#TimeUsernameProblemLanguageResultExecution timeMemory
428659HazemRectangles (IOI19_rect)C++14
Compilation error
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; }

Compilation message (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)
      |  ^~~