Codeforces Round 685 (Div. 2)

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
1451 Codeforces Round 685 (Div. 2) FINISHED False 8100 131383510 Nov. 21, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 19443 ) B Non-Substring Subsequence PROGRAMMING greedy implementation strings

B'Hr0d1y has q queries on a binary string s of length n . A binary string is a string containing only characters '0 ' and '1 '. A query is described by a pair of integers l_i , r_i (1 <= q l_i lt r_i <= q n) . For each query, he has to determine whether there exists a good subsequence in s that is equal to the substring s[l_i ldots r_i] . Can you help Hr0d1y answer each query? The first line of the input contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The description of each test case is as follows. The first line contains two integers n ( 2 <= q n <= q 100 ) and q ( 1 <= q q <= q 100 ) -- the length of the string and the number of queries. The second line contains the string s . The i -th of the next q lines contains two integers l_i and r_i ( 1 <= q l_i lt r_i <= q n ). For each test case, output q lines. The i -th line of the output of each test case should contain "YES" if there exists a good subsequence equal to the substring s[l_i...r_i] , and "NO" otherwise. You may print each letter in any case (upper or lower). In the first test case, '...

Tutorials

Editorial — Codeforces Round #685

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
99218425 nitinkumar1729 B Nov. 22, 2020, 5:30 a.m. OK GNU C11 TESTS 52 46 0
99180393 arpit.bharadwaj5 B Nov. 21, 2020, 4:27 p.m. OK GNU C11 TESTS 52 93 0
99181501 Eric_Qian B Nov. 21, 2020, 4:30 p.m. OK GNU C++11 TESTS 52 30 0
99210962 wwch B Nov. 22, 2020, 3:12 a.m. OK GNU C++11 TESTS 52 30 0
99216527 rhythm_991 B Nov. 22, 2020, 5:01 a.m. OK GNU C++11 TESTS 52 31 0
99215312 m_AS B Nov. 22, 2020, 4:41 a.m. OK GNU C++11 TESTS 52 31 0
99214567 caozilin B Nov. 22, 2020, 4:28 a.m. OK GNU C++11 TESTS 52 31 0
99213606 EchoohcE B Nov. 22, 2020, 4:12 a.m. OK GNU C++11 TESTS 52 31 0
99220570 fengyss B Nov. 22, 2020, 6 a.m. OK GNU C++11 TESTS 52 31 0
99218845 mukund_12345 B Nov. 22, 2020, 5:36 a.m. OK GNU C++11 TESTS 52 31 0
99217662 yuanyuxuan B Nov. 22, 2020, 5:18 a.m. OK GNU C++11 TESTS 52 31 0
99216530 zhoufangyuanPT B Nov. 22, 2020, 5:01 a.m. OK GNU C++11 TESTS 52 31 0
99215993 toxic_uj B Nov. 22, 2020, 4:52 a.m. OK GNU C++14 TESTS 52 30 0
99219461 Austere7 B Nov. 22, 2020, 5:44 a.m. OK GNU C++14 TESTS 52 31 0
99219148 aero__scissors B Nov. 22, 2020, 5:40 a.m. OK GNU C++14 TESTS 52 31 0
99219023 sharmaharisam B Nov. 22, 2020, 5:38 a.m. OK GNU C++14 TESTS 52 31 0
99218734 manujk B Nov. 22, 2020, 5:34 a.m. OK GNU C++14 TESTS 52 31 0
99218605 y0geshpatil B Nov. 22, 2020, 5:32 a.m. OK GNU C++14 TESTS 52 31 0
99219833 Manas_Gupta_813 B Nov. 22, 2020, 5:50 a.m. OK GNU C++14 TESTS 52 31 0
99217754 Tech_shot B Nov. 22, 2020, 5:20 a.m. OK GNU C++14 TESTS 52 31 0
99217997 vjudge4 B Nov. 22, 2020, 5:23 a.m. OK GNU C++14 TESTS 52 31 0
99220631 bawkarmanish14 B Nov. 22, 2020, 6 a.m. OK GNU C++14 TESTS 52 31 0
99178637 novice-1-2-3 B Nov. 21, 2020, 4:22 p.m. OK GNU C++17 TESTS 52 30 0
99181115 HTML_Programmer B Nov. 21, 2020, 4:29 p.m. OK GNU C++17 TESTS 52 30 0
99180701 kt0107 B Nov. 21, 2020, 4:27 p.m. OK GNU C++17 TESTS 52 30 0
99220109 chandrashekarvt761 B Nov. 22, 2020, 5:53 a.m. OK GNU C++17 TESTS 52 31 0
99220492 192.168.1.1 B Nov. 22, 2020, 5:59 a.m. OK GNU C++17 TESTS 52 31 0
99219657 harshdeep_16 B Nov. 22, 2020, 5:47 a.m. OK GNU C++17 TESTS 52 31 0
99219498 nikhil_chhipa B Nov. 22, 2020, 5:45 a.m. OK GNU C++17 TESTS 52 31 0
99218782 Munduzbaev__bo__ B Nov. 22, 2020, 5:35 a.m. OK GNU C++17 TESTS 52 31 0
99218620 Mehedi.cm B Nov. 22, 2020, 5:32 a.m. OK GNU C++17 TESTS 52 31 0
99218181 TLEKiller B Nov. 22, 2020, 5:26 a.m. OK GNU C++17 TESTS 52 31 0
99195402 Arceus03 B Nov. 21, 2020, 7:33 p.m. OK GNU C++17 (64) TESTS 52 15 0
99179033 samarth_tandon B Nov. 21, 2020, 4:23 p.m. OK GNU C++17 (64) TESTS 52 30 0
99197599 essi B Nov. 21, 2020, 8:02 p.m. OK GNU C++17 (64) TESTS 52 30 0
99217300 donpablo B Nov. 22, 2020, 5:13 a.m. OK GNU C++17 (64) TESTS 52 31 0
99217220 prakalpshakya31 B Nov. 22, 2020, 5:12 a.m. OK GNU C++17 (64) TESTS 52 31 0
99215586 ayush1206 B Nov. 22, 2020, 4:46 a.m. OK GNU C++17 (64) TESTS 52 31 0
99214540 nomad_heart B Nov. 22, 2020, 4:28 a.m. OK GNU C++17 (64) TESTS 52 31 0
99214161 alif_cse_ju B Nov. 22, 2020, 4:21 a.m. OK GNU C++17 (64) TESTS 52 31 0
99220593 kenechi B Nov. 22, 2020, 6 a.m. OK GNU C++17 (64) TESTS 52 31 0
99218505 Anisur_rahaman B Nov. 22, 2020, 5:31 a.m. OK GNU C++17 (64) TESTS 52 31 0
99219777 SAKIB_ALAMIN B Nov. 22, 2020, 5:49 a.m. OK Go TESTS 52 280 102400
99194253 _aurthohin_ B Nov. 21, 2020, 7:24 p.m. OK Go TESTS 52 343 0
99204981 abdelrahman-yousf B Nov. 21, 2020, 11:46 p.m. OK Java 11 TESTS 52 171 0
99217106 Md_Osama B Nov. 22, 2020, 5:10 a.m. OK Java 11 TESTS 52 186 0
99199666 devptyagi01 B Nov. 21, 2020, 8:42 p.m. OK Java 11 TESTS 52 186 0
99211258 mphillotry B Nov. 22, 2020, 3:19 a.m. OK Java 11 TESTS 52 217 0
99215371 vipin__sharma B Nov. 22, 2020, 4:42 a.m. OK Java 11 TESTS 52 218 0
99183177 shankha123 B Nov. 21, 2020, 4:35 p.m. OK Java 11 TESTS 52 233 0
99195630 Debojit219 B Nov. 21, 2020, 7:35 p.m. OK Java 11 TESTS 52 233 0
99200912 Clowyy B Nov. 21, 2020, 9:13 p.m. OK Java 11 TESTS 52 249 0
99214395 Alphecca4439 B Nov. 22, 2020, 4:25 a.m. OK Java 11 TESTS 52 265 0
99215552 tejaspradhan B Nov. 22, 2020, 4:45 a.m. OK Java 11 TESTS 52 280 0
99206129 kirubankamaraj B Nov. 22, 2020, 12:45 a.m. OK Java 8 TESTS 52 109 0
99201973 Life B Nov. 21, 2020, 9:39 p.m. OK Java 8 TESTS 52 109 0
99199206 piyush33patel B Nov. 21, 2020, 8:32 p.m. OK Java 8 TESTS 52 109 0
99218998 aym_05 B Nov. 22, 2020, 5:37 a.m. OK Java 8 TESTS 52 124 0
99210739 kbadrinath B Nov. 22, 2020, 3:06 a.m. OK Java 8 TESTS 52 124 0
99203489 ranveerrandhawa2468 B Nov. 21, 2020, 10:35 p.m. OK Java 8 TESTS 52 124 0
99194302 MartyByrde B Nov. 21, 2020, 7:24 p.m. OK Java 8 TESTS 52 124 0
99207357 sumitnitesh123 B Nov. 22, 2020, 1:33 a.m. OK Java 8 TESTS 52 139 0
99203880 qlf9 B Nov. 21, 2020, 10:52 p.m. OK Java 8 TESTS 52 139 0
99208901 RichardBot7000 B Nov. 22, 2020, 2:19 a.m. OK Java 8 TESTS 52 140 0
99202834 Tlatoani B Nov. 21, 2020, 10:09 p.m. OK Kotlin TESTS 52 249 102400
99182195 dkozak94 B Nov. 21, 2020, 4:32 p.m. OK Kotlin TESTS 52 280 0
99182020 amelentev B Nov. 21, 2020, 4:31 p.m. OK Kotlin TESTS 52 358 204800
99195455 amelentev B Nov. 21, 2020, 7:33 p.m. OK Kotlin TESTS 52 373 102400
99203311 Triss_Merigold B Nov. 21, 2020, 10:27 p.m. OK MS C++ 2017 TESTS 52 62 0
99201278 Targas B Nov. 21, 2020, 9:22 p.m. OK MS C++ 2017 TESTS 52 62 0
99213375 bh27122000 B Nov. 22, 2020, 4:08 a.m. OK MS C++ 2017 TESTS 52 77 0
99199314 pragati3635 B Nov. 21, 2020, 8:34 p.m. OK MS C++ 2017 TESTS 52 77 0
99196549 ustaritz B Nov. 21, 2020, 7:46 p.m. OK MS C++ 2017 TESTS 52 77 0
99178836 Megalitum B Nov. 21, 2020, 4:22 p.m. OK MS C++ 2017 TESTS 52 78 0
99188433 GooseberryJam B Nov. 21, 2020, 4:49 p.m. OK MS C++ 2017 TESTS 52 93 0
99181408 yanhao B Nov. 21, 2020, 4:30 p.m. OK MS C++ 2017 TESTS 52 93 0
99219049 htija B Nov. 22, 2020, 5:38 a.m. OK MS C++ 2017 TESTS 52 108 0
99184642 batyrbek.zhunis B Nov. 21, 2020, 4:39 p.m. OK PHP TESTS 52 93 512000
99202512 uttharapally.chandra B Nov. 21, 2020, 9:58 p.m. OK PyPy 3 TESTS 52 202 5836800
99199714 InvalidSyntax B Nov. 21, 2020, 8:43 p.m. OK PyPy 3 TESTS 52 218 5836800
99214081 codershuvo B Nov. 22, 2020, 4:20 a.m. OK PyPy 3 TESTS 52 249 5836800
99198804 vvedant99 B Nov. 21, 2020, 8:23 p.m. OK PyPy 3 TESTS 52 264 6246400
99196014 prabakar.rangarajan B Nov. 21, 2020, 7:39 p.m. OK PyPy 3 TESTS 52 327 3379200
99202146 GaussFan B Nov. 21, 2020, 9:45 p.m. OK PyPy 3 TESTS 52 343 6246400
99220153 sagarpandey7742 B Nov. 22, 2020, 5:54 a.m. OK PyPy 3 TESTS 52 343 7065600
99199090 rpkagoswami B Nov. 21, 2020, 8:29 p.m. OK PyPy 3 TESTS 52 358 5632000
99211893 tharun_99 B Nov. 22, 2020, 3:34 a.m. OK PyPy 3 TESTS 52 358 6348800
99203118 hazemhazemzoma221 B Nov. 21, 2020, 10:20 p.m. OK PyPy 3 TESTS 52 358 6553600
99211450 biltharesatyendra B Nov. 22, 2020, 3:24 a.m. OK Python 2 TESTS 52 389 0
99206565 programmer_neo B Nov. 22, 2020, 1:04 a.m. OK Python 3 TESTS 52 155 409600
99204676 borgib B Nov. 21, 2020, 11:29 p.m. OK Python 3 TESTS 52 155 409600
99208682 appmnit B Nov. 22, 2020, 2:12 a.m. OK Python 3 TESTS 52 187 0
99216874 mastermind.hk16 B Nov. 22, 2020, 5:06 a.m. OK Python 3 TESTS 52 187 307200
99215915 Ahamed30 B Nov. 22, 2020, 4:51 a.m. OK Python 3 TESTS 52 187 307200
99214003 sh1194 B Nov. 22, 2020, 4:19 a.m. OK Python 3 TESTS 52 202 0
99213350 MFahim12 B Nov. 22, 2020, 4:07 a.m. OK Python 3 TESTS 52 202 0
99211844 hakish1234 B Nov. 22, 2020, 3:33 a.m. OK Python 3 TESTS 52 202 0
99216301 ashik_sec_15 B Nov. 22, 2020, 4:58 a.m. OK Python 3 TESTS 52 202 307200
99213253 sul3 B Nov. 22, 2020, 4:06 a.m. OK Python 3 TESTS 52 202 307200
99216251 Strorkis B Nov. 22, 2020, 4:57 a.m. OK Rust TESTS 52 46 102400

remove filters

Back to search problems