Codeforces Round 707 (Div. 1, based on Moscow Open Olympiad in Informatics)

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
1500 Codeforces Round 707 (Div. 1, based on Moscow Open Olympiad in Informatics) FINISHED False 9000 121726511 March 13, 2021, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2114 ) B Two chandeliers PROGRAMMING binary search brute force chinese remainder theorem math number theory 2200

B"Vasya is a CEO of a big construction company. And as any other big boss he has a spacious, richly furnished office with two crystal chandeliers. To stay motivated Vasya needs the color of light at his office to change every day. That's why he ordered both chandeliers that can change its color cyclically. For example: red xe2 x80 x93 brown xe2 x80 x93 yellow xe2 x80 x93 red xe2 x80 x93 brown xe2 x80 x93 yellow and so on. There are many chandeliers that differs in color set or order of colors. And the person responsible for the light made a critical mistake -- they bought two different chandeliers. Since chandeliers are different, some days they will have the same color, but some days -- different. Of course, it looks poor and only annoys Vasya. As a result, at the k -th time when chandeliers will light with different colors, Vasya will become very angry and, most probably, will fire the person who bought chandeliers. Your task is to calculate the day, when it happens (counting from the day chandeliers were installed). You can think that Vasya works every day without weekends and days off. The first line contains three integers n , m and k ( 1 <= n, m <= 500 ,000 ; 1 <= k <= 10^{12} ) -- the number of colors in the first and the second chandeliers and how many times colors should differ to anger Vasya. The second line contains n different integers a_i ( 1 <= a_i <= 2 cdot max(n, m) ) that describe the first chandelier's sequence of colors. The third line contains m different integers b_j ( 1 <= b_i <= 2 cdot max(n, m) ) that describe the second chandelier's sequence of colors. At the i -th day, the first chandelier has a color a_x , where x = ((i - 1) mod n) + 1) and the second one has a color b_y , where y = ((i - 1) mod m) + 1) . It's guaranteed that sequence a differs from sequence b , so there are will be days when colors of chandeliers differs. Print the single in"...

Tutorials

