Submission #723105

#TimeUsernameProblemLanguageResultExecution timeMemory
723105GrandTiger1729Rectangles (IOI19_rect)C++17
10 / 100
8 ms468 KiB
#include "rect.h" #include <bits/stdc++.h> using namespace std; long long count_rectangles(std::vector<std::vector<int>> g){ int n = g.size(), m = g[0].size(); if (n <= 2 || m <= 2) return 0; int ans = 0; for (int i = 1; i < m - 1; i++){ int maxn = 0; for (int j = i; j < m - 1; j++){ if (min(g[0][j], g[2][j]) <= g[1][j]) break; maxn = max(maxn, g[1][j]); if (min(g[1][i - 1], g[1][j + 1]) > maxn) ans++; } } 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...