Codeforces Round 739 (Div. 3)

Solutions are presented as using the least memory and the fastest execution time. It also takes the top 10 most recent solutions from each language. If you want to limit to a specific index, click the "Solved" button and go to that problem.

ContestId
Name
Phase
Frozen
Duration (Seconds)
Relative Time
Start Time
1560 Codeforces Round 739 (Div. 3) FINISHED False 8100 102525899 Aug. 18, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 35896 ) B Who's Opposite? PROGRAMMING math 800

B"Some number of people (this number is even) have stood in a circle. The people stand in the circle evenly. They are numbered clockwise starting from a person with the number 1 . Each person is looking through the circle's center at the opposite person. You don't know the exact number of people standing in the circle (but this number is even, no doubt). It is known that the person with the number a is looking at the person with the number b (and vice versa, of course). What is the number associated with a person being looked at by the person with the number c ? If, for the specified a , b , and c , no such circle exists, output -1. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Then t test cases follow. Each test case consists of one line containing three distinct integers a , b , c ( 1 <= a,b,c <= 10^8 ). For each test case output in a separate line a single integer d -- the number of the person being looked at by the person with the number c in a circle such that the person with the number a is looking at the person with the number b . If there are multiple solutions, print any of them. Output -1 if there's no circle meeting the given conditions. In the first test case, there's a desired circle of 8 people. The person with the number 6 will look at the person with the number 2 and the person with the number 8 will look at the person with the number 4 . In the second test case, there's no circle meeting the conditions. If the person with the number 2 is looking at the person with the number 3 , the circle consists of 2 people because these persons are neighbors. But, in this case, they must have the numbers 1 and 2 , but it doesn't meet the problem's conditions. In the third test case, the only circle with the persons with the numbers 2 and 4 l"...

Tutorials

