Codeforces Round 775 (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
1648 Codeforces Round 775 (Div. 1, based on Moscow Open Olympiad in Informatics) FINISHED False 8100 90705863 March 6, 2022, 9:55 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6594 ) B Integral Array PROGRAMMING brute force constructive algorithms data structures math

B"You are given an array a of n positive integers numbered from 1 to n . Let's call an array integral if for any two, not necessarily different, numbers x and y from this array, x ge y , the number <= ft lfloor frac{x}{y} right rfloor ( x divided by y with rounding down) is also in this array. You are guaranteed that all numbers in a do not exceed c . Your task is to check whether this array is integral. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Description of the test cases follows. The first line of each test case contains two integers n and c ( 1 <= n <= 10^6 , 1 <= c <= 10^6 ) -- the size of a and the limit for the numbers in the array. The second line of each test case contains n integers a_1 , a_2 , ..., a_n ( 1 <= a_i <= c ) -- the array a . Let N be the sum of n over all test cases and C be the sum of c over all test cases. It is guaranteed that N <= 10^6 and C <= 10^6 . For each test case print Yes if the array is integral and No otherwise. In the first test case it is easy to see that the array is integral: Thus, the condition is met and the array is integral. In the second test case it is enough to see that <= ft lfloor frac{7}{3} right rfloor = <= ft lfloor 2 frac{1}{3} right rfloor = 2 , this number is not in a , that's why it is not integral. In the third test case <= ft lfloor frac{2}{2} right rfloor = 1 , but there is only 2 in the array, that's why it is not integral. "...

Tutorials

