Submission #518259

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
5182592022-01-23 09:15:02lucriEaster Eggs (info1cup17_eastereggs)C++17
0 / 100
8 ms456 KiB
#include <bits/stdc++.h>
#include "grader.h"
using namespace std;
/*static int N, X, cntQ;
static vector < int > v[1009];
int query (vector < int > h)
{
cntQ ++;
int ap[1009];
if (h.empty ()) return 0;
for (int i=1; i<=N; i++)
ap[i] = 0;
for (auto it = h.begin (); it != h.end (); it ++)
ap[*it] = 1;
queue < int > cc;
cc.push (h[0]), ap[h[0]] = 2;
while (!cc.empty ())
{
int nod = cc.front ();
cc.pop ();
for (auto it = v[nod].begin (); it != v[nod].end (); it ++)
if (ap[*it] == 1)
ap[*it] = 2, cc.push (*it);
}
for (int i=1; i<=N; i++)
if (ap[i] == 1) return -1;
for (auto it = h.begin (); it != h.end (); it ++)
if (*it == X) return 1;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...