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 |
1170
|
Kotlin Heroes: Episode 1 |
FINISHED |
False |
9000 |
178385087 |
May 28, 2019, 2:35 p.m. |
Problems
B"You are given n segments on the Ox axis. The i -th segment is given as a pair l_i, r_i , where l_i is the position of the left end of the i -th segment and r_i is the position of the right end of the i -th segment. Segments may intersect, overlap, or even coincide. A segment is a set of numbers (including floating-point numbers) lying between the segment ends or coinciding with them. Formally, the segment [l, r]= {x~|~x in Bbb{R},~l <= x <= r } . Let the union of segments be the set of all axis points covered by the set of segments. Let's call a subset of the given segments good if its union equals the union of all n segments. Your task is to calculate the number of good subsets of the given n segments. Since the answer may be very large, print it modulo 998244353 . The first line of the input contains one integer n ( 1 <= n <= 2 cdot 10^5 ) -- the number of segments. The next n lines contain segments. The i -th segment is given as a pair l_i, r_i ( 1 <= l_i <= r_i <= 10^9 ), where l_i is the left border of the segment and r_i is the right border of the segment. Segments may intersect, overlap, or even coincide. Print the number of good subsets of the given set of segments. Since the answer may be very large, print it modulo 998244353 . "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
55610615 |
ReaLNero1 |
I |
June 16, 2019, 5:26 a.m. |
OK |
Kotlin |
TESTS |
116 |
732 |
6144000 |
|
|
55109253 |
TOXait |
I |
June 5, 2019, 5:17 a.m. |
OK |
Kotlin |
TESTS |
116 |
732 |
6144000 |
|
|
54812989 |
tmworz_168 |
I |
May 29, 2019, 5:58 p.m. |
OK |
Kotlin |
TESTS |
116 |
732 |
6144000 |
|
|
54764385 |
Petr |
I |
May 28, 2019, 4:43 p.m. |
OK |
Kotlin |
TESTS |
116 |
748 |
6144000 |
|
|
54765170 |
eatmore |
I |
May 28, 2019, 4:55 p.m. |
OK |
Kotlin |
TESTS |
116 |
826 |
0 |
|
|
58336276 |
Sali_adelkhah |
I |
Aug. 5, 2019, 11:36 a.m. |
OK |
Kotlin |
TESTS |
116 |
1450 |
42393600 |
|
|
59057415 |
yongwhan |
I |
Aug. 18, 2019, 7:32 p.m. |
OK |
Kotlin |
TESTS |
116 |
1559 |
42393600 |
|
|
54812424 |
csboi |
I |
May 29, 2019, 5:39 p.m. |
OK |
Kotlin |
TESTS |
116 |
1575 |
40857600 |
|
|
54785723 |
Nurali-006-228713-08 |
I |
May 29, 2019, 3:42 a.m. |
OK |
Kotlin |
TESTS |
116 |
1575 |
40857600 |
|
|
54765451 |
tourist |
I |
May 28, 2019, 4:59 p.m. |
OK |
Kotlin |
TESTS |
116 |
1575 |
40857600 |
|
|
remove filters
Back to search problems