111892024-07-16 11:07:23probaParti (75 pont)python3Wrong answer 7/75266ms9316 KiB
# Parti
#N = 8
N = int(input())
hivas = [0]*N
#adatok = ['5 3','4 1','1 5','2 1','3 1','7 8','1 2','3 4']
for i in range(N):
    adatok = input()
    hivas[int(adatok.split(' ')[0])-1] += 1
    hivas[int(adatok.split(' ')[1])-1] += 1
'''
    hivas[int(adatok[i].split(' ')[0])-1] += 1
    hivas[int(adatok[i].split(' ')[1])-1] += 1'''
#print(hivas)
adatok = [str(i+1) for i in range(len(hivas)) if hivas[i] > 1]
print(len(adatok))
print(' '.join(adatok))


          
SubtaskSumTestVerdictTimeMemory
base7/75
1Wrong answer0/018ms2960 KiB
2Wrong answer0/0137ms6096 KiB
3Wrong answer0/317ms3008 KiB
4Accepted3/317ms2916 KiB
5Wrong answer0/317ms3064 KiB
6Wrong answer0/317ms2920 KiB
7Wrong answer0/317ms2820 KiB
8Wrong answer0/418ms2844 KiB
9Wrong answer0/419ms3044 KiB
10Wrong answer0/423ms3044 KiB
11Wrong answer0/419ms3192 KiB
12Wrong answer0/424ms3192 KiB
13Wrong answer0/426ms3196 KiB
14Wrong answer0/427ms3228 KiB
15Wrong answer0/4141ms6204 KiB
16Wrong answer0/4164ms6640 KiB
17Wrong answer0/4187ms7288 KiB
18Wrong answer0/4212ms7876 KiB
19Wrong answer0/4234ms8588 KiB
20Wrong answer0/4266ms9316 KiB
21Wrong answer0/4264ms9252 KiB
22Accepted4/417ms3044 KiB