제출 #240884

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