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 |
| 732
|
Codeforces Round 377 (Div. 2) |
FINISHED |
False |
9000 |
299690723 |
Oct. 17, 2016, 2:35 p.m. |
Problems
Berland is a tourist country! At least, it can become such — the government of Berland is confident about this. There are n cities in Berland, some pairs of which are connected by two-ways roads. Each road connects two different cities. In Berland there are no roads which connect the same pair of cities. It is possible to get from any city to any other city using given two-ways roads. According to the reform each road will become one-way. It will be oriented to one of two directions. To maximize the tourist attraction of Berland, after the reform for each city i the value r i will be calculated. It will equal to the number of cities x for which there is an oriented path from the city i to the city x . In other words, r i will equal the number of cities which can be reached from the city i by roads. The government is sure that tourist's attention will be focused on the minimum value of r i . Help the government of Berland make the reform to maximize the minimum of r i . The first line contains two integers n , m ( 2 ≤ n ≤ 400 000, 1 ≤ m ≤ 400 000 ) — the number of cities and the number of roads. The next m lines describe roads in Berland: the j -th of them contains two integers u j and v j ( 1 ≤ u j , v j ≤ n , u j ≠ v j ), where u j and v j are the numbers of cities which are connected by the j -th road. The cities are numbered from 1 to n . It is guaranteed that it is possible to get from any city to any other by following two-ways roads. In Berland there are no roads which connect the same pair of cities. In the first line print single integer — the maximum possible value min 1 ≤ i ≤ n { r i } after the orientation of roads. The next m lines must contain the description of roads after the orientation: the j -th of them must contain two integers u j , v j , it means that the j -th road will be directed from the city u j to the city v j . Print roads in the same order as they are given in the input data. |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|
22218277 |
MintGreen |
F |
Nov. 15, 2016, 7:57 a.m. |
OK |
FPC |
TESTS |
89 |
1076 |
53657600 |
|
2400 |
|
40983235 |
ReaLNero1 |
F |
July 30, 2018, 6:46 p.m. |
OK |
GNU C++ |
TESTS |
89 |
343 |
46080000 |
|
2400 |
|
40058519 |
luogu_bot2 |
F |
July 7, 2018, 10:47 a.m. |
OK |
GNU C++ |
TESTS |
89 |
358 |
70860800 |
|
2400 |
|
40099416 |
luogu_bot5 |
F |
July 9, 2018, 3:25 a.m. |
OK |
GNU C++ |
TESTS |
89 |
390 |
99020800 |
|
2400 |
|
40114496 |
Acer.Mo |
F |
July 9, 2018, 1:47 p.m. |
OK |
GNU C++ |
TESTS |
89 |
405 |
35225600 |
|
2400 |
|
22215827 |
yjher |
F |
Nov. 15, 2016, 2:21 a.m. |
OK |
GNU C++ |
TESTS |
89 |
405 |
41267200 |
|
2400 |
|
37750527 |
aoweiyin |
F |
April 30, 2018, 2:37 p.m. |
OK |
GNU C++ |
TESTS |
89 |
420 |
38707200 |
|
2400 |
|
23838133 |
vjudge5 |
F |
Jan. 15, 2017, 1:31 p.m. |
OK |
GNU C++ |
TESTS |
89 |
436 |
46899200 |
|
2400 |
|
31853578 |
Scut82 |
F |
Oct. 29, 2017, 1:32 a.m. |
OK |
GNU C++ |
TESTS |
89 |
436 |
74137600 |
|
2400 |
|
28686602 |
zhengyang |
F |
July 19, 2017, 6:31 a.m. |
OK |
GNU C++ |
TESTS |
89 |
451 |
40550400 |
|
2400 |
|
40098853 |
jzzcjb |
F |
July 9, 2018, 2:49 a.m. |
OK |
GNU C++ |
TESTS |
89 |
451 |
40857600 |
|
2400 |
|
60948464 |
rainboy |
F |
Sept. 20, 2019, 8:10 p.m. |
OK |
GNU C11 |
TESTS |
89 |
1777 |
51200000 |
|
2400 |
|
64562265 |
0724zcs |
F |
Nov. 9, 2019, 6:27 a.m. |
OK |
GNU C++11 |
TESTS |
89 |
327 |
35225600 |
|
2400 |
|
60481454 |
luogu_bot4 |
F |
Sept. 13, 2019, 10:40 a.m. |
OK |
GNU C++11 |
TESTS |
89 |
342 |
98918400 |
|
2400 |
|
63159989 |
Ametsuji_tachiaki |
F |
Oct. 22, 2019, 3:33 p.m. |
OK |
GNU C++11 |
TESTS |
89 |
343 |
46489600 |
|
2400 |
|
44430125 |
luogu_bot4 |
F |
Oct. 17, 2018, 7:13 a.m. |
OK |
GNU C++11 |
TESTS |
89 |
343 |
58368000 |
|
2400 |
|
23200672 |
eriksa |
F |
Dec. 21, 2016, 1:46 p.m. |
OK |
GNU C++11 |
TESTS |
89 |
373 |
135065600 |
|
2400 |
|
44774525 |
Twilight_Sx |
F |
Oct. 24, 2018, 1:45 p.m. |
OK |
GNU C++11 |
TESTS |
89 |
374 |
43315200 |
|
2400 |
|
40099395 |
207M |
F |
July 9, 2018, 3:24 a.m. |
OK |
GNU C++11 |
TESTS |
89 |
389 |
98918400 |
|
2400 |
|
64555022 |
cavary_cl |
F |
Nov. 9, 2019, 3 a.m. |
OK |
GNU C++11 |
TESTS |
89 |
405 |
29388800 |
|
2400 |
|
40072727 |
Nishikino_Curtis |
F |
July 8, 2018, 1:09 a.m. |
OK |
GNU C++11 |
TESTS |
89 |
405 |
37068800 |
|
2400 |
|
40072743 |
Nishikino_Curtis |
F |
July 8, 2018, 1:10 a.m. |
OK |
GNU C++11 |
TESTS |
89 |
405 |
37068800 |
|
2400 |
|
56639698 |
Al.Cash |
F |
July 6, 2019, 11:48 p.m. |
OK |
GNU C++14 |
TESTS |
89 |
264 |
20480000 |
|
2400 |
|
46714205 |
vjudge5 |
F |
Dec. 7, 2018, 10:08 a.m. |
OK |
GNU C++14 |
TESTS |
89 |
452 |
37580800 |
|
2400 |
|
40694918 |
562225807 |
F |
July 24, 2018, 7:34 a.m. |
OK |
GNU C++14 |
TESTS |
89 |
467 |
51302400 |
|
2400 |
|
40694949 |
vjudge3 |
F |
July 24, 2018, 7:35 a.m. |
OK |
GNU C++14 |
TESTS |
89 |
467 |
51302400 |
|
2400 |
|
28598472 |
problem-solved |
F |
July 16, 2017, 2:39 p.m. |
OK |
GNU C++14 |
TESTS |
89 |
499 |
45977600 |
|
2400 |
|
44246887 |
vjudge2 |
F |
Oct. 13, 2018, 9:03 a.m. |
OK |
GNU C++14 |
TESTS |
89 |
499 |
86732800 |
|
2400 |
|
26048608 |
Pluto.syah |
F |
April 1, 2017, 9:32 a.m. |
OK |
GNU C++14 |
TESTS |
89 |
529 |
39116800 |
|
2400 |
|
28598500 |
problem-solved |
F |
July 16, 2017, 2:41 p.m. |
OK |
GNU C++14 |
TESTS |
89 |
530 |
45977600 |
|
2400 |
|
22218882 |
kudokidld_ |
F |
Nov. 15, 2016, 8:51 a.m. |
OK |
GNU C++14 |
TESTS |
89 |
545 |
38400000 |
|
2400 |
|
26048349 |
Pluto.syah |
F |
April 1, 2017, 9:21 a.m. |
OK |
GNU C++14 |
TESTS |
89 |
545 |
39116800 |
|
2400 |
|
56641493 |
Al.Cash |
F |
July 7, 2019, 2:13 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
140 |
11161600 |
|
2400 |
|
56641311 |
Al.Cash |
F |
July 7, 2019, 2:02 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
140 |
15872000 |
|
2400 |
|
56640772 |
Al.Cash |
F |
July 7, 2019, 1:26 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
140 |
25600000 |
|
2400 |
|
56640484 |
Al.Cash |
F |
July 7, 2019, 1:06 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
140 |
27238400 |
|
2400 |
|
56640650 |
Al.Cash |
F |
July 7, 2019, 1:18 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
155 |
25600000 |
|
2400 |
|
56640403 |
Al.Cash |
F |
July 7, 2019, 12:58 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
155 |
27238400 |
|
2400 |
|
56643504 |
Al.Cash |
F |
July 7, 2019, 4:25 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
156 |
11264000 |
|
2400 |
|
56640595 |
Al.Cash |
F |
July 7, 2019, 1:15 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
156 |
27238400 |
|
2400 |
|
56640751 |
Al.Cash |
F |
July 7, 2019, 1:25 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
170 |
25600000 |
|
2400 |
|
56643491 |
Al.Cash |
F |
July 7, 2019, 4:24 a.m. |
OK |
GNU C++17 |
TESTS |
89 |
171 |
11161600 |
|
2400 |
|
69274042 |
GiantTornado |
F |
Jan. 22, 2020, 12:08 a.m. |
OK |
Java 11 |
TESTS |
89 |
2386 |
264089600 |
|
2400 |
|
40504919 |
Jeel_Vaishnav |
F |
July 18, 2018, 7:56 a.m. |
OK |
Java 8 |
TESTS |
89 |
951 |
77004800 |
|
2400 |
|
60948463 |
Dukkha |
F |
Sept. 20, 2019, 8:10 p.m. |
OK |
Java 8 |
TESTS |
89 |
1309 |
65945600 |
|
2400 |
|
55807156 |
SpargelTarzan |
F |
June 19, 2019, 11:58 p.m. |
OK |
Java 8 |
TESTS |
89 |
1497 |
215040000 |
|
2400 |
|
54397316 |
nullptr2 |
F |
May 19, 2019, 9:28 p.m. |
OK |
Java 8 |
TESTS |
89 |
1575 |
182476800 |
|
2400 |
|
54357649 |
zhijunlicd |
F |
May 18, 2019, 6:32 p.m. |
OK |
Java 8 |
TESTS |
89 |
1794 |
197734400 |
|
2400 |
|
54357788 |
zhijunlicd |
F |
May 18, 2019, 6:36 p.m. |
OK |
Java 8 |
TESTS |
89 |
1871 |
197734400 |
|
2400 |
|
51596714 |
GiantTornado |
F |
March 20, 2019, 10:49 p.m. |
OK |
Java 8 |
TESTS |
89 |
2121 |
214835200 |
|
2400 |
|
22706592 |
alibaba |
F |
Dec. 5, 2016, 7:39 a.m. |
OK |
Java 8 |
TESTS |
89 |
2152 |
133734400 |
|
2400 |
|
27437924 |
abear888 |
F |
May 30, 2017, 1:11 a.m. |
OK |
Java 8 |
TESTS |
89 |
2776 |
268390400 |
|
2400 |
|
31219519 |
jetblack20 |
F |
Oct. 11, 2017, 2:45 p.m. |
OK |
Java 8 |
TESTS |
89 |
3259 |
100966400 |
|
2400 |
|
66500406 |
vjudge2 |
F |
Dec. 8, 2019, 12:18 p.m. |
OK |
MS C++ |
TESTS |
89 |
545 |
43212800 |
|
2400 |
|
66318102 |
vjudge2 |
F |
Dec. 5, 2019, 1:33 p.m. |
OK |
MS C++ |
TESTS |
89 |
592 |
50380800 |
|
2400 |
|
66493072 |
vjudge2 |
F |
Dec. 8, 2019, 9:19 a.m. |
OK |
MS C++ |
TESTS |
89 |
638 |
48332800 |
|
2400 |
|
27053725 |
Coder_404 |
F |
May 12, 2017, 12:15 p.m. |
OK |
MS C++ |
TESTS |
89 |
1169 |
113561600 |
|
2400 |
|
26688546 |
picture123 |
F |
April 26, 2017, 4:58 p.m. |
OK |
MS C++ |
TESTS |
89 |
1684 |
70860800 |
|
2400 |
|
66401993 |
vjudge3 |
F |
Dec. 6, 2019, 12:34 p.m. |
OK |
MS C++ 2017 |
TESTS |
89 |
561 |
30412800 |
|
2400 |
remove filters
Back to search problems