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 |
| 156
|
Codeforces Round 110 (Div. 1) |
FINISHED |
False |
7200 |
445869023 |
Feb. 29, 2012, 5:30 p.m. |
Problems
Mrs. Hudson hasn't made her famous pancakes for quite a while and finally she decided to make them again. She has learned m new recipes recently and she can't wait to try them. Those recipes are based on n special spices. Mrs. Hudson has these spices in the kitchen lying in jars numbered with integers from 0 to n - 1 (each spice lies in an individual jar). Each jar also has the price of the corresponding spice inscribed — some integer a i . We know three values for the i -th pancake recipe: d i , s i , c i . Here d i and c i are integers, and s i is the pattern of some integer written in the numeral system with radix d i . The pattern contains digits, Latin letters (to denote digits larger than nine) and question marks. Number x in the d i -base numeral system matches the pattern s i , if we can replace question marks in the pattern with digits and letters so that we obtain number x (leading zeroes aren't taken into consideration when performing the comparison). More formally: each question mark should be replaced by exactly one digit or exactly one letter. If after we replace all question marks we get a number with leading zeroes, we can delete these zeroes. For example, number 40A9875 in the 11 -base numeral system matches the pattern " ??4??987? ", and number 4A9875 does not. To make the pancakes by the i -th recipe, Mrs. Hudson should take all jars with numbers whose representation in the d i -base numeral system matches the pattern s i . The control number of the recipe ( z i ) is defined as the sum of number c i and the product of prices of all taken jars. More formally: (where j is all such numbers whose representation in the d i -base numeral system matches the pattern s i ). Mrs. Hudson isn't as interested in the control numbers as she is in their minimum prime divisors. Your task is: for each recipe i find the minimum prime divisor of number z i . If this divisor exceeds 100 , then you do not have to find it, print -1. The first line contains the |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
1250291 |
tourist |
E |
Feb. 29, 2012, 7:11 p.m. |
OK |
Delphi |
TESTS |
16 |
2410 |
215244800 |
|
2900 |
|
1290555 |
sillycross |
E |
March 5, 2012, 12:31 p.m. |
OK |
FPC |
TESTS |
16 |
1500 |
146022400 |
|
2900 |
|
1384935 |
object022 |
E |
March 21, 2012, 3:12 p.m. |
OK |
FPC |
TESTS |
16 |
1610 |
136601600 |
|
2900 |
|
1628877 |
blackapple |
E |
April 26, 2012, 8:50 a.m. |
OK |
FPC |
TESTS |
16 |
3230 |
10956800 |
|
2900 |
|
1257208 |
kelvinlau |
E |
March 2, 2012, 2:02 p.m. |
OK |
GNU C |
TESTS |
16 |
2970 |
242790400 |
|
2900 |
|
2905109 |
asklzxn2 |
E |
Jan. 11, 2013, 1:36 p.m. |
OK |
GNU C++ |
TESTS |
16 |
296 |
119091200 |
|
2900 |
|
2905108 |
asklzxn2 |
E |
Jan. 11, 2013, 1:35 p.m. |
OK |
GNU C++ |
TESTS |
16 |
328 |
119091200 |
|
2900 |
|
40991790 |
ReaLNero1 |
E |
July 31, 2018, 12:52 a.m. |
OK |
GNU C++ |
TESTS |
16 |
404 |
118988800 |
|
2900 |
|
3688042 |
TianmingZhou |
E |
May 6, 2013, 5:43 p.m. |
OK |
GNU C++ |
TESTS |
16 |
468 |
64614400 |
|
2900 |
|
3688022 |
TianmingZhou |
E |
May 6, 2013, 5:38 p.m. |
OK |
GNU C++ |
TESTS |
16 |
484 |
64614400 |
|
2900 |
|
2907796 |
dhh1995 |
E |
Jan. 12, 2013, 1 p.m. |
OK |
GNU C++ |
TESTS |
16 |
484 |
188313600 |
|
2900 |
|
2667042 |
Seasons |
E |
Nov. 27, 2012, 8:46 a.m. |
OK |
GNU C++ |
TESTS |
16 |
515 |
116121600 |
|
2900 |
|
2516746 |
oimaster |
E |
Nov. 7, 2012, 1:35 a.m. |
OK |
GNU C++ |
TESTS |
16 |
546 |
147558400 |
|
2900 |
|
2926166 |
graysky |
E |
Jan. 15, 2013, 6:27 a.m. |
OK |
GNU C++ |
TESTS |
16 |
609 |
188313600 |
|
2900 |
|
2756198 |
ChingYunH |
E |
Dec. 12, 2012, 11:58 p.m. |
OK |
GNU C++ |
TESTS |
16 |
625 |
189132800 |
|
2900 |
|
2922922 |
llj_bash |
E |
Jan. 14, 2013, 3:21 a.m. |
OK |
GNU C++0x |
TESTS |
16 |
625 |
120627200 |
|
2900 |
|
2923008 |
llj_bash |
E |
Jan. 14, 2013, 6:44 a.m. |
OK |
GNU C++0x |
TESTS |
16 |
812 |
120627200 |
|
2900 |
|
2821568 |
apia |
E |
Dec. 24, 2012, 8:37 a.m. |
OK |
GNU C++0x |
TESTS |
16 |
1078 |
190464000 |
|
2900 |
|
9774540 |
sdya |
E |
Feb. 8, 2015, 8:06 p.m. |
OK |
GNU C++0x |
TESTS |
16 |
4398 |
2867200 |
|
2900 |
|
18918419 |
Y_UME |
E |
July 6, 2016, 12:17 p.m. |
OK |
GNU C++11 |
TESTS |
16 |
842 |
95232000 |
|
2900 |
|
17084236 |
freebsdx |
E |
April 1, 2016, 3:24 a.m. |
OK |
GNU C++11 |
TESTS |
16 |
934 |
95641600 |
|
2900 |
|
57902440 |
lopare |
E |
July 28, 2019, 4:13 p.m. |
OK |
GNU C++11 |
TESTS |
16 |
998 |
190361600 |
|
2900 |
|
35840906 |
______n______ |
E |
March 2, 2018, 2:26 p.m. |
OK |
GNU C++11 |
TESTS |
16 |
1058 |
192409600 |
|
2900 |
|
35840903 |
______u______ |
E |
March 2, 2018, 2:26 p.m. |
OK |
GNU C++11 |
TESTS |
16 |
1058 |
192409600 |
|
2900 |
|
35840574 |
_____i_____ |
E |
March 2, 2018, 2:20 p.m. |
OK |
GNU C++11 |
TESTS |
16 |
1058 |
192409600 |
|
2900 |
|
35840572 |
_____k_____ |
E |
March 2, 2018, 2:20 p.m. |
OK |
GNU C++11 |
TESTS |
16 |
1058 |
192409600 |
|
2900 |
|
35835579 |
______k______ |
E |
March 2, 2018, 12:34 p.m. |
OK |
GNU C++11 |
TESTS |
16 |
1058 |
192409600 |
|
2900 |
|
35835569 |
______h______ |
E |
March 2, 2018, 12:34 p.m. |
OK |
GNU C++11 |
TESTS |
16 |
1058 |
192409600 |
|
2900 |
|
35835494 |
______i______ |
E |
March 2, 2018, 12:33 p.m. |
OK |
GNU C++11 |
TESTS |
16 |
1058 |
192409600 |
|
2900 |
|
53005145 |
ugly2333 |
E |
April 19, 2019, 9:11 a.m. |
OK |
GNU C++14 |
TESTS |
16 |
1060 |
214630400 |
|
2900 |
|
64055623 |
vjudge4 |
E |
Nov. 2, 2019, 1:13 a.m. |
OK |
GNU C++14 |
TESTS |
16 |
1214 |
102604800 |
|
2900 |
|
23494119 |
Ali.Pi |
E |
Jan. 2, 2017, 6:44 a.m. |
OK |
GNU C++14 |
TESTS |
16 |
1246 |
121856000 |
|
2900 |
|
64004918 |
vjudge3 |
E |
Nov. 1, 2019, 2:58 p.m. |
OK |
GNU C++14 |
TESTS |
16 |
1776 |
232857600 |
|
2900 |
|
55993261 |
Scut82 |
E |
June 24, 2019, 8:52 a.m. |
OK |
GNU C++14 |
TESTS |
16 |
2152 |
93081600 |
|
2900 |
|
55993198 |
Scut82 |
E |
June 24, 2019, 8:50 a.m. |
OK |
GNU C++14 |
TESTS |
16 |
2152 |
93081600 |
|
2900 |
|
53033191 |
vjudge1 |
E |
April 20, 2019, 3:56 a.m. |
OK |
GNU C++14 |
TESTS |
16 |
2432 |
117452800 |
|
2900 |
|
55995662 |
Scut82 |
E |
June 24, 2019, 10:15 a.m. |
OK |
GNU C++14 |
TESTS |
16 |
2650 |
93081600 |
|
2900 |
|
55989594 |
Scut82 |
E |
June 24, 2019, 6:48 a.m. |
OK |
GNU C++14 |
TESTS |
16 |
2682 |
93081600 |
|
2900 |
|
42829660 |
ruo |
E |
Sept. 13, 2018, 12:20 p.m. |
OK |
GNU C++17 |
TESTS |
16 |
2402 |
238284800 |
|
2900 |
|
64092985 |
shurongwang |
E |
Nov. 2, 2019, 1:09 p.m. |
OK |
GNU C++17 |
TESTS |
16 |
2932 |
21913600 |
|
2900 |
|
1252010 |
Shef |
E |
Feb. 29, 2012, 11:27 p.m. |
OK |
MS C++ |
TESTS |
16 |
2610 |
31232000 |
|
2900 |
|
1310429 |
NALP |
E |
March 7, 2012, 10:13 p.m. |
OK |
MS C++ |
TESTS |
16 |
4410 |
17510400 |
|
2900 |
remove filters
Back to search problems