Submission #161801

#TimeUsernameProblemLanguageResultExecution timeMemory
161801andrewRectangles (IOI19_rect)C++17
10 / 100
13 ms504 KiB
#include <bits/stdc++.h> #include "rect.h" #define fi first #define se second #define pll pair<ll, ll> #define pii pair<int, int> using namespace std; typedef long long ll; typedef long double ld; const ll MAXN = 1123456; const ll N = 2e5; long long count_rectangles(vector<vector<int> > a) { ll n = a.size(), m = a[0].size(); if(n < 3)return 0; if(n == 3){ int ans = 0, mx = 0; for(int i = 1; i < m - 1; i++){ mx = 0; for(int j = i; j < m - 1; j++){ mx = max(mx, a[1][j]); if(a[0][j] <= a[1][j] || a[2][j] <= a[1][j])break; if(a[1][i - 1] > mx && mx < a[1][j + 1])ans++; } } return ans; } return 1; }
#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...