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 |
924
|
VK Cup 2018 - Round 2 |
FINISHED |
False |
8100 |
209917499 |
March 24, 2018, 3:35 p.m. |
Problems
B'We call a positive integer x a k-beautiful integer if and only if it is possible to split the multiset of its digits in the decimal representation into two subsets such that the difference between the sum of digits in one subset and the sum of digits in the other subset is less than or equal to k. Each digit should belong to exactly one subset after the split. There are n queries for you. Each query is described with three integers l, r and k, which mean that you are asked how many integers x between l and r (inclusive) are k-beautiful. The first line contains a single integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895 xc2 xb7104), indicating the number of queries. Each of the next n lines describes a query, containing three integers l, r and k (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89l xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89r xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891018, 0 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k xe2 x80 x89 xe2 x89 xa4 xe2 x80 x899). For each query print a single number -- the answer to the query. If 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x899, integer x is k-beautiful if and only if x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k. If 10 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89x xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8999, integer x xe2 x80 x89= xe2 x80 x8910a xe2 x80 x89+ xe2 x80 x89b is k-beautiful if and only if |a xe2 x80 x89- xe2 x80 x89b| xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89k, where a and b are integers between 0 and 9, inclusive. 100 is k-beautiful if and only if k xe2 x80 x89 xe2 x89 xa5 xe2 x80 x891. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
36613180 |
skywalkert |
F |
March 25, 2018, 10:36 a.m. |
OK |
GNU C++ |
TESTS |
97 |
389 |
162713600 |
|
3400 |
50589857 |
0202 |
F |
Feb. 28, 2019, 6:45 a.m. |
OK |
GNU C++11 |
TESTS |
97 |
327 |
33280000 |
|
3400 |
49230849 |
ykn1 |
F |
Jan. 31, 2019, 5:19 a.m. |
OK |
GNU C++11 |
TESTS |
97 |
327 |
33280000 |
|
3400 |
47839857 |
bashetti |
F |
Jan. 2, 2019, 11:10 a.m. |
OK |
GNU C++11 |
TESTS |
97 |
327 |
33280000 |
|
3400 |
57768000 |
py_ultron |
F |
July 25, 2019, 10:03 p.m. |
OK |
GNU C++11 |
TESTS |
97 |
342 |
33280000 |
|
3400 |
57871529 |
lopare |
F |
July 28, 2019, 2:12 a.m. |
OK |
GNU C++11 |
TESTS |
97 |
343 |
33280000 |
|
3400 |
60151113 |
foreverlasting |
F |
Sept. 6, 2019, 4:04 a.m. |
OK |
GNU C++11 |
TESTS |
97 |
358 |
76288000 |
|
3400 |
55752115 |
_twilight |
F |
June 19, 2019, 1:20 p.m. |
OK |
GNU C++11 |
TESTS |
97 |
436 |
99635200 |
|
3400 |
36878312 |
zhouyuyang |
F |
April 2, 2018, 12:44 p.m. |
OK |
GNU C++11 |
TESTS |
97 |
733 |
129945600 |
|
3400 |
36877810 |
zhouyuyang |
F |
April 2, 2018, 12:27 p.m. |
OK |
GNU C++11 |
TESTS |
97 |
826 |
129945600 |
|
3400 |
36718216 |
zhouyuyang |
F |
March 29, 2018, 11:48 a.m. |
OK |
GNU C++11 |
TESTS |
97 |
982 |
130252800 |
|
3400 |
57919780 |
dudu_luogu |
F |
July 29, 2019, 4:01 a.m. |
OK |
GNU C++14 |
TESTS |
97 |
358 |
76390400 |
|
3400 |
57919476 |
clya2004 |
F |
July 29, 2019, 3:47 a.m. |
OK |
GNU C++14 |
TESTS |
97 |
358 |
76390400 |
|
3400 |
57919605 |
dudu_luogu |
F |
July 29, 2019, 3:53 a.m. |
OK |
GNU C++14 |
TESTS |
97 |
373 |
76390400 |
|
3400 |
57919334 |
clya2004 |
F |
July 29, 2019, 3:39 a.m. |
OK |
GNU C++14 |
TESTS |
97 |
373 |
76390400 |
|
3400 |
57919225 |
clya2004 |
F |
July 29, 2019, 3:34 a.m. |
OK |
GNU C++14 |
TESTS |
97 |
373 |
76390400 |
|
3400 |
57919381 |
clya2004 |
F |
July 29, 2019, 3:42 a.m. |
OK |
GNU C++14 |
TESTS |
97 |
374 |
76390400 |
|
3400 |
57919258 |
clya2004 |
F |
July 29, 2019, 3:35 a.m. |
OK |
GNU C++14 |
TESTS |
97 |
374 |
76390400 |
|
3400 |
52498191 |
bhargav_0085 |
F |
April 8, 2019, 2:43 p.m. |
OK |
GNU C++14 |
TESTS |
97 |
374 |
159334400 |
|
3400 |
57919046 |
clya2004 |
F |
July 29, 2019, 3:25 a.m. |
OK |
GNU C++14 |
TESTS |
97 |
389 |
76390400 |
|
3400 |
37027290 |
jslijin |
F |
April 6, 2018, 5:06 p.m. |
OK |
GNU C++14 |
TESTS |
97 |
389 |
173056000 |
|
3400 |
57725177 |
kartik_tiwari |
F |
July 25, 2019, 6:55 a.m. |
OK |
GNU C++17 |
TESTS |
97 |
296 |
162304000 |
|
3400 |
36744159 |
TheGeoCoder |
F |
March 30, 2018, 10:49 a.m. |
OK |
GNU C++17 |
TESTS |
97 |
326 |
165580800 |
|
3400 |
36598875 |
LHiC V--o_o--V |
F |
March 24, 2018, 5:40 p.m. |
OK |
GNU C++17 |
TESTS |
97 |
342 |
165683200 |
|
3400 |
40978337 |
ReaLNero1 |
F |
July 30, 2018, 4:35 p.m. |
OK |
GNU C++17 |
TESTS |
97 |
343 |
162304000 |
|
3400 |
38021013 |
WlkMiCjKrT2rM5xv9k5AaIaa |
F |
May 8, 2018, 12:56 p.m. |
OK |
GNU C++17 |
TESTS |
97 |
358 |
165888000 |
|
3400 |
69568489 |
gongsuidashen |
F |
Jan. 26, 2020, 1:17 p.m. |
OK |
GNU C++17 |
TESTS |
97 |
390 |
76390400 |
|
3400 |
48669801 |
TohnoYouki |
F |
Jan. 21, 2019, 10:11 a.m. |
OK |
GNU C++17 |
TESTS |
97 |
1372 |
35635200 |
|
3400 |
62575742 |
ak_taniya |
F |
Oct. 14, 2019, 3:50 p.m. |
OK |
GNU C++17 |
TESTS |
97 |
1543 |
39936000 |
|
3400 |
36669883 |
orz |
F |
March 27, 2018, 1:51 p.m. |
OK |
GNU C++17 |
TESTS |
97 |
1700 |
195584000 |
|
3400 |
36669900 |
orz |
F |
March 27, 2018, 1:52 p.m. |
OK |
GNU C++17 |
TESTS |
97 |
1715 |
212070400 |
|
3400 |
remove filters
Back to search problems