Submission #247221

#TimeUsernameProblemLanguageResultExecution timeMemory
247221tictaccatRectangles (IOI19_rect)C++14
0 / 100
5 ms384 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 <= 2) return 0; int cnt = 0; for (int i = 0; i < m-1; i++) { int mx = a[1][i+1]; for (int j = i+2; j < m; j++) { if (a[0][j-1] <= a[1][j-1] || a[2][j-1] <= a[1][j-1]) break; if (a[1][j] > mx) { mx = a[1][j]; cnt++; if (mx >= a[1][i]) break; } } break; } return cnt; }
#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...