# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
66203 | junodeveloper | 조화행렬 (KOI18_matrix) | C++17 | 609 ms | 108692 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>
#define sz(x) ((int)x.size())
#define all(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
typedef long double ld;
const int INF = 1e9 + 10;
int m, n, a[3][200010];
set<pair<int,int> > st[200010];
pair<int,int> p[200010];
bool Check(int k, pair<int,int>& v) {
auto it = st[k].lower_bound({v.first, -INF});
if(it == st[k].begin()) return 0;
--it;
return it->second < v.second;
}
void Push(int k, pair<int,int>& v) {
auto it = st[k].lower_bound({v.first, INF});
if(it != st[k].begin()) {
--it;
if(it->second <= v.second) return;
if(it->first < v.first) ++it;
}
while(it != st[k].end() && it->second >= v.second)
it = st[k].erase(it);
st[k].insert(v);
}
int main() {
scanf("%d%d", &m, &n);
for(int i=0; i<m; i++) for(int j=1; j<=n; j++)
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... |