VK Cup 2012 Round 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
161 VK Cup 2012 Round 1 FINISHED False 7200 406392886 March 11, 2012, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 473 ) E Polycarpus the Safecracker PROGRAMMING brute force dp 2400

B"Polycarpus has t safes. The password for each safe is a square matrix consisting of decimal digits '0' ... '9' (the sizes of passwords to the safes may vary). Alas, Polycarpus has forgotten all passwords, so now he has to restore them. Polycarpus enjoys prime numbers, so when he chose the matrix passwords, he wrote a prime number in each row of each matrix. To his surprise, he found that all the matrices turned out to be symmetrical (that is, they remain the same after transposition). Now, years later, Polycarp was irritated to find out that he remembers only the prime numbers pi, written in the first lines of the password matrices. For each safe find the number of matrices which can be passwords to it. The number of digits in pi determines the number of rows and columns of the i-th matrix. One prime number can occur in several rows of the password matrix or in several matrices. The prime numbers that are written not in the first row of the matrix may have leading zeros. The first line of the input contains an integer t (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89t xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8930) -- the number of safes. Next t lines contain integers pi (10 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89pi xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8999999), pi is a prime number written in the first row of the password matrix for the i-th safe. All pi's are written without leading zeros. Print t numbers, the i-th of them should be the number of matrices that can be a password to the i-th safe. Print the numbers on separate lines. Here is a possible password matrix for the second safe: Here is a possible password matrix for the fourth safe: "...

Tutorials

