Codeforces Round 866 (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
1820 Codeforces Round 866 (Div. 2) FINISHED False 7200 50273699 April 15, 2023, 9:05 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16783 ) A Yura's New Name PROGRAMMING implementation strings

B'After holding one team contest, boy Yura got very tired and wanted to change his life and move to Japan. In honor of such a change, Yura changed his name to something nice. Fascinated by this idea he already thought up a name s consisting only of characters "_" and "^". But there 's a problem -- Yura likes smiley faces "^_^" and "^^". Therefore any character of the name must be a part of at least one such smiley. Note that only the consecutive characters of the name can be a smiley face. More formally, consider all occurrences of the strings "^_^" and "^^" in the string s . Then all such occurrences must cover the whole string s , possibly with intersections. For example, in the string "^^__^_^^__^" the characters at positions 3,4,9,10 and 11 are not contained inside any smileys, and the other characters at positions 1,2,5,6,7 and 8 are contained inside smileys. In one operation Jura can insert one of the characters "_" and "^" into his name s (you can insert it at any position in the string). He asks you to tell him the minimum number of operations you need to do to make the name fit Yura 's criteria. Each test consists of multiple test cases. The first line contains a single integer t ( 1 <= t <= 100 ) --the number of test cases. The description of test cases follows. The first and only line of each test case contains a single string s ( 1 <= q |s| <= q 100 ), consisting of characters "_" and "^", -- the name to change. For each test case, output a single integer -- the minimum number of characters you need to add to the name to make it fit for Yura. If you don 't need to change anything in the name, print 0 . In the first test case, you can get the following name by adding 5 characters: ^_^_^_^_^_^_^ In the third test case, we can add one character "^" to the end of the name, then we get the name: ^_^ In the fourth test case, we can add one character "^" to the end of t'...

Tutorials

