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 |
|---|---|---|---|---|---|---|
| 580 | Codeforces Round 321 (Div. 2) | FINISHED | False | 7200 | 333466223 | Sept. 22, 2015, 4:30 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 2557 ) | E | Kefa and Watch | PROGRAMMING | data structures hashing strings | 2700 |
One day Kefa the parrot was walking down the street as he was on the way home from the restaurant when he saw something glittering by the road. As he came nearer he understood that it was a watch. He decided to take it to the pawnbroker to earn some money. The pawnbroker said that each watch contains a serial number represented by a string of digits from 0 to 9 , and the more quality checks this number passes, the higher is the value of the watch. The check is defined by three positive integers l , r and d . The watches pass a check if a substring of the serial number from l to r has period d . Sometimes the pawnbroker gets distracted and Kefa changes in some substring of the serial number all digits to c in order to increase profit from the watch. The seller has a lot of things to do to begin with and with Kefa messing about, he gave you a task: to write a program that determines the value of the watch. Let us remind you that number x is called a period of string s ( 1 ≤ x ≤ | s | ), if s i = s i + x for all i from 1 to | s | - x . The first line of the input contains three positive integers n , m and k ( 1 ≤ n ≤ 10 5 , 1 ≤ m + k ≤ 10 5 ) — the length of the serial number, the number of change made by Kefa and the number of quality checks. The second line contains a serial number consisting of n digits. Then m + k lines follow, containing either checks or changes. The changes are given as 1 l r c ( 1 ≤ l ≤ r ≤ n , 0 ≤ c ≤ 9 ). That means that Kefa changed all the digits from the l -th to the r -th to be c . The checks are given as 2 l r d ( 1 ≤ l ≤ r ≤ n , 1 ≤ d ≤ r - l + 1 ). For each check on a single line print " YES " if the watch passed it, otherwise print " NO ". In the first sample test two checks will be made. In the first one substring "12" is checked on whether or not it has period 1, so the answer is " NO ". In the second one substring "88", is checked on whether or not it has period 1, and it has this period, so the answer is " YES ". In the s |
| Codeforces Round #321 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 53683699 | about | E | May 2, 2019, 9:28 p.m. | OK | GNU C11 | TESTS | 80 | 312 | 14540800 | 2700 | |
| 56540431 | luogu_bot3 | E | July 5, 2019, 4:44 a.m. | OK | GNU C++11 | TESTS | 80 | 109 | 7680000 | 2700 | |
| 47715527 | lwhlwh | E | Dec. 30, 2018, 7:23 a.m. | OK | GNU C++11 | TESTS | 80 | 109 | 7782400 | 2700 | |
| 56540310 | Jackpei | E | July 5, 2019, 4:40 a.m. | OK | GNU C++11 | TESTS | 80 | 109 | 13721600 | 2700 | |
| 56540355 | luogu_bot5 | E | July 5, 2019, 4:41 a.m. | OK | GNU C++11 | TESTS | 80 | 109 | 13721600 | 2700 | |
| 56543322 | luogu_bot4 | E | July 5, 2019, 6:27 a.m. | OK | GNU C++11 | TESTS | 80 | 109 | 137318400 | 2700 | |
| 56535409 | time_interspace | E | July 4, 2019, 11:55 p.m. | OK | GNU C++11 | TESTS | 80 | 124 | 4096000 | 2700 | |
| 47774438 | Love_mona | E | Dec. 31, 2018, 2:15 a.m. | OK | GNU C++11 | TESTS | 80 | 124 | 6144000 | 2700 | |
| 50558209 | cXs5 | E | Feb. 27, 2019, 9:18 a.m. | OK | GNU C++11 | TESTS | 80 | 124 | 7372800 | 2700 | |
| 61728088 | Xones | E | Oct. 2, 2019, 4:01 p.m. | OK | GNU C++11 | TESTS | 80 | 124 | 8499200 | 2700 | |
| 52945986 | lengyanze | E | April 18, 2019, 11:34 a.m. | OK | GNU C++11 | TESTS | 80 | 124 | 12288000 | 2700 | |
| 58379398 | luogu_bot2 | E | Aug. 6, 2019, 9:21 a.m. | OK | GNU C++14 | TESTS | 80 | 155 | 24473600 | 2700 | |
| 50592828 | vjudge2 | E | Feb. 28, 2019, 8:27 a.m. | OK | GNU C++14 | TESTS | 80 | 156 | 54886400 | 2700 | |
| 66448639 | Heart_Blue | E | Dec. 7, 2019, 10:38 a.m. | OK | GNU C++14 | TESTS | 80 | 171 | 9728000 | 2700 | |
| 52358841 | Unconscious | E | April 5, 2019, 6:24 p.m. | OK | GNU C++14 | TESTS | 80 | 186 | 5120000 | 2700 | |
| 47869418 | ironhead0 | E | Jan. 3, 2019, 11:56 a.m. | OK | GNU C++14 | TESTS | 80 | 186 | 13721600 | 2700 | |
| 68831706 | vjudge1 | E | Jan. 14, 2020, 11 p.m. | OK | GNU C++14 | TESTS | 80 | 187 | 5836800 | 2700 | |
| 59133506 | Dalenator | E | Aug. 20, 2019, 11:51 a.m. | OK | GNU C++14 | TESTS | 80 | 187 | 8192000 | 2700 | |
| 65623429 | davidberard | E | Nov. 24, 2019, 7:04 a.m. | OK | GNU C++14 | TESTS | 80 | 202 | 6041600 | 2700 | |
| 47330247 | realcomplex | E | Dec. 21, 2018, 12:32 p.m. | OK | GNU C++14 | TESTS | 80 | 202 | 33689600 | 2700 | |
| 49615024 | vjudge2 | E | Feb. 8, 2019, 5:31 a.m. | OK | GNU C++14 | TESTS | 80 | 202 | 40448000 | 2700 | |
| 52592581 | Nuist_vida | E | April 11, 2019, 6:47 a.m. | OK | GNU C++17 | TESTS | 80 | 171 | 28979200 | 2700 | |
| 54846231 | liweihang | E | May 30, 2019, 2:02 p.m. | OK | GNU C++17 | TESTS | 80 | 186 | 14438400 | 2700 | |
| 51954768 | Fulisike | E | March 29, 2019, 12:46 a.m. | OK | GNU C++17 | TESTS | 80 | 187 | 3276800 | 2700 | |
| 63532511 | hjk1030 | E | Oct. 27, 2019, 7:08 a.m. | OK | GNU C++17 | TESTS | 80 | 187 | 6553600 | 2700 | |
| 61926011 | AliShahali1382 | E | Oct. 5, 2019, 2:39 p.m. | OK | GNU C++17 | TESTS | 80 | 202 | 6451200 | 2700 | |
| 51842634 | Jim_CaiCaiCai_ | E | March 26, 2019, 12:16 a.m. | OK | GNU C++17 | TESTS | 80 | 202 | 9625600 | 2700 | |
| 53835030 | Romeolong | E | May 7, 2019, 1:38 a.m. | OK | GNU C++17 | TESTS | 80 | 202 | 17920000 | 2700 | |
| 49920594 | ArshiaDadras | E | Feb. 14, 2019, 6:38 p.m. | OK | GNU C++17 | TESTS | 80 | 218 | 4300800 | 2700 | |
| 47708936 | zhongyuwei | E | Dec. 30, 2018, 12:13 a.m. | OK | GNU C++17 | TESTS | 80 | 218 | 6553600 | 2700 | |
| 51850140 | Jim_CaiCaiCai_ | E | March 26, 2019, 7:27 a.m. | OK | GNU C++17 | TESTS | 80 | 218 | 7987200 | 2700 | |
| 50592832 | vjudge4 | E | Feb. 28, 2019, 8:27 a.m. | OK | MS C++ | TESTS | 80 | 202 | 13721600 | 2700 | |
| 47611914 | vjudge5 | E | Dec. 28, 2018, 8:35 a.m. | OK | MS C++ | TESTS | 80 | 311 | 6553600 | 2700 | |
| 50591540 | vjudge5 | E | Feb. 28, 2019, 7:45 a.m. | OK | MS C++ | TESTS | 80 | 389 | 13721600 | 2700 | |
| 50592645 | vjudge3 | E | Feb. 28, 2019, 8:21 a.m. | OK | MS C++ | TESTS | 80 | 405 | 13721600 | 2700 |
Back to search problems