School Regional Team Contest, Saratov, 2011

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
120 School Regional Team Contest, Saratov, 2011 FINISHED False 18000 457486223 Oct. 18, 2011, 6:30 a.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 316 ) I Luck is in Numbers PROGRAMMING greedy 2300

Vasya has been collecting transport tickets for quite a while now. His collection contains several thousands of tram, trolleybus and bus tickets. Vasya is already fed up with the traditional definition of what a lucky ticket is. Thus, he's looking for new perspectives on that. Besides, Vasya cannot understand why all tickets are only divided into lucky and unlucky ones. He thinks that all tickets are lucky but in different degrees. Having given the matter some thought, Vasya worked out the definition of a ticket's degree of luckiness . Let a ticket consist of 2 n digits. Let's regard each digit as written as is shown on the picture: You have seen such digits on electronic clocks: seven segments are used to show digits. Each segment can either be colored or not. The colored segments form a digit. Vasya regards the digits as written in this very way and takes the right half of the ticket and puts it one the left one, so that the first digit coincides with the n + 1 -th one, the second digit coincides with the n + 2 -th one, ..., the n -th digit coincides with the 2 n -th one. For each pair of digits, put one on another, he counts the number of segments colored in both digits and summarizes the resulting numbers. The resulting value is called the degree of luckiness of a ticket. For example, the degree of luckiness of ticket 03 equals four and the degree of luckiness of ticket 2345 equals six. You are given the number of a ticket containing 2 n digits. Your task is to find among the tickets whose number exceeds the number of this ticket but also consists of 2 n digits such ticket, whose degree of luckiness exceeds the degrees of luckiness of the given ticket. Moreover, if there are several such tickets, you should only choose the one with the smallest number. The first line contains the number of the ticket that consists of k characters ( k = 2 n , 1 ≤ n ≤ 10 5 ). Print the number of the sought ticket or "-1" (without the quotes) if no such ticket exists.

Tutorials