Codeforces Round #866 (Div.1, Div.2, based on Lipetsk Team Olympiad) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
202239055 RSAMSD A April 15, 2023, 12:25 p.m. OK C# 10 TESTS 4 46 204800
202238571 nksammirPL A April 15, 2023, 12:20 p.m. OK C# 10 TESTS 4 77 102400
202289587 rukaiyaUmmey_ A April 15, 2023, 7:15 p.m. OK Clang++17 Diagnostics TESTS 4 30 0
202246666 uditmehta A April 15, 2023, 1:24 p.m. OK Clang++20 Diagnostics TESTS 4 30 2150400
202271259 niloychowdhury A April 15, 2023, 5:10 p.m. OK GNU C11 TESTS 4 0 0
202290876 Electro-F A April 15, 2023, 7:30 p.m. OK GNU C11 TESTS 4 0 0
202273804 saif2107017 A April 15, 2023, 5:31 p.m. OK GNU C11 TESTS 4 15 0
202326434 j0ny A April 16, 2023, 5:26 a.m. OK GNU C11 TESTS 4 15 0
202248258 dreamtolearn A April 15, 2023, 1:36 p.m. OK GNU C11 TESTS 4 15 0
202260177 mananchichra A April 15, 2023, 3:15 p.m. OK GNU C11 TESTS 4 15 0
202263619 HQLF A April 15, 2023, 3:48 p.m. OK GNU C11 TESTS 4 15 0
202266806 ishrat02 A April 15, 2023, 4:18 p.m. OK GNU C11 TESTS 4 15 0
202273780 bkifhr6 A April 15, 2023, 5:31 p.m. OK GNU C11 TESTS 4 15 0
202236968 Hantur A April 15, 2023, 12:08 p.m. OK GNU C11 TESTS 3 30 0
202323279 AbracaSora A April 16, 2023, 4:37 a.m. OK GNU C++14 TESTS 4 0 0
202325700 maiky A April 16, 2023, 5:16 a.m. OK GNU C++14 TESTS 4 0 0
202325559 thalapaty0801 A April 16, 2023, 5:14 a.m. OK GNU C++14 TESTS 4 0 0
202324494 jack_r_007 A April 16, 2023, 4:57 a.m. OK GNU C++14 TESTS 4 0 0
202319618 zhaopipichishi A April 16, 2023, 3:30 a.m. OK GNU C++14 TESTS 4 0 0
202319439 Lovepotato_ A April 16, 2023, 3:27 a.m. OK GNU C++14 TESTS 4 0 0
202315457 Dhruv__2021 A April 16, 2023, 2:13 a.m. OK GNU C++14 TESTS 4 0 0
202315243 vishalsingh_88 A April 16, 2023, 2:08 a.m. OK GNU C++14 TESTS 4 0 0
202314697 sunrise10032 A April 16, 2023, 1:57 a.m. OK GNU C++14 TESTS 4 0 0
202313250 shattershade A April 16, 2023, 1:27 a.m. OK GNU C++14 TESTS 4 0 0
202325008 pretodf A April 16, 2023, 5:05 a.m. OK GNU C++17 TESTS 4 0 0
202326477 saptarshipramanik A April 16, 2023, 5:26 a.m. OK GNU C++17 TESTS 4 0 0
202326660 cnmnt123 A April 16, 2023, 5:29 a.m. OK GNU C++17 TESTS 4 0 0
202327011 devanshmishra111 A April 16, 2023, 5:34 a.m. OK GNU C++17 TESTS 4 0 0
202327421 its_Lokesh A April 16, 2023, 5:39 a.m. OK GNU C++17 TESTS 4 0 0
202327529 Saika_ A April 16, 2023, 5:41 a.m. OK GNU C++17 TESTS 4 0 0
202328116 mohabstudent A April 16, 2023, 5:49 a.m. OK GNU C++17 TESTS 4 0 0
202328512 guesshere A April 16, 2023, 5:54 a.m. OK GNU C++17 TESTS 4 0 0
202328808 noobyXerror69 A April 16, 2023, 5:58 a.m. OK GNU C++17 TESTS 4 0 0
202328908 kerberos_phan A April 16, 2023, 6 a.m. OK GNU C++17 TESTS 4 0 0
202318027 notyour_young A April 16, 2023, 3:02 a.m. OK GNU C++17 (64) TESTS 4 0 0
202308559 tricky_hunter A April 15, 2023, 11:40 p.m. OK GNU C++17 (64) TESTS 4 0 0
202306188 Sereen_eity323 A April 15, 2023, 10:54 p.m. OK GNU C++17 (64) TESTS 4 0 0
202304094 Krzychuo A April 15, 2023, 10:18 p.m. OK GNU C++17 (64) TESTS 4 0 0
202302596 RH_Shaudho A April 15, 2023, 9:52 p.m. OK GNU C++17 (64) TESTS 4 0 0
202298141 Anshu_9b A April 15, 2023, 8:52 p.m. OK GNU C++17 (64) TESTS 4 0 0
202291144 04kananya A April 15, 2023, 7:33 p.m. OK GNU C++17 (64) TESTS 4 0 0
202289627 kaisirius_7 A April 15, 2023, 7:16 p.m. OK GNU C++17 (64) TESTS 4 0 0
202325766 HHHlbw233 A April 16, 2023, 5:17 a.m. OK GNU C++17 (64) TESTS 4 0 0
202288956 _Rithik A April 15, 2023, 7:08 p.m. OK GNU C++17 (64) TESTS 4 0 0
202325640 Kittoi A April 16, 2023, 5:15 a.m. OK GNU C++20 (64) TESTS 4 0 0
202329039 Omar_Mohammad A April 16, 2023, 6:02 a.m. OK GNU C++20 (64) TESTS 4 0 0
202328862 asaecs2 A April 16, 2023, 5:59 a.m. OK GNU C++20 (64) TESTS 4 0 0
202328832 anhphant A April 16, 2023, 5:59 a.m. OK GNU C++20 (64) TESTS 4 0 0
202328246 automatic_station A April 16, 2023, 5:51 a.m. OK GNU C++20 (64) TESTS 4 0 0
202327478 janus_5460 A April 16, 2023, 5:40 a.m. OK GNU C++20 (64) TESTS 4 0 0
202327340 qinghuanh A April 16, 2023, 5:38 a.m. OK GNU C++20 (64) TESTS 4 0 0
202326530 aayushiiiii09 A April 16, 2023, 5:27 a.m. OK GNU C++20 (64) TESTS 4 0 0
202326416 NaXii A April 16, 2023, 5:26 a.m. OK GNU C++20 (64) TESTS 4 0 0
202325565 v1p3r_jr A April 16, 2023, 5:14 a.m. OK GNU C++20 (64) TESTS 4 0 0
202237238 IvanRenison A April 15, 2023, 12:10 p.m. OK Haskell TESTS 3 0 0
202244310 vijender_8601 A April 15, 2023, 1:05 p.m. OK Java 11 TESTS 4 155 0
202260082 WORTH A April 15, 2023, 3:14 p.m. OK Java 11 TESTS 4 171 0
202238898 NithinBharathi A April 15, 2023, 12:23 p.m. OK Java 11 TESTS 4 171 0
202252247 neelakshsharma1997 A April 15, 2023, 2:07 p.m. OK Java 11 TESTS 4 186 0
202242736 codeanand17 A April 15, 2023, 12:53 p.m. OK Java 11 TESTS 4 186 0
202278771 bommidilaxman1017 A April 15, 2023, 6:21 p.m. OK Java 11 TESTS 4 187 0
202254602 sachinshinde603eight A April 15, 2023, 2:26 p.m. OK Java 11 TESTS 4 187 0
202276034 Kempachi A April 15, 2023, 5:54 p.m. OK Java 11 TESTS 4 218 0
202263428 shrikantpadhy18 A April 15, 2023, 3:46 p.m. OK Java 11 TESTS 4 233 0
202254398 sachinshinde603eight A April 15, 2023, 2:24 p.m. OK Java 11 TESTS 4 249 0
202250664 sid234890 A April 15, 2023, 1:54 p.m. OK Java 17 TESTS 4 124 0
202246491 nigamabhai03 A April 15, 2023, 1:23 p.m. OK Java 17 TESTS 4 155 0
202254684 this.is.shivamsingh A April 15, 2023, 2:27 p.m. OK Java 17 TESTS 4 155 307200
202240505 Badass_Nemesis A April 15, 2023, 12:37 p.m. OK Java 17 TESTS 4 170 102400
202251447 bigBull2 A April 15, 2023, 2:01 p.m. OK Java 17 TESTS 4 171 0
202237642 rated21 A April 15, 2023, 12:13 p.m. OK Java 17 TESTS 3 171 0
202223678 cokebounce A April 15, 2023, 10:49 a.m. OK Java 17 TESTS 3 171 0
202246693 bipinkumar5271 A April 15, 2023, 1:24 p.m. OK Java 17 TESTS 4 187 0
202265085 bhavya_018 A April 15, 2023, 4:01 p.m. OK Java 17 TESTS 4 202 307200
202244124 Jahnvi_37 A April 15, 2023, 1:04 p.m. OK Java 17 TESTS 4 202 1024000
202326219 Virendra115 A April 16, 2023, 5:23 a.m. OK Java 8 TESTS 4 93 0
202224254 gopalchobey9 A April 15, 2023, 10:51 a.m. OK Java 8 TESTS 3 93 0
202267347 formidablechief_27 A April 15, 2023, 4:24 p.m. OK Java 8 TESTS 4 109 0
202258519 Mohit_0100 A April 15, 2023, 3 p.m. OK Java 8 TESTS 4 109 0
202256298 tejasS-27 A April 15, 2023, 2:41 p.m. OK Java 8 TESTS 4 139 0
202247088 Juhaied_nabid A April 15, 2023, 1:27 p.m. OK Java 8 TESTS 4 140 0
202245561 ahmedTarek28 A April 15, 2023, 1:16 p.m. OK Java 8 TESTS 4 140 0
202234585 2jz-gte A April 15, 2023, 11:55 a.m. OK Java 8 TESTS 3 140 0
202326941 Mohit_0100 A April 16, 2023, 5:33 a.m. OK Java 8 TESTS 4 155 0
202295088 Ashu2030 A April 15, 2023, 8:17 p.m. OK Java 8 TESTS 4 171 0
202312046 MustafaMahmoud15 A April 16, 2023, 1:01 a.m. OK Kotlin 1.7 TESTS 4 280 0
202327697 Pranay32 A April 16, 2023, 5:43 a.m. OK MS C++ 2017 TESTS 4 0 0
202222905 seelight A April 15, 2023, 10:47 a.m. OK MS C++ 2017 TESTS 3 0 0
202315051 ishybee A April 16, 2023, 2:04 a.m. OK MS C++ 2017 TESTS 4 15 0
202301513 incuiio A April 15, 2023, 9:36 p.m. OK MS C++ 2017 TESTS 4 15 0
202294477 Ahmed_El-Sayed_Mahmoud A April 15, 2023, 8:10 p.m. OK MS C++ 2017 TESTS 4 15 0
202241639 adesh123 A April 15, 2023, 12:45 p.m. OK MS C++ 2017 TESTS 4 15 0
202235561 Hamada A April 15, 2023, noon OK MS C++ 2017 TESTS 3 15 0
202227018 tyrt A April 15, 2023, 10:59 a.m. OK MS C++ 2017 TESTS 3 15 0
202225892 gsomani A April 15, 2023, 10:56 a.m. OK PyPy 3 TESTS 3 62 1433600
202236949 t12104 A April 15, 2023, 12:08 p.m. OK PyPy 3 TESTS 3 77 1433600
202239060 crows1 A April 15, 2023, 12:25 p.m. OK PyPy 3 TESTS 4 92 0
202246238 drugkeeper A April 15, 2023, 1:21 p.m. OK PyPy 3-64 TESTS 4 46 0
202229064 Leniksss A April 15, 2023, 11:03 a.m. OK PyPy 3-64 TESTS 3 46 1433600
202224104 Lock_r A April 15, 2023, 10:51 a.m. OK PyPy 3-64 TESTS 3 46 1433600
202259930 Kaee A April 15, 2023, 3:13 p.m. OK PyPy 3-64 TESTS 4 46 1536000
202238580 gardengnome A April 15, 2023, 12:21 p.m. OK PyPy 3-64 TESTS 4 46 1536000
202320594 ZaeThrix A April 16, 2023, 3:47 a.m. OK PyPy 3-64 TESTS 4 46 1740800
202277192 A_r_e_s A April 15, 2023, 6:06 p.m. OK PyPy 3-64 TESTS 4 46 1740800
202258295 Ashis2512 A April 15, 2023, 2:58 p.m. OK PyPy 3-64 TESTS 4 46 1740800
202240032 omsubhampati A April 15, 2023, 12:33 p.m. OK PyPy 3-64 TESTS 4 46 1740800
202277154 rishabh.jaiswal A April 15, 2023, 6:06 p.m. OK PyPy 3-64 TESTS 4 61 1638400
202278099 eugalt A April 15, 2023, 6:15 p.m. OK Python 3 TESTS 4 30 0
202271475 RahulSinghIITD A April 15, 2023, 5:13 p.m. OK Python 3 TESTS 4 30 0
202315075 eugalt A April 16, 2023, 2:05 a.m. OK Python 3 TESTS 4 31 0
202279702 PythonIsGodlike A April 15, 2023, 6:31 p.m. OK Python 3 TESTS 4 31 0
202250633 Md.Salam_Uddin A April 15, 2023, 1:54 p.m. OK Python 3 TESTS 4 31 0
202229298 Red_Kaiser A April 15, 2023, 11:04 a.m. OK Python 3 TESTS 3 31 0
202227596 atharv.chakurkar21 A April 15, 2023, 11 a.m. OK Python 3 TESTS 3 31 0
202223511 guptasharad723 A April 15, 2023, 10:49 a.m. OK Python 3 TESTS 3 31 0
202312385 MutedSolace A April 16, 2023, 1:08 a.m. OK Python 3 TESTS 4 46 0
202290126 ahmedchammam A April 15, 2023, 7:22 p.m. OK Python 3 TESTS 4 46 0
202259060 zheland A April 15, 2023, 3:05 p.m. OK Rust 2021 TESTS 4 0 0
202255564 ilyshana A April 15, 2023, 2:34 p.m. OK Rust 2021 TESTS 4 0 0
202292816 damka_habalka A April 15, 2023, 7:51 p.m. OK Rust 2021 TESTS 4 15 0

remove filters

Back to search problems