94009

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
126627504 Kaptan B Aug. 21, 2021, 2:01 p.m. OK GNU C11 TESTS 16 31 3686400 800
126643220 Nishtha_12 B Aug. 21, 2021, 5:33 p.m. OK GNU C11 TESTS 16 31 3686400 800
126794801 shoumik_69 B Aug. 23, 2021, 11:41 p.m. OK GNU C11 TESTS 16 31 3686400 800
126746648 danielwijaya2004 B Aug. 23, 2021, 9:34 a.m. OK GNU C11 TESTS 16 31 3686400 800
126706829 iamrhythmic B Aug. 22, 2021, 5:17 p.m. OK GNU C11 TESTS 16 31 3686400 800
126653507 Lunessel B Aug. 21, 2021, 9:13 p.m. OK GNU C11 TESTS 16 31 3686400 800
126622822 GEETHA_REDDY B Aug. 21, 2021, 12:59 p.m. OK GNU C11 TESTS 16 31 3686400 800
126626218 Nuku B Aug. 21, 2021, 1:44 p.m. OK GNU C11 TESTS 16 31 3686400 800
126991196 Doblac_Lewlif B Aug. 25, 2021, 5:18 p.m. OK GNU C11 TESTS 16 46 3686400 800
126841914 hoanglong7802 B Aug. 24, 2021, 1:23 p.m. OK GNU C11 TESTS 16 46 3686400 800
126615245 dhruvdy2911 B Aug. 21, 2021, 11:12 a.m. OK GNU C++14 TESTS 16 15 3686400 800
127009983 vjudge3 B Aug. 26, 2021, 2:18 a.m. OK GNU C++14 TESTS 16 15 3686400 800
126948238 LittleFisher79 B Aug. 25, 2021, 8:01 a.m. OK GNU C++14 TESTS 16 15 3686400 800
127009974 ansustdi B Aug. 26, 2021, 2:18 a.m. OK GNU C++14 TESTS 16 15 3686400 800
126623339 inazuma_11 B Aug. 21, 2021, 1:05 p.m. OK GNU C++14 TESTS 16 15 3686400 800
126598176 Gaurang00 B Aug. 21, 2021, 7:44 a.m. OK GNU C++14 TESTS 16 15 3686400 800
126817095 LJFan B Aug. 24, 2021, 7:46 a.m. OK GNU C++14 TESTS 16 15 3686400 800
126695785 Gogozi B Aug. 22, 2021, 2:29 p.m. OK GNU C++14 TESTS 16 15 3686400 800
127006961 EdisonBa B Aug. 26, 2021, 12:25 a.m. OK GNU C++14 TESTS 16 15 3686400 800
126621144 Triose_Cyl B Aug. 21, 2021, 12:34 p.m. OK GNU C++14 TESTS 16 15 3686400 800
126665095 timsu1104 B Aug. 22, 2021, 5 a.m. OK GNU C++17 TESTS 16 15 3686400 800
126989225 I_Pizza_Love B Aug. 25, 2021, 4:49 p.m. OK GNU C++17 TESTS 16 15 3686400 800
126813311 BHU-hahaqaz2014 B Aug. 24, 2021, 7:02 a.m. OK GNU C++17 TESTS 16 15 3686400 800
126796512 DenTofieM B Aug. 24, 2021, 1:09 a.m. OK GNU C++17 TESTS 16 15 3686400 800
126662079 YYDS_JIN B Aug. 22, 2021, 3:22 a.m. OK GNU C++17 TESTS 16 15 3686400 800
126661624 renyatsuhito B Aug. 22, 2021, 3:07 a.m. OK GNU C++17 TESTS 16 15 3686400 800
126621799 dathathreya B Aug. 21, 2021, 12:44 p.m. OK GNU C++17 TESTS 16 15 3686400 800
127006716 CarlosS48 B Aug. 26, 2021, 12:12 a.m. OK GNU C++17 TESTS 16 15 3788800 800
126973454 qymyz B Aug. 25, 2021, 1:41 p.m. OK GNU C++17 TESTS 16 15 3788800 800
126943813 utkarshfr B Aug. 25, 2021, 7:08 a.m. OK GNU C++17 TESTS 16 15 3788800 800
126792764 jaisaikrishnan B Aug. 23, 2021, 9:47 p.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126960696 del1ke B Aug. 25, 2021, 10:44 a.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126917355 tnowak B Aug. 24, 2021, 9:05 p.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126841133 Wild4Stone B Aug. 24, 2021, 1:13 p.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126833472 jg_trek B Aug. 24, 2021, 11:34 a.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126811184 lin_rany B Aug. 24, 2021, 6:34 a.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126802708 it_aint_me B Aug. 24, 2021, 4:13 a.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126781623 sparta_i B Aug. 23, 2021, 5:34 p.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126746447 _legend_ B Aug. 23, 2021, 9:31 a.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126734255 sharmaharisam B Aug. 23, 2021, 6:39 a.m. OK GNU C++17 (64) TESTS 16 15 4300800 800
126926540 Gin_Sian B Aug. 25, 2021, 2:38 a.m. OK Go TESTS 16 61 10649600 800
126731028 SnacksTime B Aug. 23, 2021, 5:44 a.m. OK Go TESTS 16 77 10649600 800
126763880 mtester B Aug. 23, 2021, 1:49 p.m. OK Go TESTS 16 748 10649600 800
126763306 mtester B Aug. 23, 2021, 1:42 p.m. OK Go TESTS 16 748 10752000 800
126763950 mtester B Aug. 23, 2021, 1:50 p.m. OK Go TESTS 16 763 10649600 800
126763804 mtester B Aug. 23, 2021, 1:48 p.m. OK Go TESTS 16 764 10649600 800
126763635 mtester B Aug. 23, 2021, 1:47 p.m. OK Go TESTS 16 779 10752000 800
126776013 mhdx B Aug. 23, 2021, 4:14 p.m. OK Go TESTS 16 811 10649600 800
126692689 Laurens B Aug. 22, 2021, 1:41 p.m. OK Haskell TESTS 16 93 11571200 800
126792565 TomazGomes B Aug. 23, 2021, 9:39 p.m. OK Haskell TESTS 16 93 11571200 800
126713867 LNB B Aug. 22, 2021, 7:54 p.m. OK Java 11 TESTS 16 171 23756800 800
126715115 MishkaGrig B Aug. 22, 2021, 8:31 p.m. OK Java 11 TESTS 16 171 23756800 800
126841366 ptk_3705 B Aug. 24, 2021, 1:16 p.m. OK Java 11 TESTS 16 171 23961600 800
126549422 ankit_bit B Aug. 20, 2021, 3:10 p.m. OK Java 11 TESTS 16 186 23859200 800
126720876 MrGorbunov B Aug. 23, 2021, 1:02 a.m. OK Java 11 TESTS 16 186 23961600 800
126674349 step-off-bitch B Aug. 22, 2021, 8:10 a.m. OK Java 11 TESTS 16 186 23961600 800
126562664 pili B Aug. 20, 2021, 5:49 p.m. OK Java 11 TESTS 16 187 23756800 800
126945677 adhi_2311 B Aug. 25, 2021, 7:29 a.m. OK Java 11 TESTS 16 187 23756800 800
126712083 shamonhashmi B Aug. 22, 2021, 7:10 p.m. OK Java 11 TESTS 16 187 23756800 800
126644190 smaduri B Aug. 21, 2021, 5:49 p.m. OK Java 11 TESTS 16 187 23756800 800
126992579 ZiadASadek B Aug. 25, 2021, 5:39 p.m. OK Java 8 TESTS 16 93 20480000 800
126696632 matbensch B Aug. 22, 2021, 2:43 p.m. OK Java 8 TESTS 16 109 20480000 800
126788924 Abdallah_Ragab00 B Aug. 23, 2021, 7:45 p.m. OK Java 8 TESTS 16 109 20480000 800
126686374 dexter_1205 B Aug. 22, 2021, 11:45 a.m. OK Java 8 TESTS 16 124 20480000 800
126849579 pdk.abhishek B Aug. 24, 2021, 2:43 p.m. OK Java 8 TESTS 16 124 20480000 800
126997066 Moamen_Shoman B Aug. 25, 2021, 6:54 p.m. OK Java 8 TESTS 16 124 20582400 800
126761259 srishtikatiyar15999 B Aug. 23, 2021, 1:15 p.m. OK Java 8 TESTS 16 124 20684800 800
126696048 _Eyepatch B Aug. 22, 2021, 2:33 p.m. OK Java 8 TESTS 16 124 21196800 800
126778363 twoBit B Aug. 23, 2021, 4:48 p.m. OK Java 8 TESTS 16 139 20480000 800
126564460 thisisujjawal B Aug. 20, 2021, 6:14 p.m. OK Java 8 TESTS 16 140 20480000 800
126771860 catcatcute B Aug. 23, 2021, 3:23 p.m. OK Kotlin TESTS 16 140 21708800 800
126770834 catcatcute B Aug. 23, 2021, 3:11 p.m. OK Kotlin TESTS 16 156 21811200 800
126997789 Krantzy B Aug. 25, 2021, 7:07 p.m. OK Kotlin TESTS 16 202 21811200 800
126817557 Bororo B Aug. 24, 2021, 7:52 a.m. OK Kotlin TESTS 16 217 21811200 800
126566683 GusztavSzmolik B Aug. 20, 2021, 6:50 p.m. OK Mono C# TESTS 16 61 11673600 800
126756989 EgoManiaC B Aug. 23, 2021, 12:16 p.m. OK MS C++ 2017 TESTS 16 15 3686400 800
126920403 JJMV B Aug. 24, 2021, 11:15 p.m. OK MS C++ 2017 TESTS 16 30 3686400 800
126580301 songuno1 B Aug. 21, 2021, 2:14 a.m. OK MS C++ 2017 TESTS 16 31 3686400 800
126787396 diall_38 B Aug. 23, 2021, 7:10 p.m. OK MS C++ 2017 TESTS 16 31 3788800 800
126617436 taotaotao123 B Aug. 21, 2021, 11:42 a.m. OK MS C++ 2017 TESTS 16 31 6144000 800
126666970 the-fly0618 B Aug. 22, 2021, 5:48 a.m. OK MS C++ 2017 TESTS 16 46 3686400 800
126681137 handle19 B Aug. 22, 2021, 10:08 a.m. OK MS C++ 2017 TESTS 16 46 3686400 800
126720299 LochanRD B Aug. 23, 2021, 12:37 a.m. OK MS C++ 2017 TESTS 16 46 3788800 800
126969137 MADDarko B Aug. 25, 2021, 12:45 p.m. OK MS C++ 2017 TESTS 16 46 3788800 800
126654625 tolmachch B Aug. 21, 2021, 9:57 p.m. OK MS C++ 2017 TESTS 16 46 3788800 800
126977838 kate333 B Aug. 25, 2021, 2:34 p.m. OK .NET Core C# TESTS 16 108 14131200 800
127005083 Chuck1911 B Aug. 25, 2021, 10:35 p.m. OK .NET Core C# TESTS 16 124 14028800 800
126545233 SravanSTG B Aug. 20, 2021, 2:23 p.m. OK .NET Core C# TESTS 16 124 14028800 800
126626324 Nidz05 B Aug. 21, 2021, 1:45 p.m. OK .NET Core C# TESTS 16 124 14643200 800
126844316 AbdelrhmanRafaat B Aug. 24, 2021, 1:55 p.m. OK .NET Core C# TESTS 16 140 14336000 800
126691262 Vitya.saber B Aug. 22, 2021, 1:15 p.m. OK .NET Core C# TESTS 16 155 14131200 800
126758421 Rafsan18 B Aug. 23, 2021, 12:37 p.m. OK Node.js TESTS 16 171 17612800 800
126542855 a1ikeda B Aug. 20, 2021, 1:56 p.m. OK Perl TESTS 16 46 2764800 800
126791233 coden00b2021 B Aug. 23, 2021, 8:52 p.m. OK PyPy 2 TESTS 16 124 30105600 800
126613941 Anti-Neutrino B Aug. 21, 2021, 10:54 a.m. OK PyPy 3 TESTS 16 155 24371200 800
126547604 last_try99 B Aug. 20, 2021, 2:50 p.m. OK PyPy 3 TESTS 16 171 28057600 800
126666507 skysnail B Aug. 22, 2021, 5:37 a.m. OK PyPy 3 TESTS 16 171 29491200 800
126644119 KuroKousuii B Aug. 21, 2021, 5:47 p.m. OK PyPy 3 TESTS 16 171 30003200 800
126941608 sachindodwani B Aug. 25, 2021, 6:43 a.m. OK PyPy 3 TESTS 16 187 28774400 800
126784454 anubhav44044 B Aug. 23, 2021, 6:18 p.m. OK PyPy 3 TESTS 16 202 27443200 800
126545870 Bambam_Shivam B Aug. 20, 2021, 2:30 p.m. OK PyPy 3 TESTS 16 233 29798400 800
126621518 sohamb17 B Aug. 21, 2021, 12:40 p.m. OK PyPy 3 TESTS 16 249 29900800 800
126586611 chotathanos B Aug. 21, 2021, 4:50 a.m. OK PyPy 3 TESTS 16 249 30208000 800
126837942 lovekumar B Aug. 24, 2021, 12:32 p.m. OK PyPy 3 TESTS 16 264 29491200 800
126658583 mutekiaji B Aug. 22, 2021, 1:18 a.m. OK Python 3 TESTS 16 62 7065600 800
126567152 pearsareunderrated B Aug. 20, 2021, 6:58 p.m. OK Python 3 TESTS 16 62 7270400 800
126828836 brogrammer_24 B Aug. 24, 2021, 10:29 a.m. OK Python 3 TESTS 16 77 6963200 800
126714062 dcdj B Aug. 22, 2021, 7:59 p.m. OK Python 3 TESTS 16 77 6963200 800
126815910 DarkWind B Aug. 24, 2021, 7:31 a.m. OK Python 3 TESTS 16 77 7065600 800
126657758 mutekiaji B Aug. 22, 2021, 12:36 a.m. OK Python 3 TESTS 16 77 7065600 800
126642825 wexouv B Aug. 21, 2021, 5:26 p.m. OK Python 3 TESTS 16 77 7577600 800
126988554 abisheka1441 B Aug. 25, 2021, 4:39 p.m. OK Python 3 TESTS 16 78 7577600 800
126941715 sachindodwani B Aug. 25, 2021, 6:44 a.m. OK Python 3 TESTS 16 93 6963200 800
126554074 navedkhan B Aug. 20, 2021, 3:59 p.m. OK Python 3 TESTS 16 93 6963200 800
126980503 lxk B Aug. 25, 2021, 3:03 p.m. OK Rust TESTS 16 46 3788800 800
126792951 khr03ae B Aug. 23, 2021, 9:57 p.m. OK Rust TESTS 16 92 3788800 800
126720639 SnowballSH B Aug. 23, 2021, 12:52 a.m. OK Rust TESTS 16 92 3788800 800
126962705 GeoffreyY B Aug. 25, 2021, 11:14 a.m. OK Rust TESTS 16 93 3788800 800
126792928 khr03ae B Aug. 23, 2021, 9:56 p.m. OK Rust TESTS 16 124 3788800 800

remove filters

Back to search problems