Educational Codeforces Round 145 (Rated for Div. 2)

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
1809 Educational Codeforces Round 145 (Rated for Div. 2) FINISHED False 7200 57597863 March 23, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 20448 ) B Points on Plane PROGRAMMING binary search greedy math

B'You are given a two-dimensional plane, and you need to place n chips on it. You can place a chip only at a point with integer coordinates. The cost of placing a chip at the point (x, y) is equal to |x| + |y| (where |a| is the absolute value of a ). The cost of placing n chips is equal to the maximum among the costs of each chip. You need to place n chips on the plane in such a way that the Euclidean distance between each pair of chips is strictly greater than 1 , and the cost is the minimum possible. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of test cases. Next t cases follow. The first and only line of each test case contains one integer n ( 1 <= n <= 10^{18} ) -- the number of chips you need to place. For each test case, print a single integer -- the minimum cost to place n chips if the distance between each pair of chips must be strictly greater than 1 . In the first test case, you can place the only chip at point (0, 0) with total cost equal to 0 + 0 = 0 . In the second test case, you can, for example, place chips at points (-1, 0) , (0, 1) and (1, 0) with costs |-1| + |0| = 1 , |0| + |1| = 1 and |0| + |1| = 1 . Distance between each pair of chips is greater than 1 (for example, distance between (-1, 0) and (0, 1) is equal to sqrt{2} ). The total cost is equal to max(1, 1, 1) = 1 . In the third test case, you can, for example, place chips at points (-1, -1) , (-1, 1) , (1, 1) , (0, 0) and (0, 2) . The total cost is equal to max(2, 2, 2, 0, 2) = 2 . '...

Tutorials

114300

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
198873040 AkashGaneriwal B March 23, 2023, 10:53 p.m. OK Clang++20 Diagnostics TESTS 3 170 0
198890493 Batchu_Radhika B March 24, 2023, 4:36 a.m. OK GNU C++14 TESTS 3 0 0
198852042 ishakunwar B March 23, 2023, 7:08 p.m. OK GNU C++14 TESTS 3 0 0
198838313 sriv2804 B March 23, 2023, 5:20 p.m. OK GNU C++14 TESTS 3 0 0
198831603 princesharma74 B March 23, 2023, 4:45 p.m. OK GNU C++14 TESTS 3 0 0
198831568 Kareem-Ahmed B March 23, 2023, 4:45 p.m. OK GNU C++14 TESTS 3 0 0
198827911 dlebryk B March 23, 2023, 4:33 p.m. OK GNU C++14 TESTS 3 0 0
198890782 PROOF_A_Z B March 24, 2023, 4:40 a.m. OK GNU C++14 TESTS 3 15 0
198889282 Uni_Tune B March 24, 2023, 4:17 a.m. OK GNU C++14 TESTS 3 15 0
198887983 yeying075 B March 24, 2023, 3:53 a.m. OK GNU C++14 TESTS 3 15 0
198886527 Kyzer1de B March 24, 2023, 3:26 a.m. OK GNU C++14 TESTS 3 15 0
198890741 itsjustblue B March 24, 2023, 4:39 a.m. OK GNU C++17 TESTS 3 0 0
198883455 xioachou B March 24, 2023, 2:23 a.m. OK GNU C++17 TESTS 3 0 0
198883039 xin2002 B March 24, 2023, 2:14 a.m. OK GNU C++17 TESTS 3 0 0
198879846 dbt10 B March 24, 2023, 1:06 a.m. OK GNU C++17 TESTS 3 0 0
198876253 Al_madbwly B March 23, 2023, 11:55 p.m. OK GNU C++17 TESTS 3 0 0
198875745 ERRORsOverflow B March 23, 2023, 11:45 p.m. OK GNU C++17 TESTS 3 0 0
198875324 Turing_Sheep B March 23, 2023, 11:37 p.m. OK GNU C++17 TESTS 3 0 0
198873440 obscure0_0 B March 23, 2023, 11 p.m. OK GNU C++17 TESTS 3 0 0
198860434 igz B March 23, 2023, 8:32 p.m. OK GNU C++17 TESTS 3 0 0
198857254 ThunderXGod B March 23, 2023, 8:01 p.m. OK GNU C++17 TESTS 3 0 0
198893774 muzizhou B March 24, 2023, 5:17 a.m. OK GNU C++17 (64) TESTS 3 0 0
198884288 C0nfused B March 24, 2023, 2:43 a.m. OK GNU C++17 (64) TESTS 3 0 0
198874874 _oo1oo_ B March 23, 2023, 11:29 p.m. OK GNU C++17 (64) TESTS 3 0 0
198847606 opPO B March 23, 2023, 6:26 p.m. OK GNU C++17 (64) TESTS 3 0 0
198841527 trash2026 B March 23, 2023, 5:40 p.m. OK GNU C++17 (64) TESTS 3 0 0
198841199 mesbah19 B March 23, 2023, 5:38 p.m. OK GNU C++17 (64) TESTS 3 0 0
198829743 pawan1712 B March 23, 2023, 4:38 p.m. OK GNU C++17 (64) TESTS 3 0 0
198891918 moursalinme B March 24, 2023, 4:55 a.m. OK GNU C++17 (64) TESTS 3 15 0
198891855 moursalinme B March 24, 2023, 4:54 a.m. OK GNU C++17 (64) TESTS 3 15 0
198888715 jz796 B March 24, 2023, 4:07 a.m. OK GNU C++17 (64) TESTS 3 15 0

remove filters

Back to search problems