锦标赛AI (CI翻译)
The tournament «Sleepyhead-2010» in the rapid falling asleep has just finished in Berland. $*n*$ best participants from the country have participated in it. The tournament consists of games, each of them is a match between two participants. $*n*·(*n* - 1) / 2$ games were played during the tournament, and each participant had a match with each other participant.
伯兰国的快速入睡锦标赛 «Sleepyhead-2010» 刚刚结束。来自全国的 $*n*$ 名优秀参赛者参加了比赛。锦标赛由若干场比赛组成,每场比赛由两名参赛者进行。锦标赛期间共进行了 $*n*·(*n* - 1) / 2$ 场比赛,每名参赛者都与其他每名参赛者进行了一场比赛。AI (CI翻译)
The rules of the game are quite simple — the participant who falls asleep first wins. The secretary made a record of each game in the form «$*x*_{*i*}$ $*y*_{*i*}$», where $*x*_{*i*}$ and $*y*_{*i*}$ are the numbers of participants. The first number in each pair is a winner (i.e. $*x*_{*i*}$ is a winner and $*y*_{*i*}$ is a loser). There is no draws.
比赛规则非常简单——先入睡的参赛者获胜。秘书以 «$*x*_{*i*}$ $*y*_{*i*}$» 的形式记录了每场比赛的结果,其中 $*x*_{*i*}$ 和 $*y*_{*i*}$ 是参赛者的编号。每对编号中的第一个是获胜者(即 $*x*_{*i*}$ 获胜,$*y*_{*i*}$ 失败)。比赛不存在平局。AI (CI翻译)
Recently researches form the «Institute Of Sleep» have found that every person is characterized by a value $*p*_{*j*}$ — the speed of falling asleep. The person who has lower speed wins. Every person has its own value $*p*_{*j*}$, constant during the life.
最近,「睡眠研究所」的研究发现,每个人都有一个表示入睡速度的值 $*p*_{*j*}$。入睡速度较低的人获胜。每个人都有自己独有的值 $*p*_{*j*}$,并且该值终生不变。AI (CI翻译)
It is known that all participants of the tournament have distinct speeds of falling asleep. Also it was found that the secretary made records about all the games except one. You are to find the result of the missing game.
已知锦标赛所有参赛者的入睡速度各不相同。此外还发现,秘书记录了除一场比赛外的所有比赛结果。请你找出缺失比赛的结果。AI (CI翻译)
Input
输入格式
AI (CI翻译)The first line contains one integer $*n*$ ($3 ≤ *n* ≤ 50$) — the number of participants. The following $*n*·(*n* - 1) / 2 - 1$ lines contain the results of the games. Each game is described in a single line by two integers $*x*_{*i*}, *y*_{*i*}$ ($1 ≤ *x*_{*i*}, *y*_{*i*} ≤ *n*, *x*_{*i*} ≠ *y*_{*i*}$), where $*x*_{*i*}$ и $*y*_{*i*}$ are the numbers of the opponents in this game. It is known that during the tournament each of the $*n*$ participants played $*n* - 1$ games, one game with each other participant.
第一行包含一个整数 $*n*$($3 ≤ *n* ≤ 50$),表示参赛者的数量。接下来的 $*n*·(*n* - 1) / 2 - 1$ 行包含各场比赛的结果。每场比赛用一行中的两个整数 $*x*_{*i*}, *y*_{*i*}$($1 ≤ *x*_{*i*}, *y*_{*i*} ≤ *n*$,$*x*_{*i*} ≠ *y*_{*i*}$)表示,其中 $*x*_{*i*}$ 和 $*y*_{*i*}$ 是这场比赛中两名对手的编号。已知在锦标赛期间,每名参赛者都进行了 $*n* - 1$ 场比赛,且与其他每名参赛者各进行了一场比赛。AI (CI翻译)
Output
输出格式
AI (CI翻译)Output two integers $*x*$ and $*y*$ — the missing record. If there are several solutions, output any of them.
输出两个整数 $*x*$ 和 $*y*$,表示缺失的记录。如果有多个答案,输出任意一个即可。AI (CI翻译)
样例
4
4 2
4 1
2 3
2 1
3 1
4 3
题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。