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 |
---|---|---|---|---|---|---|
309 | Croc Champ 2013 - Finals (online version, Div. 1) | FINISHED | False | 9000 | 368894997 | May 17, 2013, 3:10 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 1377 ) | C | Memory for Arrays | PROGRAMMING | binary search bitmasks greedy | 1900 |
B"You get to work and turn on the computer. You start coding and give little thought to the RAM role in the whole process. In this problem your task is to solve one of the problems you encounter in your computer routine. We'll consider the RAM as a sequence of cells that can contain data. Some cells already contain some data, some are empty. The empty cells form the so-called memory clusters. Thus, a memory cluster is a sequence of some consecutive empty memory cells. You have exactly n memory clusters, the i-th cluster consists of ai cells. You need to find memory for m arrays in your program. The j-th array takes 2bj consecutive memory cells. There possibly isn't enough memory for all m arrays, so your task is to determine what maximum number of arrays can be located in the available memory clusters. Of course, the arrays cannot be divided between the memory clusters. Also, no cell can belong to two arrays. The first line of the input 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 x89106). The next line contains n integers a1, xe2 x80 x89a2, xe2 x80 x89..., xe2 x80 x89an (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ai xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). The next line contains m integers b1, xe2 x80 x89b2, xe2 x80 x89..., xe2 x80 x89bm (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892bi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89109). Print a single integer -- the answer to the problem. In the first example you are given memory clusters with sizes 8, 4, 3, 2, 2 and arrays with sizes 8, 4, 4. There are few ways to obtain an answer equals 2: you can locate array with size 8 to the cluster with size 8, and one of the arrays with size 4 to the cluster with size 4. Another way is to locate two arrays with size 4 to the one cluster with size 8. In the second example you are given 10 memory clusters with size 1 and 6 arrays with size 1. You can choose any 6 clusters and locate all given arrays to them."... |
Чемпионат КРОК 2013 — Финальный раунд — Разбор |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
3730084 | Golovanov399 | C | May 17, 2013, 3:55 p.m. | OK | Delphi | TESTS | 70 | 531 | 7987200 | 1900 | |
3730306 | equi | C | May 17, 2013, 4:23 p.m. | OK | Delphi | TESTS | 70 | 1109 | 249446400 | 1900 | |
3730967 | Misha100896 | C | May 17, 2013, 6 p.m. | OK | Delphi | TESTS | 70 | 1232 | 12083200 | 1900 | |
3735281 | con_nha_ngheo | C | May 19, 2013, 3:51 a.m. | OK | FPC | TESTS | 70 | 531 | 16179200 | 1900 | |
3735220 | hiepsieunhan | C | May 19, 2013, 3:08 a.m. | OK | FPC | TESTS | 70 | 578 | 102400 | 1900 | |
3729896 | Um_nik | C | May 17, 2013, 3:37 p.m. | OK | FPC | TESTS | 70 | 640 | 0 | 1900 | |
3729927 | ig_dug | C | May 17, 2013, 3:41 p.m. | OK | FPC | TESTS | 70 | 670 | 16076800 | 1900 | |
3766811 | _Mao_ | C | May 24, 2013, 6:23 p.m. | OK | FPC | TESTS | 70 | 687 | 0 | 1900 | |
4031060 | Nik_Storm_2010 | C | July 6, 2013, 1:18 p.m. | OK | FPC | TESTS | 70 | 796 | 102400 | 1900 | |
40216391 | luogu_bot4 | C | July 12, 2018, 2:51 a.m. | OK | FPC | TESTS | 70 | 1278 | 102400 | 1900 | |
4030856 | Nik_Storm_2010 | C | July 6, 2013, 12:16 p.m. | OK | FPC | TESTS | 70 | 2000 | 102400 | 1900 | |
3731354 | xtalclr | C | May 17, 2013, 7:20 p.m. | OK | GNU C | TESTS | 70 | 703 | 0 | 1900 | |
3731403 | xtalclr | C | May 17, 2013, 7:36 p.m. | OK | GNU C | TESTS | 70 | 703 | 0 | 1900 | |
3731318 | xtalclr | C | May 17, 2013, 7:08 p.m. | OK | GNU C | TESTS | 70 | 703 | 0 | 1900 | |
3731342 | xtalclr | C | May 17, 2013, 7:14 p.m. | OK | GNU C | TESTS | 70 | 718 | 0 | 1900 | |
3731424 | xtalclr | C | May 17, 2013, 7:39 p.m. | OK | GNU C | TESTS | 70 | 734 | 0 | 1900 | |
40189923 | libra9z | C | July 11, 2018, 5:52 a.m. | OK | GNU C | TESTS | 70 | 748 | 0 | 1900 | |
3732050 | ali_fiujnomali | C | May 18, 2013, 4:11 a.m. | OK | GNU C | TESTS | 70 | 781 | 12595200 | 1900 | |
35858846 | ______u______ | C | March 2, 2018, 9:07 p.m. | OK | GNU C | TESTS | 70 | 872 | 1843200 | 1900 | |
35858827 | ______n______ | C | March 2, 2018, 9:07 p.m. | OK | GNU C | TESTS | 70 | 872 | 1843200 | 1900 | |
35858430 | _____i_____ | C | March 2, 2018, 8:59 p.m. | OK | GNU C | TESTS | 70 | 872 | 1843200 | 1900 | |
3732169 | bakabakashyoshyo | C | May 18, 2013, 5:35 a.m. | OK | GNU C++ | TESTS | 70 | 109 | 3993600 | 1900 | |
4039063 | XieZheng | C | July 8, 2013, 1:38 p.m. | OK | GNU C++ | TESTS | 70 | 218 | 0 | 1900 | |
4039038 | XieZheng | C | July 8, 2013, 1:32 p.m. | OK | GNU C++ | TESTS | 70 | 234 | 0 | 1900 | |
3756674 | chnlich | C | May 22, 2013, 11:48 a.m. | OK | GNU C++ | TESTS | 70 | 234 | 0 | 1900 | |
40216175 | paulzrm | C | July 12, 2018, 2:41 a.m. | OK | GNU C++ | TESTS | 70 | 248 | 0 | 1900 | |
40216293 | luogu_bot3 | C | July 12, 2018, 2:47 a.m. | OK | GNU C++ | TESTS | 70 | 248 | 0 | 1900 | |
3730710 | phamvanhanhgoldIOI2015 | C | May 17, 2013, 5:21 p.m. | OK | GNU C++ | TESTS | 70 | 250 | 102400 | 1900 | |
4038961 | XieZheng | C | July 8, 2013, 1:20 p.m. | OK | GNU C++ | TESTS | 70 | 265 | 3993600 | 1900 | |
40216272 | paulzrm | C | July 12, 2018, 2:46 a.m. | OK | GNU C++ | TESTS | 70 | 278 | 0 | 1900 | |
4142508 | vjudge3 | C | July 23, 2013, 5:57 p.m. | OK | GNU C++ | TESTS | 70 | 312 | 0 | 1900 | |
3729859 | mruxim | C | May 17, 2013, 3:33 p.m. | OK | GNU C++0x | TESTS | 70 | 343 | 128307200 | 1900 | |
9718423 | AlexandruValeanu | C | Feb. 4, 2015, 3:38 p.m. | OK | GNU C++0x | TESTS | 70 | 404 | 3993600 | 1900 | |
3733790 | error202 | C | May 18, 2013, 1:45 p.m. | OK | GNU C++0x | TESTS | 70 | 421 | 0 | 1900 | |
3751248 | kraskevich | C | May 20, 2013, 7:02 p.m. | OK | GNU C++0x | TESTS | 70 | 484 | 7987200 | 1900 | |
3731178 | freak93 | C | May 17, 2013, 6:29 p.m. | OK | GNU C++0x | TESTS | 70 | 484 | 7987200 | 1900 | |
6858024 | aliasadiiii | C | June 10, 2014, 8:38 a.m. | OK | GNU C++0x | TESTS | 70 | 560 | 3993600 | 1900 | |
3730160 | Skird | C | May 17, 2013, 4:03 p.m. | OK | GNU C++0x | TESTS | 70 | 578 | 0 | 1900 | |
3732879 | Riatre | C | May 18, 2013, 9:22 a.m. | OK | GNU C++0x | TESTS | 70 | 609 | 0 | 1900 | |
9372493 | Alimol | C | Jan. 6, 2015, 12:28 p.m. | OK | GNU C++0x | TESTS | 70 | 652 | 0 | 1900 | |
3913214 | andreihh | C | June 18, 2013, 10:18 a.m. | OK | GNU C++0x | TESTS | 70 | 718 | 3993600 | 1900 | |
32577168 | duerno | C | Nov. 23, 2017, 1:58 p.m. | OK | GNU C11 | TESTS | 70 | 936 | 0 | 1900 | |
32576963 | duerno | C | Nov. 23, 2017, 1:50 p.m. | OK | GNU C11 | TESTS | 70 | 998 | 0 | 1900 | |
11759054 | zld3794955 | C | June 25, 2015, 10:49 a.m. | OK | GNU C++11 | TESTS | 70 | 248 | 3993600 | 1900 | |
20102981 | kvk1920 | C | Aug. 24, 2016, 9:57 a.m. | OK | GNU C++11 | TESTS | 70 | 342 | 2048000 | 1900 | |
54645815 | newbeginBKB | C | May 26, 2019, 12:11 a.m. | OK | GNU C++11 | TESTS | 70 | 342 | 8908800 | 1900 | |
64886249 | gsyz | C | Nov. 14, 2019, 1:12 p.m. | OK | GNU C++11 | TESTS | 70 | 372 | 0 | 1900 | |
35525899 | BinaryBoy | C | Feb. 20, 2018, 3:33 p.m. | OK | GNU C++11 | TESTS | 70 | 436 | 6041600 | 1900 | |
57821090 | py_ultron | C | July 26, 2019, 11:17 p.m. | OK | GNU C++11 | TESTS | 70 | 654 | 0 | 1900 | |
50638503 | a_n_m | C | March 1, 2019, 12:52 p.m. | OK | GNU C++11 | TESTS | 70 | 654 | 0 | 1900 | |
49825109 | luogu_bot5 | C | Feb. 12, 2019, 11:07 a.m. | OK | GNU C++11 | TESTS | 70 | 654 | 0 | 1900 | |
57896060 | lopare | C | July 28, 2019, 1:37 p.m. | OK | GNU C++11 | TESTS | 70 | 654 | 0 | 1900 | |
59437667 | IHate24CharactersLimit | C | Aug. 25, 2019, 9:36 a.m. | OK | GNU C++11 | TESTS | 70 | 654 | 3993600 | 1900 | |
30653645 | LiChenKoh | C | Sept. 23, 2017, 9:13 p.m. | OK | GNU C++14 | TESTS | 70 | 342 | 0 | 1900 | |
51260114 | ArtemZaycev | C | March 13, 2019, 12:59 p.m. | OK | GNU C++14 | TESTS | 70 | 1028 | 3993600 | 1900 | |
33461977 | omidazadi | C | Dec. 20, 2017, 5:03 p.m. | OK | GNU C++14 | TESTS | 70 | 1028 | 15667200 | 1900 | |
40186336 | AwD | C | July 11, 2018, 2:02 a.m. | OK | GNU C++14 | TESTS | 70 | 1028 | 32051200 | 1900 | |
29683386 | _AjReme_ | C | Aug. 22, 2017, 1:06 p.m. | OK | GNU C++14 | TESTS | 70 | 1060 | 3993600 | 1900 | |
31324342 | MeGaa | C | Oct. 14, 2017, 9:46 p.m. | OK | GNU C++14 | TESTS | 70 | 1060 | 3993600 | 1900 | |
51919015 | davidberard | C | March 28, 2019, 2:07 a.m. | OK | GNU C++14 | TESTS | 70 | 1090 | 3993600 | 1900 | |
52891588 | _1a | C | April 17, 2019, 8:08 a.m. | OK | GNU C++14 | TESTS | 70 | 1090 | 16076800 | 1900 | |
51919678 | davidberard | C | March 28, 2019, 2:58 a.m. | OK | GNU C++14 | TESTS | 70 | 1092 | 3993600 | 1900 | |
33068664 | magdy.hasan | C | Dec. 9, 2017, 8:32 p.m. | OK | GNU C++14 | TESTS | 70 | 1092 | 9932800 | 1900 | |
40193775 | vjudge5 | C | July 11, 2018, 8:01 a.m. | OK | GNU C++17 | TESTS | 70 | 748 | 307200 | 1900 | |
46273815 | AM. | C | Nov. 27, 2018, 10:08 a.m. | OK | GNU C++17 | TESTS | 70 | 872 | 8192000 | 1900 | |
51257324 | vjudge2 | C | March 13, 2019, 11:52 a.m. | OK | GNU C++17 | TESTS | 70 | 966 | 0 | 1900 | |
65709857 | karemo | C | Nov. 25, 2019, 1:57 p.m. | OK | GNU C++17 | TESTS | 70 | 1028 | 3993600 | 1900 | |
51920062 | chenvictor1999 | C | March 28, 2019, 3:20 a.m. | OK | GNU C++17 | TESTS | 70 | 1028 | 3993600 | 1900 | |
59347214 | jo_ulej | C | Aug. 23, 2019, 10:14 a.m. | OK | GNU C++17 | TESTS | 70 | 1028 | 7987200 | 1900 | |
51919472 | MathStudentInCS | C | March 28, 2019, 2:44 a.m. | OK | GNU C++17 | TESTS | 70 | 1058 | 6348800 | 1900 | |
61247238 | Kuroni | C | Sept. 25, 2019, 2:02 a.m. | OK | GNU C++17 | TESTS | 70 | 1060 | 14028800 | 1900 | |
61405433 | _timelord | C | Sept. 28, 2019, 6:52 a.m. | OK | GNU C++17 | TESTS | 70 | 1090 | 0 | 1900 | |
40194191 | tzxydby | C | July 11, 2018, 8:14 a.m. | OK | GNU C++17 | TESTS | 70 | 1090 | 307200 | 1900 | |
3730215 | uwi | C | May 17, 2013, 4:11 p.m. | OK | Java 6 | TESTS | 70 | 421 | 0 | 1900 | |
3732568 | hiukim | C | May 18, 2013, 8:07 a.m. | OK | Java 6 | TESTS | 70 | 873 | 88473600 | 1900 | |
4030295 | slycelote | C | July 6, 2013, 9:22 a.m. | OK | Java 6 | TESTS | 70 | 1187 | 204800 | 1900 | |
4030256 | slycelote | C | July 6, 2013, 9:08 a.m. | OK | Java 6 | TESTS | 70 | 1984 | 5632000 | 1900 | |
3731140 | niyaznigmatul | C | May 17, 2013, 6:23 p.m. | OK | Java 7 | TESTS | 70 | 843 | 0 | 1900 | |
3731217 | SergeyLazarev | C | May 17, 2013, 6:38 p.m. | OK | Java 7 | TESTS | 70 | 875 | 88371200 | 1900 | |
3732000 | Di735 | C | May 18, 2013, 3:34 a.m. | OK | Java 7 | TESTS | 70 | 921 | 93696000 | 1900 | |
3730188 | qwerty787788 | C | May 17, 2013, 4:07 p.m. | OK | Java 7 | TESTS | 70 | 984 | 92774400 | 1900 | |
3729891 | hs484 | C | May 17, 2013, 3:36 p.m. | OK | Java 7 | TESTS | 70 | 1046 | 92979200 | 1900 | |
3731985 | Di735 | C | May 18, 2013, 3:25 a.m. | OK | Java 7 | TESTS | 70 | 1109 | 93081600 | 1900 | |
3730263 | mmaxio | C | May 17, 2013, 4:17 p.m. | OK | Java 7 | TESTS | 70 | 1140 | 92672000 | 1900 | |
3730869 | Azat_Yusupov | C | May 17, 2013, 5:39 p.m. | OK | Java 7 | TESTS | 70 | 1140 | 92774400 | 1900 | |
16340229 | mkirsche | C | Feb. 26, 2016, 4:54 a.m. | OK | Java 7 | TESTS | 70 | 1278 | 92569600 | 1900 | |
5121098 | IgorKoval | C | Nov. 15, 2013, 6:39 p.m. | OK | Java 7 | TESTS | 70 | 1340 | 92774400 | 1900 | |
54403687 | mTvTm | C | May 20, 2019, 3:59 a.m. | OK | Java 8 | TESTS | 70 | 808 | 2560000 | 1900 | |
63751152 | elkadymohammed01 | C | Oct. 29, 2019, 8:22 p.m. | OK | Java 8 | TESTS | 70 | 872 | 0 | 1900 | |
59163366 | hongquanntct | C | Aug. 20, 2019, 3:20 p.m. | OK | Java 8 | TESTS | 70 | 1122 | 80793600 | 1900 | |
42332454 | Noureldin | C | Sept. 1, 2018, 11:12 a.m. | OK | Java 8 | TESTS | 70 | 1214 | 80076800 | 1900 | |
66782424 | YahiaSherif | C | Dec. 13, 2019, 12:30 p.m. | OK | Java 8 | TESTS | 70 | 1216 | 194355200 | 1900 | |
4194209 | kingofnumbers | C | July 28, 2013, 11:01 a.m. | OK | MS C++ | TESTS | 70 | 436 | 23040000 | 1900 | |
3731706 | caustique | C | May 17, 2013, 10:40 p.m. | OK | MS C++ | TESTS | 70 | 593 | 0 | 1900 | |
3731103 | KhaustovPavel | C | May 17, 2013, 6:17 p.m. | OK | MS C++ | TESTS | 70 | 609 | 0 | 1900 | |
3794931 | Aharon | C | May 30, 2013, 3:25 p.m. | OK | MS C++ | TESTS | 70 | 625 | 0 | 1900 | |
3730564 | izban | C | May 17, 2013, 5 p.m. | OK | MS C++ | TESTS | 70 | 625 | 8396800 | 1900 | |
3751305 | WHO_ARE_U | C | May 20, 2013, 7:20 p.m. | OK | MS C++ | TESTS | 70 | 656 | 0 | 1900 | |
3732291 | BIT_silence | C | May 18, 2013, 6:42 a.m. | OK | MS C++ | TESTS | 70 | 656 | 7987200 | 1900 | |
3733090 | ballon | C | May 18, 2013, 10:18 a.m. | OK | MS C++ | TESTS | 70 | 656 | 16384000 | 1900 | |
3730291 | Taube | C | May 17, 2013, 4:21 p.m. | OK | MS C++ | TESTS | 70 | 656 | 32460800 | 1900 | |
3731898 | lost3030 | C | May 18, 2013, 2:38 a.m. | OK | MS C++ | TESTS | 70 | 764 | 11980800 | 1900 | |
56258446 | Mr.Inconsistent | C | June 29, 2019, 7:05 a.m. | OK | PyPy 2 | TESTS | 70 | 1684 | 68915200 | 1900 |
Back to search problems