제출 #415302

#제출 시각아이디문제언어결과실행 시간메모리
415302peuchRectangles (IOI19_rect)C++17
10 / 100
5 ms332 KiB
#include "rect.h" #include<bits/stdc++.h> using namespace std; long long count_rectangles(std::vector<std::vector<int> > a) { int n = a.size(); int m = a[0].size(); if(n < 3) return 0; if(n == 3){ long long ans = 0; for(int i = 0; i < m - 1; i++){ int maxi = a[1][i]; for(int j = i; j < m - 1; j++){ if(a[1][j] >= a[0][j] || a[1][j] >= a[2][j]) break; maxi = max(a[1][j], maxi); if(maxi < a[1][i - 1] && maxi < a[1][j + 1]) ans++; } } return ans; } return 0; }
#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...