.

International Olympiad in Informatics 2009 - tasks and solutions

作者:
V.Tzanov, K.Hultquist, E.Keledjiev, I.Chernov, B.Bantchev, L.Fan, R.Peng, B.Merry, M.Patrascu, K.Imajo
ISBN :
出版日期:
2011-04-23 00:00:00
语言:
国家地区:
.
1021-st International Olympiad In Informaticsshould start the tournament, so that you can achieve your goals as deed above. CONSTRAINTS 1 �N �200 000 �The number of targets; also equal to half the number of archers 2 �N �R �1 000 000 000 �The number of tournament rounds 1 �Sk �2 �N �The rank of archer k INPUT Your program must read from standard input the following data: The st line contains the integers N and R, separated by a space. The next 2 �N lines list the ranks of the archers. The st of these lines contains your rank. The rest of these lines contain the ranks of the other archers, one archer per line, in the order in which they have arranged themselves (from left to right). Each of these 2 �N lines contains a single integer between 1 and 2 �N inclusive. A rank of 1 is the best and a rank of 2 �N is the worst. No two archers have the same rank. OUTPUT Your program must write to standard output a single line containing a single integer between 1 and N inclusive: the number of the target on which you will start the tournament. GRADING For a number of tests, worth a total of 60 points, N will not exceed 5 000. Also, for some of these tests, worth a total of 20 points, N will not exceed 200. EXAMPLES Sample Input 48 7 4 2 6 5 8 1 3 Smaple Output 3
本书内搜索
序号 页码 相关内容
您还未搜索