# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
878015 | noiaint | Papričice (COCI20_papricice) | C++17 | 133 ms | 45276 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 long long long
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define debug(...) 520
#endif
const int N = 1e6 + 5;
const int MOD = 1e9 + 7; // 998244353
const int inf = INT_MAX; // LLONG_MAX
const int LOG = 25; // LOG + 1
template<class T> bool minimize(T &a, T b) { return a > b ? (a = b, true) : false; }
template<class T> bool maximize(T &a, T b) { return a < b ? (a = b, true) : false; }
template<class T> bool add(T &a, T b) { a += b; while (a > MOD) a -= MOD; return true; }
int n;
vector<int> g[N];
int s[N];
int ans = 0;
void DFS(int u, int p) {
s[u] = 1;
for (int v : g[u]) if (v != p) {
DFS(v, u);
s[u] += s[v];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |