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'You have been asked to organize a very important art conference. The first step is to choose the dates. The conference must last for a certain number of consecutive days. Each day, one lecturer must perform, and the same lecturer cannot perform more than once. You asked n potential lecturers if they could participate in the conference. Lecturer i indicated that they could perform on any day from l_i to r_i inclusive. A certain segment of days can be chosen as the conference dates if there is a way to assign an available lecturer to each day of the segment, assigning each lecturer to no more than one day. For each k from 1 to n , find how many ways there are to choose a segment of k consecutive days as the conference dates. The first line of input contains one integer n -- the number of potential lecturers ( 1 <= n <= 2 cdot 10^5 ). Each of the next n lines contains two integers l_i and r_i -- the segment of available days for the i th lecturer ( 1 <= l_i <= r_i <= 2 cdot 10^5 ). Print n integers, where the k th number denotes the number of ways to select a segment of k consecutive days as conference dates. In the first testcase, a one-day conference can be organized on any of the days from 1 to 6 . A two-day conference can be organized from day 2 to day 3 , as well as from day 4 to day 5 . In the second testcase, five lecturers can perform only from day 1 to day 3 , so it will not be possible to organize a conference longer than three days. '... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
263250211 |
lxeason |
F |
May 30, 2024, 12:48 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
203 |
6451200 |
|
3300 |
262399567 |
luogu_bot2 |
F |
May 24, 2024, 2:27 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
233 |
8089600 |
|
3300 |
260543228 |
little_vegetable |
F |
May 11, 2024, 1:38 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
249 |
5632000 |
|
3300 |
260638101 |
C1942huangjiaxu |
F |
May 12, 2024, 9:03 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
249 |
6451200 |
|
3300 |
258839432 |
Harry27182 |
F |
April 30, 2024, 10:30 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
249 |
24883200 |
|
3300 |
262248730 |
phirtheta |
F |
May 23, 2024, 11:31 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
265 |
6451200 |
|
3300 |
259130249 |
xuqin |
F |
May 2, 2024, 2:01 p.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
280 |
5632000 |
|
3300 |
261945929 |
luogu_bot1 |
F |
May 21, 2024, 12:44 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
281 |
9830400 |
|
3300 |
259076297 |
by_chance |
F |
May 2, 2024, 3:41 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
296 |
10137600 |
|
3300 |
259722417 |
by_chance |
F |
May 6, 2024, 8:39 a.m. |
OK |
C++14 (GCC 6-32) |
TESTS |
88 |
312 |
10240000 |
|
3300 |
262386685 |
Joey_c |
F |
May 24, 2024, 12:47 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
249 |
6246400 |
|
3300 |
261922079 |
AAAnonimus |
F |
May 20, 2024, 6:16 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
249 |
7680000 |
|
3300 |
261745608 |
Ramo7fsw |
F |
May 20, 2024, 8:37 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
249 |
7680000 |
|
3300 |
260064830 |
vjudge.1 |
F |
May 9, 2024, 3:18 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
249 |
24064000 |
|
3300 |
258672418 |
zjy2008 |
F |
April 29, 2024, 11:14 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
265 |
4812800 |
|
3300 |
261274586 |
djq_cpp |
F |
May 17, 2024, 4:39 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
265 |
7680000 |
|
3300 |
260967742 |
xioxio |
F |
May 14, 2024, 5:50 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
280 |
8192000 |
|
3300 |
260542284 |
little_vegetable |
F |
May 11, 2024, 1:29 p.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
281 |
5632000 |
|
3300 |
258806683 |
xiaoziyao |
F |
April 30, 2024, 3:15 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
296 |
5632000 |
|
3300 |
259961180 |
2210080040 |
F |
May 8, 2024, 7:05 a.m. |
OK |
C++17 (GCC 7-32) |
TESTS |
88 |
296 |
10240000 |
|
3300 |
258686196 |
Zhouershan |
F |
April 29, 2024, 12:36 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
140 |
7782400 |
|
3300 |
258799978 |
cmk666 |
F |
April 30, 2024, 12:54 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
171 |
7782400 |
|
3300 |
258797907 |
Adam_GS |
F |
April 29, 2024, 11:55 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
202 |
17612800 |
|
3300 |
259130286 |
vjudge3 |
F |
May 2, 2024, 2:02 p.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
217 |
5632000 |
|
3300 |
263588231 |
SampsonYW |
F |
June 1, 2024, 6:59 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
218 |
7270400 |
|
3300 |
260064471 |
Doqe |
F |
May 9, 2024, 3:12 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
233 |
24678400 |
|
3300 |
258505747 |
N_z__ |
F |
April 28, 2024, 2:42 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
234 |
11878400 |
|
3300 |
258825875 |
bashkort |
F |
April 30, 2024, 7:36 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
234 |
15872000 |
|
3300 |
259852375 |
rui_er |
F |
May 7, 2024, 9:19 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
249 |
13516800 |
|
3300 |
258825653 |
bashkort |
F |
April 30, 2024, 7:34 a.m. |
OK |
C++20 (GCC 13-64) |
TESTS |
88 |
249 |
15872000 |
|
3300 |
260000755 |
timiss |
F |
May 8, 2024, 12:49 p.m. |
OK |
GNU C11 |
TESTS |
88 |
984 |
9113600 |
|
3300 |
258442366 |
rainboy |
F |
April 27, 2024, 3:24 p.m. |
OK |
GNU C11 |
TESTS |
88 |
999 |
9113600 |
|
3300 |
261036327 |
chinatest |
F |
May 15, 2024, 10:09 a.m. |
OK |
Java 8 |
TESTS |
88 |
1890 |
26316800 |
|
3300 |
remove filters
Back to search problems