Codeforces Round 207 (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
356 Codeforces Round 207 (Div. 1) FINISHED False 7200 349984799 Oct. 15, 2013, noon

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1933 ) B Xenia and Hamming PROGRAMMING implementation math 2000

B'Xenia is an amateur programmer. Today on the IT lesson she learned about the Hamming distance. The Hamming distance between two strings s xe2 x80 x89= xe2 x80 x89s1s2... sn and t xe2 x80 x89= xe2 x80 x89t1t2... tn of equal length n is value . Record [si xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89ti] is the Iverson notation and represents the following: if si xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89ti, it is one, otherwise -- zero. Now Xenia wants to calculate the Hamming distance between two long strings a and b. The first string a is the concatenation of n copies of string x, that is, . The second string b is the concatenation of m copies of string y. Help Xenia, calculate the required Hamming distance, given n, xe2 x80 x89x, xe2 x80 x89m, xe2 x80 x89y. The first line contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891012). The second line contains a non-empty string x. The third line contains a non-empty string y. Both strings consist of at most 106 lowercase English letters. It is guaranteed that strings a and b that you obtain from the input have the same length. Print a single integer -- the required Hamming distance. Please, do not use the %lld specifier to read or write 64-bit integers in xd0 xa1++. It is preferred to use the cin, cout streams or the %I64d specifier. In the first test case string a is the same as string b and equals 100 letters a. As both strings are equal, the Hamming distance between them is zero. In the second test case strings a and b differ in their 3-rd, 5-th, 6-th and 7-th characters. Thus, the Hamming distance equals 4. In the third test case string a is rzrrzr and string b is azazaz. The strings differ in all characters apart for the second one, the Hamming distance between them equals 5.'...

Tutorials

