244202026-02-11 13:37:43vyrallBizonyításpython3Wrong answer 0/501.1s5684 KiB
n, q = map(int, input().split())

possible = [[False] * n for _ in range(n)]

for _ in range(q):
    t, x, y = map(int, input().split())
    x -= 1
    y -= 1
    if t == 1:
        for i in range(n):
            if possible[i][x]:
                for j in range(n):
                    if possible[y][j]:
                        possible[i][j] = True
    else:
        print("IGEN" if possible[x][y] else "NEM")
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Wrong answer16ms3308 KiB
2Time limit exceeded1.087s4940 KiB
subtask20/10
3Wrong answer30ms3112 KiB
4Wrong answer186ms3556 KiB
5Time limit exceeded1.082s5112 KiB
6Time limit exceeded1.082s4148 KiB
7Time limit exceeded1.08s4104 KiB
8Wrong answer30ms3380 KiB
9Wrong answer25ms3312 KiB
10Wrong answer238ms3380 KiB
11Wrong answer995ms3892 KiB
12Time limit exceeded1.055s4660 KiB
subtask30/15
13Wrong answer16ms3320 KiB
14Wrong answer21ms3320 KiB
15Wrong answer17ms3124 KiB
16Wrong answer19ms3124 KiB
17Wrong answer17ms2976 KiB
18Wrong answer17ms3132 KiB
19Wrong answer17ms2908 KiB
20Wrong answer16ms3112 KiB
21Wrong answer17ms3128 KiB
22Wrong answer18ms3100 KiB
23Wrong answer19ms3120 KiB
24Wrong answer16ms3000 KiB
25Wrong answer20ms3124 KiB
26Wrong answer19ms3128 KiB
27Wrong answer17ms3124 KiB
28Wrong answer17ms2972 KiB
29Wrong answer19ms3004 KiB
30Accepted16ms3140 KiB
31Wrong answer17ms3108 KiB
32Wrong answer16ms3120 KiB
33Wrong answer17ms3144 KiB
34Wrong answer16ms3140 KiB
35Wrong answer16ms3124 KiB
36Wrong answer19ms3124 KiB
37Wrong answer17ms3308 KiB
38Wrong answer17ms3124 KiB
subtask40/25
39Wrong answer16ms3320 KiB
40Time limit exceeded1.1s5140 KiB
41Wrong answer30ms3112 KiB
42Wrong answer186ms3556 KiB
43Time limit exceeded1.082s5112 KiB
44Time limit exceeded1.082s4148 KiB
45Time limit exceeded1.08s4104 KiB
46Wrong answer30ms3380 KiB
47Wrong answer25ms3312 KiB
48Wrong answer238ms3380 KiB
49Wrong answer995ms3892 KiB
50Time limit exceeded1.055s4660 KiB
51Wrong answer21ms3320 KiB
52Wrong answer17ms3124 KiB
53Wrong answer19ms3124 KiB
54Wrong answer17ms2976 KiB
55Wrong answer17ms3132 KiB
56Wrong answer17ms2908 KiB
57Wrong answer16ms3112 KiB
58Wrong answer17ms3128 KiB
59Wrong answer18ms3100 KiB
60Wrong answer19ms3120 KiB
61Wrong answer16ms3000 KiB
62Wrong answer20ms3124 KiB
63Wrong answer19ms3128 KiB
64Wrong answer17ms3124 KiB
65Wrong answer17ms2972 KiB
66Wrong answer19ms3004 KiB
67Accepted16ms3140 KiB
68Wrong answer17ms3108 KiB
69Wrong answer16ms3120 KiB
70Wrong answer17ms3144 KiB
71Wrong answer16ms3140 KiB
72Wrong answer16ms3124 KiB
73Wrong answer19ms3124 KiB
74Wrong answer17ms3308 KiB
75Wrong answer17ms3124 KiB
76Wrong answer442ms3396 KiB
77Wrong answer370ms4184 KiB
78Time limit exceeded1.1s4528 KiB
79Wrong answer425ms3892 KiB
80Time limit exceeded1.083s4148 KiB
81Wrong answer460ms3380 KiB
82Wrong answer648ms3380 KiB
83Time limit exceeded1.077s3636 KiB
84Time limit exceeded1.078s3892 KiB
85Time limit exceeded1.08s4404 KiB
86Wrong answer813ms3640 KiB
87Time limit exceeded1.09s4320 KiB
88Time limit exceeded1.032s3892 KiB
89Time limit exceeded1.08s3892 KiB
90Time limit exceeded1.085s5428 KiB
91Time limit exceeded1.08s4916 KiB
92Time limit exceeded1.087s5428 KiB
93Time limit exceeded1.08s4660 KiB
94Time limit exceeded1.083s5684 KiB
95Time limit exceeded1.082s4916 KiB
96Time limit exceeded1.085s4916 KiB
97Time limit exceeded1.085s4916 KiB
98Time limit exceeded1.087s4916 KiB
99Time limit exceeded1.077s5032 KiB
100Time limit exceeded1.082s4632 KiB
101Time limit exceeded1.08s4660 KiB
102Time limit exceeded1.088s4916 KiB
103Time limit exceeded1.082s4868 KiB
104Time limit exceeded1.087s5000 KiB