{"problem":{"name":"[ICPC 2022 Xi'an R] Clone Ranran","description":{"content":"Ranran needs to prepare a contest! A contest is made of $c$ problems, and Ranran can do one of the following two things: - Clone himself in $a$ minutes. That is, after $a$ minutes, there will be one ","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":524288},"difficulty":{"LuoguStyle":"P2"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGP9360"},"statements":[{"statement_type":"Markdown","content":"Ranran needs to prepare a contest! A contest is made of $c$ problems, and Ranran can do one of the following two things:\n\n- Clone himself in $a$ minutes. That is, after $a$ minutes, there will be one more Ranran.\n- Prepare a problem in $b$ minutes. That is, after $b$ minutes, there will be one more problem.\n\nNote that a cloned Ranran can also do the two things above. A Ranran cannot do the two things at the same time.\n\nRanran wants to prepare the contest as fast as possible. But he is very lazy, so he asks you to find the minimum number of minutes to prepare the contest.\n\nYou need to answer $T$ queries independently.\n\n## Input\n\nThe first line contains an integer $T$ ($1\\leq T\\leq 10 ^ 5$).\n\nEach of the next $T$ lines contains three integers $a$, $b$ and $c$ ($1\\leq a, b, c\\leq 10 ^ 9$), representing a query.\n\n## Output\n\nFor each test case, output a line with a single integer representing the answer.\n\n[samples]\n\n## Note\n\n**Source**: The 2022 ICPC Asia Xi'an Regional Contest Problem C.\n\n**Author**: MagicSpark.","is_translate":false,"language":"English"}],"meta":{"iden":"LGP9360","tags":["2022","O2优化","ICPC","西安"],"sample_group":[["5\n1 1 1\n2 3 3\n9 9 9\n3 26 47\n1064 822 1048576\n","1\n7\n45\n44\n21860\n"]],"created_at":"2026-03-03 11:09:25"}}