Codeforces Round #207: разбор задач

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
4792516 Golovanov399 B Oct. 15, 2013, 12:35 p.m. OK Delphi TESTS 49 842 2969600 2000
4801283 love_lt B Oct. 16, 2013, 12:47 a.m. OK FPC TESTS 49 31 2764800 2000
4813496 vietdoan B Oct. 17, 2013, 11:56 a.m. OK FPC TESTS 49 31 106905600 2000
5377767 graceoflives B Dec. 7, 2013, 5:34 p.m. OK FPC TESTS 49 46 106905600 2000
5631543 Misha100896 B Jan. 7, 2014, 8:51 a.m. OK FPC TESTS 49 46 107008000 2000
4945282 NUOUN B Oct. 31, 2013, 1:47 p.m. OK FPC TESTS 49 46 110899200 2000
4831620 pal3 B Oct. 20, 2013, 6:19 a.m. OK FPC TESTS 49 93 7987200 2000
4931447 cjqw B Oct. 30, 2013, 1:05 a.m. OK FPC TESTS 49 93 224460800 2000
29239062 IPRIT B Aug. 6, 2017, 10:47 a.m. OK FPC TESTS 49 108 237260800 2000
25357954 Gray_58 B March 9, 2017, 11:07 a.m. OK FPC TESTS 49 124 237260800 2000
4828136 Nik_Storm_2010 B Oct. 19, 2013, 7:30 p.m. OK FPC TESTS 49 156 211046400 2000
4793695 -oo- B Oct. 15, 2013, 12:51 p.m. OK GNU C TESTS 49 31 2048000 2000
4831457 MINISTER B Oct. 20, 2013, 5:37 a.m. OK GNU C TESTS 49 78 218624000 2000
5067937 vis10326 B Nov. 11, 2013, 12:51 p.m. OK GNU C TESTS 49 93 2048000 2000
10542179 lnsuyn B April 1, 2015, 1:24 p.m. OK GNU C TESTS 49 124 2048000 2000
4865839 hkglly B Oct. 24, 2013, 3:26 p.m. OK GNU C++ TESTS 49 31 1945600 2000
4813603 2010031220 B Oct. 17, 2013, 12:13 p.m. OK GNU C++ TESTS 49 31 1945600 2000
4804365 roman.kolganov B Oct. 16, 2013, 9:38 a.m. OK GNU C++ TESTS 49 31 1945600 2000
4802099 GreyAnts B Oct. 16, 2013, 3:25 a.m. OK GNU C++ TESTS 49 31 1945600 2000
4801245 xlyle B Oct. 16, 2013, 12:38 a.m. OK GNU C++ TESTS 49 31 1945600 2000
4792776 EllipsisDweller B Oct. 15, 2013, 12:38 p.m. OK GNU C++ TESTS 49 31 1945600 2000
5414910 longbiau B Dec. 12, 2013, 1:29 p.m. OK GNU C++ TESTS 49 31 2048000 2000
4996693 qian99 B Nov. 6, 2013, 12:46 a.m. OK GNU C++ TESTS 49 31 2048000 2000
4977313 vjudge1 B Nov. 3, 2013, 8:29 a.m. OK GNU C++ TESTS 49 31 2048000 2000
4806354 taos B Oct. 16, 2013, 1:21 p.m. OK GNU C++ TESTS 49 31 2048000 2000
4857217 Archon.JK B Oct. 24, 2013, 6:33 a.m. OK GNU C++0x TESTS 49 31 1945600 2000
4804396 roman.kolganov B Oct. 16, 2013, 9:43 a.m. OK GNU C++0x TESTS 49 31 1945600 2000
4792530 Xellos B Oct. 15, 2013, 12:35 p.m. OK GNU C++0x TESTS 49 31 3174400 2000
4792213 sharph B Oct. 15, 2013, 12:31 p.m. OK GNU C++0x TESTS 49 31 3174400 2000
4792219 pzzxj B Oct. 15, 2013, 12:31 p.m. OK GNU C++0x TESTS 49 31 106188800 2000
4791172 mruxim B Oct. 15, 2013, 12:20 p.m. OK GNU C++0x TESTS 49 31 127385600 2000
8752552 hogloid B Nov. 19, 2014, 6:09 a.m. OK GNU C++0x TESTS 49 46 2150400 2000
4793727 harhrayr B Oct. 15, 2013, 12:51 p.m. OK GNU C++0x TESTS 49 46 106188800 2000
4792463 liouzhou_101 B Oct. 15, 2013, 12:34 p.m. OK GNU C++0x TESTS 49 46 106188800 2000
4790482 KADR B Oct. 15, 2013, 12:14 p.m. OK GNU C++0x TESTS 49 46 106188800 2000
14034760 behzad.nouri B Nov. 2, 2015, 10:37 p.m. OK GNU C++11 TESTS 49 31 3891200 2000
15282403 FinnTheHuman B Jan. 10, 2016, 4:56 p.m. OK GNU C++11 TESTS 49 31 3891200 2000
11925077 behzad.nouri B July 4, 2015, 4:54 p.m. OK GNU C++11 TESTS 49 31 107417600 2000
17061725 bartek19121995 B March 30, 2016, 8:45 p.m. OK GNU C++11 TESTS 49 31 214528000 2000
31784507 harshali_25 B Oct. 27, 2017, 6:01 a.m. OK GNU C++11 TESTS 49 46 5222400 2000
13216527 konbu B Sept. 25, 2015, 10:09 a.m. OK GNU C++11 TESTS 49 46 105984000 2000
11925116 behzad.nouri B July 4, 2015, 5:01 p.m. OK GNU C++11 TESTS 49 46 106188800 2000
18218796 lnzva B June 2, 2016, 2:50 p.m. OK GNU C++11 TESTS 49 46 111206400 2000
52227641 nansns B April 2, 2019, 10:28 a.m. OK GNU C++11 TESTS 49 46 114278400 2000
47372457 Depressed_R B Dec. 22, 2018, 3:05 p.m. OK GNU C++11 TESTS 49 46 122265600 2000
29245336 IPRIT B Aug. 6, 2017, 4:22 p.m. OK GNU C++14 TESTS 49 46 109465600 2000
30993669 aextactlya B Oct. 4, 2017, 1:53 p.m. OK GNU C++14 TESTS 49 46 214425600 2000
31850252 demonsbane B Oct. 28, 2017, 8:25 p.m. OK GNU C++14 TESTS 49 61 107520000 2000
23562799 Ali.Pi B Jan. 5, 2017, 8:47 p.m. OK GNU C++14 TESTS 49 61 108134400 2000
35225923 xproxmess B Feb. 14, 2018, 8:20 a.m. OK GNU C++14 TESTS 49 61 124108800 2000
24062588 vjudge1 B Jan. 23, 2017, 4:36 a.m. OK GNU C++14 TESTS 49 62 108134400 2000
24062584 llyyff B Jan. 23, 2017, 4:35 a.m. OK GNU C++14 TESTS 49 62 108134400 2000
33249928 yaksha B Dec. 14, 2017, 8:08 p.m. OK GNU C++14 TESTS 49 62 125440000 2000
21894061 chemthan B Oct. 30, 2016, 2:37 p.m. OK GNU C++14 TESTS 49 77 3379200 2000
39985428 alechuang98 B July 5, 2018, 1:17 p.m. OK GNU C++14 TESTS 49 77 106188800 2000
59533172 roll_no_1 B Aug. 26, 2019, 3:51 p.m. OK GNU C++17 TESTS 49 77 107520000 2000
49941796 ONE_DAY_I_WILL B Feb. 15, 2019, 10:03 a.m. OK GNU C++17 TESTS 49 77 111206400 2000
55555601 ruo B June 14, 2019, 9:43 a.m. OK GNU C++17 TESTS 49 77 122265600 2000
42970700 farhad519 B Sept. 17, 2018, 6:03 a.m. OK GNU C++17 TESTS 49 77 219443200 2000
58110436 Kirill_from_Kazan B Aug. 1, 2019, 6:53 a.m. OK GNU C++17 TESTS 49 78 3379200 2000
61594842 Rian_5900 B Oct. 1, 2019, 8:25 a.m. OK GNU C++17 TESTS 49 78 111616000 2000
53671527 ---------- B May 2, 2019, 1:25 p.m. OK GNU C++17 TESTS 49 109 4608000 2000
53674675 ---------- B May 2, 2019, 3:06 p.m. OK GNU C++17 TESTS 49 109 4608000 2000
53674480 ---------- B May 2, 2019, 2:58 p.m. OK GNU C++17 TESTS 49 109 4608000 2000
57163246 Phortox B July 16, 2019, 8:25 p.m. OK GNU C++17 TESTS 49 124 210432000 2000
4826216 Ljubitel B Oct. 19, 2013, 4:43 p.m. OK Java 6 TESTS 49 218 102400 2000
6475860 Sammarize B April 25, 2014, 10:09 p.m. OK Java 6 TESTS 49 218 3584000 2000
4898290 mkirsche B Oct. 25, 2013, 10:49 p.m. OK Java 6 TESTS 49 280 86630400 2000
4808410 alibaba B Oct. 16, 2013, 3:39 p.m. OK Java 6 TESTS 49 312 237363200 2000
4813847 bay B Oct. 17, 2013, 12:49 p.m. OK Java 6 TESTS 49 312 239206400 2000
4796187 ika B Oct. 15, 2013, 1:32 p.m. OK Java 6 TESTS 49 327 239820800 2000
4880694 vjudge5 B Oct. 25, 2013, 3:24 p.m. OK Java 6 TESTS 49 358 90624000 2000
4817961 bajrangi B Oct. 18, 2013, 7:40 a.m. OK Java 6 TESTS 49 390 127180800 2000
8494465 marcose18 B Oct. 31, 2014, 7:14 a.m. OK Java 6 TESTS 49 404 127897600 2000
4880715 vjudge3 B Oct. 25, 2013, 3:27 p.m. OK Java 6 TESTS 49 530 259379200 2000
4803920 tanzaku B Oct. 16, 2013, 8:39 a.m. OK Java 7 TESTS 49 93 15974400 2000
4873792 kuludrew B Oct. 25, 2013, 12:33 a.m. OK Java 7 TESTS 49 109 102400 2000
4811542 Azat_Yusupov B Oct. 17, 2013, 5:38 a.m. OK Java 7 TESTS 49 109 164249600 2000
4799207 Vbifial B Oct. 15, 2013, 6:20 p.m. OK Java 7 TESTS 49 156 239718400 2000
4802370 uwi B Oct. 16, 2013, 4:25 a.m. OK Java 7 TESTS 49 187 0 2000
4792617 AlexanderBolshakov B Oct. 15, 2013, 12:36 p.m. OK Java 7 TESTS 49 202 204800 2000
4791407 mmaxio B Oct. 15, 2013, 12:22 p.m. OK Java 7 TESTS 49 218 0 2000
5647443 DoublePointer B Jan. 9, 2014, 8:51 p.m. OK Java 7 TESTS 49 218 102400 2000
4913376 hama-du B Oct. 27, 2013, 1:42 p.m. OK Java 7 TESTS 49 234 3584000 2000
4831112 xenoslash B Oct. 20, 2013, 2:45 a.m. OK Java 7 TESTS 49 265 139264000 2000
37255912 Ahmad B April 12, 2018, 4:10 p.m. OK Java 8 TESTS 49 233 150528000 2000
39024623 Golmol B June 7, 2018, 2:40 p.m. OK Java 8 TESTS 49 374 133939200 2000
66381645 pulkit1411 B Dec. 6, 2019, 5:52 a.m. OK Java 8 TESTS 49 420 242278400 2000
19590917 poikniok B Aug. 3, 2016, 4:31 a.m. OK Java 8 TESTS 49 436 186368000 2000
19590906 poikniok B Aug. 3, 2016, 4:29 a.m. OK Java 8 TESTS 49 452 186368000 2000
19590934 poikniok B Aug. 3, 2016, 4:33 a.m. OK Java 8 TESTS 49 514 102092800 2000
47308828 wery0 B Dec. 20, 2018, 6:24 p.m. OK Java 8 TESTS 49 592 258662400 2000
32062830 flyman3046 B Nov. 4, 2017, 8:04 p.m. OK Java 8 TESTS 49 608 258969600 2000
47308713 wery0 B Dec. 20, 2018, 6:20 p.m. OK Java 8 TESTS 49 717 258764800 2000
19590935 poikniok B Aug. 3, 2016, 4:34 a.m. OK Java 8 TESTS 49 732 178892800 2000
7818834 azukun B Sept. 17, 2014, 2:22 p.m. OK MS C# TESTS 49 93 113049600 2000
24876157 og.kostya B Feb. 21, 2017, 4:41 p.m. OK MS C# TESTS 49 124 123084800 2000
24876127 og.kostya B Feb. 21, 2017, 4:40 p.m. OK MS C# TESTS 49 373 141107200 2000
24875976 og.kostya B Feb. 21, 2017, 4:29 p.m. OK MS C# TESTS 49 545 152371200 2000
4804546 roman.kolganov B Oct. 16, 2013, 10:04 a.m. OK MS C++ TESTS 49 31 1843200 2000
4804392 roman.kolganov B Oct. 16, 2013, 9:42 a.m. OK MS C++ TESTS 49 31 1843200 2000
4803686 Timur_Sitdikov B Oct. 16, 2013, 8:14 a.m. OK MS C++ TESTS 49 31 1843200 2000
4795315 nf001 B Oct. 15, 2013, 1:17 p.m. OK MS C++ TESTS 49 31 2048000 2000
4791187 Giraffy B Oct. 15, 2013, 12:20 p.m. OK MS C++ TESTS 49 31 2048000 2000
4913762 mosab_aldahyyat B Oct. 27, 2013, 2:47 p.m. OK MS C++ TESTS 49 31 106188800 2000
4804539 roman.kolganov B Oct. 16, 2013, 10:03 a.m. OK MS C++ TESTS 49 46 1843200 2000
4794247 Happy_bin B Oct. 15, 2013, 12:59 p.m. OK MS C++ TESTS 49 46 2048000 2000
4891852 kcm1700 B Oct. 25, 2013, 6:33 p.m. OK MS C++ TESTS 49 46 106086400 2000
4841871 riceCornSorghum B Oct. 22, 2013, 11:02 a.m. OK MS C++ TESTS 49 46 106188800 2000
6538133 yugle7 B May 3, 2014, 10:51 a.m. OK Python 2 TESTS 49 732 34611200 2000

remove filters

Back to search problems