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 |
---|---|---|---|---|---|---|
1520 | Codeforces Round 719 (Div. 3) | FINISHED | False | 7200 | 117127511 | May 5, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 53071 ) | A | Do Not Be Distracted! | PROGRAMMING | brute force implementation |
B'Polycarp has 26 tasks. Each task is designated by a capital letter of the Latin alphabet. The teacher asked Polycarp to solve tasks in the following way: if Polycarp began to solve some task, then he must solve it to the end, without being distracted by another task. After switching to another task, Polycarp cannot return to the previous task. Polycarp can only solve one task during the day. Every day he wrote down what task he solved. Now the teacher wants to know if Polycarp followed his advice. For example, if Polycarp solved tasks in the following order: "DDBBCCCBBEZ", then the teacher will see that on the third day Polycarp began to solve the task 'B ', then on the fifth day he got distracted and began to solve the task 'C ', on the eighth day Polycarp returned to the task 'B '. Other examples of when the teacher is suspicious: "BAB", "AABBCCDDEEBZZ" and "AAAAZAAAAA". If Polycarp solved the tasks as follows: "FFGZZZY", then the teacher cannot have any suspicions. Please note that Polycarp is not obligated to solve all tasks. Other examples of when the teacher doesn 't have any suspicious: "BA", "AFFFCC" and "YYYYY". Help Polycarp find out if his teacher might be suspicious. The first line contains an integer t ( 1 <= t <= 1000 ). Then t test cases follow. The first line of each test case contains one integer n ( 1 <= n <= 50 ) -- the number of days during which Polycarp solved tasks. The second line contains a string of length n , consisting of uppercase Latin letters, which is the order in which Polycarp solved the tasks. For each test case output: You may print every letter in any case you want (so, for example, the strings yEs, yes, Yes and YES are all recognized as positive answer). '... |
Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
115351296 | g.temurkan | A | May 5, 2021, 7:35 p.m. | OK | GNU C++11 | TESTS | 2 | 0 | 3686400 | ||
115344355 | Hyperi0N | A | May 5, 2021, 6:18 p.m. | OK | GNU C++11 | TESTS | 2 | 0 | 3891200 | ||
115344505 | tej_1441 | A | May 5, 2021, 6:19 p.m. | OK | GNU C++11 | TESTS | 2 | 0 | 3993600 | ||
115373398 | jjboy | A | May 6, 2021, 3:51 a.m. | OK | GNU C++11 | TESTS | 17 | 15 | 3686400 | ||
115344455 | AVM.Martin | A | May 5, 2021, 6:19 p.m. | OK | GNU C++11 | TESTS | 2 | 15 | 3686400 | ||
115383715 | Cai_ruBbish_Ji | A | May 6, 2021, 6 a.m. | OK | GNU C++11 | TESTS | 17 | 15 | 3891200 | ||
115376372 | bkifhr9 | A | May 6, 2021, 4:36 a.m. | OK | GNU C++11 | TESTS | 17 | 15 | 3891200 | ||
115375681 | AnYunchuan | A | May 6, 2021, 4:26 a.m. | OK | GNU C++11 | TESTS | 17 | 15 | 3891200 | ||
115375624 | codeminion | A | May 6, 2021, 4:26 a.m. | OK | GNU C++11 | TESTS | 17 | 15 | 3891200 | ||
115374990 | Youbuhua | A | May 6, 2021, 4:15 a.m. | OK | GNU C++11 | TESTS | 17 | 15 | 3891200 | ||
115358173 | Ramu | A | May 5, 2021, 9:32 p.m. | OK | GNU C++14 | TESTS | 2 | 0 | 3891200 | ||
115357657 | HossamHero7 | A | May 5, 2021, 9:21 p.m. | OK | GNU C++14 | TESTS | 2 | 0 | 3891200 | ||
115352697 | Aurthur | A | May 5, 2021, 7:54 p.m. | OK | GNU C++14 | TESTS | 2 | 0 | 3891200 | ||
115348228 | shahil198 | A | May 5, 2021, 6:56 p.m. | OK | GNU C++14 | TESTS | 2 | 0 | 3891200 | ||
115381549 | under_promotion | A | May 6, 2021, 5:37 a.m. | OK | GNU C++14 | TESTS | 17 | 15 | 3686400 | ||
115379421 | cullinan | A | May 6, 2021, 5:15 a.m. | OK | GNU C++14 | TESTS | 17 | 15 | 3686400 | ||
115378034 | muskankumawatdei | A | May 6, 2021, 4:58 a.m. | OK | GNU C++14 | TESTS | 17 | 15 | 3686400 | ||
115377045 | Bakku | A | May 6, 2021, 4:45 a.m. | OK | GNU C++14 | TESTS | 17 | 15 | 3686400 | ||
115371765 | Developer2020 | A | May 6, 2021, 3:25 a.m. | OK | GNU C++14 | TESTS | 17 | 15 | 3686400 | ||
115371647 | Knownname | A | May 6, 2021, 3:24 a.m. | OK | GNU C++14 | TESTS | 17 | 15 | 3686400 |
Back to search problems