五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網 會員登陸 & 注冊

CF 1850A - To My Critics

2023-07-25 14:39 作者:您是打尖兒還是住店呢  | 我要投稿

In the game show "Ten Words of Wisdom", there are n participants numbered from 1 to n, each of whom submits one response. The i-th response is ai words long and has quality bi. No two responses have the same quality, and at least one response has length at most 10.

The winner of the show is the response which has the highest quality out of all responses that are not longer than 10 words. Which response is the winner?

Input

The first line contains a single integer t (1≤t≤100) — the number of test cases.

The first line of each test case contains a single integer n (1≤n≤50) — the number of responses.

Then n

?lines follow, the i-th of which contains two integers ai and bi (1≤ai,bi≤50) — the number of words and the quality of the i-th response, respectively.


Additional constraints on the input: in each test case, at least one value of i satisfies ai≤10, and all values of bi are distinct.

Output

For each test case, output a single line containing one integer x (1≤x≤n) — the winner of the show, according to the rules given in the statement.


It can be shown that, according to the constraints in the statement, exactly one winner exists for each test case.

---------------------------------------------------

游戲節(jié)目“智慧十句話”中,有n位參與者,編號為1到n,每人提交一個答案。 第 i 個響應的長度為 ai,質量為 bi。 沒有兩個響應具有相同的質量,并且至少一個響應的長度最多為 10。

該節(jié)目的獲勝者是所有不超過 10 個字的回復中質量最高的回復。 哪一個反應是獲勝者?

輸入

第一行包含一個整數(shù) t (1≤t≤100) — 測試用例的數(shù)量。

每個測試用例的第一行包含一個整數(shù) n (1≤n≤50) — 響應數(shù)。

然后n

? 接下來的行,其中第 i 行包含兩個整數(shù) ai 和 bi (1≤ai,bi≤50) — 分別是單詞數(shù)和第 i 個響應的質量。


對輸入的附加約束:在每個測試用例中,至少有一個 i 值滿足 ai≤10,并且 bi 的所有值都是不同的。

輸出

對于每個測試用例,根據語句中給出的規(guī)則,輸出一行,其中包含一個整數(shù) x (1≤x≤n) — 節(jié)目的獲勝者。


可以證明,根據語句中的約束,每個測試用例恰好存在一個獲勝者。

-------------------------------------

下面是代碼:


CF 1850A - To My Critics的評論 (共 條)

分享到微博請遵守國家法律
监利县| 阿拉善左旗| 自贡市| 泉州市| 辉南县| 安康市| 渑池县| 喜德县| 周至县| 黔东| 新乡县| 鄂州市| 陆川县| 乐至县| 雷波县| 富顺县| 永吉县| 通州区| 鹿泉市| 福鼎市| 金平| 荣成市| 娄底市| 五指山市| 辉县市| 潼关县| 平顶山市| 漠河县| 墨玉县| 台山市| 佳木斯市| 买车| 武隆县| 沛县| 广河县| 内乡县| 桓仁| 海盐县| 芦山县| 泊头市| 南乐县|