# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
862695 | Youssif_Elkadi | Logičari (COCI21_logicari) | C++17 | 259 ms | 524288 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;
const long long N = 1e5 + 5, mod = 1e9 + 7;
vector<long long> adj[N];
vector<long long> cy;
long long dp[N][4], dp2[N][5][5];
bool vis[N];
long long par[N];
long long n, hi;
void cyc(long long u)
{
vis[u] = 1;
for (auto v : adj[u])
{
if (v == par[u])
continue;
par[v] = u;
if (vis[v])
hi = v;
if (hi)
return;
cyc(v);
}
vis[u] = 0;
}
void calc(long long u, long long p)
{
bool flag = 0;
long long cnt[4] = {}, sum[4] = {};
for (auto v : adj[u])
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... |