제출 #429011

#제출 시각아이디문제언어결과실행 시간메모리
429011HazemRectangles (IOI19_rect)C++14
10 / 100
13 ms460 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; LL ans = 0; for(int i=1;i<m-1;i++){ int mx = 0; bool q = 1; for(int j=i;j<m-1;j++){ mx = max(mx,a[1][j]); q &= a[1][j]<min(a[0][j],a[2][j]); ans += q&(mx<min(a[1][i-1],a[1][j+1])); } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...