Codeforces Round 556 (Div. 1)

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
1149 Codeforces Round 556 (Div. 1) FINISHED False 7200 188580265 April 29, 2019, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1940 ) B Three Religions PROGRAMMING dp implementation strings 2200

B"During the archaeological research in the Middle East you found the traces of three ancient religions: First religion, Second religion and Third religion. You compiled the information on the evolution of each of these beliefs, and you now wonder if the followers of each religion could coexist in peace. The Word of Universe is a long word containing the lowercase English characters only. At each moment of time, each of the religion beliefs could be described by a word consisting of lowercase English characters. The three religions can coexist in peace if their descriptions form disjoint subsequences of the Word of Universe. More formally, one can paint some of the characters of the Word of Universe in three colors: 1 , 2 , 3 , so that each character is painted in at most one color, and the description of the i -th religion can be constructed from the Word of Universe by removing all characters that aren't painted in color i . The religions however evolve. In the beginning, each religion description is empty. Every once in a while, either a character is appended to the end of the description of a single religion, or the last character is dropped from the description. After each change, determine if the religions could coexist in peace. The first line of the input contains two integers n, q ( 1 <= q n <= q 100 ,000 , 1 <= q q <= q 1000 ) -- the length of the Word of Universe and the number of religion evolutions, respectively. The following line contains the Word of Universe -- a string of length n consisting of lowercase English characters. Each of the following line describes a single evolution and is in one of the following formats: You can assume that no religion will have description longer than 250 characters. Write q lines. The i -th of them should be YES if the religions could coexist in peace after the i -th evolution, or NO otherwise. You can print each character in any case (eit"...

Tutorials

