# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
3598 | movie_jo | Cactus? Not cactus? (kriii1_C) | C11 | 28 ms | 2260 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 <stdio.h>
int x[100001];
int group[100001], gl = 1;
int cycle[100001];
int main(void)
{
int N, M, i, a, b, y, z, chk = 0;
scanf("%d %d", &N, &M);
for(i = 0; i < M; i++)
{
scanf("%d %d", &a, &b);
if(chk)
continue;
if(x[a])
{
if(x[b])
{
y = x[a];
z = x[b];
while(group[y] != y)
y = group[y];
while(group[z] != z)
z = group[z];
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |