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.
Problems
B"Squirrel Liss loves nuts. Liss asks you to plant some nut trees. There are n positions (numbered 1 to n from west to east) to plant a tree along a street. Trees grow one meter per month. At the beginning of each month you should process one query. The query is one of the following types: After processing each query, you should print the length of the longest increasing subsequence. A subset of existent trees is called an increasing subsequence if the height of the trees in the set is strictly increasing from west to east (for example, the westmost tree in the set must be the shortest in the set). The length of the increasing subsequence is the number of trees in it. Note that Liss don't like the trees with the same heights, so it is guaranteed that at any time no two trees have the exactly same heights. The first line contains two integers: n and m (1 xe2 x80 x89 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89105; 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x892 xc2 xb7105) -- the number of positions and the number of queries. Next m lines contains the information of queries by following formats: The input is guaranteed to be correct, i.e., In each line integers are separated by single spaces. Print m integers -- the length of the longest increasing subsequence after each query. Separate the numbers by whitespaces. States of street after each query you can see on the following animation: If your browser doesn't support animation png, please see the gif version here: http://212.193.37.254/codeforces/images/162/roadtree.gif"... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
8896237 |
SHUXK |
E |
Nov. 30, 2014, 7:36 a.m. |
OK |
FPC |
TESTS |
60 |
3710 |
6041600 |
|
2900 |
9436638 |
meikoNiMaBi |
E |
Jan. 15, 2015, 2:07 p.m. |
OK |
GNU C++ |
TESTS |
60 |
528 |
14643200 |
|
2900 |
40990297 |
ReaLNero1 |
E |
July 30, 2018, 11:46 p.m. |
OK |
GNU C++ |
TESTS |
60 |
560 |
13312000 |
|
2900 |
11877670 |
TC.Stan |
E |
July 1, 2015, 7:13 a.m. |
OK |
GNU C++ |
TESTS |
60 |
560 |
13312000 |
|
2900 |
25862648 |
ChillingDream |
E |
March 28, 2017, 12:50 a.m. |
OK |
GNU C++ |
TESTS |
60 |
592 |
9011200 |
|
2900 |
34561183 |
Rushfinen |
E |
Jan. 26, 2018, 1:07 a.m. |
OK |
GNU C++ |
TESTS |
60 |
622 |
9523200 |
|
2900 |
9621864 |
___LH |
E |
Jan. 30, 2015, 3:32 a.m. |
OK |
GNU C++ |
TESTS |
60 |
654 |
9523200 |
|
2900 |
35856212 |
______u______ |
E |
March 2, 2018, 8:16 p.m. |
OK |
GNU C++ |
TESTS |
60 |
654 |
9728000 |
|
2900 |
35855929 |
______n______ |
E |
March 2, 2018, 8:10 p.m. |
OK |
GNU C++ |
TESTS |
60 |
654 |
9728000 |
|
2900 |
35855435 |
_____i_____ |
E |
March 2, 2018, 8:01 p.m. |
OK |
GNU C++ |
TESTS |
60 |
654 |
9728000 |
|
2900 |
35855400 |
_____k_____ |
E |
March 2, 2018, 8:01 p.m. |
OK |
GNU C++ |
TESTS |
60 |
654 |
9728000 |
|
2900 |
10021679 |
zxc901 |
E |
Feb. 25, 2015, 3:26 p.m. |
OK |
GNU C++0x |
TESTS |
60 |
996 |
12800000 |
|
2900 |
8466748 |
equation314 |
E |
Oct. 29, 2014, 8:14 a.m. |
OK |
GNU C++0x |
TESTS |
60 |
1060 |
12185600 |
|
2900 |
2976181 |
roosephu |
E |
Jan. 21, 2013, 3:30 a.m. |
OK |
GNU C++0x |
TESTS |
60 |
1250 |
10752000 |
|
2900 |
3410836 |
dc. |
E |
March 27, 2013, 8:32 a.m. |
OK |
GNU C++0x |
TESTS |
60 |
1359 |
21913600 |
|
2900 |
8329712 |
jiry_2 |
E |
Oct. 20, 2014, 11:27 a.m. |
OK |
GNU C++0x |
TESTS |
60 |
1902 |
15257600 |
|
2900 |
8341043 |
zshi |
E |
Oct. 21, 2014, 11:43 a.m. |
OK |
GNU C++0x |
TESTS |
60 |
2090 |
36761600 |
|
2900 |
2977685 |
cherudim |
E |
Jan. 21, 2013, 10:22 a.m. |
OK |
GNU C++0x |
TESTS |
60 |
2843 |
14540800 |
|
2900 |
41243233 |
emoairx |
E |
Aug. 5, 2018, 11:39 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
528 |
9625600 |
|
2900 |
57821557 |
py_ultron |
E |
July 26, 2019, 11:45 p.m. |
OK |
GNU C++11 |
TESTS |
60 |
530 |
7680000 |
|
2900 |
57897743 |
lopare |
E |
July 28, 2019, 2:18 p.m. |
OK |
GNU C++11 |
TESTS |
60 |
560 |
7680000 |
|
2900 |
41243139 |
emoairx |
E |
Aug. 5, 2018, 11:36 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
592 |
9625600 |
|
2900 |
26454935 |
vjudge2 |
E |
April 17, 2017, 12:46 p.m. |
OK |
GNU C++11 |
TESTS |
60 |
654 |
12492800 |
|
2900 |
50521205 |
luogu_bot4 |
E |
Feb. 26, 2019, 9:29 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
654 |
12902400 |
|
2900 |
46756340 |
SovietPower |
E |
Dec. 8, 2018, 11:56 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
654 |
13312000 |
|
2900 |
39437133 |
zhouyuyang |
E |
June 20, 2018, 1:27 p.m. |
OK |
GNU C++11 |
TESTS |
60 |
716 |
8499200 |
|
2900 |
17129820 |
freebsdx |
E |
April 2, 2016, 12:18 p.m. |
OK |
GNU C++11 |
TESTS |
60 |
716 |
12595200 |
|
2900 |
57833410 |
Patti |
E |
July 27, 2019, 6:47 a.m. |
OK |
GNU C++11 |
TESTS |
60 |
746 |
12800000 |
|
2900 |
56273025 |
RedStar_13 |
E |
June 29, 2019, 12:55 p.m. |
OK |
GNU C++14 |
TESTS |
60 |
746 |
11366400 |
|
2900 |
31914995 |
apiadu |
E |
Oct. 31, 2017, 8:57 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
780 |
9216000 |
|
2900 |
23662298 |
Ali.Pi |
E |
Jan. 9, 2017, 8:10 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
810 |
12492800 |
|
2900 |
56267705 |
RedStar_13 |
E |
June 29, 2019, 10:37 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
810 |
12902400 |
|
2900 |
38644807 |
cxt |
E |
May 27, 2018, 12:10 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
872 |
9830400 |
|
2900 |
50102286 |
hychyc |
E |
Feb. 18, 2019, 3:30 p.m. |
OK |
GNU C++14 |
TESTS |
60 |
872 |
11366400 |
|
2900 |
27061753 |
toster1287 |
E |
May 12, 2017, 8:16 p.m. |
OK |
GNU C++14 |
TESTS |
60 |
904 |
13516800 |
|
2900 |
57775925 |
vjudge5 |
E |
July 26, 2019, 3:30 a.m. |
OK |
GNU C++14 |
TESTS |
60 |
904 |
16588800 |
|
2900 |
27061741 |
RemiliaScarlet |
E |
May 12, 2017, 8:15 p.m. |
OK |
GNU C++14 |
TESTS |
60 |
936 |
13516800 |
|
2900 |
27062255 |
RemiliaScarlet |
E |
May 12, 2017, 8:59 p.m. |
OK |
GNU C++14 |
TESTS |
60 |
966 |
14028800 |
|
2900 |
59977394 |
Miyukine |
E |
Sept. 4, 2019, 6:38 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
810 |
30822400 |
|
2900 |
65423451 |
ivan100sic |
E |
Nov. 20, 2019, 9:51 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
904 |
9420800 |
|
2900 |
57087469 |
hjk1030 |
E |
July 15, 2019, 9:27 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
904 |
17817600 |
|
2900 |
69954011 |
hjk1030 |
E |
Feb. 1, 2020, 9:41 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
934 |
17817600 |
|
2900 |
51635344 |
ruo |
E |
March 21, 2019, 4:07 p.m. |
OK |
GNU C++17 |
TESTS |
60 |
966 |
12390400 |
|
2900 |
49889987 |
SKY_magician |
E |
Feb. 14, 2019, 2:38 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
1060 |
36556800 |
|
2900 |
49889978 |
SKY_magician |
E |
Feb. 14, 2019, 2:38 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
1060 |
36556800 |
|
2900 |
41245939 |
q234rty |
E |
Aug. 5, 2018, 1:07 p.m. |
OK |
GNU C++17 |
TESTS |
60 |
1092 |
23859200 |
|
2900 |
69198173 |
vjudge2 |
E |
Jan. 20, 2020, 3:35 p.m. |
OK |
GNU C++17 |
TESTS |
60 |
1122 |
10752000 |
|
2900 |
57788010 |
vjudge3 |
E |
July 26, 2019, 8:29 a.m. |
OK |
GNU C++17 |
TESTS |
60 |
1122 |
10854400 |
|
2900 |
3422355 |
FattyPenguin |
E |
March 30, 2013, 9:48 a.m. |
OK |
Java 7 |
TESTS |
60 |
2156 |
12288000 |
|
2900 |
4845269 |
kcm1700 |
E |
Oct. 22, 2013, 4:12 p.m. |
OK |
MS C++ |
TESTS |
60 |
624 |
5427200 |
|
2900 |
2971453 |
al13n |
E |
Jan. 20, 2013, 2:37 p.m. |
OK |
MS C++ |
TESTS |
60 |
859 |
16076800 |
|
2900 |
2974561 |
Shef |
E |
Jan. 20, 2013, 7:07 p.m. |
OK |
MS C++ |
TESTS |
60 |
2046 |
8396800 |
|
2900 |
3061803 |
problem-solved |
E |
Feb. 2, 2013, 6:06 a.m. |
OK |
MS C++ |
TESTS |
60 |
2140 |
9113600 |
|
2900 |
remove filters
Back to search problems