Codeforces Round 900 (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
1878 Codeforces Round 900 (Div. 3) FINISHED False 8100 41441063 Sept. 26, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4265 ) F Vasilije Loves Number Theory PROGRAMMING math number theory

B'Vasilije is a smart student and his discrete mathematics teacher Sonja taught him number theory very well. He gave Ognjen a positive integer n . Denote d(n) as the number of positive integer divisors of n , and denote gcd(a, b) as the largest integer g such that a is divisible by g and b is divisible by g . After that, he gave Ognjen q queries, and there are 2 types of queries. Note that n does not get back to its initial value after the type 1 query. Since Ognjen is afraid of number theory, Vasilije promised him that after each query, d(n) <= 10^9 , however, even with that constraint, he still needs your help with this problem. The first line contains a positive integer t , ( 1 <= t <= 100 ) -- the number of test cases. The first line of each test case contains 2 integers, n and q ( 1 <= n <= 10^{6} , 1 <= q <= 1000 ) -- the number n and the number of queries. The following q lines contain an integer k ( 1 <= k <= 2 ), if k=1 then there is another integer in this line x ( 1 <= x <= 10^6 ) -- the description of the queries. It is guaranteed that, for the given input, d(n) does not exceed 10^9 at any point. It is guaranteed that the sum of q over all test cases doesn 't exceed 10^3 . For each type 1 query, you should output "YES" if there exist such positive integer a that gcd(a, n) = 1 and d(n cdot a)=n , and "NO" if he can 't. You can output the answer in any case (for example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as a positive answer). In the first test case, we initially have n=1 . After the first query: n=1 , d(n)=1 , so by taking a = 1 , d(n cdot a) = n , and the answer to this query is "YES". After the second query: n=2 , d(n)=2 , we can, again, take a = 1 , d(n cdot a) = n , and'...

Tutorials

