Please subscribe to the official Codeforces channel in Telegram via the link https://t.me/codeforces_official. ×
Problem G - Gallivanting Merchant
 
 
 
 
Contest status
 
 
# When Who Problem Lang Verdict Time Memory
196427797 Mar/07/2023 21:32 18o3 G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 374 ms 18900 KB
223752373 Sep/17/2023 19:35 Atcoder 2800: smax# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 358 ms 18900 KB
271193923 Jul/18/2024 17:23 Aboeldahab G - Gallivanting Merchant C++20 (GCC 13-64) Accepted 140 ms 3000 KB
192446045 Feb/06/2023 12:21 vjudge2 G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 685 ms 62000 KB
192593142 Feb/07/2023 14:48 vjudge1 G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 670 ms 62000 KB
228246706 Oct/15/2023 08:54 Gxstarry.# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 156 ms 31300 KB
189034571 Jan/12/2023 22:32 UCF Beehive: Xylenox, Meaf# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 187 ms 12400 KB
192476446 Feb/06/2023 16:39 Drakkon G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 171 ms 12700 KB
187909560 Jan/04/2023 13:52 P+P+P: 353cerega, 998batrr, 244mhq# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 109 ms 13400 KB
331973157 Aug/01/2025 17:54 -forward- G - Gallivanting Merchant C++23 (GCC 14-64, msys2) Accepted 1155 ms 61500 KB
191744759 Feb/02/2023 20:27 Noob_smallpeter# G - Gallivanting Merchant C++14 (GCC 6-32) Accepted 888 ms 250500 KB
196929872 Mar/11/2023 15:11 [UFCG] proibido chegar na hora: brenner1, Rennan, Rdpaula# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 109 ms 25700 KB
187585517 Jan/02/2023 10:05 Leningrad Institute of Precision Mechanics and Optics: V4V, r3.14, DesalotAge# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 171 ms 19000 KB
196427635 Mar/07/2023 21:31 18o3 G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 483 ms 37700 KB
258384486 Apr/27/2024 14:58 Folka G - Gallivanting Merchant C++20 (GCC 13-64) Accepted 1030 ms 16700 KB
185626406 Dec/17/2022 16:03 nor G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 1231 ms 41200 KB
211549418 Jun/29/2023 23:36 Purdue GLD: shcal, eggag32# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 109 ms 15000 KB
192130421 Feb/04/2023 12:33 عودة العلاقات: Drakkon, Kneee, Gamal74# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 108 ms 18100 KB
192202494 Feb/04/2023 23:02 Treesum: MohamedRadyA, Mina7akim, Emailam# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 826 ms 70300 KB
214144586 Jul/17/2023 06:21 winna27 G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 810 ms 69000 KB
214264075 Jul/18/2023 00:19 fabsrom G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 810 ms 69000 KB
195119693 Feb/27/2023 14:39 Luke_Cai G - Gallivanting Merchant C++14 (GCC 6-32) Accepted 920 ms 22100 KB
196259008 Mar/06/2023 16:16 nusaibaa G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 467 ms 20000 KB
206800339 May/22/2023 09:26 HCMUS-SecondMen: cthau, ntkwan, LptN21# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 343 ms 18900 KB
351109962 Nov/29/2025 07:06 Naming is the hardest problem: koishi.komeiji, flandre.scarlet, kith14# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 546 ms 17000 KB
223462497 Sep/15/2023 13:02 MAI #0: ZergTricky, maxplus, mainyutin# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 249 ms 11000 KB
192119299 Feb/04/2023 10:49 BUET Wild Guess: TamimEhsan, Eshirahh# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 1185 ms 36200 KB
198105252 Mar/19/2023 16:52 [UET]ICPC-2023-2024: achibulup, nanhtu, MangoBoss# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 234 ms 23500 KB
271183161 Jul/18/2024 15:57 Aboeldahab G - Gallivanting Merchant C++20 (GCC 13-64) Accepted 125 ms 0 KB
186363047 Dec/22/2022 17:24 readon.ly G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 342 ms 12700 KB
211979621 Jul/03/2023 20:00 YahiaSherif# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 296 ms 18900 KB
207755487 May/29/2023 15:35 warner1129 G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 390 ms 18900 KB
198740900 Mar/23/2023 15:48 UWez420: loK10, VaVshchuck, pit4h# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 109 ms 13400 KB
186629869 Dec/25/2022 07:47 nowcow: olphe, new_textfile, nrvft# G - Gallivanting Merchant C++17 (GCC 9-64) Accepted 280 ms 23500 KB
186181635 Dec/21/2022 09:43 hjmu G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 343 ms 22100 KB
186181652 Dec/21/2022 09:43 Accepted: hjy12345, Jackylkk2003, JacaJava# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 343 ms 22100 KB
196427460 Mar/07/2023 21:30 18o3 G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 624 ms 44300 KB
351412811 Dec/01/2025 07:56 plast G - Gallivanting Merchant C++23 (GCC 14-64, msys2) Accepted 359 ms 30600 KB
303947059 Feb/01/2025 18:49 Tacos de Búfer: Danielgmol, imanolgzz, pyoro# G - Gallivanting Merchant C++23 (GCC 14-64, msys2) Accepted 531 ms 22700 KB
189402685 Jan/16/2023 09:37 ZJUT1: WROwO, Genius_dream, jsssk# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 780 ms 9400 KB
352346569 Dec/07/2025 09:45 MilkCoffee: mohammadsam, Bahamin# G - Gallivanting Merchant C++20 (GCC 13-64) Accepted 593 ms 38700 KB
229696453 Oct/25/2023 16:13 Ab3tlo Clarification, Myrodsh: aboelsoudJr, MiinaMagdy, 7oSkaaa# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 390 ms 20400 KB
223217473 Sep/13/2023 16:08 NYCU_Segmentree: thomasyu, lolainta, r1407p# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 124 ms 19700 KB
256696376 Apr/14/2024 22:54 ___nerd___ G - Gallivanting Merchant C++20 (GCC 13-64) Accepted 421 ms 22600 KB
333598755 Aug/12/2025 09:05 NYCU_hwh: HowardLee, H1de_on_bruH# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 531 ms 12600 KB
199880338 Mar/30/2023 23:27 Demons: __AB__, psychobot# G - Gallivanting Merchant C++20 (GCC 11-64) Accepted 109 ms 25700 KB
345032769 Oct/21/2025 16:35 de_dust2: theulo, ChomuSuke, Tenkhu# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 562 ms 12700 KB
301124674 Jan/15/2025 18:26 Echipa Putere_in_brat: ezluci, Razvan_Rotaru# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 765 ms 29200 KB
272598873 Jul/25/2024 20:45 sesc boys: OpiumCat, 8c433d971212bf42, meanlessnessener# G - Gallivanting Merchant C++17 (GCC 7-32) Accepted 889 ms 117700 KB
187241198 Dec/30/2022 15:37 YMSeah G - Gallivanting Merchant PyPy 3 Accepted 452 ms 41000 KB
Sort by: