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 |
---|---|---|---|---|---|---|
1932 | Codeforces Round 927 (Div. 3) | FINISHED | False | 8100 | 23565299 | Feb. 18, 2024, 12:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 11548 ) | D | Card Game | PROGRAMMING | greedy implementation |
B'Two players are playing an online card game. The game is played using a 32-card deck. Each card has a suit and a rank. There are four suits: clubs, diamonds, hearts, and spades. We will encode them with characters 'C ', 'D ', 'H ', and 'S ', respectively. And there are 8 ranks, in increasing order: '2 ', '3 ', '4 ', '5 ', '6 ', '7 ', '8 ', '9 '. Each card is denoted by two letters: its rank and its suit. For example, the 8 of Hearts is denoted as 8H. At the beginning of the game, one suit is chosen as the trump suit. In each round, players make moves like this: the first player places one of his cards on the table, and the second player must beat this card with one of their cards. After that, both cards are moved to the discard pile. A card can beat another card if both cards have the same suit and the first card has a higher rank than the second. For example, 8S can beat 4S. Additionally, a trump card can beat any non-trump card, regardless of the rank of the cards, for example, if the trump suit is clubs ( 'C '), then 3C can beat 9D. Note that trump cards can be beaten only by the trump cards of higher rank. There were n rounds played in the game, so the discard pile now contains 2n cards. You want to reconstruct the rounds played in the game, but the cards in the discard pile are shuffled. Find any possible sequence of n rounds that might have been played in the game. The first line contains integer t ( 1 <= t <= 100 ) -- the number of test cases. Then t test cases follow. The first line of a test case contains the integer number n ( 1 <= n <= 16 ). The second line of a test case contains one character, the trump suit. It is one of "CDHS". The third line of a test case contains the description of 2n cards. Each card is described by a two-character string, the first character is the rank of the card, which is one of "23456789", and the second one is the suit of the card, which is one of "CDHS". All cards are differe'... |
126196 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
247210788 | mban259 | D | Feb. 19, 2024, 1:25 p.m. | OK | C# 10 | TESTS | 12 | 61 | 921600 | ||
247181729 | bluemegane | D | Feb. 19, 2024, 9:26 a.m. | OK | C# 8 | TESTS | 12 | 124 | 716800 | ||
247192887 | asad_yuan | D | Feb. 19, 2024, 11:02 a.m. | OK | Clang++17 Diagnostics | TESTS | 12 | 31 | 0 | ||
247193034 | asad_yuan | D | Feb. 19, 2024, 11:03 a.m. | OK | Clang++17 Diagnostics | TESTS | 12 | 31 | 0 | ||
247151086 | W.Sherlock.Henry | D | Feb. 19, 2024, 3:44 a.m. | OK | Clang++20 Diagnostics | TESTS | 12 | 61 | 102400 | ||
247148276 | Bazinga_2004 | D | Feb. 18, 2024, 10:15 p.m. | OK | Clang++20 Diagnostics | TESTS | 12 | 61 | 5324800 | ||
247398801 | iffatul_anon | D | Feb. 19, 2024, 9:15 p.m. | OK | GNU C11 | TESTS | 12 | 31 | 307200 | ||
247389838 | Laure-Haddad | D | Feb. 19, 2024, 7:34 p.m. | OK | GNU C++17 | TESTS | 12 | 0 | 0 | ||
247188166 | albertonl | D | Feb. 19, 2024, 10:19 a.m. | OK | GNU C++17 | TESTS | 12 | 0 | 0 | ||
247395433 | govufpb | D | Feb. 19, 2024, 8:33 p.m. | OK | GNU C++17 | TESTS | 12 | 0 | 0 | ||
247409779 | tnakao | D | Feb. 20, 2024, 1:02 a.m. | OK | GNU C++17 | TESTS | 12 | 0 | 0 | ||
247207963 | elec_tron | D | Feb. 19, 2024, 1:06 p.m. | OK | GNU C++17 | TESTS | 12 | 0 | 102400 | ||
247197357 | SoVizzy | D | Feb. 19, 2024, 11:41 a.m. | OK | GNU C++17 | TESTS | 12 | 0 | 102400 | ||
247190303 | param_101204 | D | Feb. 19, 2024, 10:38 a.m. | OK | GNU C++17 | TESTS | 12 | 0 | 102400 | ||
247189040 | agarwal_jayaa | D | Feb. 19, 2024, 10:26 a.m. | OK | GNU C++17 | TESTS | 12 | 0 | 102400 | ||
247185543 | Xiaobaibubai | D | Feb. 19, 2024, 9:57 a.m. | OK | GNU C++17 | TESTS | 12 | 0 | 102400 | ||
247356058 | shoaibcodez | D | Feb. 19, 2024, 4:35 p.m. | OK | GNU C++17 | TESTS | 12 | 0 | 102400 | ||
247425685 | YinDouKi | D | Feb. 20, 2024, 4:57 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247301912 | deekshitha_kdr | D | Feb. 19, 2024, 3:26 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247209772 | s1mpleO_FUckPPT | D | Feb. 19, 2024, 1:18 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247208578 | Oka_Asahi | D | Feb. 19, 2024, 1:10 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247203263 | moursalinme | D | Feb. 19, 2024, 12:31 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247201642 | bjjvsrjjt | D | Feb. 19, 2024, 12:18 p.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247187553 | drdilyor | D | Feb. 19, 2024, 10:14 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247185887 | HeJuMuFan | D | Feb. 19, 2024, 10 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247174958 | eacnscnj | D | Feb. 19, 2024, 8:32 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247171771 | paren | D | Feb. 19, 2024, 8:08 a.m. | OK | GNU C++17 (64) | TESTS | 12 | 0 | 0 | ||
247425318 | zzzxxxzzz | D | Feb. 20, 2024, 4:53 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247407221 | arnavsrivastava0123 | D | Feb. 20, 2024, 12:09 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247399173 | JOE362 | D | Feb. 19, 2024, 9:20 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247398072 | AnasMaged | D | Feb. 19, 2024, 9:05 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247396994 | juancs | D | Feb. 19, 2024, 8:52 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247394830 | Vinicabral | D | Feb. 19, 2024, 8:26 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247391769 | Angooo | D | Feb. 19, 2024, 7:54 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247385653 | ChirkovM | D | Feb. 19, 2024, 6:54 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247377787 | abj | D | Feb. 19, 2024, 5:52 p.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247425347 | DrainedOmar | D | Feb. 20, 2024, 4:53 a.m. | OK | GNU C++20 (64) | TESTS | 12 | 0 | 0 | ||
247151372 | PokeYoo | D | Feb. 19, 2024, 3:48 a.m. | OK | Go | TESTS | 12 | 30 | 204800 | ||
247208762 | AkshatSaxena_05 | D | Feb. 19, 2024, 1:11 p.m. | OK | Java 21 | TESTS | 12 | 264 | 0 | ||
247177668 | black_rise | D | Feb. 19, 2024, 8:55 a.m. | OK | Java 21 | TESTS | 12 | 264 | 0 | ||
247420914 | net12k44 | D | Feb. 20, 2024, 3:52 a.m. | OK | Java 21 | TESTS | 12 | 264 | 409600 | ||
247187621 | Alex_Toppo_06 | D | Feb. 19, 2024, 10:15 a.m. | OK | Java 21 | TESTS | 12 | 265 | 102400 | ||
247208129 | ramitg254 | D | Feb. 19, 2024, 1:07 p.m. | OK | Java 21 | TESTS | 12 | 280 | 102400 | ||
247214982 | Sagy13 | D | Feb. 19, 2024, 1:55 p.m. | OK | Java 21 | TESTS | 12 | 280 | 307200 | ||
247211774 | Sagy13 | D | Feb. 19, 2024, 1:32 p.m. | OK | Java 21 | TESTS | 12 | 295 | 0 | ||
247215500 | Zhanzhe_Lee | D | Feb. 19, 2024, 1:59 p.m. | OK | Java 21 | TESTS | 12 | 296 | 204800 | ||
247132500 | mena-rizkalla | D | Feb. 18, 2024, 6:44 p.m. | OK | Java 21 | TESTS | 12 | 296 | 307200 | ||
247134065 | MasterO_o | D | Feb. 18, 2024, 7 p.m. | OK | Java 21 | TESTS | 12 | 296 | 409600 | ||
247134049 | giko | D | Feb. 18, 2024, 7 p.m. | OK | Java 8 | TESTS | 12 | 109 | 0 | ||
247152749 | Darko | D | Feb. 19, 2024, 4:07 a.m. | OK | Java 8 | TESTS | 12 | 124 | 0 | ||
247184975 | only_forward_ | D | Feb. 19, 2024, 9:52 a.m. | OK | Java 8 | TESTS | 12 | 139 | 0 | ||
247134643 | giko | D | Feb. 18, 2024, 7:06 p.m. | OK | Java 8 | TESTS | 12 | 140 | 0 | ||
247134424 | etian6795 | D | Feb. 18, 2024, 7:04 p.m. | OK | Java 8 | TESTS | 12 | 140 | 0 | ||
247198554 | Abhishek_jwp | D | Feb. 19, 2024, 11:51 a.m. | OK | Java 8 | TESTS | 12 | 155 | 0 | ||
247186613 | nmyyq114 | D | Feb. 19, 2024, 10:06 a.m. | OK | Java 8 | TESTS | 12 | 155 | 0 | ||
247186190 | nmyyq114 | D | Feb. 19, 2024, 10:03 a.m. | OK | Java 8 | TESTS | 12 | 155 | 0 | ||
247143063 | kirsh_kkm | D | Feb. 18, 2024, 8:46 p.m. | OK | Java 8 | TESTS | 12 | 171 | 0 | ||
247131566 | sakethsriram19 | D | Feb. 18, 2024, 6:34 p.m. | OK | Java 8 | TESTS | 12 | 171 | 0 | ||
247126944 | KirillRas | D | Feb. 18, 2024, 5:54 p.m. | OK | MS C++ 2017 | TESTS | 12 | 15 | 0 | ||
247183017 | ansun.sim | D | Feb. 19, 2024, 9:36 a.m. | OK | PyPy 3 | TESTS | 12 | 124 | 2969600 | ||
247175458 | hjc4 | D | Feb. 19, 2024, 8:36 a.m. | OK | PyPy 3 | TESTS | 12 | 124 | 3174400 | ||
247127234 | sathwika_446 | D | Feb. 18, 2024, 5:57 p.m. | OK | PyPy 3 | TESTS | 12 | 124 | 3174400 | ||
247373165 | v.bonifaci | D | Feb. 19, 2024, 5:23 p.m. | OK | PyPy 3 | TESTS | 12 | 124 | 3481600 | ||
247199301 | callme_Akash | D | Feb. 19, 2024, 11:58 a.m. | OK | PyPy 3 | TESTS | 12 | 140 | 68915200 | ||
247135830 | ErikUs | D | Feb. 18, 2024, 7:18 p.m. | OK | PyPy 3 | TESTS | 12 | 155 | 3686400 | ||
247150783 | aanya31 | D | Feb. 19, 2024, 3:41 a.m. | OK | PyPy 3 | TESTS | 12 | 171 | 3481600 | ||
247387623 | JavaLim | D | Feb. 19, 2024, 7:13 p.m. | OK | PyPy 3-64 | TESTS | 12 | 77 | 2662400 | ||
247135270 | AZron | D | Feb. 18, 2024, 7:12 p.m. | OK | PyPy 3-64 | TESTS | 12 | 77 | 4608000 | ||
247137002 | DarkTemplarDrop | D | Feb. 18, 2024, 7:30 p.m. | OK | PyPy 3-64 | TESTS | 12 | 77 | 4812800 | ||
247410192 | vibs2101 | D | Feb. 20, 2024, 1:10 a.m. | OK | PyPy 3-64 | TESTS | 12 | 93 | 3993600 | ||
247196152 | skrabik | D | Feb. 19, 2024, 11:31 a.m. | OK | PyPy 3-64 | TESTS | 12 | 93 | 4403200 | ||
247127161 | motsuni04 | D | Feb. 18, 2024, 5:56 p.m. | OK | PyPy 3-64 | TESTS | 12 | 93 | 4505600 | ||
247156574 | kunalseth | D | Feb. 19, 2024, 4:56 a.m. | OK | PyPy 3-64 | TESTS | 12 | 93 | 4710400 | ||
247187035 | hunglomdom | D | Feb. 19, 2024, 10:10 a.m. | OK | PyPy 3-64 | TESTS | 12 | 93 | 4812800 | ||
247193017 | glmnfc | D | Feb. 19, 2024, 11:03 a.m. | OK | PyPy 3-64 | TESTS | 12 | 93 | 5324800 | ||
247387089 | standoff | D | Feb. 19, 2024, 7:07 p.m. | OK | PyPy 3-64 | TESTS | 12 | 93 | 5632000 | ||
247402020 | kapopenko Gegedosh MakShon | D | Feb. 19, 2024, 10:04 p.m. | OK | Python 3 | TESTS | 12 | 46 | 0 | ||
247213999 | Posvan | D | Feb. 19, 2024, 1:48 p.m. | OK | Python 3 | TESTS | 12 | 46 | 0 | ||
247186261 | ___a_s_1_2___ | D | Feb. 19, 2024, 10:03 a.m. | OK | Python 3 | TESTS | 12 | 46 | 0 | ||
247183956 | demony | D | Feb. 19, 2024, 9:43 a.m. | OK | Python 3 | TESTS | 12 | 46 | 0 | ||
247153098 | hushbek_2009 | D | Feb. 19, 2024, 4:12 a.m. | OK | Python 3 | TESTS | 12 | 46 | 0 | ||
247129501 | Slata | D | Feb. 18, 2024, 6:16 p.m. | OK | Python 3 | TESTS | 12 | 46 | 0 | ||
247174373 | smugi | D | Feb. 19, 2024, 8:28 a.m. | OK | Python 3 | TESTS | 12 | 46 | 102400 | ||
247147903 | Naikwad27 | D | Feb. 18, 2024, 10:06 p.m. | OK | Python 3 | TESTS | 12 | 46 | 102400 | ||
247127352 | cat.lover | D | Feb. 18, 2024, 5:58 p.m. | OK | Python 3 | TESTS | 12 | 46 | 102400 | ||
247150321 | sviswa | D | Feb. 18, 2024, 11:04 p.m. | OK | Python 3 | TESTS | 12 | 46 | 204800 | ||
247196238 | robostac | D | Feb. 19, 2024, 11:32 a.m. | OK | Rust 2021 | TESTS | 12 | 15 | 512000 |
Back to search problems