제출 #971820

#제출 시각아이디문제언어결과실행 시간메모리
971820opPORectangles (IOI19_rect)C++14
0 / 100
5 ms556 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) { if (mx < a[1][l] && mx < a[1][r]) { res++; } } 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...