Submission #1042882

#TimeUsernameProblemLanguageResultExecution timeMemory
1042882idasRectangles (IOI19_rect)C++17
10 / 100
3 ms424 KiB
#include "rect.h" #include "bits/stdc++.h" #define FOR(i, begin, end) for(int i=(begin); i<(end); i++) using namespace std; int n, m; long long count_rectangles(std::vector<std::vector<int> > a) { n=a.size(); m=a[0].size(); if(n<=2) return 0; int ans=0; FOR(i, 1, m-1) { int mx=-1; FOR(j, i, m-1) { mx=max(mx, a[1][j]); if(a[0][j]<=a[1][j] || a[1][j]>=a[2][j]) break; if(a[1][i-1]>mx && mx<a[1][j+1]) ans++; } } 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...