제출 #954705

#제출 시각아이디문제언어결과실행 시간메모리
954705waldiRectangles (IOI19_rect)C++17
18 / 100
5043 ms28284 KiB
#include "rect.h" #include <bits/stdc++.h> #define FOR(i,p,k) for(int i=(p);i<=(k);++i) #define REP(i,n) FOR(i,0,(n)-1) #define ssize(x) (int((x).size())) #define all(x) (x).begin(),(x).end() #define fi first #define se second using namespace std; typedef long long ll; typedef pair<int, int> pii; ll count_rectangles(vector<vector<int>> wej){ int n = ssize(wej); int m = ssize(wej[0]); if(n<3 || m<3) return 0ll; ll wyn = 0ll; FOR(lewo, 1, m-2) FOR(prawo, lewo, m-2){ FOR(gora, 1, n-2) FOR(dol, gora, n-2){ bool git = 1; FOR(i, gora, dol) FOR(j, lewo, prawo){ if(wej[i][j] >= wej[i][lewo-1]) git = 0; if(wej[i][j] >= wej[i][prawo+1]) git = 0; if(wej[i][j] >= wej[gora-1][j]) git = 0; if(wej[i][j] >= wej[dol+1][j]) git = 0; } if(git) ++wyn; } } return wyn; }
#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...