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 are given n segments on the Ox-axis. You can drive a nail in any integer point on the Ox-axis line nail so, that all segments containing this point, are considered nailed down. If the nail passes through endpoint of some segment, this segment is considered to be nailed too. What is the smallest number of nails needed to nail all the segments down? The first line of the input contains single integer number n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000) -- amount of segments. Following n lines contain descriptions of the segments. Each description is a pair of integer numbers -- endpoints coordinates. All the coordinates don't exceed 10000 by absolute value. Segments can degenarate to points. The first line should contain one integer number -- the smallest number of nails needed to nail all the segments down. The second line should contain coordinates of driven nails separated by space in any order. If the answer is not unique, output any."... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
94735 |
sankear |
D |
June 29, 2010, 4:15 p.m. |
OK |
Delphi |
TESTS |
40 |
30 |
921600 |
|
1900 |
94969 |
xtpynx |
D |
June 29, 2010, 4:31 p.m. |
OK |
Delphi |
TESTS |
40 |
30 |
921600 |
|
1900 |
94358 |
JOZHEG |
D |
June 29, 2010, 3:50 p.m. |
OK |
Delphi |
TESTS |
40 |
50 |
2867200 |
|
1900 |
94200 |
rhehi |
D |
June 29, 2010, 3:39 p.m. |
OK |
FPC |
TESTS |
40 |
30 |
1024000 |
|
1900 |
94168 |
sevenkplus |
D |
June 29, 2010, 3:36 p.m. |
OK |
FPC |
TESTS |
40 |
30 |
1024000 |
|
1900 |
94172 |
alger95 |
D |
June 29, 2010, 3:36 p.m. |
OK |
FPC |
TESTS |
40 |
30 |
1126400 |
|
1900 |
94461 |
ChuYuxun |
D |
June 29, 2010, 3:58 p.m. |
OK |
FPC |
TESTS |
40 |
30 |
1126400 |
|
1900 |
94987 |
mavr |
D |
June 29, 2010, 4:33 p.m. |
OK |
FPC |
TESTS |
40 |
50 |
1126400 |
|
1900 |
95074 |
sempav |
D |
June 29, 2010, 4:41 p.m. |
OK |
FPC |
TESTS |
40 |
50 |
1126400 |
|
1900 |
94631 |
kuzmichev_dima |
D |
June 29, 2010, 4:08 p.m. |
OK |
FPC |
TESTS |
40 |
80 |
1024000 |
|
1900 |
94450 |
kensou |
D |
June 29, 2010, 3:57 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
95146 |
tygrysek |
D |
June 29, 2010, 4:49 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
95107 |
rudolf |
D |
June 29, 2010, 4:45 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
95064 |
durt |
D |
June 29, 2010, 4:40 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94889 |
zgmf_x20a |
D |
June 29, 2010, 4:25 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94885 |
BeCase |
D |
June 29, 2010, 4:25 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94729 |
vudduu |
D |
June 29, 2010, 4:14 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94543 |
karpinski |
D |
June 29, 2010, 4:03 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94489 |
kohyatoh |
D |
June 29, 2010, 4 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94238 |
misha_hkl |
D |
June 29, 2010, 3:42 p.m. |
OK |
GNU C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94745 |
segrey |
D |
June 29, 2010, 4:16 p.m. |
OK |
Java 6 |
TESTS |
40 |
90 |
42905600 |
|
1900 |
94841 |
stef2n |
D |
June 29, 2010, 4:22 p.m. |
OK |
Java 6 |
TESTS |
40 |
130 |
42905600 |
|
1900 |
94994 |
Spacejoker |
D |
June 29, 2010, 4:34 p.m. |
OK |
Java 6 |
TESTS |
40 |
160 |
42905600 |
|
1900 |
94501 |
Rotsor |
D |
June 29, 2010, 4 p.m. |
OK |
Mono C# |
TESTS |
40 |
130 |
6348800 |
|
1900 |
95251 |
liuyubobobo |
D |
June 29, 2010, 4:57 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
95132 |
yudaer |
D |
June 29, 2010, 4:47 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94674 |
Kasparyan_Mikhail |
D |
June 29, 2010, 4:10 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94657 |
AndreyP |
D |
June 29, 2010, 4:09 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
1331200 |
|
1900 |
94399 |
impetus |
D |
June 29, 2010, 3:53 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
1433600 |
|
1900 |
95123 |
VolodymyrK |
D |
June 29, 2010, 4:46 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
1433600 |
|
1900 |
94288 |
Fdg |
D |
June 29, 2010, 3:46 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
1433600 |
|
1900 |
94089 |
PavelChadnov |
D |
June 29, 2010, 3:31 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
1433600 |
|
1900 |
94703 |
Ministr |
D |
June 29, 2010, 4:12 p.m. |
OK |
MS C++ |
TESTS |
40 |
30 |
1945600 |
|
1900 |
94410 |
akaki |
D |
June 29, 2010, 3:54 p.m. |
OK |
MS C++ |
TESTS |
40 |
50 |
1331200 |
|
1900 |
94792 |
insane |
D |
June 29, 2010, 4:18 p.m. |
OK |
Python 2 |
TESTS |
40 |
60 |
2764800 |
|
1900 |
94406 |
muntasir |
D |
June 29, 2010, 3:54 p.m. |
OK |
Python 2 |
TESTS |
40 |
60 |
2764800 |
|
1900 |
remove filters
Back to search problems