Submission #971822

#TimeUsernameProblemLanguageResultExecution timeMemory
971822opPORectangles (IOI19_rect)C++14
10 / 100
5 ms348 KiB
#include "rect.h" #include <bits/stdc++.h> #define sz(x) (int)x.size() using namespace std; long long count_rectangles(vector<vector<int>> a) { int n = sz(a); int m = sz(a[0]); if (n <= 2 || m <= 2) { return 0; } if (n == 3) { long long res = 0; for (int l = 0; l < m; l++) { int mx = -1e9; for (int r = l + 1; r < m; r++) { if (r - l > 1 && mx < a[1][l] && mx < a[1][r]) { res++; } if (a[1][r] >= a[0][r] || a[1][r] >= a[2][r]) break; mx = max(mx, a[1][r]); } } return res; } return 0; } /* g++ -std=gnu++14 -O2 -Wall -pipe -static -o "rect" "grader.cpp" "rect.cpp" */
#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...