Submission #1094769

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10947692024-09-30 13:42:18shmaxGift Exchange (JOI24_ho_t4)C++17
19 / 100
2601 ms35140 KiB
/*
~??: :!?J???????????????! .????????~ !?!~?^~!:7:?!~7?. .????????^ .:^^^^^:...............::................::::::............:.. ....
.YYY: .^7JYYYYYYYYYY?!: ~YYYYYYYYJ??: :J7^Y?~Y!~J! .7?JYYYYYYYYJ .::^^^~~^.................::^~~^:::...........:::^^^^:::::.......... ..:.
.YYYJ. .. .::^^^^:.. .7JJYYJYYYYY7~?^ .?. !! .?!!JYYYYYYYYY?~ .:^:::^^~~..................^~7!^:.................:::::^^::............. ..:.
.:. ~YYYY~ ~77: .~~~:. :7JYY?~^^JYYYJ?JJ!!?J??YYYY!^~!!~^:. .:::::^^~~!~::::^:::..........:!^................::^::::::::::::........ .... ..:.
YYJ!. .!YYJJY? .. ...?YYYYY!. .!JYYJY?. .JYYJYYYYYYYYYYJJYY: .:::::^^^~^^^^^^^^:...........:~~~:...::::..........:^!??7~^:............. . .... ..:..
YYYYY??JYYYYYY?.......JYJYYYYYYYY?...7YYYYJJYYJYYYYJJJJYYYYYJJYYY!................................^^^:::^^^^^^^^^^::..............::...::........::......:::^~7?7~.............. ........ .^^:...................................................................................................
JJJJYYYYJJYJYY!......:YYYYJJJJJYYY^.:YYYYJYYYYYYY~7YYYYYJ?JYYYYJ~...............................^~~^^^^:::^^^^^^......^^^:...............::::.....::::::::^^::.:^7?~............. ....::. . .^~:....................................................................................................
YYYYYYYYYYYYY7........!YYYYYYYJJYY~.^YYJJJYYYYYY!..:~7~:..:~7!^... ........................:!7!~^^::::^^^^^^.....^!!^....................:~^::....:::^^^^^:::...:!?^....... ..... .::.::.. .. .:^:....................................................................................................
^:~JY!:~^.~?~..........:!?JYYYYYYY^.:YYYYYYYY?!:................. .....................:!7!!^^::::^^^^~~.. .:!J?^.............:........::^~^:..::::::::^^:......:!!:..... ..^^. :~.:^:. ... .^^:...................................................................................................
.^ ..............:^~!7?J?:..?J?7!~^:................ ... ...............^!!~!~^:::::^^^~!^. .!YJ~......::.......:.....:::::::^^:...::....::^::......^7~. ..^!: .!::^:...... .^^:..................................................................................................
: . .^!7????7~^:...........:^~7?????~......... . .: ........... :77!!7~^^^:::^^~!7^.. .JP7....:.:^:.......::.....:::::::::~::.........:^:........~!. .:7!:.7^:^^...::. :~^:................................................................................................
.:.. . !YYYYYYYYYYYJ?^.....:?JJYYYYYY7:. .. . .. .. ..............~7777?~^^^^^^^^!77^...:?5~......:^:........::......:::::..:^!::..........:^:.......^7: ....!J~:?~:^^...:^.. .^^:...............................................................................................
::. .:: :YYYYYJJYYJYY7..:^:..7YYJYYYJY? .. ... . .. ............:777777~~~^^^^^~7??~...:?J:......:^:.........^..............::^7::..........:^:.......:7^ ......^?77J!^~~:..:~... ^~^:.............................................................................................
: . ..!YYJYJYJYYJ~..!JYJ!:.~JYYYJYJ?~... : ... .. ...........~?7?7!7~~~~~~^^~7??7...:JJ.::.....^!..........~...............~.~!.:...........:^.... .7~ .......^??7J7~!!...~~... ^~^:............................................................................................
:. .:. ...?YYYYYYYJ!:.^JYYYYYJ~.:!JYY7. .:. .: .....:..^77~~.....:!77J7!?~~!^~~^^!??J?:...JJ:^!......~~..........~:..............!:.?^.:...........:^. ..!~ ........^??7?77?!..:7~... :~^:...........................................................................................
:.. . ..^!7???!^:..!YYYYJYYYY7..:^77. ...... ...:!JJ7JYYYY:...:77?J!!?~~!~^!~^~????!...JY:~7!:..:..!~..........^~............. ~~ :Y............. .:. ......!~ .........^??77777~..!?^.....:~^:..........................................................................................
............~YYYYYJYYYYY~...... . .. .. .....~JYYY!!7?YJ?!^77JJ!!J!^!7~!!^~?????:..75^^777:.^..^!~.........::7............. ^J. 77....... .. .:.::.....7: ..........!7777!!7^.~?7:......~^:.........................................................................................
.... ...............!YJYJYYYJJYY7.......... .........!JJ7:.:?YYYJ77JY!!J?^~7!~!~~?????7:.^P!^7!7?..~..!!!....::...^.!^.............:5: .5:..... .....:^^^....:7. .........:!77!!!!7::?7~..:.:..~::........................................................................................
...............:^:...:^^...?YYYYJJYYY?:........................~JYYY??JJY!77?5Y!!?J~^~777!~7J????!~.5?^77777.^~.:7!!^...^....~:.7.........:....5~. ?Y..:.............^~!^....:! ..........^7!!~!!!~:7~!:.:::: .~^:.......................................................................................
.~~:^7~......:~!YYYJ!?YYY7~:.^7!:.:~7^...........................^77~!YYJJ7~?P5!!?Y7^^~7?7~!J?77777^75~!777?7.7~.^7!!!:::!....^~.^!:......:~....P?..:P~.:7^.....:..:...~!?~^...~^ ..........~~~~^~!!^!^~^..^~!. :~::......................................................................................
:YYYYYYYJ:... !YYJ?!~7!~?JYY7........:.........::......... . .....:~:~~?P5!!75J^^~~7?7!?J777777^P?!77!!?7:?^.^7!!!~^~7..^.:^^:!7:.....^!:..:GJ:..JY:.!Y^...:^^::~...!??~^...7.........:.:!^~~.^77!^:!..^!7: :^::.....................................................................................
:?Y7!??!7YJ777!~JJ^~!~~~!!^?Y~.....::!YY?~....~?YY7::...... . . .......^~?P5!!!Y5!^^~!7?77Y?77777!?P777!!777^J^.~7!!!~~7?..7:.^:!^!~.....!7:..~GY:..~G!:.JY:...~!!7~~..:???7~..^7 ^.......:.!~^~~.:77^.!:.^7?~ ^^:.....................................................................................
J77~^7!~~!~7YYYYY~!7^. .^7!^JYJ^..:YYY!~~.~..~.~~!YYY^... . .. ....:~75Y!~~75J^^^~~7?7YY777777!5Y?7!!!77?!J~.~7!!!~~7?^:?~.::.?~~.....!?^..7GY~::.PJ!^:5J:..^7!7J7^..~J??7!..!::!..:...:.^7^^!^.:!!:^^.!J?! ^^:....................................................................................
!:7!~^^^!7~^JYJYY?^!!^:^!!^?YYJ^...77:::!77?7777:::!?.... . ... ....~!57!~~!Y5~^^~~~??75?777!77!5J?!!!!7!??J~.~7!!!!!!?7~??:.~.~J~^...:77~..JGY!^~.?B!?^!P?:.:7!~??~..:?J7777::7.7!:.~...:.?~^^!:.:7~:^:77?7. . :::...................................................................................
:!7~: .^~7^^JYYYY?7~~7~~77JYY!......:!?77~^^~77?7:.......... .......~~Y~~~^^7P?^^^~~~?7J5!~!!!7!75?77!!!7!7JJ~.~?!!!!!7YJ77?!.^:^7?~^:.:77!:.PGY7^J.:PY~?^YY7^:^!!!Y7^.:~5?7777:!::7!^!7^.~:^?~~!!..~7::!?~!7. . ^^:..................................................................................
!~7!~:::~!!^JY7:::^YJJYJJY~:::...:^..!?7!: .!7?7:.^:................^^J~:~^^^?5~^^~~~~?75Y~~!!!7~?J777!!7777??~.!Y~!!!!75Y7777^.^~!~~7^:~777~!BPJ?^P:.7Y7!7~G?!~~!!~~Y!::^?P!?!!7!!.!~!7??77!:77:^7^..7!~7!.^7: :...^^:.................................................................................
J^~!!!!!~~!~JYJ. ..~J?!7?^.::..:7YJ.:7?7!. .!7??:.JY?:.............:^!!:~^^^~YJ^^^~~~~?7P?~~!!!7~J?777!!7777??~.!G!~!!!75Y!!7J7::7!!:!!!!!!!!PP5J?^B!.!!J!!!?G!~~~::.~Y~:~~55!?~!7J.~~~~~!7J?:!?!.^7^.:7!7::~7^. ~:.: ^^^................................................................................
 
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...