# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1170251 | nathan4690 | Grapevine (NOI22_grapevine) | C++20 | 908 ms | 168032 KiB |
// Cay nho - GRAPE
// NOI Singapore 2022 Task 4: Grapevine
#include <bits/stdc++.h>
#define ll long long
#define ld long double
#define f1(i,n) for(int i=1;i<=n;i++)
#define __file_name ""
using namespace std;
const ll maxn=1e5+5, inf=1e16;
struct Lazy{
long long data = 0;
Lazy(){};
Lazy(long long data): data(data){};
Lazy operator+(const Lazy &rhs) const{
// Push a lazy down
return Lazy(data + rhs.data);
}
};
struct Value{
long long data = 1e18;
Value(){};
Value(long long data): data(data){};
Value operator+(const Value &rhs) const{
// Merge two nodes
return Value(min(data, rhs.data));
}
Value operator+(const Lazy &rhs) const{
// Apply lazy to node
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |