# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
599945 | Hanksburger | Werewolf (IOI18_werewolf) | C++17 | 564 ms | 58484 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 "werewolf.h"
#include <bits/stdc++.h>
using namespace std;
int b[200005][18], c[200005][18], deg[200005], pos[200005], a[200005];
vector<int> adj[400005], ans;
bool ok[400005];
queue<int> q;
vector<int> check_validity(int n, vector<int> x, vector<int> y, vector<int> s, vector<int> e, vector<int> l, vector<int> r)
{
if (n<=3000 && x.size()<=6000 && s.size()<=3000)
{
for (int i=0; i<x.size(); i++)
{
adj[x[i]].push_back(y[i]);
adj[y[i]].push_back(x[i]);
adj[n+x[i]].push_back(n+y[i]);
adj[n+y[i]].push_back(n+x[i]);
}
for (int i=0; i<n; i++)
adj[i].push_back(n+i);
for (int i=0; i<s.size(); i++)
{
for (int j=0; j<n*2; j++)
ok[j]=0;
ok[s[i]]=1;
q.push(s[i]);
while (!q.empty())
{
int u=q.front();
q.pop();
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... |