제출 #1040050

#제출 시각아이디문제언어결과실행 시간메모리
1040050LaMatematica14Rectangles (IOI19_rect)C++17
0 / 100
1 ms348 KiB
#include <bits/stdc++.h> using namespace std; long long count_rectangles(vector<vector<int>> a) { int n = a.size(); int m = a[0].size(); if (n < 3 || m < 3) return 0; long long tot = 0; for (int i = 1; i < m-1; i++) { int mm = 0; for (int j = i; j < m-1; j++) { mm = max(mm, a[1][j]); if (a[0][j] <= a[1][j]) break; if (a[2][j] <= a[1][j]) break; if (a[1][i-1] <= mm) break; if (a[1][j+1] <= mm) break; tot++; } } return tot; }
#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...