Codeforces Round #775 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
148609909 deutlay B March 6, 2022, 1:27 p.m. OK Clang++17 Diagnostics TESTS 31 483 12697600
148598038 VinstaG173 B March 6, 2022, 11:59 a.m. OK GNU C++14 TESTS 30 46 8499200
148562461 cunzai_zsy0531 B March 6, 2022, 10:25 a.m. OK GNU C++14 TESTS 30 77 8192000
148565390 expdjy B March 6, 2022, 10:30 a.m. OK GNU C++14 TESTS 30 78 26112000
148559974 TanKuku B March 6, 2022, 10:21 a.m. OK GNU C++14 TESTS 30 108 24473600
148569440 FormalPowerSeries B March 6, 2022, 10:38 a.m. OK GNU C++14 TESTS 30 139 14131200
148566989 yqj_1234 B March 6, 2022, 10:33 a.m. OK GNU C++14 TESTS 30 140 32153600
148559042 ZhangCW_QwQ B March 6, 2022, 10:19 a.m. OK GNU C++14 TESTS 30 155 10137600
148656501 logh1 B March 7, 2022, 3:01 a.m. OK GNU C++14 TESTS 33 218 12083200
148652787 wu_sir B March 7, 2022, 1:03 a.m. OK GNU C++14 TESTS 33 234 7987200
148560898 _SS B March 6, 2022, 10:22 a.m. OK GNU C++14 TESTS 30 249 3993600
148552470 izone B March 6, 2022, 10:10 a.m. OK GNU C++17 TESTS 30 62 8806400
148648341 try_kuhn B March 6, 2022, 10:07 p.m. OK GNU C++17 TESTS 33 62 47206400
148583078 zj713300 B March 6, 2022, 11:13 a.m. OK GNU C++17 TESTS 30 77 5017600
148660531 -Samuel B March 7, 2022, 4:39 a.m. OK GNU C++17 TESTS 33 78 28876800
148648118 try_kuhn B March 6, 2022, 10 p.m. OK GNU C++17 TESTS 33 78 47206400
148648432 try_kuhn B March 6, 2022, 10:10 p.m. OK GNU C++17 TESTS 33 78 47206400
148648406 try_kuhn B March 6, 2022, 10:09 p.m. OK GNU C++17 TESTS 33 78 47206400
148648294 try_kuhn B March 6, 2022, 10:06 p.m. OK GNU C++17 TESTS 33 78 47206400
148558626 ZZTC2000731 B March 6, 2022, 10:18 a.m. OK GNU C++17 TESTS 30 93 8499200
148647796 try_kuhn B March 6, 2022, 9:52 p.m. OK GNU C++17 TESTS 33 93 44134400
148552884 liouzhou_101 B March 6, 2022, 10:10 a.m. OK GNU C++17 (64) TESTS 30 46 10137600
148590315 Arraiter B March 6, 2022, 11:35 a.m. OK GNU C++17 (64) TESTS 30 46 18022400
148562419 LayCurse B March 6, 2022, 10:25 a.m. OK GNU C++17 (64) TESTS 30 109 110284800
148661063 AFOier B March 7, 2022, 4:49 a.m. OK GNU C++17 (64) TESTS 33 155 3993600
148565089 fr200110217102 B March 6, 2022, 10:30 a.m. OK GNU C++17 (64) TESTS 30 155 5017600
148636667 zenman B March 6, 2022, 6:28 p.m. OK GNU C++17 (64) TESTS 33 155 8192000
148652385 KKT_89 B March 7, 2022, 12:50 a.m. OK GNU C++17 (64) TESTS 33 155 12083200
148563958 Kude B March 6, 2022, 10:28 a.m. OK GNU C++17 (64) TESTS 30 156 5017600
148586759 JaroslavUrban B March 6, 2022, 11:24 a.m. OK GNU C++17 (64) TESTS 30 170 3993600
148576554 Xellos B March 6, 2022, 10:55 a.m. OK GNU C++17 (64) TESTS 30 170 5017600
148557573 Vercingetorix B March 6, 2022, 10:17 a.m. OK GNU C++20 (64) TESTS 30 31 15360000
148564338 ZigZagK B March 6, 2022, 10:28 a.m. OK GNU C++20 (64) TESTS 30 62 3993600
148555229 YaliCai B March 6, 2022, 10:13 a.m. OK GNU C++20 (64) TESTS 30 108 91238400
148649317 silxi B March 6, 2022, 10:41 p.m. OK GNU C++20 (64) TESTS 33 124 4198400
148556855 visiteur B March 6, 2022, 10:16 a.m. OK GNU C++20 (64) TESTS 30 124 7987200
148612274 maxplus B March 6, 2022, 1:46 p.m. OK GNU C++20 (64) TESTS 31 124 7987200
148574656 Howarli B March 6, 2022, 10:50 a.m. OK GNU C++20 (64) TESTS 30 124 8089600
148613246 maxplus B March 6, 2022, 1:54 p.m. OK GNU C++20 (64) TESTS 32 124 12083200
148659685 shivangtiwari B March 7, 2022, 4:19 a.m. OK GNU C++20 (64) TESTS 33 124 12390400
148665276 the-other-sunny B March 7, 2022, 6:03 a.m. OK GNU C++20 (64) TESTS 33 124 14848000
148559755 mmaxio B March 6, 2022, 10:20 a.m. OK Java 11 TESTS 30 233 0
148553847 uwi B March 6, 2022, 10:11 a.m. OK Java 11 TESTS 30 265 5632000
148585179 Cepera B March 6, 2022, 11:19 a.m. OK Java 11 TESTS 30 374 15155200
148632907 Apocellipse B March 6, 2022, 5:39 p.m. OK Java 11 TESTS 33 467 25497600
148573745 YahiaSherif B March 6, 2022, 10:48 a.m. OK Java 11 TESTS 30 530 19456000
148568342 Hakiobo B March 6, 2022, 10:36 a.m. OK Kotlin 1.4 TESTS 30 483 0
148608581 arvindf232 B March 6, 2022, 1:17 p.m. OK Kotlin 1.4 TESTS 31 576 16896000
148556789 Sparky_Master_WCH1226 B March 6, 2022, 10:16 a.m. OK Kotlin 1.4 TESTS 30 576 16896000
148599617 r57shell B March 6, 2022, 12:03 p.m. OK MS C++ 2017 TESTS 30 296 7987200
148596679 machine_solution B March 6, 2022, 11:55 a.m. OK MS C++ 2017 TESTS 30 982 24166400
148574235 mban259 B March 6, 2022, 10:49 a.m. OK .NET Core C# TESTS 30 358 97075200
148651895 toam B March 7, 2022, 12:31 a.m. OK PyPy 3 TESTS 33 936 70963200
148637977 eepsilon B March 6, 2022, 6:47 p.m. OK PyPy 3 TESTS 33 1060 70553600
148559882 lowking B March 6, 2022, 10:20 a.m. OK PyPy 3 TESTS 30 1060 70553600
148663034 ambs_ B March 7, 2022, 5:26 a.m. OK PyPy 3 TESTS 33 1091 70451200
148561886 toam B March 6, 2022, 10:24 a.m. OK PyPy 3 TESTS 30 1668 134144000
148663408 nicku123 B March 7, 2022, 5:32 a.m. OK PyPy 3-64 TESTS 33 1138 135987200
148660262 dvaravind B March 7, 2022, 4:32 a.m. OK PyPy 3-64 TESTS 33 1200 134348800
148565613 tamato B March 6, 2022, 10:31 a.m. OK PyPy 3-64 TESTS 30 1294 138649600
148557056 Egor B March 6, 2022, 10:16 a.m. OK Rust 2021 TESTS 30 77 11980800
148615703 sansen B March 6, 2022, 2:16 p.m. OK Rust 2021 TESTS 33 109 17510400
148611029 togatoga B March 6, 2022, 1:35 p.m. OK Rust 2021 TESTS 31 249 57548800

remove filters

Back to search problems