# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
846697 | eltu0815 | Ants and Sugar (JOI22_sugar) | C++14 | 333 ms | 102604 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 MAX 500005
#define MOD 998244353
#define INF (ll)(1e18)
#define inf (1987654321)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef complex<long double> cpx;
constexpr long double PI = acos(-1);
int q, L;
pii ant[MAX], sugar[MAX];
ll sum[MAX];
ll sugar1[MAX], sugar2[MAX];
struct Node {
int s, e;
ll dp[2][2];
Node() { dp[0][0] = dp[1][0] = dp[0][1] = dp[1][1] = -INF; }
};
Node Merge(Node l, Node r) {
Node ret = Node();
ret.s = l.s, ret.e = r.e;
for(int i = 0; i <= 1; ++i) for(int j = 0; j <= 1; ++j) {
for(int a = 0; a <= 1; ++a) for(int b = 0; b <= 1; ++b) {
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... |