Submission #292498

#TimeUsernameProblemLanguageResultExecution timeMemory
292498miss_robotRectangles (IOI19_rect)C++14
10 / 100
6 ms512 KiB
#include <bits/stdc++.h> #include "rect.h" #pragma GCC optimize("O3") using namespace std; const int N = 2500, M = 2500; int n, m; long long sol; int f[N][M]; void st5(){ for(int i = 1, mx; i < m-1; i++){ mx = 0; for(int j = i; j < m-1; j++){ mx = max(mx, f[1][j]); if(f[1][j] >= f[1][i-1] || f[1][j] >= f[0][j] || f[1][j] >= f[2][j]) break; if(mx < f[1][j+1]) sol++; } } } long long count_rectangles(vector< vector<int> > a){ n = a.size(), m = a[0].size(); if(n < 3 || m < 3) return 0; for(int i = 0; i < n; i++) for(int j = 0; j < m; j++) f[i][j] = a[i][j]; if(n == 3) st5(); return sol; }
#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...