# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
71269 | 3zp | 매트 (KOI15_mat) | C++14 | 1088 ms | 12924 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 pii pair<int,int>
#define F first
#define S second
using namespace std;
vector<pair<pii,pii> > a, b;
int dp[3009][3009], ans;
int al[3009], ar[3009], ah[3009], ac[3009];
int bl[3009], br[3009], bh[3009], bc[3009];
main(){
a . push_back ({{-1, -1}, {1 , 1}});
b . push_back ({{-1, -1}, {1 , 1}});
int n, w;
cin >> n >> w;
for(int i = 0; i < n; i++){
int p, l, r, h, c;
cin >> p >> l >> r >> h >> c;
pair<pii, pii > x = { { l , r } , { h , c } };
if(p == 0) a .push_back( x );
else b .push_back( x);
}
a.push_back({{1e9,1e9}, {0,0}});
b.push_back({{1e9,1e9}, {0,0}});
int x = a.size(), y = b.size();
sort(a.begin(), a.end());
sort(b.begin(), b.end());
dp[0][0] = 0;
for(int i = 0; i < x; i++)
al[i] = a[i].F.F,
ar[i] = a[i].F.S,
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... |