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'The Fair Nut got stacked in planar world. He should solve this task to get out. You are given n rectangles with vertexes in (0, 0) , (x_i, 0) , (x_i, y_i) , (0, y_i) . For each rectangle, you are also given a number a_i . Choose some of them that the area of union minus sum of a_i of the chosen ones is maximum. It is guaranteed that there are no nested rectangles. Nut has no idea how to find the answer, so he asked for your help. The first line contains one integer n ( 1 <= q n <= q 10^6 ) -- the number of rectangles. Each of the next n lines contains three integers x_i , y_i and a_i ( 1 <= q x_i, y_i <= q 10^9 , 0 <= q a_i <= q x_i cdot y_i ). It is guaranteed that there are no nested rectangles. In a single line print the answer to the problem -- the maximum value which you can achieve. In the first example, the right answer can be achieved by choosing the first and the second rectangles. In the second example, the right answer can also be achieved by choosing the first and the second rectangles. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
66442890 |
yinghua1314 |
E |
Dec. 7, 2019, 8:33 a.m. |
OK |
GNU C++11 |
TESTS |
63 |
311 |
30720000 |
|
2400 |
46938646 |
Tgiwx |
E |
Dec. 12, 2018, 3:14 p.m. |
OK |
GNU C++11 |
TESTS |
63 |
342 |
24064000 |
|
2400 |
46880499 |
Gloid |
E |
Dec. 10, 2018, 7:23 p.m. |
OK |
GNU C++11 |
TESTS |
63 |
343 |
28057600 |
|
2400 |
65246418 |
JialinOuyang |
E |
Nov. 17, 2019, 10:35 a.m. |
OK |
GNU C++11 |
TESTS |
63 |
358 |
16076800 |
|
2400 |
68217571 |
vjudge4 |
E |
Jan. 5, 2020, 1:36 a.m. |
OK |
GNU C++11 |
TESTS |
63 |
358 |
28057600 |
|
2400 |
68217566 |
Wangxuye |
E |
Jan. 5, 2020, 1:35 a.m. |
OK |
GNU C++11 |
TESTS |
63 |
358 |
28057600 |
|
2400 |
47831712 |
ZredXNy |
E |
Jan. 2, 2019, 7:17 a.m. |
OK |
GNU C++11 |
TESTS |
63 |
358 |
28057600 |
|
2400 |
60327806 |
msuwakow |
E |
Sept. 10, 2019, 3:22 a.m. |
OK |
GNU C++11 |
TESTS |
63 |
358 |
28364800 |
|
2400 |
54387891 |
yhdd |
E |
May 19, 2019, 2:24 p.m. |
OK |
GNU C++11 |
TESTS |
63 |
358 |
71987200 |
|
2400 |
49102345 |
luogu_bot5 |
E |
Jan. 28, 2019, 11:49 a.m. |
OK |
GNU C++11 |
TESTS |
63 |
358 |
71987200 |
|
2400 |
47520217 |
cyc4188 |
E |
Dec. 26, 2018, 12:37 p.m. |
OK |
GNU C++14 |
TESTS |
63 |
327 |
30822400 |
|
2400 |
46892160 |
neal |
E |
Dec. 11, 2018, 6:54 a.m. |
OK |
GNU C++14 |
TESTS |
63 |
327 |
32051200 |
|
2400 |
46892134 |
neal |
E |
Dec. 11, 2018, 6:54 a.m. |
OK |
GNU C++14 |
TESTS |
63 |
327 |
32051200 |
|
2400 |
47144911 |
neal |
E |
Dec. 17, 2018, 12:51 a.m. |
OK |
GNU C++14 |
TESTS |
63 |
342 |
32051200 |
|
2400 |
48655241 |
ReaLNero1 |
E |
Jan. 21, 2019, 2:08 a.m. |
OK |
GNU C++14 |
TESTS |
63 |
343 |
32051200 |
|
2400 |
46892074 |
neal |
E |
Dec. 11, 2018, 6:51 a.m. |
OK |
GNU C++14 |
TESTS |
63 |
343 |
32051200 |
|
2400 |
46892021 |
neal |
E |
Dec. 11, 2018, 6:48 a.m. |
OK |
GNU C++14 |
TESTS |
63 |
358 |
16281600 |
|
2400 |
46892088 |
neal |
E |
Dec. 11, 2018, 6:52 a.m. |
OK |
GNU C++14 |
TESTS |
63 |
358 |
32051200 |
|
2400 |
47508123 |
silxi |
E |
Dec. 26, 2018, 3:46 a.m. |
OK |
GNU C++14 |
TESTS |
63 |
389 |
32358400 |
|
2400 |
47508078 |
silxi |
E |
Dec. 26, 2018, 3:41 a.m. |
OK |
GNU C++14 |
TESTS |
63 |
389 |
32358400 |
|
2400 |
62390322 |
disposrestfuIly |
E |
Oct. 12, 2019, 1:14 a.m. |
OK |
GNU C++17 |
TESTS |
63 |
311 |
36454400 |
|
2400 |
57764803 |
neal |
E |
July 25, 2019, 7:41 p.m. |
OK |
GNU C++17 |
TESTS |
63 |
327 |
32051200 |
|
2400 |
55913847 |
chongryong |
E |
June 22, 2019, 4:10 a.m. |
OK |
GNU C++17 |
TESTS |
63 |
374 |
36454400 |
|
2400 |
58235915 |
N0ne_ |
E |
Aug. 3, 2019, 7:32 p.m. |
OK |
GNU C++17 |
TESTS |
63 |
468 |
53657600 |
|
2400 |
46889344 |
lqs2015 |
E |
Dec. 11, 2018, 4:28 a.m. |
OK |
GNU C++17 |
TESTS |
63 |
561 |
53657600 |
|
2400 |
46889330 |
lqs2015 |
E |
Dec. 11, 2018, 4:28 a.m. |
OK |
GNU C++17 |
TESTS |
63 |
561 |
53657600 |
|
2400 |
46882329 |
MrDindows |
E |
Dec. 10, 2018, 8:04 p.m. |
OK |
GNU C++17 |
TESTS |
63 |
592 |
76595200 |
|
2400 |
56868752 |
GoogleBot |
E |
July 12, 2019, 5:13 a.m. |
OK |
GNU C++17 |
TESTS |
63 |
873 |
69939200 |
|
2400 |
46954540 |
rzy_99 |
E |
Dec. 13, 2018, 2 a.m. |
OK |
GNU C++17 |
TESTS |
63 |
889 |
25292800 |
|
2400 |
46882267 |
KrK |
E |
Dec. 10, 2018, 8:03 p.m. |
OK |
GNU C++17 |
TESTS |
63 |
904 |
16179200 |
|
2400 |
67020756 |
dalt |
E |
Dec. 16, 2019, 12:53 p.m. |
OK |
Java 8 |
TESTS |
63 |
1045 |
88473600 |
|
2400 |
61840709 |
jakejase2 |
E |
Oct. 4, 2019, 9:33 a.m. |
OK |
Java 8 |
TESTS |
63 |
1075 |
38400000 |
|
2400 |
47240833 |
Lewin |
E |
Dec. 19, 2018, 1:26 a.m. |
OK |
Java 8 |
TESTS |
63 |
1076 |
63897600 |
|
2400 |
46874789 |
uwi |
E |
Dec. 10, 2018, 6:03 p.m. |
OK |
Java 8 |
TESTS |
63 |
1106 |
76492800 |
|
2400 |
61393414 |
beginner1010 |
E |
Sept. 27, 2019, 11:50 p.m. |
OK |
Java 8 |
TESTS |
63 |
1294 |
135884800 |
|
2400 |
58066470 |
abdomisan |
E |
July 31, 2019, 9:05 a.m. |
OK |
Java 8 |
TESTS |
63 |
1418 |
63692800 |
|
2400 |
47009384 |
unicorn20141 |
E |
Dec. 14, 2018, 3:38 p.m. |
OK |
Java 8 |
TESTS |
63 |
1466 |
59187200 |
|
2400 |
69592270 |
Giantpizzahead |
E |
Jan. 27, 2020, 1:20 a.m. |
OK |
Java 8 |
TESTS |
63 |
1481 |
94924800 |
|
2400 |
49848053 |
mmaxio |
E |
Feb. 13, 2019, 12:16 a.m. |
OK |
Java 8 |
TESTS |
63 |
1512 |
115302400 |
|
2400 |
50272710 |
mmaxio |
E |
Feb. 21, 2019, 8:12 a.m. |
OK |
Java 8 |
TESTS |
63 |
1528 |
115200000 |
|
2400 |
47865786 |
logickaiser |
E |
Jan. 3, 2019, 9:36 a.m. |
OK |
MS C++ |
TESTS |
63 |
717 |
48332800 |
|
2400 |
48500481 |
vjudge3 |
E |
Jan. 17, 2019, 2:50 p.m. |
OK |
MS C++ |
TESTS |
63 |
732 |
36044800 |
|
2400 |
47865751 |
logickaiser |
E |
Jan. 3, 2019, 9:34 a.m. |
OK |
MS C++ |
TESTS |
63 |
733 |
48128000 |
|
2400 |
47866141 |
logickaiser |
E |
Jan. 3, 2019, 9:50 a.m. |
OK |
MS C++ |
TESTS |
63 |
733 |
48332800 |
|
2400 |
67146203 |
vjudge3 |
E |
Dec. 18, 2019, 8:57 a.m. |
OK |
MS C++ |
TESTS |
63 |
748 |
28057600 |
|
2400 |
67146004 |
vjudge2 |
E |
Dec. 18, 2019, 8:52 a.m. |
OK |
MS C++ |
TESTS |
63 |
795 |
28057600 |
|
2400 |
48597452 |
vjudge4 |
E |
Jan. 20, 2019, 6:52 a.m. |
OK |
MS C++ |
TESTS |
63 |
857 |
40345600 |
|
2400 |
67310722 |
vjudge5 |
E |
Dec. 21, 2019, 2:31 a.m. |
OK |
MS C++ |
TESTS |
63 |
873 |
24064000 |
|
2400 |
48314695 |
vjudge2 |
E |
Jan. 13, 2019, 5:48 a.m. |
OK |
MS C++ |
TESTS |
63 |
873 |
48128000 |
|
2400 |
46881629 |
LoneFox |
E |
Dec. 10, 2018, 7:43 p.m. |
OK |
MS C++ |
TESTS |
63 |
1590 |
36044800 |
|
2400 |
52648291 |
AleksanderBalobanov |
E |
April 12, 2019, 3:28 p.m. |
OK |
MS C++ 2017 |
TESTS |
63 |
1014 |
80588800 |
|
2400 |
65591878 |
vjudge4 |
E |
Nov. 23, 2019, 2:24 p.m. |
OK |
MS C++ 2017 |
TESTS |
63 |
1153 |
36556800 |
|
2400 |
remove filters
Back to search problems