Codeforces Global Round 13

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
1491 Codeforces Global Round 13 FINISHED False 10800 122747062 Feb. 28, 2021, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1029 ) F Magnets PROGRAMMING binary search constructive algorithms interactive

B"This is an interactive problem. Kochiya Sanae is playing with magnets. Realizing that some of those magnets are demagnetized, she is curious to find them out. There are n magnets, which can be of the following 3 types: Note that you don't know the types of these magnets beforehand. You have a machine which can measure the force between the magnets, and you can use it at most n+ lfloor log_2n rfloor times. You can put some magnets to the left part of the machine and some to the right part of the machine, and launch the machine. Obviously, you can put one magnet to at most one side (you don't have to put all magnets). You can put the same magnet in different queries. Then the machine will tell the force these magnets produce. Formally, let n_1,s_1 be the number of N and S magnets correspondently on the left and n_2,s_2 -- on the right. Then the force between them would be n_1n_2+s_1s_2-n_1s_2-n_2s_1 . Please note that the force is a signed value. However, when the absolute value of the force is strictly larger than n , the machine will crash into pieces. You need to find all magnets of type - (all demagnetized ones), without breaking the machine. Note that the interactor is not adaptive. The types of the magnets are fixed before the start of the interaction and do not change with queries. It is guaranteed that there are at least 2 magnets whose type is not -, and at least 1 magnet of type -. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. For each test case you should start by reading an integer n ( 3 <= q n <= q 2000 ) -- the number of the magnets. It is guaranteed that the total sum of all n over all test cases doesn't exceed 2000 . After that you can put some magnets into the machine and make a query from the statement. You have to print each query in three lines: After printing a query do not forget to output end of line a"...

Tutorials

Codeforces Global Round 13 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
108765004 2018LZY F March 1, 2021, 2:37 a.m. OK GNU C++11 TESTS 79 31 0
108764252 SSerxhs F March 1, 2021, 2:08 a.m. OK GNU C++11 TESTS 79 156 0
108742369 RainAir F Feb. 28, 2021, 4:30 p.m. OK GNU C++11 TESTS 79 171 0
108742558 FluffyBunny F Feb. 28, 2021, 4:31 p.m. OK GNU C++11 TESTS 79 171 409600
108762101 Scarlet_Hypoc F March 1, 2021, 12:25 a.m. OK GNU C++11 TESTS 79 186 0
108763732 froggyzhang F March 1, 2021, 1:45 a.m. OK GNU C++11 TESTS 79 187 0
108764015 jzp F March 1, 2021, 1:58 a.m. OK GNU C++11 TESTS 79 202 0
108762003 Suiseiseki F March 1, 2021, 12:19 a.m. OK GNU C++11 TESTS 79 202 0
108743063 Hoshimi F Feb. 28, 2021, 4:32 p.m. OK GNU C++11 TESTS 79 202 0
108735363 JeffreyLC F Feb. 28, 2021, 4:05 p.m. OK GNU C++11 TESTS 79 202 0

remove filters

Back to search problems