66783

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
53517765 Gassa B April 29, 2019, 3:30 p.m. OK D TESTS 26 764 80896000 2200
53528546 sansen B April 29, 2019, 6:08 p.m. OK GNU C11 TESTS 26 358 74752000 2200
53529021 sansen B April 29, 2019, 6:19 p.m. OK GNU C11 TESTS 26 374 74752000 2200
53518447 rainboy B April 29, 2019, 3:33 p.m. OK GNU C11 TESTS 26 390 73932800 2200
53521915 sansen B April 29, 2019, 3:55 p.m. OK GNU C11 TESTS 26 2011 65228800 2200
53742250 oyqy1203 B May 4, 2019, 2:32 p.m. OK GNU C++11 TESTS 26 155 171110400 2200
53534500 ffffxk B April 30, 2019, 12:35 a.m. OK GNU C++11 TESTS 26 264 80998400 2200
53836231 luogu_bot4 B May 7, 2019, 3:10 a.m. OK GNU C++11 TESTS 26 280 73932800 2200
53834507 JKLover B May 7, 2019, 12:57 a.m. OK GNU C++11 TESTS 26 280 73932800 2200
53567991 bitetheDDDDt B April 30, 2019, 1:32 p.m. OK GNU C++11 TESTS 26 280 77004800 2200
65696477 Arya_Erin B Nov. 25, 2019, 8:29 a.m. OK GNU C++11 TESTS 26 280 77312000 2200
66223805 wxj B Dec. 3, 2019, 11:48 a.m. OK GNU C++11 TESTS 26 280 77824000 2200
68744687 Taday B Jan. 14, 2020, 3:50 a.m. OK GNU C++11 TESTS 26 280 78540800 2200
61814420 pufanyi B Oct. 4, 2019, 1:24 a.m. OK GNU C++11 TESTS 26 295 77312000 2200
57481346 xielinhan B July 22, 2019, 2:33 a.m. OK GNU C++11 TESTS 26 296 85196800 2200
53834211 gtrhetr B May 7, 2019, 12:28 a.m. OK GNU C++14 TESTS 26 264 114176000 2200
54456595 spentplaying B May 21, 2019, 4:13 p.m. OK GNU C++14 TESTS 26 280 74342400 2200
58857292 Scut82 B Aug. 15, 2019, 9:54 a.m. OK GNU C++14 TESTS 26 280 77004800 2200
62038893 Four-leafClover B Oct. 7, 2019, 5:10 a.m. OK GNU C++14 TESTS 26 280 77004800 2200
64747989 arshad2117 B Nov. 12, 2019, 2:13 p.m. OK GNU C++14 TESTS 26 296 74854400 2200
53524673 _Ash__ B April 29, 2019, 4:16 p.m. OK GNU C++14 TESTS 26 296 117145600 2200
53586537 ae04071 B April 30, 2019, 6:54 p.m. OK GNU C++14 TESTS 26 311 73932800 2200
53540650 molamola. B April 30, 2019, 6:29 a.m. OK GNU C++14 TESTS 26 311 76288000 2200
58891716 Scut82 B Aug. 16, 2019, 5:55 a.m. OK GNU C++14 TESTS 26 311 77414400 2200
53894571 daniel071292 B May 9, 2019, 4:36 a.m. OK GNU C++14 TESTS 26 311 78643200 2200
55610328 ReaLNero1 B June 16, 2019, 5:16 a.m. OK GNU C++17 TESTS 26 234 113868800 2200
53613570 Eric_hooo B May 1, 2019, 2:25 p.m. OK GNU C++17 TESTS 26 264 80998400 2200
53517061 Jatana B April 29, 2019, 3:26 p.m. OK GNU C++17 TESTS 26 264 113868800 2200
53534359 Als123 B April 30, 2019, 12:23 a.m. OK GNU C++17 TESTS 26 265 77004800 2200
53880132 Elegia B May 8, 2019, 2:12 p.m. OK GNU C++17 TESTS 26 280 80998400 2200
53989191 Eric_hooo B May 11, 2019, 11:24 a.m. OK GNU C++17 TESTS 26 280 80998400 2200
53530909 chinmay0906 B April 29, 2019, 8:13 p.m. OK GNU C++17 TESTS 26 295 77107200 2200
53693060 HNO2 B May 3, 2019, 6:12 a.m. OK GNU C++17 TESTS 26 295 77209600 2200
54849487 ogo B May 30, 2019, 3:47 p.m. OK GNU C++17 TESTS 26 295 77209600 2200
53854768 AlexPanda B May 7, 2019, 3:31 p.m. OK GNU C++17 TESTS 26 296 77312000 2200
53513913 Jeel_Vaishnav B April 29, 2019, 3:13 p.m. OK Java 8 TESTS 26 1138 78131200 2200
53511923 Egor B April 29, 2019, 3:05 p.m. OK Java 8 TESTS 26 1263 78131200 2200
53514226 uwi B April 29, 2019, 3:14 p.m. OK Java 8 TESTS 26 1278 142643200 2200
53579230 Yugioh B April 30, 2019, 2:41 p.m. OK Java 8 TESTS 26 1294 75980800 2200
53528442 4mda4mda B April 29, 2019, 6:06 p.m. OK Java 8 TESTS 26 1340 128716800 2200
53529726 Dukkha B April 29, 2019, 6:43 p.m. OK Java 8 TESTS 26 1356 140083200 2200
53522835 Petr B April 29, 2019, 4:01 p.m. OK Java 8 TESTS 26 1481 137113600 2200
55824412 tmwilliamlin168 B June 20, 2019, 10:08 a.m. OK Java 8 TESTS 26 1606 143155200 2200
64609050 ijxjdjd B Nov. 9, 2019, 11:19 p.m. OK Java 8 TESTS 26 1746 142540800 2200
53519100 m.sabouri B April 29, 2019, 3:37 p.m. OK Java 8 TESTS 26 2573 78643200 2200
53518321 math957963 B April 29, 2019, 3:33 p.m. OK MS C++ TESTS 26 482 73728000 2200
60517154 meooow B Sept. 14, 2019, 7:08 a.m. OK PyPy 3 TESTS 26 2417 86323200 2200
60516944 meooow B Sept. 14, 2019, 7:03 a.m. OK PyPy 3 TESTS 26 2495 87142400 2200
66288957 sansen B Dec. 4, 2019, 8:53 p.m. OK Rust TESTS 26 685 77312000 2200

remove filters

Back to search problems