Tutorial for school regional team contest of Saratov

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
775976 tourist I Oct. 18, 2011, 7:58 a.m. OK Delphi TESTS 60 90 6246400 2300
837770 Shapo I Nov. 6, 2011, 11:11 a.m. OK Delphi TESTS 60 130 10649600 2300
781224 vlad107 HulkHoggan artyom.kazak I Oct. 18, 2011, 12:33 p.m. OK FPC TESTS 60 30 1433600 2300
780535 gingkgo I Oct. 18, 2011, 11:19 a.m. OK FPC TESTS 60 30 13516800 2300
780367 mfhraven I Oct. 18, 2011, 11:11 a.m. OK FPC TESTS 60 30 13516800 2300
783314 learningSister I Oct. 19, 2011, 12:24 a.m. OK FPC TESTS 60 30 13721600 2300
787889 coolinging I Oct. 21, 2011, 5:07 a.m. OK FPC TESTS 60 50 2252800 2300
779827 Sereja I Oct. 18, 2011, 10:42 a.m. OK FPC TESTS 60 50 7475200 2300
9976430 Glaceon08 I Feb. 24, 2015, 4:46 a.m. OK FPC TESTS 60 62 1228800 2300
2509744 luogan I Nov. 5, 2012, 7:42 a.m. OK FPC TESTS 60 62 1228800 2300
790925 kawatea I Oct. 22, 2011, 5:46 p.m. OK GNU C TESTS 60 30 1740800 2300
2878011 master_miu I Jan. 6, 2013, 11:10 a.m. OK GNU C++ TESTS 60 15 307200 2300
2864218 ChuckLin2014 I Jan. 1, 2013, 4:11 p.m. OK GNU C++ TESTS 60 15 307200 2300
2797952 apia I Dec. 20, 2012, 11:16 a.m. OK GNU C++ TESTS 60 15 307200 2300
2799328 lydrainbowcat I Dec. 20, 2012, 4:23 p.m. OK GNU C++ TESTS 60 15 1536000 2300
3009052 rng_58 I Jan. 25, 2013, 6:22 p.m. OK GNU C++ TESTS 60 15 1638400 2300
3354661 vjudge1 I March 19, 2013, 3:42 a.m. OK GNU C++ TESTS 60 15 1945600 2300
2786921 sayade I Dec. 17, 2012, 12:09 p.m. OK GNU C++ TESTS 60 15 18841600 2300
14191264 130705009 I Nov. 11, 2015, 1:04 a.m. OK GNU C++ TESTS 60 30 204800 2300
4232155 vjtest I Aug. 5, 2013, 8:15 a.m. OK GNU C++ TESTS 60 30 307200 2300
4232148 suyufeng I Aug. 5, 2013, 8:15 a.m. OK GNU C++ TESTS 60 30 307200 2300
2851438 CMHJT I Dec. 29, 2012, 6:32 a.m. OK GNU C++0x TESTS 60 15 307200 2300
4146511 roger98 I July 24, 2013, 10:20 a.m. OK GNU C++0x TESTS 60 15 12697600 2300
993765 Archon.JK I Jan. 1, 2012, 11:27 a.m. OK GNU C++0x TESTS 60 30 1740800 2300
778702 watashi I Oct. 18, 2011, 9:45 a.m. OK GNU C++0x TESTS 60 30 2457600 2300
2797473 dc. I Dec. 20, 2012, 9:31 a.m. OK GNU C++0x TESTS 60 31 307200 2300
2911476 xlk I Jan. 13, 2013, 2:44 p.m. OK GNU C++0x TESTS 60 46 307200 2300
2822035 bakabakashyoshyo I Dec. 24, 2012, 11:04 a.m. OK GNU C++0x TESTS 60 46 307200 2300
2665841 llj_bash I Nov. 27, 2012, 2:20 a.m. OK GNU C++0x TESTS 60 78 1433600 2300
835560 jonathanasdf I Nov. 5, 2011, 1:34 a.m. OK GNU C++0x TESTS 60 90 2662400 2300
2558940 roosephu I Nov. 14, 2012, 12:23 p.m. OK GNU C++0x TESTS 60 93 3072000 2300
35221936 hawkomg I Feb. 14, 2018, 2:31 a.m. OK GNU C++11 TESTS 60 30 2252800 2300
17166446 dooooodle I April 5, 2016, 5:30 a.m. OK GNU C++11 TESTS 60 30 2560000 2300
17166239 dooooodle I April 5, 2016, 5 a.m. OK GNU C++11 TESTS 60 30 2560000 2300
28191901 Djok216 I July 1, 2017, 12:51 p.m. OK GNU C++11 TESTS 60 30 2764800 2300
15436538 Svyat I Jan. 19, 2016, 7:32 a.m. OK GNU C++11 TESTS 60 60 1536000 2300
28190875 mouse_wireless bogdan.seniuc Djok216 I July 1, 2017, 11:49 a.m. OK GNU C++11 TESTS 60 60 2764800 2300
57903840 lopare I July 28, 2019, 4:47 p.m. OK GNU C++11 TESTS 60 62 204800 2300
14191260 vjudge5 I Nov. 11, 2015, 1:02 a.m. OK GNU C++11 TESTS 60 62 204800 2300
12587210 I_love_Tanya_Romanova I Aug. 18, 2015, 10:33 a.m. OK GNU C++11 TESTS 60 62 921600 2300
34432166 FlappyFish I Jan. 22, 2018, 4:38 a.m. OK GNU C++11 TESTS 60 62 2252800 2300
54549137 bhargav_0085 I May 24, 2019, 8:04 a.m. OK GNU C++14 TESTS 60 62 819200 2300
34303758 Cyanic I Jan. 19, 2018, 1:27 p.m. OK GNU C++14 TESTS 60 62 2252800 2300
56017969 sorry_im_smurfing I June 24, 2019, 11:22 p.m. OK GNU C++14 TESTS 60 92 307200 2300
48310196 vicwanf I Jan. 13, 2019, 12:21 a.m. OK GNU C++14 TESTS 60 92 1740800 2300
23563483 Ali.Pi I Jan. 5, 2017, 9:50 p.m. OK GNU C++14 TESTS 60 92 2560000 2300
41300871 ruo I Aug. 7, 2018, 10:03 a.m. OK GNU C++17 TESTS 60 92 614400 2300
49467529 pit4h I Feb. 4, 2019, 3:42 p.m. OK GNU C++17 TESTS 60 92 1740800 2300
777466 Egor I Oct. 18, 2011, 8:50 a.m. OK Java 6 TESTS 60 140 43315200 2300
778226 OgieKako I Oct. 18, 2011, 9:23 a.m. OK Java 6 TESTS 60 160 43212800 2300
787434 mathbattler riadwaw Abra I Oct. 18, 2011, 10:30 a.m. OK Java 6 TESTS 60 170 43520000 2300
783469 Di735 I Oct. 19, 2011, 2:55 a.m. OK Java 6 TESTS 60 170 43520000 2300
10450765 A.Elahi I March 25, 2015, 5:30 p.m. OK Java 8 TESTS 60 248 0 2300
15141774 HappyNewYearMike I Dec. 31, 2015, 9:50 p.m. OK MS C++ TESTS 60 30 512000 2300
780654 gojira I Oct. 18, 2011, 11:24 a.m. OK MS C++ TESTS 60 30 1740800 2300
778835 Fdg I Oct. 18, 2011, 9:51 a.m. OK MS C++ TESTS 60 30 1740800 2300
787161 kennethsnow I Oct. 20, 2011, 5:08 p.m. OK MS C++ TESTS 60 30 1843200 2300
785076 al_maz I Oct. 18, 2011, 10:26 a.m. OK MS C++ TESTS 60 30 7168000 2300
776642 al13n I Oct. 18, 2011, 8:19 a.m. OK MS C++ TESTS 60 50 1740800 2300
817875 OutSide I Oct. 29, 2011, 6:18 p.m. OK MS C++ TESTS 60 50 4403200 2300
786593 lenny kirill Saimon_Saret I Oct. 20, 2011, 12:53 p.m. OK MS C++ TESTS 60 50 6041600 2300
779813 elfness I Oct. 18, 2011, 10:42 a.m. OK MS C++ TESTS 60 60 2560000 2300
784944 permin I Oct. 18, 2011, 9:44 a.m. OK MS C++ TESTS 60 60 4915200 2300

remove filters

Back to search problems