# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
85670 | chunghan | 매트 (KOI15_mat) | C++17 | 666 ms | 63836 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>
typedef long long int lld;
using namespace std;
class Line {
public:
int P, X, I, H, left, K;
Line(int P, int X, int I, int H, int K) : P(P), X(X), I(I), H(H), K(K) {}
bool operator <(Line m) const{
return this->X < m.X || (this->X == m.K && this->H > m.K);
}
};
vector<Line> L;
int N, W, D[3005][6005], rst = 0;
void solve(int i, int j) {
Line r = L[i], l = L[j];
if(l.X > r.X) return;
int M = 0;
if(l.K != -1) {
if(l.X <= L[r.left].X) {
M = r.K + D[l.I][j];
} else if(l.P != r.P && l.H + r.H <= W) {
if(l.left < r.left)
M = r.K + D[l.I][r.left];
# | 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... |