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 |
---|---|---|---|---|---|---|
1553 | Harbour.Space Scholarship Contest 2021-2022 (open for everyone, rated, Div. 1 + Div. 2) | FINISHED | False | 9000 | 110388311 | July 22, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 18205 ) | C | Penalty | PROGRAMMING | brute force dp greedy |
B"Consider a simplified penalty phase at the end of a football match. A penalty phase consists of at most 10 kicks, the first team takes the first kick, the second team takes the second kick, then the first team takes the third kick, and so on. The team that scores more goals wins; if both teams score the same number of goals, the game results in a tie (note that it goes against the usual football rules). The penalty phase is stopped if one team has scored more goals than the other team could reach with all of its remaining kicks. For example, if after the 7 -th kick the first team has scored 1 goal, and the second team has scored 3 goals, the penalty phase ends -- the first team cannot reach 3 goals. You know which player will be taking each kick, so you have your predictions for each of the 10 kicks. These predictions are represented by a string s consisting of 10 characters. Each character can either be 1, 0, or ?. This string represents your predictions in the following way: Based on your predictions, you have to calculate the minimum possible number of kicks there can be in the penalty phase (that means, the earliest moment when the penalty phase is stopped, considering all possible ways it could go). Note that the referee doesn't take into account any predictions when deciding to stop the penalty phase -- you may know that some kick will/won't be scored, but the referee doesn't. The first line contains one integer t ( 1 <= t <= 1 ,000 ) -- the number of test cases. Each test case is represented by one line containing the string s , consisting of exactly 10 characters. Each character is either 1, 0, or ?. For each test case, print one integer -- the minimum possible number of kicks in the penalty phase. Consider the example test: In the first test case, consider the situation when the 1 -st, 5 -th and 7 -th kicks score goals, and kicks 2 , 3 , 4 and "... |
Harbour.Space Scholarship Contest 2021-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 |
---|---|---|---|---|---|---|---|---|---|---|---|
123351210 | Bikmish | C | July 22, 2021, 5:03 p.m. | OK | GNU C11 | TESTS | 20 | 31 | 3686400 | ||
123349308 | happy_rose | C | July 22, 2021, 4:57 p.m. | OK | GNU C11 | TESTS | 20 | 31 | 3686400 | ||
123375327 | 1443356159 Capitalist_Wang | C | July 23, 2021, 12:52 a.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3686400 | ||
123379813 | Yang_Rick | C | July 23, 2021, 2:15 a.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3891200 | ||
123377909 | C20211711LJS | C | July 23, 2021, 1:44 a.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3891200 | ||
123376234 | pdsu_luren | C | July 23, 2021, 1:13 a.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3891200 | ||
123357057 | NEUQJacker | C | July 22, 2021, 6:44 p.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3891200 | ||
123347129 | prodigy33 | C | July 22, 2021, 4:50 p.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3891200 | ||
123387525 | AEHEA | C | July 23, 2021, 4:06 a.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3891200 | ||
123383297 | _Sunrise | C | July 23, 2021, 3:08 a.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3891200 | ||
123391776 | pr_iy_an_sh_ut_iw_ar_i | C | July 23, 2021, 5:07 a.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3891200 | ||
123391362 | Murot_06 | C | July 23, 2021, 5:01 a.m. | OK | GNU C++11 | TESTS | 20 | 15 | 3891200 | ||
123385567 | Koo_Pung-Kei | C | July 23, 2021, 3:39 a.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3686400 | ||
123390643 | ankush8523 | C | July 23, 2021, 4:52 a.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3686400 | ||
123388061 | Abhishekcs001 | C | July 23, 2021, 4:15 a.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3686400 | ||
123387309 | soumya21 | C | July 23, 2021, 4:03 a.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3788800 | ||
123375210 | sweet_hope25 | C | July 23, 2021, 12:49 a.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3788800 | ||
123372116 | alwerty | C | July 22, 2021, 11:04 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3788800 | ||
123367874 | adars_h | C | July 22, 2021, 9:10 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3788800 | ||
123366961 | pk_69 | C | July 22, 2021, 8:50 p.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3788800 | ||
123394688 | ssohit111 | C | July 23, 2021, 5:42 a.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3788800 | ||
123392319 | Prakash_1238 | C | July 23, 2021, 5:14 a.m. | OK | GNU C++14 | TESTS | 20 | 15 | 3788800 | ||
123347362 | _groot | C | July 22, 2021, 4:51 p.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3686400 | ||
123392932 | subi_98 | C | July 23, 2021, 5:22 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3686400 | ||
123387628 | Shubhu_513 | C | July 23, 2021, 4:08 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3686400 | ||
123386959 | Cortex | C | July 23, 2021, 3:58 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3686400 | ||
123386951 | v_sai_j | C | July 23, 2021, 3:58 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3686400 | ||
123394468 | newbie_dqt | C | July 23, 2021, 5:40 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3788800 | ||
123393632 | strayghost | C | July 23, 2021, 5:30 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3788800 | ||
123393745 | PrateekShakya | C | July 23, 2021, 5:31 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3788800 | ||
123395172 | Secret_Superstar12 | C | July 23, 2021, 5:48 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3788800 | ||
123396014 | jaygod | C | July 23, 2021, 5:57 a.m. | OK | GNU C++17 | TESTS | 20 | 15 | 3788800 | ||
123389734 | Keenan2114 | C | July 23, 2021, 4:39 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123388638 | yashank_A | C | July 23, 2021, 4:23 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123385525 | fossette7 | C | July 23, 2021, 3:39 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123373305 | MazenBatrawi | C | July 22, 2021, 11:50 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123372901 | zalak_b | C | July 22, 2021, 11:32 p.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123378265 | Tarunkasarapu | C | July 23, 2021, 1:50 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123395589 | ravi_sins | C | July 23, 2021, 5:52 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123393841 | tushar2805 | C | July 23, 2021, 5:32 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123393101 | Sanzh | C | July 23, 2021, 5:24 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123391376 | jigsaw_20 | C | July 23, 2021, 5:02 a.m. | OK | GNU C++17 (64) | TESTS | 20 | 15 | 4300800 | ||
123382586 | tranquyetthang281 | C | July 23, 2021, 2:57 a.m. | OK | Haskell | TESTS | 20 | 15 | 11571200 | ||
123383103 | tranquyetthang281 | C | July 23, 2021, 3:05 a.m. | OK | Haskell | TESTS | 20 | 31 | 11571200 | ||
123396001 | Clark_Kent | C | July 23, 2021, 5:57 a.m. | OK | Java 11 | TESTS | 20 | 187 | 23756800 | ||
123371098 | MoonCoder1234 | C | July 22, 2021, 10:31 p.m. | OK | Java 11 | TESTS | 20 | 187 | 23756800 | ||
123357470 | tony_heart | C | July 22, 2021, 6:46 p.m. | OK | Java 11 | TESTS | 20 | 187 | 23756800 | ||
123388027 | rodgepranav | C | July 23, 2021, 4:14 a.m. | OK | Java 11 | TESTS | 20 | 187 | 23859200 | ||
123383169 | Ishwar_749 | C | July 23, 2021, 3:06 a.m. | OK | Java 11 | TESTS | 20 | 202 | 23859200 | ||
123391138 | _awwwsme_ | C | July 23, 2021, 4:58 a.m. | OK | Java 11 | TESTS | 20 | 202 | 23859200 | ||
123385312 | mphillotry | C | July 23, 2021, 3:36 a.m. | OK | Java 11 | TESTS | 20 | 202 | 23859200 | ||
123359557 | ryanranaut | C | July 22, 2021, 7:04 p.m. | OK | Java 11 | TESTS | 20 | 202 | 23859200 | ||
123350730 | suriyaa_13 | C | July 22, 2021, 5:01 p.m. | OK | Java 11 | TESTS | 20 | 202 | 23859200 | ||
123349048 | ben.c.heckmann | C | July 22, 2021, 4:56 p.m. | OK | Java 11 | TESTS | 20 | 202 | 24064000 | ||
123346617 | akshit09 | C | July 22, 2021, 4:48 p.m. | OK | Java 8 | TESTS | 20 | 108 | 20480000 | ||
123387058 | pikachu_pika_pika | C | July 23, 2021, 3:59 a.m. | OK | Java 8 | TESTS | 20 | 124 | 20480000 | ||
123376062 | amit_roy | C | July 23, 2021, 1:09 a.m. | OK | Java 8 | TESTS | 20 | 124 | 20480000 | ||
123351837 | pgthebigshot | C | July 22, 2021, 5:04 p.m. | OK | Java 8 | TESTS | 20 | 124 | 20480000 | ||
123349458 | kenjinemera | C | July 22, 2021, 4:58 p.m. | OK | Java 8 | TESTS | 20 | 124 | 20480000 | ||
123376045 | milon34 | C | July 23, 2021, 1:09 a.m. | OK | Java 8 | TESTS | 20 | 140 | 20480000 | ||
123370288 | kzhang2012 | C | July 22, 2021, 10:08 p.m. | OK | Java 8 | TESTS | 20 | 140 | 20480000 | ||
123366359 | darvesh_23 | C | July 22, 2021, 8:39 p.m. | OK | Java 8 | TESTS | 20 | 140 | 20480000 | ||
123346540 | twoBit | C | July 22, 2021, 4:48 p.m. | OK | Java 8 | TESTS | 20 | 140 | 20480000 | ||
123385101 | Dcoder123 | C | July 23, 2021, 3:33 a.m. | OK | Java 8 | TESTS | 20 | 140 | 20582400 | ||
123391875 | amanpatel23 | C | July 23, 2021, 5:08 a.m. | OK | Kotlin | TESTS | 20 | 109 | 20889600 | ||
123369018 | reanimatorzon | C | July 22, 2021, 9:35 p.m. | OK | Kotlin | TESTS | 20 | 155 | 21811200 | ||
123384676 | Ir0nic_Joker | C | July 23, 2021, 3:27 a.m. | OK | MS C++ 2017 | TESTS | 20 | 30 | 3788800 | ||
123350193 | Score12122 | C | July 22, 2021, 5 p.m. | OK | MS C++ 2017 | TESTS | 20 | 30 | 3788800 | ||
123382889 | Xiaomostream | C | July 23, 2021, 3:01 a.m. | OK | MS C++ 2017 | TESTS | 20 | 31 | 3788800 | ||
123382162 | Agumon | C | July 23, 2021, 2:51 a.m. | OK | MS C++ 2017 | TESTS | 20 | 31 | 3788800 | ||
123379034 | camacju | C | July 23, 2021, 2:03 a.m. | OK | MS C++ 2017 | TESTS | 20 | 31 | 3788800 | ||
123350350 | Baobab0304 | C | July 22, 2021, 5 p.m. | OK | MS C++ 2017 | TESTS | 20 | 31 | 3788800 | ||
123349839 | Login_ | C | July 22, 2021, 4:59 p.m. | OK | MS C++ 2017 | TESTS | 20 | 31 | 3788800 | ||
123348420 | goelnimitt241100 | C | July 22, 2021, 4:54 p.m. | OK | MS C++ 2017 | TESTS | 20 | 31 | 3788800 | ||
123379874 | Xiaomostream | C | July 23, 2021, 2:16 a.m. | OK | MS C++ 2017 | TESTS | 20 | 62 | 3788800 | ||
123359565 | Tangerine | C | July 22, 2021, 7:04 p.m. | OK | MS C++ 2017 | TESTS | 20 | 93 | 3788800 | ||
123366495 | snape_here | C | July 22, 2021, 8:41 p.m. | OK | PyPy 2 | TESTS | 20 | 327 | 34406400 | ||
123363913 | yash490 | C | July 22, 2021, 7:58 p.m. | OK | PyPy 3 | TESTS | 20 | 156 | 24473600 | ||
123356961 | armsusman | C | July 22, 2021, 6:43 p.m. | OK | PyPy 3 | TESTS | 20 | 156 | 24780800 | ||
123348475 | Neji_Med | C | July 22, 2021, 4:54 p.m. | OK | PyPy 3 | TESTS | 20 | 171 | 23244800 | ||
123361228 | rishabhrao | C | July 22, 2021, 7:22 p.m. | OK | PyPy 3 | TESTS | 20 | 171 | 23552000 | ||
123362385 | thhsu | C | July 22, 2021, 7:37 p.m. | OK | PyPy 3 | TESTS | 20 | 186 | 23859200 | ||
123357682 | SherlockKA | C | July 22, 2021, 6:48 p.m. | OK | PyPy 3 | TESTS | 20 | 202 | 23859200 | ||
123356267 | 1_2_3_4_5_9 | C | July 22, 2021, 6:38 p.m. | OK | PyPy 3 | TESTS | 20 | 202 | 23859200 | ||
123359301 | zayn. | C | July 22, 2021, 7:01 p.m. | OK | PyPy 3 | TESTS | 20 | 202 | 23961600 | ||
123381963 | kaki1013 | C | July 23, 2021, 2:48 a.m. | OK | PyPy 3 | TESTS | 20 | 202 | 24268800 | ||
123384781 | nsharc4 | C | July 23, 2021, 3:28 a.m. | OK | PyPy 3 | TESTS | 20 | 202 | 25088000 | ||
123379912 | eugalt | C | July 23, 2021, 2:17 a.m. | OK | Python 3 | TESTS | 20 | 62 | 6963200 | ||
123379136 | eugalt | C | July 23, 2021, 2:05 a.m. | OK | Python 3 | TESTS | 20 | 62 | 6963200 | ||
123386629 | rutz12 | C | July 23, 2021, 3:53 a.m. | OK | Python 3 | TESTS | 20 | 77 | 6963200 | ||
123383162 | eugalt | C | July 23, 2021, 3:06 a.m. | OK | Python 3 | TESTS | 20 | 77 | 6963200 | ||
123381927 | eugalt | C | July 23, 2021, 2:48 a.m. | OK | Python 3 | TESTS | 20 | 77 | 6963200 | ||
123381469 | eugalt | C | July 23, 2021, 2:41 a.m. | OK | Python 3 | TESTS | 20 | 77 | 6963200 | ||
123367721 | Ernestico | C | July 22, 2021, 9:07 p.m. | OK | Python 3 | TESTS | 20 | 77 | 6963200 | ||
123356736 | 2019287 | C | July 22, 2021, 6:41 p.m. | OK | Python 3 | TESTS | 20 | 77 | 6963200 | ||
123355636 | 2019287 | C | July 22, 2021, 6:36 p.m. | OK | Python 3 | TESTS | 20 | 77 | 6963200 | ||
123350850 | agw02010 | C | July 22, 2021, 5:02 p.m. | OK | Python 3 | TESTS | 20 | 77 | 6963200 | ||
123368796 | GiackAloZ | C | July 22, 2021, 9:31 p.m. | OK | Rust | TESTS | 20 | 31 | 3788800 | ||
123372434 | IvanDyachenko | C | July 22, 2021, 11:16 p.m. | OK | Scala | TESTS | 20 | 498 | 31744000 | ||
123351604 | IvanDyachenko | C | July 22, 2021, 5:03 p.m. | OK | Scala | TESTS | 20 | 514 | 31744000 |
Back to search problems