# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
526422 | benson1029 | Sandcastle 2 (JOI22_ho_t5) | C++14 | 1197 ms | 7884 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
int h,w;
vector< vector<int> > v;
vector< vector<int> > psum[16];
vector< pair< int, pair<int,int> > > lst;
int mxv;
int middle[500005], first[500005], last[500005];
map<int, int> mp;
int dx[4] = {0, 0, 1, -1};
int dy[4] = {1, -1, 0, 0};
bool ok(int x, int y) {
return (x>=1&&x<=h&&y>=1&&y<=w);
}
int find(int id, int X1, int X2, int Y1, int Y2) {
if(X1>X2 || Y1>Y2) return 0;
return psum[id][X2][Y2] - psum[id][X1-1][Y2] - psum[id][X2][Y1-1] + psum[id][X1-1][Y1-1];
}
int main() {
cin >> h >> w;
if(h>w) {
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |