Codeforces Round 498 (Div. 3)

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
1006 Codeforces Round 498 (Div. 3) FINISHED False 7200 200071499 July 16, 2018, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 6011 ) D Two Strings Swaps PROGRAMMING implementation 1700

B"You are given two strings a and b consisting of lowercase English letters, both of length n . The characters of both strings have indices from 1 to n , inclusive. You are allowed to do the following changes: Note that if n is odd, you are formally allowed to swap a_{ lceil frac{n}{2} rceil} with a_{ lceil frac{n}{2} rceil} (and the same with the string b ) but this move is useless. Also you can swap two equal characters but this operation is useless as well. You have to make these strings equal by applying any number of changes described above, in any order. But it is obvious that it may be impossible to make two strings equal by these swaps. In one preprocess move you can replace a character in a with another character. In other words, in a single preprocess move you can choose any index i ( 1 <= i <= n ), any character c and set a_i := c . Your task is to find the minimum number of preprocess moves to apply in such a way that after them you can make strings a and b equal by applying some number of changes described in the list above. Note that the number of changes you make after the preprocess moves does not matter. Also note that you cannot apply preprocess moves to the string b or make any preprocess moves after the first change is made. The first line of the input contains one integer n ( 1 <= n <= 10^5 ) -- the length of strings a and b . The second line contains the string a consisting of exactly n lowercase English letters. The third line contains the string b consisting of exactly n lowercase English letters. Print a single integer -- the minimum number of preprocess moves to apply before changes, so that it is possible to make the string a equal to string b with a sequence of changes from the list above. In the first example preprocess moves are as follows: a_1 := 'b', a_3 := $$"...

Tutorials

