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 |
|---|---|---|---|---|---|---|
| 623 | AIM Tech Round (Div. 1) | FINISHED | False | 7200 | 321886485 | Feb. 4, 2016, 5:05 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 526 ) | C | Electric Charges | PROGRAMMING | binary search dp | 2800 |
Programmer Sasha is a student at MIPT (Moscow Institute of Physics and Technology) and he needs to make a laboratory work to pass his finals. A laboratory unit is a plane with standard coordinate axes marked on it. Physicists from Moscow Institute of Physics and Technology charged the axes by large electric charges: axis X is positive and axis Y is negative. Experienced laboratory worker marked n points with integer coordinates ( x i , y i ) on the plane and stopped the time. Sasha should use "atomic tweezers" to place elementary particles in these points. He has an unlimited number of electrons (negatively charged elementary particles) and protons (positively charged elementary particles). He can put either an electron or a proton at each marked point. As soon as all marked points are filled with particles, laboratory worker will turn on the time again and the particles will come in motion and after some time they will stabilize in equilibrium. The objective of the laboratory work is to arrange the particles in such a way, that the diameter of the resulting state (the maximum distance between the pairs of points of the set) is as small as possible. Since Sasha is a programmer, he naively thinks that all the particles will simply "fall" into their projections on the corresponding axes: electrons will fall on axis X , while protons will fall on axis Y . As we are programmers too, we will consider the same model as Sasha. That is, a particle gets from point ( x , y ) to point ( x , 0) if it is an electron and to point (0, y ) if it is a proton. As the laboratory has high background radiation and Sasha takes care of his laptop, he did not take it with him, and now he can't write a program that computes the minimum possible diameter of the resulting set. Therefore, you will have to do it for him. Print a square of the minimum possible diameter of the set. The first line of the input contains a single integer n ( 1 ≤ n ≤ 100 000 ) — the number of points marked |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 20560032 | jiyutian | C | Sept. 13, 2016, 4:40 a.m. | OK | GNU C++ | TESTS | 176 | 109 | 2252800 | 2800 | |
| 15989208 | shdut | C | Feb. 13, 2016, 3:13 p.m. | OK | GNU C++ | TESTS | 176 | 109 | 2764800 | 2800 | |
| 16710706 | jcvb | C | March 14, 2016, 9:19 a.m. | OK | GNU C++ | TESTS | 176 | 124 | 4505600 | 2800 | |
| 16331497 | wangck1998 | C | Feb. 25, 2016, 1:50 p.m. | OK | GNU C++ | TESTS | 176 | 140 | 2457600 | 2800 | |
| 35823748 | vjudge3 | C | March 2, 2018, 2:48 a.m. | OK | GNU C++ | TESTS | 176 | 140 | 4300800 | 2800 | |
| 17595533 | vjudge2 | C | April 30, 2016, 1:15 p.m. | OK | GNU C++ | TESTS | 176 | 140 | 4505600 | 2800 | |
| 31785415 | _SHENZHEBEI_ | C | Oct. 27, 2017, 6:39 a.m. | OK | GNU C++ | TESTS | 176 | 140 | 15257600 | 2800 | |
| 16064585 | function348 | C | Feb. 17, 2016, 2:18 a.m. | OK | GNU C++ | TESTS | 176 | 155 | 2457600 | 2800 | |
| 15988945 | shdut | C | Feb. 13, 2016, 2:47 p.m. | OK | GNU C++ | TESTS | 176 | 155 | 3584000 | 2800 | |
| 35778142 | vjudge4 | C | Feb. 28, 2018, 8:13 a.m. | OK | GNU C++ | TESTS | 176 | 155 | 4403200 | 2800 | |
| 22339756 | Minology | C | Nov. 20, 2016, 2:51 a.m. | OK | GNU C++11 | TESTS | 176 | 93 | 2457600 | 2800 | |
| 17433599 | namai | C | April 22, 2016, 11:29 a.m. | OK | GNU C++11 | TESTS | 176 | 93 | 5427200 | 2800 | |
| 16282931 | ershov.stanislav | C | Feb. 22, 2016, 7:24 p.m. | OK | GNU C++11 | TESTS | 176 | 108 | 4403200 | 2800 | |
| 15894200 | zhouwenkai | C | Feb. 8, 2016, 10:43 a.m. | OK | GNU C++11 | TESTS | 176 | 109 | 2252800 | 2800 | |
| 40985225 | ReaLNero1 | C | July 30, 2018, 7:49 p.m. | OK | GNU C++11 | TESTS | 176 | 109 | 2457600 | 2800 | |
| 15944064 | shanbei_drug_trafficker | C | Feb. 10, 2016, 5:12 p.m. | OK | GNU C++11 | TESTS | 176 | 109 | 2457600 | 2800 | |
| 15843653 | matthew99 | C | Feb. 6, 2016, 2:05 p.m. | OK | GNU C++11 | TESTS | 176 | 109 | 3584000 | 2800 | |
| 15951580 | BUPT_birdstorm | C | Feb. 11, 2016, 6:56 a.m. | OK | GNU C++11 | TESTS | 176 | 109 | 5222400 | 2800 | |
| 69878325 | Hazyknight | C | Jan. 31, 2020, 5:16 a.m. | OK | GNU C++11 | TESTS | 176 | 124 | 2457600 | 2800 | |
| 15943837 | BUPT_birdstorm | C | Feb. 10, 2016, 5:05 p.m. | OK | GNU C++11 | TESTS | 176 | 124 | 2457600 | 2800 | |
| 36799154 | Dreamchaser101 | C | April 1, 2018, 1:14 p.m. | OK | GNU C++14 | TESTS | 176 | 156 | 5734400 | 2800 | |
| 31785030 | vjudge5 | C | Oct. 27, 2017, 6:21 a.m. | OK | GNU C++14 | TESTS | 176 | 186 | 35020800 | 2800 | |
| 31785020 | q234rty | C | Oct. 27, 2017, 6:20 a.m. | OK | GNU C++14 | TESTS | 176 | 187 | 35020800 | 2800 | |
| 67421221 | EntityIT | C | Dec. 22, 2019, 11:44 a.m. | OK | GNU C++14 | TESTS | 176 | 202 | 4812800 | 2800 | |
| 30307062 | NiroBC | C | Sept. 13, 2017, 12:40 p.m. | OK | GNU C++14 | TESTS | 176 | 202 | 18022400 | 2800 | |
| 33476050 | erfanesm omidazadi | C | Dec. 21, 2017, 10:13 a.m. | OK | GNU C++14 | TESTS | 176 | 233 | 14848000 | 2800 | |
| 31257119 | victoragnez | C | Oct. 12, 2017, 5:51 p.m. | OK | GNU C++14 | TESTS | 176 | 234 | 2867200 | 2800 | |
| 26769355 | King_George | C | April 30, 2017, 2:14 p.m. | OK | GNU C++14 | TESTS | 176 | 264 | 8396800 | 2800 | |
| 31785043 | black_moon | C | Oct. 27, 2017, 6:21 a.m. | OK | GNU C++14 | TESTS | 176 | 265 | 6451200 | 2800 | |
| 31777644 | vjudge3 | C | Oct. 27, 2017, 2:40 a.m. | OK | GNU C++14 | TESTS | 176 | 280 | 4812800 | 2800 | |
| 57863103 | Benq | C | July 27, 2019, 6:59 p.m. | OK | GNU C++17 | TESTS | 176 | 217 | 2457600 | 2800 | |
| 69547310 | ruo | C | Jan. 26, 2020, 4:02 a.m. | OK | GNU C++17 | TESTS | 176 | 233 | 4812800 | 2800 | |
| 66998244 | hjk1030 | C | Dec. 16, 2019, 3:53 a.m. | OK | GNU C++17 | TESTS | 176 | 249 | 4812800 | 2800 | |
| 55287377 | Antoine | C | June 8, 2019, 5:49 a.m. | OK | GNU C++17 | TESTS | 176 | 264 | 3174400 | 2800 | |
| 42095617 | XTyuan | C | Aug. 25, 2018, 3:57 p.m. | OK | GNU C++17 | TESTS | 176 | 265 | 4812800 | 2800 | |
| 41567820 | isaf27 | C | Aug. 13, 2018, 6:41 p.m. | OK | GNU C++17 | TESTS | 176 | 265 | 4812800 | 2800 | |
| 62440490 | Rzepa | C | Oct. 12, 2019, 7:12 p.m. | OK | GNU C++17 | TESTS | 176 | 280 | 48128000 | 2800 | |
| 46555565 | kefaa2 | C | Dec. 3, 2018, 6:44 p.m. | OK | GNU C++17 | TESTS | 176 | 373 | 6656000 | 2800 | |
| 57892172 | Kmcode | C | July 28, 2019, 12:13 p.m. | OK | GNU C++17 | TESTS | 176 | 1123 | 14848000 | 2800 | |
| 63620172 | ivan100sic | C | Oct. 27, 2019, 10:13 p.m. | OK | GNU C++17 | TESTS | 176 | 1606 | 3584000 | 2800 | |
| 15806724 | Sinner | C | Feb. 4, 2016, 6:28 p.m. | OK | Java 8 | TESTS | 176 | 343 | 2764800 | 2800 | |
| 15929164 | antonkov | C | Feb. 10, 2016, 1:01 p.m. | OK | Java 8 | TESTS | 176 | 1949 | 0 | 2800 | |
| 15854112 | azukun | C | Feb. 7, 2016, 8:39 a.m. | OK | MS C# | TESTS | 176 | 998 | 12288000 | 2800 | |
| 15948614 | Milanin | C | Feb. 10, 2016, 10:01 p.m. | OK | MS C++ | TESTS | 176 | 374 | 2457600 | 2800 | |
| 16090160 | HappyLittlePony | C | Feb. 17, 2016, 7:47 p.m. | OK | MS C++ | TESTS | 176 | 967 | 7782400 | 2800 | |
| 15811032 | izban | C | Feb. 4, 2016, 7:32 p.m. | OK | MS C++ | TESTS | 176 | 1325 | 6656000 | 2800 | |
| 15916033 | Death_Knight_DK | C | Feb. 9, 2016, 2:37 p.m. | OK | MS C++ | TESTS | 176 | 1653 | 33689600 | 2800 |
Back to search problems