VK Cup 2012 Round 1: editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
1350725 Rubanenko E March 12, 2012, 7:42 a.m. OK Delphi TESTS 25 480 1024000 2400
1442644 Furko E March 30, 2012, 7:23 a.m. OK Delphi TESTS 25 550 2457600 2400
1350719 Rubanenko E March 12, 2012, 7:40 a.m. OK Delphi TESTS 25 580 1024000 2400
1351607 zanoes E March 12, 2012, 12:12 p.m. OK Delphi TESTS 25 1130 19456000 2400
1344819 tourist E March 11, 2012, 4:11 p.m. OK Delphi TESTS 25 1330 1228800 2400
1351043 coolinging E March 12, 2012, 9:20 a.m. OK Delphi TESTS 25 2530 3379200 2400
1348498 Sereja E March 11, 2012, 6:21 p.m. OK Delphi TESTS 25 2800 45363200 2400
1347089 Sereja E March 11, 2012, 4:54 p.m. OK Delphi TESTS 25 2890 45363200 2400
1351623 coolinging E March 12, 2012, 12:15 p.m. OK FPC TESTS 25 30 1536000 2400
1477285 blackapple E April 5, 2012, 6:54 a.m. OK FPC TESTS 25 200 1228800 2400
1348030 sillycross E March 11, 2012, 5:04 p.m. OK FPC TESTS 25 270 7065600 2400
1350846 object022 E March 12, 2012, 8:20 a.m. OK FPC TESTS 25 300 1331200 2400
1442652 Furko E March 30, 2012, 7:25 a.m. OK FPC TESTS 25 780 2662400 2400
1352991 Berezin E March 12, 2012, 6:05 p.m. OK FPC TESTS 25 1550 19046400 2400
1475488 superpear E April 4, 2012, 10:49 a.m. OK FPC TESTS 25 2140 1433600 2400
1357481 giongto35 E March 14, 2012, 5:36 p.m. OK FPC TESTS 25 2530 6656000 2400
1349553 jberci E March 11, 2012, 9:52 p.m. OK GNU C TESTS 25 170 3891200 2400
1359401 choice E March 15, 2012, 4:26 p.m. OK GNU C TESTS 25 2200 3788800 2400
1349824 fancy E March 12, 2012, 1:26 a.m. OK GNU C++ TESTS 25 30 2252800 2400
1346100 sevenkplus E March 11, 2012, 4:36 p.m. OK GNU C++ TESTS 25 30 2355200 2400
1350961 prpr E March 12, 2012, 8:51 a.m. OK GNU C++ TESTS 25 50 1945600 2400
1351163 prpr E March 12, 2012, 9:55 a.m. OK GNU C++ TESTS 25 50 2457600 2400
1348453 Bugman E March 11, 2012, 6:17 p.m. OK GNU C++ TESTS 25 50 2560000 2400
1357591 Orfest E March 14, 2012, 6:31 p.m. OK GNU C++ TESTS 25 50 18841600 2400
20922155 gzz E Sept. 26, 2016, 9:24 a.m. OK GNU C++ TESTS 25 60 409600 2400
1349921 sandytea E March 12, 2012, 2:17 a.m. OK GNU C++ TESTS 25 60 1638400 2400
1350148 data_h E March 12, 2012, 4:02 a.m. OK GNU C++ TESTS 25 60 12595200 2400
40991711 ReaLNero1 E July 31, 2018, 12:49 a.m. OK GNU C++ TESTS 25 62 819200 2400
1355976 Parhomets E March 13, 2012, 9:16 p.m. OK GNU C++0x TESTS 25 380 1536000 2400
1348923 watashi E March 11, 2012, 7:06 p.m. OK GNU C++0x TESTS 25 470 3481600 2400
10090473 scorpion E March 1, 2015, 1:14 a.m. OK GNU C++0x TESTS 25 778 29286400 2400
4129939 harhrayr E July 21, 2013, 2:33 p.m. OK GNU C++0x TESTS 25 1312 102400 2400
1358173 Archon.JK E March 15, 2012, 4:38 a.m. OK GNU C++0x TESTS 25 1330 69017600 2400
1378322 doraemon E March 19, 2012, 2:02 a.m. OK GNU C++0x TESTS 25 1580 10240000 2400
1358166 Archon.JK E March 15, 2012, 4:32 a.m. OK GNU C++0x TESTS 25 1730 68608000 2400
7677109 delta_4d E Sept. 3, 2014, 7:03 p.m. OK GNU C++0x TESTS 25 2058 13209600 2400
7236475 wanbo E July 25, 2014, 1:20 a.m. OK GNU C++0x TESTS 25 2090 409600 2400
10100315 kondranin E March 1, 2015, 7:12 p.m. OK GNU C++0x TESTS 25 2808 1331200 2400
23458712 .I. E Dec. 30, 2016, 9:54 p.m. OK GNU C++11 TESTS 25 60 3174400 2400
64887912 2020skyfall E Nov. 14, 2019, 1:42 p.m. OK GNU C++11 TESTS 25 156 307200 2400
50706150 Daniel_Yeh E March 3, 2019, 4:09 a.m. OK GNU C++11 TESTS 25 186 1433600 2400
12413837 maximumSHOT E Aug. 8, 2015, 11:35 a.m. OK GNU C++11 TESTS 25 280 921600 2400
17399308 darry140 E April 20, 2016, 12:36 p.m. OK GNU C++11 TESTS 25 374 7782400 2400
50916850 zd11024 E March 7, 2019, 6:55 a.m. OK GNU C++11 TESTS 25 404 307200 2400
16607055 I_love_Tanya_Romanova E March 8, 2016, 7 p.m. OK GNU C++11 TESTS 25 498 20582400 2400
16607044 I_love_Tanya_Romanova E March 8, 2016, 6:59 p.m. OK GNU C++11 TESTS 25 624 20582400 2400
12777606 qw4990 E Aug. 30, 2015, 2:02 p.m. OK GNU C++11 TESTS 25 904 2867200 2400
12777611 vjudge5 E Aug. 30, 2015, 2:02 p.m. OK GNU C++11 TESTS 25 936 2867200 2400
53719864 davidberard E May 3, 2019, 9:41 p.m. OK GNU C++14 TESTS 25 654 614400 2400
47276025 tmt514 E Dec. 19, 2018, 7:23 p.m. OK GNU C++14 TESTS 25 966 2457600 2400
57182700 sorry_im_smurfing E July 17, 2019, 7:46 a.m. OK GNU C++14 TESTS 25 1092 2457600 2400
47142754 Adrian_MG E Dec. 16, 2018, 9:23 p.m. OK GNU C++14 TESTS 25 1246 6553600 2400
23670420 Ali.Pi E Jan. 9, 2017, 8:07 p.m. OK GNU C++14 TESTS 25 1466 4403200 2400
34798983 akaiNeko E Feb. 1, 2018, 10:44 a.m. OK GNU C++14 TESTS 25 1496 6451200 2400
26188547 Kerim.K E April 7, 2017, 9:26 a.m. OK GNU C++14 TESTS 25 1996 4915200 2400
61242558 stefdasca E Sept. 24, 2019, 8:44 p.m. OK GNU C++14 TESTS 25 2214 409600 2400
42758715 iaojnh E Sept. 11, 2018, 9:08 a.m. OK GNU C++14 TESTS 25 2340 25190400 2400
32201814 danya.smelskiy E Nov. 10, 2017, 5:26 p.m. OK GNU C++14 TESTS 25 2402 3379200 2400
47667423 yhchang3 E Dec. 29, 2018, 2:22 a.m. OK GNU C++17 TESTS 25 92 716800 2400
67994116 Gnoud__ E Dec. 31, 2019, 7:01 a.m. OK GNU C++17 TESTS 25 124 30105600 2400
66558161 jpetrovcic E Dec. 9, 2019, 5:42 p.m. OK GNU C++17 TESTS 25 716 6553600 2400
47038168 jpetrovcic E Dec. 15, 2018, 1:23 p.m. OK GNU C++17 TESTS 25 716 6553600 2400
40987962 _Ore_ E July 30, 2018, 9:38 p.m. OK GNU C++17 TESTS 25 810 4300800 2400
67974421 I_love_tigersugar E Dec. 30, 2019, 4:18 p.m. OK GNU C++17 TESTS 25 1028 78233600 2400
68297003 I_love_Inori_Yuzuriha E Jan. 6, 2020, 3:42 a.m. OK GNU C++17 TESTS 25 1154 6860800 2400
42909484 ruo E Sept. 16, 2018, 6:27 a.m. OK GNU C++17 TESTS 25 1652 6451200 2400
46625007 Bench0310 E Dec. 4, 2018, 8:09 p.m. OK GNU C++17 TESTS 25 1714 102400 2400
66558559 jpetrovcic E Dec. 9, 2019, 5:52 p.m. OK GNU C++17 TESTS 25 1746 9830400 2400
1349329 eatmore E March 11, 2012, 8:12 p.m. OK Java 6 TESTS 25 80 43110400 2400
1348635 OgieKako E March 11, 2012, 6:34 p.m. OK Java 6 TESTS 25 110 43212800 2400
1351900 partizan22 E March 12, 2012, 1:26 p.m. OK Java 6 TESTS 25 720 43110400 2400
1356064 jcomputer000 E March 13, 2012, 11:58 p.m. OK Java 6 TESTS 25 860 43212800 2400
1356073 Navigabimus E March 14, 2012, 12:05 a.m. OK Java 6 TESTS 25 860 43315200 2400
1346320 shevchen E March 11, 2012, 4:40 p.m. OK Java 6 TESTS 25 910 43110400 2400
1346917 TomConerly E March 11, 2012, 4:50 p.m. OK Java 6 TESTS 25 1280 43315200 2400
1352377 fetetriste E March 12, 2012, 3:24 p.m. OK Java 6 TESTS 25 1810 43212800 2400
1385824 jonathanpaulson E March 22, 2012, 12:23 a.m. OK Java 6 TESTS 25 1860 43520000 2400
1348852 Joshik E March 11, 2012, 6:59 p.m. OK Java 6 TESTS 25 2140 43520000 2400
1614020 Madiyar E April 22, 2012, 6:57 p.m. OK Java 7 TESTS 25 660 44851200 2400
1614010 Madiyar E April 22, 2012, 6:54 p.m. OK Java 7 TESTS 25 670 44851200 2400
1349710 mmaxio E March 12, 2012, 12:09 a.m. OK Java 7 TESTS 25 860 45056000 2400
2043123 jiangzhijie E Aug. 22, 2012, 4:26 p.m. OK Java 7 TESTS 25 940 45875200 2400
1352395 fetetriste E March 12, 2012, 3:29 p.m. OK Java 7 TESTS 25 1830 44953600 2400
1408916 uwi E March 25, 2012, 2:12 p.m. OK Java 7 TESTS 25 2630 44851200 2400
1349022 yaro E March 11, 2012, 7:16 p.m. OK Java 7 TESTS 25 2670 45772800 2400
1371276 Lymphz E March 17, 2012, 3:59 a.m. OK Java 7 TESTS 25 2810 44851200 2400
1361293 Lymphz E March 16, 2012, 1:39 p.m. OK Java 7 TESTS 25 2830 44851200 2400
9570415 AlexFetisov E Jan. 27, 2015, 9:48 a.m. OK Java 8 TESTS 25 996 0 2400
24984857 antonkov E Feb. 24, 2017, 2:21 p.m. OK Java 8 TESTS 25 2526 20377600 2400
24984838 antonkov E Feb. 24, 2017, 2:20 p.m. OK Java 8 TESTS 25 2526 20377600 2400
24984784 antonkov E Feb. 24, 2017, 2:19 p.m. OK Java 8 TESTS 25 2526 20377600 2400
24984499 antonkov E Feb. 24, 2017, 2:11 p.m. OK Java 8 TESTS 25 2652 20275200 2400
6353406 antofik E April 14, 2014, 9:04 a.m. OK MS C# TESTS 25 1466 2867200 2400
1351635 goo.gl_SsAhv E March 12, 2012, 12:17 p.m. OK MS C++ TESTS 25 170 4812800 2400
1351631 goo.gl_SsAhv E March 12, 2012, 12:16 p.m. OK MS C++ TESTS 25 170 4812800 2400
1354393 TheNewOne E March 13, 2012, 10:08 a.m. OK MS C++ TESTS 25 230 7270400 2400
1355983 Parhomets E March 13, 2012, 9:21 p.m. OK MS C++ TESTS 25 410 1536000 2400
1359927 sixteentons E March 15, 2012, 9:54 p.m. OK MS C++ TESTS 25 470 15974400 2400
1446943 J_M E March 31, 2012, 2:12 p.m. OK MS C++ TESTS 25 480 5836800 2400
1357386 AND1989 E March 14, 2012, 5:03 p.m. OK MS C++ TESTS 25 520 4198400 2400
1348227 nevidomy E March 11, 2012, 6:07 p.m. OK MS C++ TESTS 25 530 2662400 2400
1613507 vagnard E April 22, 2012, 12:52 p.m. OK MS C++ TESTS 25 530 2969600 2400
1350750 Erop E March 12, 2012, 7:52 a.m. OK MS C++ TESTS 25 730 8192000 2400
51988642 aleonov E March 29, 2019, 6:44 p.m. OK MS C++ 2017 TESTS 25 1872 7680000 2400
1349000 -dp- E March 11, 2012, 7:14 p.m. OK Python 2 TESTS 25 2800 9830400 2400

remove filters

Back to search problems