Codeforces Round #707 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
109879251 Shedneryan B March 13, 2021, 11:07 a.m. OK GNU C++11 TESTS 68 93 24064000 2200
109929947 Leasier B March 14, 2021, 1:41 a.m. OK GNU C++11 TESTS 68 124 20070400 2200
109859310 Mr_Eight B March 13, 2021, 9:52 a.m. OK GNU C++11 TESTS 68 124 24064000 2200
109902361 Sanzenkai B March 13, 2021, 2:42 p.m. OK GNU C++11 TESTS 68 124 28057600 2200
109873486 r7tc B March 13, 2021, 10:43 a.m. OK GNU C++11 TESTS 68 124 39424000 2200
109938458 bkifhr10 B March 14, 2021, 5:35 a.m. OK GNU C++11 TESTS 68 140 18739200 2200
109929185 onglu B March 14, 2021, 1:04 a.m. OK GNU C++11 TESTS 68 140 20070400 2200
109891709 little_brush B March 13, 2021, 12:52 p.m. OK GNU C++11 TESTS 68 140 48128000 2200
109882710 Wall_breaker B March 13, 2021, 11:21 a.m. OK GNU C++11 TESTS 68 155 16076800 2200
109885187 jiaangk_ B March 13, 2021, 11:30 a.m. OK GNU C++11 TESTS 68 155 62464000 2200
109912961 NaimSS B March 13, 2021, 5:03 p.m. OK GNU C++14 TESTS 68 265 20070400 2200
109912460 NaimSS B March 13, 2021, 4:56 p.m. OK GNU C++14 TESTS 68 280 20070400 2200
109901228 sharath101 B March 13, 2021, 2:30 p.m. OK GNU C++14 TESTS 68 311 28057600 2200
109878102 cip999 B March 13, 2021, 11:02 a.m. OK GNU C++14 TESTS 68 326 30412800 2200
109862539 y1s1 B March 13, 2021, 10:03 a.m. OK GNU C++14 TESTS 68 327 17817600 2200
109878499 Kalptaru B March 13, 2021, 11:04 a.m. OK GNU C++14 TESTS 68 327 20070400 2200
109870620 _Karuna B March 13, 2021, 10:32 a.m. OK GNU C++14 TESTS 68 327 40140800 2200
109899761 sharath101 B March 13, 2021, 2:14 p.m. OK GNU C++14 TESTS 68 342 28057600 2200
109895086 Bedo_Sayed B March 13, 2021, 1:30 p.m. OK GNU C++14 TESTS 68 342 36659200 2200
109904998 tkxkd B March 13, 2021, 3:13 p.m. OK GNU C++14 TESTS 68 358 22835200 2200
109860683 radical108 B March 13, 2021, 9:56 a.m. OK GNU C++17 TESTS 68 265 10035200 2200
109873491 patou B March 13, 2021, 10:43 a.m. OK GNU C++17 TESTS 68 265 10035200 2200
109877000 AquaBlaze B March 13, 2021, 10:58 a.m. OK GNU C++17 TESTS 68 265 17715200 2200
109893191 Tc14 B March 13, 2021, 1:08 p.m. OK GNU C++17 TESTS 68 280 14131200 2200
109876111 schtomi97 B March 13, 2021, 10:54 a.m. OK GNU C++17 TESTS 68 280 16076800 2200
109893527 Intercept B March 13, 2021, 1:12 p.m. OK GNU C++17 TESTS 68 296 20070400 2200
109884586 sempav B March 13, 2021, 11:28 a.m. OK GNU C++17 TESTS 68 296 21913600 2200
109874502 iLLusio B March 13, 2021, 10:48 a.m. OK GNU C++17 TESTS 68 311 30208000 2200
109859055 dreamoon_love_AA B March 13, 2021, 9:51 a.m. OK GNU C++17 TESTS 68 312 14745600 2200
109923825 Slamur B March 13, 2021, 8:33 p.m. OK GNU C++17 TESTS 68 327 18329600 2200
109929257 box B March 14, 2021, 1:08 a.m. OK GNU C++17 (64) TESTS 68 62 16281600 2200
109929184 box B March 14, 2021, 1:04 a.m. OK GNU C++17 (64) TESTS 68 171 16076800 2200
109874285 ollpu B March 13, 2021, 10:47 a.m. OK GNU C++17 (64) TESTS 68 186 10035200 2200
109858453 lsantire B March 13, 2021, 9:49 a.m. OK GNU C++17 (64) TESTS 68 187 10035200 2200
109879927 GRT_2018 B March 13, 2021, 11:10 a.m. OK GNU C++17 (64) TESTS 68 187 12083200 2200
109868776 AndreySergunin B March 13, 2021, 10:25 a.m. OK GNU C++17 (64) TESTS 68 202 10035200 2200
109872917 risujiroh B March 13, 2021, 10:41 a.m. OK GNU C++17 (64) TESTS 68 202 10035200 2200
109893614 Dragnoid99 B March 13, 2021, 1:13 p.m. OK GNU C++17 (64) TESTS 68 202 13312000 2200
109902251 user32 B March 13, 2021, 2:41 p.m. OK GNU C++17 (64) TESTS 68 218 18636800 2200
109934804 George1123 B March 14, 2021, 4:17 a.m. OK GNU C++17 (64) TESTS 68 218 19456000 2200
109902852 0x3F B March 13, 2021, 2:48 p.m. OK Go TESTS 68 124 11059200 2200
109902613 0x3F B March 13, 2021, 2:45 p.m. OK Go TESTS 68 124 11059200 2200
109902054 0x3F B March 13, 2021, 2:39 p.m. OK Go TESTS 68 670 16179200 2200
109861429 uwi B March 13, 2021, 9:59 a.m. OK Java 11 TESTS 68 529 13107200 2200
109893443 Apfeloxid B March 13, 2021, 1:11 p.m. OK Java 11 TESTS 68 1481 70348800 2200
109889453 fetetriste B March 13, 2021, 12:30 p.m. OK Java 11 TESTS 68 1996 21913600 2200
109865448 iakovlev.zakhar B March 13, 2021, 10:13 a.m. OK Java 8 TESTS 68 1138 46284800 2200
109857621 LoneFox B March 13, 2021, 9:47 a.m. OK MS C++ TESTS 68 639 17920000 2200
109882442 Yupiteru B March 13, 2021, 11:20 a.m. OK .NET Core C# TESTS 68 1481 92160000 2200
109879768 mkawa2 B March 13, 2021, 11:09 a.m. OK PyPy 3 TESTS 68 1824 127488000 2200
109868942 tamato B March 13, 2021, 10:26 a.m. OK PyPy 3 TESTS 68 1980 79872000 2200
109874001 titia B March 13, 2021, 10:45 a.m. OK PyPy 3 TESTS 68 1996 54784000 2200
109859593 pineriver B March 13, 2021, 9:53 a.m. OK PyPy 3 TESTS 68 1996 65843200 2200
109860116 sansen B March 13, 2021, 9:55 a.m. OK Rust TESTS 68 623 33075200 2200
109892803 ocamler B March 13, 2021, 1:04 p.m. OK Rust TESTS 68 1341 66764800 2200
109868957 hiratai B March 13, 2021, 10:26 a.m. OK Rust TESTS 68 1746 31948800 2200

remove filters

Back to search problems