Codeforces round #900 (Div.3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
225549264 omeganot F Sept. 27, 2023, 5 p.m. OK GNU C++14 TESTS 22 15 102400
225526176 chibubao F Sept. 27, 2023, 2:10 p.m. OK GNU C++14 TESTS 22 15 102400
225502124 EasonLiang F Sept. 27, 2023, 11:33 a.m. OK GNU C++14 TESTS 22 15 1228800
225501577 Lotuses F Sept. 27, 2023, 11:30 a.m. OK GNU C++14 TESTS 22 15 1228800
225458463 jiang_feng F Sept. 27, 2023, 4:35 a.m. OK GNU C++14 TESTS 22 15 1228800
225472275 xzf200906 F Sept. 27, 2023, 7:42 a.m. OK GNU C++14 TESTS 22 15 3174400
225479932 seeeeeeven7 F Sept. 27, 2023, 8:44 a.m. OK GNU C++14 TESTS 22 30 1228800
225493372 Neco_arc F Sept. 27, 2023, 10:32 a.m. OK GNU C++14 TESTS 22 30 13209600
225585194 lsxhyyds F Sept. 28, 2023, 1:54 a.m. OK GNU C++14 TESTS 22 31 102400
225569826 ssp_2000 F Sept. 27, 2023, 8:25 p.m. OK GNU C++14 TESTS 22 31 102400
225599449 siiiuuuuuuu_007 F Sept. 28, 2023, 5:44 a.m. OK GNU C++17 TESTS 22 15 102400
225594253 imposterx F Sept. 28, 2023, 4:42 a.m. OK GNU C++17 TESTS 22 15 102400
225590057 zulfahmi1612 F Sept. 28, 2023, 3:36 a.m. OK GNU C++17 TESTS 22 15 102400
225579762 Rj3i_Flicker F Sept. 27, 2023, 11:46 p.m. OK GNU C++17 TESTS 22 15 102400
225565542 kevin_thelast_916 F Sept. 27, 2023, 7:32 p.m. OK GNU C++17 TESTS 22 15 102400
225549477 dipu_2 F Sept. 27, 2023, 5:02 p.m. OK GNU C++17 TESTS 22 15 102400
225528238 momen159 F Sept. 27, 2023, 2:24 p.m. OK GNU C++17 TESTS 22 15 102400
225525884 lomlit F Sept. 27, 2023, 2:08 p.m. OK GNU C++17 TESTS 22 15 102400
225586283 tnakao F Sept. 28, 2023, 2:19 a.m. OK GNU C++17 TESTS 22 15 204800
225559600 hbatata11 F Sept. 27, 2023, 6:30 p.m. OK GNU C++17 TESTS 22 15 204800
225572600 birka0 F Sept. 27, 2023, 9:06 p.m. OK GNU C++17 (64) TESTS 22 15 0
225509418 yangyl F Sept. 27, 2023, 12:20 p.m. OK GNU C++17 (64) TESTS 22 15 1228800
225508179 Cosysl F Sept. 27, 2023, 12:12 p.m. OK GNU C++17 (64) TESTS 22 15 1228800
225506859 kumarnimit0316 F Sept. 27, 2023, 12:04 p.m. OK GNU C++17 (64) TESTS 22 15 1228800
225506253 luowang666 F Sept. 27, 2023, noon OK GNU C++17 (64) TESTS 22 15 1228800
225495144 yeyuotc F Sept. 27, 2023, 10:46 a.m. OK GNU C++17 (64) TESTS 22 15 1228800
225487741 shiro53 F Sept. 27, 2023, 9:45 a.m. OK GNU C++17 (64) TESTS 22 15 1228800
225484738 yyyyyd F Sept. 27, 2023, 9:20 a.m. OK GNU C++17 (64) TESTS 22 15 1228800
225459630 wqweto F Sept. 27, 2023, 4:50 a.m. OK GNU C++17 (64) TESTS 22 15 1228800
225458544 I_love_GSNQK F Sept. 27, 2023, 4:36 a.m. OK GNU C++17 (64) TESTS 22 15 1228800
225482957 litachloveyou F Sept. 27, 2023, 9:07 a.m. OK GNU C++20 (64) TESTS 22 0 1331200
225596820 lwx_hh F Sept. 28, 2023, 5:15 a.m. OK GNU C++20 (64) TESTS 22 15 0
225573817 UnstoppableChillMachine F Sept. 27, 2023, 9:26 p.m. OK GNU C++20 (64) TESTS 22 15 0
225562661 Mikami F Sept. 27, 2023, 7:01 p.m. OK GNU C++20 (64) TESTS 22 15 0
225560976 kinannotfound F Sept. 27, 2023, 6:44 p.m. OK GNU C++20 (64) TESTS 22 15 0
225560626 Mikami F Sept. 27, 2023, 6:40 p.m. OK GNU C++20 (64) TESTS 22 15 0
225560334 giokit F Sept. 27, 2023, 6:37 p.m. OK GNU C++20 (64) TESTS 22 15 0
225560027 XHYMathematics F Sept. 27, 2023, 6:34 p.m. OK GNU C++20 (64) TESTS 22 15 0
225559504 Mikami F Sept. 27, 2023, 6:29 p.m. OK GNU C++20 (64) TESTS 22 15 0
225559248 kinannotfound F Sept. 27, 2023, 6:27 p.m. OK GNU C++20 (64) TESTS 22 15 0
225488333 vermadv2000 F Sept. 27, 2023, 9:49 a.m. OK Java 17 TESTS 22 217 40448000
225450143 keduolimm F Sept. 27, 2023, 2:30 a.m. OK Java 17 TESTS 22 233 40550400
225512255 KAZHYI F Sept. 27, 2023, 12:39 p.m. OK Java 17 TESTS 22 249 40448000
225459629 ikun111 F Sept. 27, 2023, 4:50 a.m. OK Java 17 TESTS 22 264 40755200
225571384 cpp10 F Sept. 27, 2023, 8:46 p.m. OK Java 17 TESTS 22 389 1024000
225571469 cpp10 F Sept. 27, 2023, 8:47 p.m. OK Java 17 TESTS 22 390 512000
225596946 Mamimi F Sept. 28, 2023, 5:16 a.m. OK Java 17 TESTS 22 795 6656000
225522539 vijay_panwar12 F Sept. 27, 2023, 1:46 p.m. OK Java 8 TESTS 22 124 0
225564172 Sumitsingh7 F Sept. 27, 2023, 7:17 p.m. OK Java 8 TESTS 22 124 5939200
225497059 Danger_Don F Sept. 27, 2023, 11 a.m. OK Java 8 TESTS 22 124 18944000
225485995 yvbf F Sept. 27, 2023, 9:30 a.m. OK Java 8 TESTS 22 1716 268390400
225483378 xyxoro F Sept. 27, 2023, 9:10 a.m. OK PyPy 3 TESTS 22 155 21811200
225483808 xyxoro F Sept. 27, 2023, 9:13 a.m. OK PyPy 3 TESTS 22 171 21606400
225482961 xyxoro F Sept. 27, 2023, 9:07 a.m. OK PyPy 3 TESTS 22 218 23654400
225546500 lomakus F Sept. 27, 2023, 4:38 p.m. OK PyPy 3-64 TESTS 22 124 5427200
225545888 lomakus F Sept. 27, 2023, 4:34 p.m. OK PyPy 3-64 TESTS 22 124 5632000
225450285 YMSeah F Sept. 27, 2023, 2:32 a.m. OK PyPy 3-64 TESTS 22 124 35328000
225546391 lomakus F Sept. 27, 2023, 4:38 p.m. OK PyPy 3-64 TESTS 22 139 5324800
225485366 yukipom F Sept. 27, 2023, 9:25 a.m. OK PyPy 3-64 TESTS 22 139 35123200
225582040 RobinFromTheHood F Sept. 28, 2023, 12:40 a.m. OK PyPy 3-64 TESTS 22 155 10035200
225455338 liuaaa F Sept. 27, 2023, 3:53 a.m. OK PyPy 3-64 TESTS 22 171 38400000
225595072 sinhabalabira3 F Sept. 28, 2023, 4:53 a.m. OK PyPy 3-64 TESTS 22 187 15667200
225546299 broshen F Sept. 27, 2023, 4:37 p.m. OK PyPy 3-64 TESTS 22 187 18022400
225470728 dipakgupta007 F Sept. 27, 2023, 7:25 a.m. OK PyPy 3-64 TESTS 22 187 45670400
225518390 edugong F Sept. 27, 2023, 1:20 p.m. OK Python 3 TESTS 22 390 5939200
225547845 hunglomdom F Sept. 27, 2023, 4:49 p.m. OK Python 3 TESTS 22 561 10956800
225521419 bqn F Sept. 27, 2023, 1:39 p.m. OK Rust 2021 TESTS 22 15 1740800
225496997 zheland F Sept. 27, 2023, 11 a.m. OK Rust 2021 TESTS 22 31 5222400

remove filters

Back to search problems