60672

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
40485412 rr_ D July 17, 2018, 4:21 p.m. OK D TESTS 23 46 4198400 1700
40485634 rr_ D July 17, 2018, 4:28 p.m. OK D TESTS 23 61 4198400 1700
40587465 ruban D July 20, 2018, 6:50 p.m. OK Delphi TESTS 23 46 43622400 1700
61756061 LaSWeeG D Oct. 3, 2019, 5:33 a.m. OK FPC TESTS 23 31 1126400 1700
40968995 __ShaW D July 30, 2018, 12:34 p.m. OK FPC TESTS 23 46 204800 1700
40502264 lokianyu D July 18, 2018, 6:49 a.m. OK GNU C TESTS 23 31 204800 1700
40498997 Asurudo D July 18, 2018, 4:40 a.m. OK GNU C TESTS 23 31 204800 1700
40498876 Asurudo D July 18, 2018, 4:32 a.m. OK GNU C TESTS 23 31 204800 1700
40498649 Asurudo D July 18, 2018, 4:18 a.m. OK GNU C TESTS 23 31 204800 1700
40482293 Shadman_Ibne_Saiful D July 17, 2018, 2:42 p.m. OK GNU C TESTS 23 31 204800 1700
40560066 Kallaf D July 19, 2018, 10:40 p.m. OK GNU C TESTS 23 31 204800 1700
40506178 egg23333 D July 18, 2018, 8:30 a.m. OK GNU C TESTS 23 31 204800 1700
42010973 luogu_bot3 D Aug. 24, 2018, 12:43 a.m. OK GNU C++ TESTS 23 15 0 1700
40993781 Scut82 D July 31, 2018, 2:13 a.m. OK GNU C++ TESTS 23 15 204800 1700
41138241 vjudge3 D Aug. 2, 2018, 11:53 p.m. OK GNU C++ TESTS 23 30 0 1700
40608876 serotonin D July 21, 2018, 1:03 p.m. OK GNU C++ TESTS 23 30 0 1700
40608757 dimdim D July 21, 2018, 12:59 p.m. OK GNU C++ TESTS 23 30 0 1700
40563053 vjudge2 D July 20, 2018, 2:36 a.m. OK GNU C++ TESTS 23 30 0 1700
40546852 treeofapple D July 19, 2018, 12:15 p.m. OK GNU C++ TESTS 23 30 0 1700
41333714 vjudge1 D Aug. 8, 2018, 10:29 a.m. OK GNU C++ TESTS 23 30 102400 1700
40506410 Only_Wolfy D July 18, 2018, 8:36 a.m. OK GNU C++ TESTS 23 30 204800 1700
40717909 vjudge5 D July 24, 2018, 9:06 p.m. OK GNU C++ TESTS 23 30 307200 1700
40533838 LudwigVanBeethoven D July 19, 2018, 4:58 a.m. OK GNU C11 TESTS 23 31 204800 1700
40658423 zprhhs D July 23, 2018, 5:45 a.m. OK GNU C++11 TESTS 23 15 204800 1700
41536902 _12_ D Aug. 12, 2018, 6:28 p.m. OK GNU C++11 TESTS 23 15 512000 1700
41532235 vjudge5 D Aug. 12, 2018, 3:09 p.m. OK GNU C++11 TESTS 23 15 3993600 1700
40684838 ggoh D July 24, 2018, 1:11 a.m. OK GNU C++11 TESTS 23 30 0 1700
41996592 Mikhniuk D Aug. 23, 2018, 12:29 p.m. OK GNU C++11 TESTS 23 30 0 1700
48477093 vjudge5 D Jan. 17, 2019, 3:33 a.m. OK GNU C++11 TESTS 23 30 204800 1700
67469545 solego D Dec. 23, 2019, 12:18 p.m. OK GNU C++11 TESTS 23 30 204800 1700
41954196 xuyifeng D Aug. 22, 2018, 5:08 a.m. OK GNU C++11 TESTS 23 30 204800 1700
41329123 vjudge3 D Aug. 8, 2018, 7:39 a.m. OK GNU C++11 TESTS 23 30 204800 1700
40866467 pipishrimp D July 28, 2018, 3:38 a.m. OK GNU C++11 TESTS 23 30 204800 1700
47893294 qilip D Jan. 4, 2019, 8:26 a.m. OK GNU C++14 TESTS 23 15 204800 1700
50536210 janurban D Feb. 26, 2019, 3:50 p.m. OK GNU C++14 TESTS 23 15 204800 1700
53304228 shangxiaomi D April 26, 2019, 12:39 a.m. OK GNU C++14 TESTS 23 15 204800 1700
48477910 vjudge4 D Jan. 17, 2019, 4:18 a.m. OK GNU C++14 TESTS 23 15 204800 1700
63664347 qf1874 D Oct. 28, 2019, 2:49 p.m. OK GNU C++14 TESTS 23 15 409600 1700
56059364 19Weapons D June 26, 2019, 4:07 a.m. OK GNU C++14 TESTS 23 15 512000 1700
53271261 lamvh2812 D April 25, 2019, 6:27 a.m. OK GNU C++14 TESTS 23 15 512000 1700
51963670 le9018468 D March 29, 2019, 8:40 a.m. OK GNU C++14 TESTS 23 15 512000 1700
49631705 kartikey_21 D Feb. 8, 2019, 4:26 p.m. OK GNU C++14 TESTS 23 15 512000 1700
48118222 vasu2907 D Jan. 9, 2019, 2:08 p.m. OK GNU C++14 TESTS 23 15 512000 1700
40549082 sm00vlatte D July 19, 2018, 1:20 p.m. OK GNU C++17 TESTS 23 15 204800 1700
41445782 BryanValeriano D Aug. 10, 2018, 11:38 p.m. OK GNU C++17 TESTS 23 15 204800 1700
40646118 Alex18mai D July 22, 2018, 4:18 p.m. OK GNU C++17 TESTS 23 15 204800 1700
40493907 Counting_Stars D July 18, 2018, 12:33 a.m. OK GNU C++17 TESTS 23 15 204800 1700
40631590 ZJNU_5taiwei D July 22, 2018, 9:25 a.m. OK GNU C++17 TESTS 23 15 409600 1700
68077044 vladand D Jan. 2, 2020, 12:58 p.m. OK GNU C++17 TESTS 23 15 512000 1700
63648232 maximum2000 D Oct. 28, 2019, 10:31 a.m. OK GNU C++17 TESTS 23 15 512000 1700
57720591 GeorgeRaouf D July 25, 2019, 5:07 a.m. OK GNU C++17 TESTS 23 15 512000 1700
56143740 bagheera__ D June 27, 2019, 5 a.m. OK GNU C++17 TESTS 23 15 512000 1700
69584507 yuhta D Jan. 26, 2020, 6:50 p.m. OK GNU C++17 TESTS 23 15 512000 1700
40519093 lemonYu D July 18, 2018, 2:57 p.m. OK GNU C++17 Diagnostics TESTS 23 1560 2457600 1700
40946511 vdang1 D July 30, 2018, 8:36 a.m. OK GNU C++17 Diagnostics TESTS 23 1653 1638400 1700
69594455 GiantTornado D Jan. 27, 2020, 3:31 a.m. OK Java 11 TESTS 23 186 0 1700
50902621 Harbin D March 6, 2019, 6:11 p.m. OK Java 8 TESTS 23 124 0 1700
69617187 luchy0120 D Jan. 27, 2020, 1:26 p.m. OK Java 8 TESTS 23 124 0 1700
66245002 Agnimandur D Dec. 3, 2019, 8:01 p.m. OK Java 8 TESTS 23 124 0 1700
59382088 chojh1222 D Aug. 24, 2019, 3:59 a.m. OK Java 8 TESTS 23 124 0 1700
53466227 icpc_loser D April 28, 2019, 10:14 a.m. OK Java 8 TESTS 23 124 0 1700
53224156 hex_as D April 24, 2019, 1:28 p.m. OK Java 8 TESTS 23 124 0 1700
52777492 mikkk D April 15, 2019, 12:41 p.m. OK Java 8 TESTS 23 124 0 1700
47527206 kusomushi D Dec. 26, 2018, 4:36 p.m. OK Java 8 TESTS 23 124 0 1700
40922024 taipham93 D July 29, 2018, 3:25 p.m. OK Java 8 TESTS 23 124 0 1700
40861076 rohan03 D July 27, 2018, 9:22 p.m. OK Java 8 TESTS 23 124 0 1700
40773947 user32 D July 26, 2018, 10:11 a.m. OK Kotlin TESTS 23 233 716800 1700
59660953 og.kostya D Aug. 29, 2019, 12:27 p.m. OK Mono C# TESTS 23 46 716800 1700
42359371 TrinidadTobago D Sept. 2, 2018, 10:52 a.m. OK Mono C# TESTS 23 61 716800 1700
48484127 vjudge5 D Jan. 17, 2019, 7:34 a.m. OK MS C++ TESTS 23 15 204800 1700
43923166 vjudge5 D Oct. 7, 2018, 2:32 a.m. OK MS C++ TESTS 23 15 204800 1700
63734883 vjudge3 D Oct. 29, 2019, 3:02 p.m. OK MS C++ TESTS 23 30 204800 1700
68441844 vjudge4 D Jan. 9, 2020, 11:13 a.m. OK MS C++ TESTS 23 30 204800 1700
68425355 vjudge5 D Jan. 9, 2020, 2:46 a.m. OK MS C++ TESTS 23 30 204800 1700
40546844 Bye_Codeforces D July 19, 2018, 12:15 p.m. OK MS C++ TESTS 23 30 409600 1700
62432344 vjudge4 D Oct. 12, 2019, 4:13 p.m. OK MS C++ TESTS 23 31 204800 1700
60371980 vjudge2 D Sept. 11, 2019, 2:59 a.m. OK MS C++ TESTS 23 31 204800 1700
67660867 tarattata1 D Dec. 26, 2019, 3:46 p.m. OK MS C++ TESTS 23 31 204800 1700
68425666 vjudge1 D Jan. 9, 2020, 3 a.m. OK MS C++ TESTS 23 31 204800 1700
49555354 work_hard. D Feb. 7, 2019, 9:16 a.m. OK MS C++ 2017 TESTS 23 31 204800 1700
57798037 zkq111 D July 26, 2019, 12:11 p.m. OK MS C++ 2017 TESTS 23 31 307200 1700
59442477 yorky D Aug. 25, 2019, 11:49 a.m. OK MS C++ 2017 TESTS 23 31 307200 1700
64285455 Y_is_sunshine D Nov. 5, 2019, 4:36 a.m. OK MS C++ 2017 TESTS 23 46 307200 1700
51871191 AlexandrBusse D March 26, 2019, 5:28 p.m. OK MS C++ 2017 TESTS 23 46 409600 1700
64285475 vjudge4 D Nov. 5, 2019, 4:37 a.m. OK MS C++ 2017 TESTS 23 46 614400 1700
40481605 mayakin D July 17, 2018, 2:23 p.m. OK PHP TESTS 23 62 0 1700
60081119 soumyasarkar1998 D Sept. 5, 2019, 2:04 p.m. OK PyPy 2 TESTS 23 140 819200 1700
45667336 c1729 D Nov. 13, 2018, 8:26 a.m. OK PyPy 2 TESTS 23 202 2048000 1700
40612999 sasasagagaga D July 21, 2018, 3:51 p.m. OK PyPy 2 TESTS 23 264 3686400 1700
40613056 sasasagagaga D July 21, 2018, 3:54 p.m. OK PyPy 2 TESTS 23 420 19968000 1700
40622656 rawfish D July 22, 2018, 3:05 a.m. OK PyPy 3 TESTS 23 171 8806400 1700
47479059 TurningTables D Dec. 25, 2018, 2:20 a.m. OK PyPy 3 TESTS 23 171 9728000 1700
68081497 lowoncode D Jan. 2, 2020, 2:33 p.m. OK PyPy 3 TESTS 23 186 3379200 1700
61435614 I_Am_Justice RedRanger FCUKmodiBhakts D Sept. 28, 2019, 4:30 p.m. OK PyPy 3 TESTS 23 186 3481600 1700
40877567 bandi.enkh D July 28, 2018, 9:10 a.m. OK PyPy 3 TESTS 23 187 2867200 1700
62428734 deadguy D Oct. 12, 2019, 3:06 p.m. OK PyPy 3 TESTS 23 202 9523200 1700
40500121 vjudge5 D July 18, 2018, 5:36 a.m. OK PyPy 3 TESTS 23 217 2969600 1700
40500116 ZhouTi D July 18, 2018, 5:36 a.m. OK PyPy 3 TESTS 23 218 2969600 1700
41159990 Zombarian D Aug. 3, 2018, 2:35 p.m. OK PyPy 3 TESTS 23 218 3072000 1700
53584595 yfo D April 30, 2019, 5:40 p.m. OK PyPy 3 TESTS 23 233 3891200 1700
40683839 codercody D July 23, 2018, 11:40 p.m. OK Python 2 TESTS 23 218 1228800 1700
40684256 splidd D July 24, 2018, 12:20 a.m. OK Python 2 TESTS 23 233 1126400 1700
40535151 marshal4world D July 19, 2018, 5:50 a.m. OK Python 2 TESTS 23 233 1228800 1700
40535130 ashishj123 D July 19, 2018, 5:50 a.m. OK Python 2 TESTS 23 233 1228800 1700
40620770 nealzane D July 22, 2018, 1:20 a.m. OK Python 2 TESTS 23 234 307200 1700
47865569 Luxo D Jan. 3, 2019, 9:28 a.m. OK Python 2 TESTS 23 249 307200 1700
40683779 codercody D July 23, 2018, 11:33 p.m. OK Python 2 TESTS 23 265 1228800 1700
40600442 vjudge3 D July 21, 2018, 8:16 a.m. OK Python 2 TESTS 23 265 1228800 1700
41976342 WakeUpSudo D Aug. 22, 2018, 7:12 p.m. OK Python 2 TESTS 23 296 1228800 1700
40536439 god1048 D July 19, 2018, 6:31 a.m. OK Python 2 TESTS 23 327 1331200 1700
52506864 notbot D April 8, 2019, 7:14 p.m. OK Python 3 TESTS 23 140 614400 1700
40562357 eugalt D July 20, 2018, 1:55 a.m. OK Python 3 TESTS 23 140 716800 1700
40930648 ReaLNero1 D July 30, 2018, 12:04 a.m. OK Python 3 TESTS 23 155 716800 1700
40563182 eugalt D July 20, 2018, 2:44 a.m. OK Python 3 TESTS 23 155 716800 1700
40504489 Mad_Andrei D July 18, 2018, 7:47 a.m. OK Python 3 TESTS 23 156 512000 1700
40556649 eugalt D July 19, 2018, 6:41 p.m. OK Python 3 TESTS 23 156 716800 1700
40553931 eugalt D July 19, 2018, 4:28 p.m. OK Python 3 TESTS 23 170 819200 1700
40724465 ritikraj730 D July 25, 2018, 3:52 a.m. OK Python 3 TESTS 23 171 512000 1700
55422822 Annvv D June 11, 2019, 7:26 a.m. OK Python 3 TESTS 23 171 614400 1700
40677128 anagohirame D July 23, 2018, 4:16 p.m. OK Python 3 TESTS 23 171 1433600 1700
41446444 betrue12 D Aug. 11, 2018, 12:48 a.m. OK Ruby TESTS 23 327 614400 1700
46409911 yakamoto D Nov. 30, 2018, 4:33 p.m. OK Scala TESTS 23 607 0 1700
46413537 yakamoto D Nov. 30, 2018, 6:09 p.m. OK Scala TESTS 23 717 0 1700
46413371 yakamoto D Nov. 30, 2018, 6:05 p.m. OK Scala TESTS 23 1434 0 1700
46413136 yakamoto D Nov. 30, 2018, 5:58 p.m. OK Scala TESTS 23 1528 0 1700

remove filters

Back to search problems