제출 #161800

#제출 시각아이디문제언어결과실행 시간메모리
161800andrewRectangles (IOI19_rect)C++17
0 / 100
20 ms376 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])continue;; if(a[1][i - 1] > mx && mx < a[1][j + 1])ans = max(ans, j - i + 1); } } 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...