Codeforces Round 104 (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
145 Codeforces Round 104 (Div. 1) FINISHED False 7200 410741951 Jan. 22, 2012, 7 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 3323 ) E Lucky Queries PROGRAMMING data structures 2400

B"Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not. Petya brought home string s with the length of n. The string only consists of lucky digits. The digits are numbered from the left to the right starting with 1. Now Petya should execute m queries of the following form: Subsequence of a string s is a string that can be obtained from s by removing zero or more of its elements. A string is called non-decreasing if each successive digit is not less than the previous one. Help Petya process the requests. The first line contains two integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106, xe2 x80 x891 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x893 xc2 xb7105) -- the length of the string s and the number of queries correspondingly. The second line contains n lucky digits without spaces -- Petya's initial string. Next m lines contain queries in the form described in the statement. For each query count print an answer on a single line. In the first sample the chronology of string s after some operations are fulfilled is as follows (the sought maximum subsequence is marked with bold): "...

Tutorials

Codeforces Round #104 - Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
1106471 tourist E Jan. 22, 2012, 8:22 a.m. OK Delphi TESTS 104 1230 144486400 2400
1112551 Sereja E Jan. 23, 2012, 1:56 p.m. OK Delphi TESTS 104 1810 81100800 2400
1112565 Sereja E Jan. 23, 2012, 2:01 p.m. OK Delphi TESTS 104 1880 81100800 2400
1380910 valikluks1995 E March 19, 2012, 8:40 p.m. OK Delphi TESTS 104 2000 83148800 2400
1179182 Nikolai E Feb. 14, 2012, 7:17 p.m. OK Delphi TESTS 104 2280 115200000 2400
1111056 vlad107 E Jan. 22, 2012, 6:06 p.m. OK FPC TESTS 104 1420 129433600 2400
1153633 sillycross E Feb. 6, 2012, 2:47 p.m. OK FPC TESTS 104 1560 72294400 2400
1382512 valikluks1995 E March 20, 2012, 5:37 p.m. OK FPC TESTS 104 1580 82636800 2400
1122477 Nomad E Jan. 28, 2012, 9:03 a.m. OK FPC TESTS 104 1590 82636800 2400
1112259 huangjizuo E Jan. 23, 2012, 10:43 a.m. OK FPC TESTS 104 1630 39936000 2400
1176162 Berezin E Feb. 13, 2012, 7:26 p.m. OK FPC TESTS 104 1640 114688000 2400
1105779 whitetooth E Jan. 22, 2012, 8:06 a.m. OK FPC TESTS 104 1690 59801600 2400
1119645 _Vadim_ E Jan. 26, 2012, 8:54 p.m. OK FPC TESTS 104 1700 162406400 2400
1109752 zanoes E Jan. 22, 2012, 12:23 p.m. OK FPC TESTS 104 1720 89190400 2400
3092640 619116104 E Feb. 11, 2013, 8:52 a.m. OK FPC TESTS 104 1734 113356800 2400
28930122 reyad E July 27, 2017, 12:33 p.m. OK GNU C TESTS 104 1278 86118400 2400
1122265 mage E Jan. 28, 2012, 7:26 a.m. OK GNU C TESTS 104 1500 82534400 2400
40247174 Peter_Z E July 13, 2018, 2:22 a.m. OK GNU C++ TESTS 104 936 116019200 2400
4035608 nealzane E July 7, 2013, 4:50 p.m. OK GNU C++ TESTS 104 968 43008000 2400
35840027 ______n______ E March 2, 2018, 2:09 p.m. OK GNU C++ TESTS 104 998 44953600 2400
35840030 ______u______ E March 2, 2018, 2:09 p.m. OK GNU C++ TESTS 104 998 44953600 2400
35839318 _____k_____ E March 2, 2018, 1:50 p.m. OK GNU C++ TESTS 104 998 44953600 2400
35839314 _____i_____ E March 2, 2018, 1:50 p.m. OK GNU C++ TESTS 104 998 44953600 2400
35834765 ______h______ E March 2, 2018, 12:10 p.m. OK GNU C++ TESTS 104 998 44953600 2400
35834721 ______k______ E March 2, 2018, 12:10 p.m. OK GNU C++ TESTS 104 998 44953600 2400
35834546 ______i______ E March 2, 2018, 12:05 p.m. OK GNU C++ TESTS 104 998 44953600 2400
35830985 ______M______ E March 2, 2018, 9:32 a.m. OK GNU C++ TESTS 104 998 44953600 2400
5870118 dasko1 E Feb. 2, 2014, 7:35 p.m. OK GNU C++0x TESTS 104 1216 43008000 2400
7796251 SealView E Sept. 14, 2014, 5:26 p.m. OK GNU C++0x TESTS 104 1310 81203200 2400
10186011 mahdi_r E March 7, 2015, 5:33 a.m. OK GNU C++0x TESTS 104 1370 70144000 2400
9564365 sdya E Jan. 26, 2015, 6:42 p.m. OK GNU C++0x TESTS 104 1370 89292800 2400
7669268 DarthKnight E Sept. 2, 2014, 4:54 p.m. OK GNU C++0x TESTS 104 1402 86118400 2400
9884357 I_love_Hoang_Yen E Feb. 17, 2015, 4:30 p.m. OK GNU C++0x TESTS 104 1434 103219200 2400
4367198 wanbo E Aug. 29, 2013, 5:38 p.m. OK GNU C++0x TESTS 104 1528 126771200 2400
10053726 niquefa_diego E Feb. 27, 2015, 3:26 p.m. OK GNU C++0x TESTS 104 1652 97484800 2400
7451184 SMAKH E Aug. 15, 2014, 8:10 a.m. OK GNU C++0x TESTS 104 1714 69324800 2400
3728368 mruxim E May 16, 2013, 8:16 p.m. OK GNU C++0x TESTS 104 1718 82329600 2400
61792224 rainboy E Oct. 3, 2019, 4:13 p.m. OK GNU C11 TESTS 104 2120 36761600 2400
66410690 okwedook E Dec. 6, 2019, 3:13 p.m. OK GNU C++11 TESTS 104 686 45977600 2400
61052700 xuyixuan E Sept. 22, 2019, 7:04 a.m. OK GNU C++11 TESTS 104 746 162201600 2400
61054067 xuyixuan E Sept. 22, 2019, 7:30 a.m. OK GNU C++11 TESTS 104 746 162201600 2400
66410590 okwedook E Dec. 6, 2019, 3:11 p.m. OK GNU C++11 TESTS 104 748 45977600 2400
43881504 AlessandroChen E Oct. 6, 2018, 5:30 a.m. OK GNU C++11 TESTS 104 748 85299200 2400
43882868 AlessandroChen E Oct. 6, 2018, 6:07 a.m. OK GNU C++11 TESTS 104 810 85299200 2400
61052911 xuyixuan E Sept. 22, 2019, 7:08 a.m. OK GNU C++11 TESTS 104 810 162201600 2400
44774979 luogu_bot5 E Oct. 24, 2018, 1:57 p.m. OK GNU C++11 TESTS 104 840 64921600 2400
52270306 Liviu2000 E April 3, 2019, 12:55 p.m. OK GNU C++11 TESTS 104 872 69120000 2400
52807636 S.A.R E April 16, 2019, 6:17 a.m. OK GNU C++11 TESTS 104 872 70144000 2400
49825027 am1tbh47 E Feb. 12, 2019, 11:04 a.m. OK GNU C++14 TESTS 104 872 82227200 2400
49824497 am1tbh47 E Feb. 12, 2019, 10:45 a.m. OK GNU C++14 TESTS 104 904 82227200 2400
50558451 vjudge4 E Feb. 27, 2019, 9:26 a.m. OK GNU C++14 TESTS 104 966 69120000 2400
66451733 Heart_Blue E Dec. 7, 2019, 11:43 a.m. OK GNU C++14 TESTS 104 966 81203200 2400
56028632 sorry_im_smurfing E June 25, 2019, 8:20 a.m. OK GNU C++14 TESTS 104 1028 43008000 2400
67168515 CoDeHuNtEr E Dec. 18, 2019, 4:25 p.m. OK GNU C++14 TESTS 104 1028 82227200 2400
58843537 vjudge4 E Aug. 15, 2019, 3:36 a.m. OK GNU C++14 TESTS 104 1058 81203200 2400
58843475 dddfaker E Aug. 15, 2019, 3:33 a.m. OK GNU C++14 TESTS 104 1058 81203200 2400
59897496 2683331518 E Sept. 2, 2019, 12:37 p.m. OK GNU C++14 TESTS 104 1060 81203200 2400
56372563 lmpars E July 1, 2019, 4:43 a.m. OK GNU C++14 TESTS 104 1060 82227200 2400
54418449 AliShahali1382 E May 20, 2019, 2 p.m. OK GNU C++17 TESTS 104 966 70246400 2400
66409989 okwedook E Dec. 6, 2019, 2:59 p.m. OK GNU C++17 TESTS 104 996 44134400 2400
52807701 S.A.R E April 16, 2019, 6:20 a.m. OK GNU C++17 TESTS 104 996 70144000 2400
54418379 AliShahali1382 E May 20, 2019, 1:58 p.m. OK GNU C++17 TESTS 104 996 70246400 2400
46931306 vjudge5 E Dec. 12, 2018, 11:45 a.m. OK GNU C++17 TESTS 104 996 85196800 2400
66410158 okwedook E Dec. 6, 2019, 3:02 p.m. OK GNU C++17 TESTS 104 998 44134400 2400
52807359 S.A.R E April 16, 2019, 6:02 a.m. OK GNU C++17 TESTS 104 998 70144000 2400
60204466 vjudge3 E Sept. 7, 2019, 7:32 a.m. OK GNU C++17 TESTS 104 1028 81203200 2400
48865524 Hi_archer E Jan. 24, 2019, 2:49 a.m. OK GNU C++17 TESTS 104 1028 84377600 2400
56745146 tnakao E July 9, 2019, 9:21 a.m. OK GNU C++17 TESTS 104 1058 36761600 2400
1108839 uwi E Jan. 22, 2012, 10:09 a.m. OK Java 6 TESTS 104 1750 100454400 2400
1118631 golyj_na_stole E Jan. 26, 2012, 11:16 a.m. OK Java 6 TESTS 104 2000 210329600 2400
1118604 golyj_na_stole E Jan. 26, 2012, 11:04 a.m. OK Java 6 TESTS 104 2020 210329600 2400
1117746 Gantz E Jan. 25, 2012, 9:10 p.m. OK Java 6 TESTS 104 2060 198963200 2400
1104340 Egor E Jan. 22, 2012, 7:39 a.m. OK Java 6 TESTS 104 2140 116224000 2400
1115412 Jokser E Jan. 24, 2012, 6:32 p.m. OK Java 6 TESTS 104 2280 167731200 2400
1214332 Eledven E Feb. 21, 2012, 1:23 p.m. OK Java 6 TESTS 104 2330 223129600 2400
1447290 jonathanpaulson E March 31, 2012, 4:56 p.m. OK Java 6 TESTS 104 2590 156569600 2400
12620648 free.dom E Aug. 20, 2015, 8:55 p.m. OK Java 7 TESTS 104 2276 158617600 2400
4440930 DoublePointer E Sept. 11, 2013, 2:36 a.m. OK Java 7 TESTS 104 2496 154624000 2400
2409468 Uncia E Oct. 22, 2012, 3:16 p.m. OK Java 7 TESTS 104 2750 138956800 2400
6960191 mohamednabil00000 E June 25, 2014, 10:25 p.m. OK Java 7 TESTS 104 2930 184627200 2400
17423734 alibaba E April 21, 2016, 6:36 p.m. OK Java 7 TESTS 104 2994 212172800 2400
61792666 Dukkha E Oct. 3, 2019, 4:19 p.m. OK Java 8 TESTS 104 1464 40960000 2400
9874821 qwerty787788 E Feb. 16, 2015, 6:45 p.m. OK Java 8 TESTS 104 1902 158105600 2400
41520753 I_love_Harpae E Aug. 12, 2018, 8:52 a.m. OK Java 8 TESTS 104 2088 159129600 2400
10254131 AlexFetisov E March 13, 2015, 6:22 a.m. OK Java 8 TESTS 104 2214 158310400 2400
35198352 spar5h E Feb. 13, 2018, 11:59 a.m. OK Java 8 TESTS 104 2306 116633600 2400
32820421 flyman3046 E Dec. 1, 2017, 3:33 a.m. OK Java 8 TESTS 104 2338 133632000 2400
45578210 SomaYukihira E Nov. 11, 2018, 11:31 p.m. OK Java 8 TESTS 104 2400 118988800 2400
32820443 flyman3046 E Dec. 1, 2017, 3:37 a.m. OK Java 8 TESTS 104 2402 133632000 2400
17077129 YukimuraYukino E March 31, 2016, 3:47 p.m. OK Java 8 TESTS 104 2588 146329600 2400
10622358 A.Elahi E April 7, 2015, 2:36 p.m. OK Java 8 TESTS 104 2774 161587200 2400
1417998 Utka E March 25, 2012, 10:53 p.m. OK Mono C# TESTS 104 2950 56422400 2400
3640986 XilinX E April 27, 2013, 9:31 a.m. OK MS C++ TESTS 104 968 134758400 2400
1155204 dlehdgh E Feb. 7, 2012, 8:32 a.m. OK MS C++ TESTS 104 1030 36044800 2400
1119179 jiangzhijie E Jan. 26, 2012, 3:34 p.m. OK MS C++ TESTS 104 1030 77004800 2400
51903255 vjudge1 E March 27, 2019, 2:19 p.m. OK MS C++ TESTS 104 1060 81203200 2400
51891683 vjudge2 E March 27, 2019, 9:27 a.m. OK MS C++ TESTS 104 1060 81203200 2400
3719358 yejinru E May 14, 2013, 8:21 a.m. OK MS C++ TESTS 104 1078 113254400 2400
40991925 ReaLNero1 E July 31, 2018, 12:57 a.m. OK MS C++ TESTS 104 1120 134758400 2400
46931241 vjudge3 E Dec. 12, 2018, 11:43 a.m. OK MS C++ TESTS 104 1122 85196800 2400
53307060 vjudge2 E April 26, 2019, 3:47 a.m. OK MS C++ TESTS 104 1122 85196800 2400
1242747 BIT_silence E Feb. 29, 2012, 5:13 a.m. OK MS C++ TESTS 104 1170 82534400 2400
49516428 nomiku99 E Feb. 6, 2019, 3:26 a.m. OK MS C++ 2017 TESTS 104 2682 82636800 2400
58812396 LowR E Aug. 14, 2019, 11:19 a.m. OK Rust TESTS 104 1528 53350400 2400
58813361 LowR E Aug. 14, 2019, 11:38 a.m. OK Rust TESTS 104 1652 53350400 2400

remove filters

Back to search problems