# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
140610 | Minnakhmetov | Zoltan (COCI16_zoltan) | C++14 | 343 ms | 9968 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;
#define ll long long
#define all(aaa) aaa.begin(), aaa.end()
const int MOD = 1e9 + 7;
struct Node {
int val, w;
};
Node operator + (Node a, Node b) {
if (a.val == b.val) {
if (a.val == 0)
return { 0, 1 };
Node c = { a.val, a.w + b.w };
if (c.w >= MOD)
c.w -= MOD;
return c;
}
if (a.val > b.val)
return a;
return b;
}
const int N = 2e5 + 5;
Node t[N * 4], mxr[N];
vector<int> vd;
int a[N];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |