제출 #607386

#제출 시각아이디문제언어결과실행 시간메모리
607386ShithilaRectangles (IOI19_rect)C++14
10 / 100
4 ms340 KiB
#include "rect.h" long long count_rectangles(std::vector<std::vector<int> > a) { int n=a.size(); if(n<3) { return 0; } int m=a[0].size(); int ans=0; for(int i=1;i<m-1;i++) { int frontbound=a[1][i-1]; int max=0; int j=i; { while(j<m-1) { if(max<a[1][j]) { max=a[1][j]; } if(a[1][j]>=a[0][j] || a[1][j]>=a[2][j]) { break; } else if(max>=frontbound || max>=a[1][j+1]) { j++; } else { //cout<<i<<" "<<j<<endl; ans++; j++; } } } } 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...