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 |
---|---|---|---|---|---|---|
1774 | Polynomial Round 2022 (Div. 1 + Div. 2, Rated, Prizes!) | FINISHED | False | 9000 | 60535499 | Dec. 17, 2022, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 12108 ) | C | Ice and Fire | PROGRAMMING | constructive algorithms dp greedy |
B'Little09 and his friends are playing a game. There are n players, and the temperature value of the player i is i . The types of environment are expressed as 0 or 1 . When two players fight in a specific environment, if its type is 0 , the player with a lower temperature value in this environment always wins; if it is 1 , the player with a higher temperature value in this environment always wins. The types of the n-1 environments form a binary string s with a length of n-1 . If there are x players participating in the game, there will be a total of x-1 battles, and the types of the x-1 environments will be the first x-1 characters of s . While there is more than one player left in the tournament, choose any two remaining players to fight. The player who loses will be eliminated from the tournament. The type of the environment of battle i is s_i . For each x from 2 to n , answer the following question: if all players whose temperature value does not exceed x participate in the game, how many players have a chance to win? Each test contains multiple test cases. The first line contains a single integer t ( 1 <= t <= 10^3 ) -- the number of test cases. The description of the test cases follows. The first line of each test case contains a single integer n ( 2 <= q n <= q 2 cdot 10^5 ) -- the number of players. The second line of each test case contains a binary string s with a length n-1 . It is guaranteed that the sum of n over all test cases does not exceed 3 cdot 10^5 . For each test case output n-1 integers -- for each x from 2 to n , output the number of players that have a chance to win. In the first test case, for x=2 and x=3 , only the player whose temperature value is 1 can be the winner. For x=4 , the player whose temperature value is 2,3,'... |
Polynomial Round 2022 (Div. 1 + Div. 2) Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
185703810 | FatemehAskari | C | Dec. 17, 2022, 4:49 p.m. | OK | C# 8 | TESTS | 50 | 951 | 14848000 | ||
185735452 | cgmoreda | C | Dec. 17, 2022, 11:10 p.m. | OK | GNU C++14 | TESTS | 50 | 46 | 0 | ||
185741153 | Aleph__Zero | C | Dec. 18, 2022, 2:32 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 204800 | ||
185741046 | xkcdjerry | C | Dec. 18, 2022, 2:29 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 204800 | ||
185740924 | xkcdjerry | C | Dec. 18, 2022, 2:26 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 204800 | ||
185740802 | steven144 | C | Dec. 18, 2022, 2:23 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 204800 | ||
185740546 | Aleph__Zero | C | Dec. 18, 2022, 2:17 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 204800 | ||
185752086 | Iam1789 | C | Dec. 18, 2022, 5:59 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 307200 | ||
185750872 | jai2706 | C | Dec. 18, 2022, 5:43 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 512000 | ||
185749722 | Kevin_attendant | C | Dec. 18, 2022, 5:28 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 512000 | ||
185741272 | xiaomiAK | C | Dec. 18, 2022, 2:35 a.m. | OK | GNU C++14 | TESTS | 50 | 46 | 512000 | ||
185742634 | jhdonghj112 | C | Dec. 18, 2022, 3:10 a.m. | OK | GNU C++17 | TESTS | 50 | 46 | 204800 | ||
185742602 | wronganswerr | C | Dec. 18, 2022, 3:09 a.m. | OK | GNU C++17 | TESTS | 50 | 46 | 204800 | ||
185738950 | Lucky_OvO | C | Dec. 18, 2022, 1:30 a.m. | OK | GNU C++17 | TESTS | 50 | 46 | 204800 | ||
185709403 | The-Winner | C | Dec. 17, 2022, 5:03 p.m. | OK | GNU C++17 | TESTS | 50 | 46 | 204800 | ||
185707553 | MatheusOP | C | Dec. 17, 2022, 4:59 p.m. | OK | GNU C++17 | TESTS | 50 | 46 | 204800 | ||
185750846 | T_yunhui | C | Dec. 18, 2022, 5:43 a.m. | OK | GNU C++17 | TESTS | 50 | 46 | 512000 | ||
185744462 | NotImplemented | C | Dec. 18, 2022, 3:53 a.m. | OK | GNU C++17 | TESTS | 50 | 46 | 512000 | ||
185742420 | Diamonrald | C | Dec. 18, 2022, 3:05 a.m. | OK | GNU C++17 | TESTS | 50 | 46 | 512000 | ||
185739831 | forevpurityyy | C | Dec. 18, 2022, 1:58 a.m. | OK | GNU C++17 | TESTS | 50 | 46 | 512000 | ||
185738555 | Apiram | C | Dec. 18, 2022, 1:17 a.m. | OK | GNU C++17 | TESTS | 50 | 46 | 512000 | ||
185742183 | Alex_Wei | C | Dec. 18, 2022, 2:59 a.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 307200 | ||
185747622 | Oinng | C | Dec. 18, 2022, 4:59 a.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 512000 | ||
185742572 | sanyon | C | Dec. 18, 2022, 3:08 a.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 512000 | ||
185731431 | aatrey | C | Dec. 17, 2022, 9:30 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 512000 | ||
185727779 | Azmee | C | Dec. 17, 2022, 8:31 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 512000 | ||
185722199 | TheQuantiX | C | Dec. 17, 2022, 7:22 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 512000 | ||
185722126 | airths | C | Dec. 17, 2022, 7:21 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 512000 | ||
185710096 | animay620 | C | Dec. 17, 2022, 5:04 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 512000 | ||
185708021 | pravesh_2505 | C | Dec. 17, 2022, 5 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 512000 | ||
185707386 | ashibh | C | Dec. 17, 2022, 4:58 p.m. | OK | GNU C++17 (64) | TESTS | 50 | 46 | 512000 | ||
185710169 | llking | C | Dec. 17, 2022, 5:04 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 0 | ||
185709811 | UnPolinomio | C | Dec. 17, 2022, 5:03 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 0 | ||
185700438 | EgKng | C | Dec. 17, 2022, 4:39 p.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 0 | ||
185739647 | Licykoc | C | Dec. 18, 2022, 1:52 a.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 204800 | ||
185747712 | DanielzNikolaevna | C | Dec. 18, 2022, 5 a.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 512000 | ||
185745868 | katsu. | C | Dec. 18, 2022, 4:22 a.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 512000 | ||
185745790 | marvenlee | C | Dec. 18, 2022, 4:20 a.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 512000 | ||
185744360 | BJJVSRJJT | C | Dec. 18, 2022, 3:51 a.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 512000 | ||
185744262 | VanIOImaster153 | C | Dec. 18, 2022, 3:49 a.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 512000 | ||
185743310 | xiaotiancaiqingbao | C | Dec. 18, 2022, 3:27 a.m. | OK | GNU C++20 (64) | TESTS | 50 | 31 | 512000 | ||
185721166 | mcrash12 | C | Dec. 17, 2022, 7:11 p.m. | OK | Java 11 | TESTS | 50 | 218 | 0 | ||
185701572 | singh.yuvraj1047 | C | Dec. 17, 2022, 4:42 p.m. | OK | Java 11 | TESTS | 50 | 218 | 0 | ||
185719825 | shubham202012 | C | Dec. 17, 2022, 6:58 p.m. | OK | Java 11 | TESTS | 50 | 233 | 0 | ||
185710403 | rohit_8469 | C | Dec. 17, 2022, 5:04 p.m. | OK | Java 11 | TESTS | 50 | 280 | 0 | ||
185702381 | Sudhanshu_03 | C | Dec. 17, 2022, 4:44 p.m. | OK | Java 11 | TESTS | 50 | 280 | 0 | ||
185700902 | sduMamutbekov | C | Dec. 17, 2022, 4:40 p.m. | OK | Java 11 | TESTS | 50 | 280 | 0 | ||
185706780 | Aabhas99 | C | Dec. 17, 2022, 4:57 p.m. | OK | Java 8 | TESTS | 50 | 124 | 2048000 | ||
185739764 | duyipeng | C | Dec. 18, 2022, 1:55 a.m. | OK | Java 8 | TESTS | 50 | 140 | 0 | ||
185739573 | ikillmyself | C | Dec. 18, 2022, 1:50 a.m. | OK | Java 8 | TESTS | 50 | 140 | 0 | ||
185735010 | Mohamed308 | C | Dec. 17, 2022, 10:56 p.m. | OK | Java 8 | TESTS | 50 | 140 | 0 | ||
185720996 | TheSawan | C | Dec. 17, 2022, 7:10 p.m. | OK | Java 8 | TESTS | 50 | 140 | 0 | ||
185700939 | abhayrajnegi0416 | C | Dec. 17, 2022, 4:40 p.m. | OK | Java 8 | TESTS | 50 | 156 | 2457600 | ||
185702348 | imMortalSuv | C | Dec. 17, 2022, 4:44 p.m. | OK | Java 8 | TESTS | 50 | 171 | 0 | ||
185701997 | sifath100 | C | Dec. 17, 2022, 4:43 p.m. | OK | Java 8 | TESTS | 50 | 186 | 0 | ||
185737353 | 202103023413 | C | Dec. 18, 2022, 12:28 a.m. | OK | MS C++ 2017 | TESTS | 50 | 77 | 1433600 | ||
185728043 | dooyoung | C | Dec. 17, 2022, 8:35 p.m. | OK | MS C++ 2017 | TESTS | 50 | 187 | 614400 | ||
185717333 | Vitru | C | Dec. 17, 2022, 6:38 p.m. | OK | MS C++ 2017 | TESTS | 50 | 187 | 614400 | ||
185703762 | Nanouklol | C | Dec. 17, 2022, 4:48 p.m. | OK | Node.js | TESTS | 50 | 124 | 18022400 | ||
185707356 | harvey123 | C | Dec. 17, 2022, 4:58 p.m. | OK | PyPy 3 | TESTS | 50 | 171 | 79052800 | ||
185707622 | SaurabhJaiswal | C | Dec. 17, 2022, 4:59 p.m. | OK | PyPy 3 | TESTS | 50 | 342 | 14643200 | ||
185750612 | Raindrops1117 | C | Dec. 18, 2022, 5:40 a.m. | OK | PyPy 3 | TESTS | 50 | 436 | 11161600 | ||
185702375 | VovaLolKek | C | Dec. 17, 2022, 4:44 p.m. | OK | PyPy 3 | TESTS | 50 | 452 | 11059200 | ||
185700660 | A9_10 | C | Dec. 17, 2022, 4:39 p.m. | OK | PyPy 3 | TESTS | 50 | 452 | 11468800 | ||
185740335 | bambu07 | C | Dec. 18, 2022, 2:12 a.m. | OK | PyPy 3 | TESTS | 50 | 483 | 11776000 | ||
185706782 | bongcloud7777 | C | Dec. 17, 2022, 4:57 p.m. | OK | PyPy 3 | TESTS | 50 | 499 | 15155200 | ||
185709931 | gs3122 | C | Dec. 17, 2022, 5:04 p.m. | OK | PyPy 3 | TESTS | 50 | 499 | 47411200 | ||
185745445 | V.Karthik | C | Dec. 18, 2022, 4:13 a.m. | OK | PyPy 3-64 | TESTS | 50 | 93 | 14336000 | ||
185723600 | mrdhnv | C | Dec. 17, 2022, 7:36 p.m. | OK | PyPy 3-64 | TESTS | 50 | 109 | 11468800 | ||
185736919 | onemoreq | C | Dec. 18, 2022, 12:08 a.m. | OK | PyPy 3-64 | TESTS | 50 | 124 | 10035200 | ||
185716938 | mintplz | C | Dec. 17, 2022, 6:35 p.m. | OK | PyPy 3-64 | TESTS | 50 | 124 | 16896000 | ||
185716894 | hvbird | C | Dec. 17, 2022, 6:35 p.m. | OK | PyPy 3-64 | TESTS | 50 | 124 | 16896000 | ||
185706156 | _N_0_0_B_ | C | Dec. 17, 2022, 4:55 p.m. | OK | PyPy 3-64 | TESTS | 50 | 140 | 17612800 | ||
185723171 | D.V.Aravind | C | Dec. 17, 2022, 7:31 p.m. | OK | PyPy 3-64 | TESTS | 50 | 140 | 20070400 | ||
185716727 | generalPurpose | C | Dec. 17, 2022, 6:34 p.m. | OK | PyPy 3-64 | TESTS | 50 | 155 | 16179200 | ||
185700883 | BOCHO | C | Dec. 17, 2022, 4:40 p.m. | OK | PyPy 3-64 | TESTS | 50 | 155 | 16588800 | ||
185747043 | mohanned_war | C | Dec. 18, 2022, 4:48 a.m. | OK | PyPy 3-64 | TESTS | 50 | 155 | 16896000 | ||
185735584 | vule.coffo | C | Dec. 17, 2022, 11:13 p.m. | OK | Python 3 | TESTS | 50 | 218 | 11673600 | ||
185701844 | Anchawale | C | Dec. 17, 2022, 4:43 p.m. | OK | Python 3 | TESTS | 50 | 234 | 11776000 | ||
185730861 | beautifulworld | C | Dec. 17, 2022, 9:19 p.m. | OK | Python 3 | TESTS | 50 | 249 | 4710400 | ||
185729695 | amarbudhiraja | C | Dec. 17, 2022, 8:59 p.m. | OK | Python 3 | TESTS | 50 | 467 | 4096000 | ||
185708835 | wKai000 | C | Dec. 17, 2022, 5:01 p.m. | OK | Python 3 | TESTS | 50 | 468 | 5120000 | ||
185706290 | Scourge_Seraph | C | Dec. 17, 2022, 4:55 p.m. | OK | Python 3 | TESTS | 50 | 499 | 716800 | ||
185705538 | sikchisagar9330 | C | Dec. 17, 2022, 4:53 p.m. | OK | Python 3 | TESTS | 50 | 499 | 5939200 | ||
185703127 | Sami.S_SundarSTEM | C | Dec. 17, 2022, 4:47 p.m. | OK | Python 3 | TESTS | 50 | 545 | 819200 | ||
185717358 | pranavkumar | C | Dec. 17, 2022, 6:38 p.m. | OK | Python 3 | TESTS | 50 | 561 | 5939200 | ||
185706287 | hiral_garg | C | Dec. 17, 2022, 4:55 p.m. | OK | Python 3 | TESTS | 50 | 623 | 3174400 |
Back to search problems