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 |
60
|
Codeforces Beta Round 56 |
FINISHED |
False |
7200 |
439048763 |
Feb. 19, 2011, 4 p.m. |
Problems
B'Pasha and Akim were making a forest map -- the lawns were the graph 's vertexes and the roads joining the lawns were its edges. They decided to encode the number of laughy mushrooms on every lawn in the following way: on every edge between two lawns they wrote two numbers, the greatest common divisor (GCD) and the least common multiple (LCM) of the number of mushrooms on these lawns. But one day Pasha and Akim had an argument about the laughy mushrooms and tore the map. Pasha was left with just some part of it, containing only m roads. Your task is to help Pasha -- use the map he has to restore the number of mushrooms on every lawn. As the result is not necessarily unique, help Pasha to restore any one or report that such arrangement of mushrooms does not exist. It is guaranteed that the numbers on the roads on the initial map were no less that 1 and did not exceed 106. The first line contains two numbers n and m () which are the numbers of lawns and roads we know about. Each of the following m lines contains four numbers which are the numbers of lawns the road connects, the GCD and the LCM of the numbers of mushrooms on these lawns (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89GCD, xe2 x80 x89LCM xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89106). It is guaranteed, that no road connects lawn to itself, and no two lawns are connected by more than one road. The answer should contain "YES" or "NO" on the first line, saying whether it is possible or not to perform the arrangement. If the answer is "YES", print on the following line n numbers which are the numbers of mushrooms on the corresponding lawns.'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
3267186 |
AleksanderBalobanov |
C |
March 8, 2013, 7:07 p.m. |
OK |
Delphi |
TESTS |
39 |
15 |
4300800 |
|
2100 |
291673 |
alexej |
C |
Feb. 19, 2011, 7:58 p.m. |
OK |
Delphi |
TESTS |
39 |
30 |
2252800 |
|
2100 |
291432 |
tourist |
C |
Feb. 19, 2011, 6:57 p.m. |
OK |
Delphi |
TESTS |
39 |
30 |
4915200 |
|
2100 |
292741 |
watson |
C |
Feb. 20, 2011, 2:57 p.m. |
OK |
Delphi |
TESTS |
39 |
30 |
23961600 |
|
2100 |
290630 |
Sender |
C |
Feb. 19, 2011, 5:35 p.m. |
OK |
Delphi |
TESTS |
39 |
360 |
1126400 |
|
2100 |
289975 |
sankear |
C |
Feb. 19, 2011, 5 p.m. |
OK |
Delphi |
TESTS |
39 |
360 |
3174400 |
|
2100 |
3130344 |
GOP_NICK |
C |
Feb. 14, 2013, 7:36 p.m. |
OK |
FPC |
TESTS |
39 |
15 |
204800 |
|
2100 |
3148163 |
7Midav7 |
C |
Feb. 19, 2013, 7:18 p.m. |
OK |
FPC |
TESTS |
39 |
15 |
614400 |
|
2100 |
476884 |
vlad107 |
C |
June 7, 2011, 8:23 a.m. |
OK |
FPC |
TESTS |
39 |
30 |
2048000 |
|
2100 |
330405 |
CherryTree |
C |
March 10, 2011, 7:43 p.m. |
OK |
FPC |
TESTS |
39 |
30 |
5529600 |
|
2100 |
1176375 |
Furko |
C |
Feb. 13, 2012, 9:55 p.m. |
OK |
FPC |
TESTS |
39 |
30 |
7475200 |
|
2100 |
912463 |
LifeKeeper |
C |
Dec. 1, 2011, 8:04 a.m. |
OK |
FPC |
TESTS |
39 |
30 |
7782400 |
|
2100 |
291002 |
MihailTyomkin |
C |
Feb. 19, 2011, 5:54 p.m. |
OK |
FPC |
TESTS |
39 |
60 |
2867200 |
|
2100 |
40993104 |
ReaLNero1 |
C |
July 31, 2018, 1:46 a.m. |
OK |
FPC |
TESTS |
39 |
62 |
204800 |
|
2100 |
910595 |
sgtrouge |
C |
Nov. 29, 2011, 3:58 p.m. |
OK |
FPC |
TESTS |
39 |
80 |
1843200 |
|
2100 |
497932 |
Sereja |
C |
June 19, 2011, 1:55 p.m. |
OK |
FPC |
TESTS |
39 |
160 |
3788800 |
|
2100 |
694200 |
zpl1 |
C |
Sept. 14, 2011, 11:54 a.m. |
OK |
GNU C |
TESTS |
39 |
30 |
1536000 |
|
2100 |
290043 |
LayCurse |
C |
Feb. 19, 2011, 5:03 p.m. |
OK |
GNU C |
TESTS |
39 |
60 |
9728000 |
|
2100 |
290708 |
stubbscroll |
C |
Feb. 19, 2011, 5:40 p.m. |
OK |
GNU C |
TESTS |
39 |
130 |
1433600 |
|
2100 |
3365085 |
vjudge5 |
C |
March 21, 2013, 12:30 p.m. |
OK |
GNU C++ |
TESTS |
39 |
15 |
102400 |
|
2100 |
3365020 |
lirh8121099 |
C |
March 21, 2013, 12:21 p.m. |
OK |
GNU C++ |
TESTS |
39 |
15 |
102400 |
|
2100 |
3658408 |
Choojae |
C |
May 1, 2013, 4:01 p.m. |
OK |
GNU C++ |
TESTS |
39 |
15 |
204800 |
|
2100 |
3316727 |
zeonsgtr |
C |
March 14, 2013, 1:55 p.m. |
OK |
GNU C++ |
TESTS |
39 |
15 |
409600 |
|
2100 |
2866300 |
Fcdkbear |
C |
Jan. 2, 2013, 12:14 p.m. |
OK |
GNU C++ |
TESTS |
39 |
15 |
409600 |
|
2100 |
3364952 |
vjudge5 |
C |
March 21, 2013, 12:11 p.m. |
OK |
GNU C++ |
TESTS |
39 |
15 |
1536000 |
|
2100 |
15143751 |
HappyNewYearMike |
C |
Dec. 31, 2015, 11:43 p.m. |
OK |
GNU C++ |
TESTS |
39 |
30 |
204800 |
|
2100 |
7658646 |
wjh720 |
C |
Sept. 1, 2014, 6:10 a.m. |
OK |
GNU C++ |
TESTS |
39 |
30 |
204800 |
|
2100 |
5691719 |
GalinhaPintadinha |
C |
Jan. 14, 2014, 4:53 p.m. |
OK |
GNU C++ |
TESTS |
39 |
30 |
204800 |
|
2100 |
20324424 |
hohomu |
C |
Sept. 1, 2016, 2:40 p.m. |
OK |
GNU C++ |
TESTS |
39 |
30 |
307200 |
|
2100 |
3251559 |
stan |
C |
March 4, 2013, 11:05 p.m. |
OK |
GNU C++0x |
TESTS |
39 |
15 |
512000 |
|
2100 |
7368054 |
a654889339 |
C |
Aug. 7, 2014, 3:07 p.m. |
OK |
GNU C++0x |
TESTS |
39 |
30 |
409600 |
|
2100 |
668739 |
Archon.JK |
C |
Sept. 5, 2011, 7:07 a.m. |
OK |
GNU C++0x |
TESTS |
39 |
60 |
1740800 |
|
2100 |
7193014 |
ItsLastDay |
C |
July 21, 2014, 9:41 a.m. |
OK |
GNU C++0x |
TESTS |
39 |
62 |
307200 |
|
2100 |
8804842 |
MinakoKojima |
C |
Nov. 22, 2014, 5:01 p.m. |
OK |
GNU C++0x |
TESTS |
39 |
62 |
614400 |
|
2100 |
9443435 |
peterpan |
C |
Jan. 16, 2015, 12:53 p.m. |
OK |
GNU C++0x |
TESTS |
39 |
62 |
3276800 |
|
2100 |
15756317 |
tenshi_kanade |
C |
Feb. 2, 2016, 6:37 p.m. |
OK |
GNU C++11 |
TESTS |
39 |
30 |
204800 |
|
2100 |
16011118 |
Jori |
C |
Feb. 14, 2016, 1:06 a.m. |
OK |
GNU C++11 |
TESTS |
39 |
30 |
307200 |
|
2100 |
15982433 |
snowflake |
C |
Feb. 13, 2016, 6:30 a.m. |
OK |
GNU C++11 |
TESTS |
39 |
30 |
307200 |
|
2100 |
15982120 |
snowflake |
C |
Feb. 13, 2016, 5:57 a.m. |
OK |
GNU C++11 |
TESTS |
39 |
30 |
307200 |
|
2100 |
15983693 |
snowflake |
C |
Feb. 13, 2016, 8:13 a.m. |
OK |
GNU C++11 |
TESTS |
39 |
30 |
512000 |
|
2100 |
33633362 |
Ownography |
C |
Dec. 25, 2017, 10:16 p.m. |
OK |
GNU C++11 |
TESTS |
39 |
30 |
2355200 |
|
2100 |
17083596 |
freebsdx |
C |
April 1, 2016, 1:55 a.m. |
OK |
GNU C++11 |
TESTS |
39 |
30 |
2355200 |
|
2100 |
18067926 |
YakutovDmitriy |
C |
May 25, 2016, 8:24 a.m. |
OK |
GNU C++11 |
TESTS |
39 |
30 |
2560000 |
|
2100 |
18908515 |
zadrga |
C |
July 5, 2016, 11:26 p.m. |
OK |
GNU C++11 |
TESTS |
39 |
62 |
102400 |
|
2100 |
38446862 |
ruo |
C |
May 20, 2018, 4:16 a.m. |
OK |
GNU C++11 |
TESTS |
39 |
62 |
204800 |
|
2100 |
58195402 |
vjudge3 |
C |
Aug. 2, 2019, 11:23 p.m. |
OK |
GNU C++14 |
TESTS |
39 |
30 |
409600 |
|
2100 |
30294791 |
Mustafa. |
C |
Sept. 12, 2017, 8:05 p.m. |
OK |
GNU C++14 |
TESTS |
39 |
30 |
409600 |
|
2100 |
27723307 |
Minology |
C |
June 11, 2017, 3:27 p.m. |
OK |
GNU C++14 |
TESTS |
39 |
30 |
512000 |
|
2100 |
21602121 |
2016 |
C |
Oct. 19, 2016, 6:54 p.m. |
OK |
GNU C++14 |
TESTS |
39 |
30 |
2252800 |
|
2100 |
26641827 |
Kerim.K |
C |
April 24, 2017, 1:35 p.m. |
OK |
GNU C++14 |
TESTS |
39 |
30 |
2662400 |
|
2100 |
26303270 |
wucebrayne |
C |
April 11, 2017, 4:08 p.m. |
OK |
GNU C++14 |
TESTS |
39 |
30 |
2764800 |
|
2100 |
58183061 |
cycleke |
C |
Aug. 2, 2019, 3:59 p.m. |
OK |
GNU C++14 |
TESTS |
39 |
60 |
409600 |
|
2100 |
65395267 |
Simon7426 |
C |
Nov. 19, 2019, 6:50 p.m. |
OK |
GNU C++14 |
TESTS |
39 |
62 |
409600 |
|
2100 |
65390564 |
Ada.Grad.Shil |
C |
Nov. 19, 2019, 5:27 p.m. |
OK |
GNU C++14 |
TESTS |
39 |
62 |
409600 |
|
2100 |
58197006 |
wec134297 |
C |
Aug. 3, 2019, 1:24 a.m. |
OK |
GNU C++14 |
TESTS |
39 |
62 |
409600 |
|
2100 |
52559845 |
HIT_Attacker |
C |
April 10, 2019, 9:44 a.m. |
OK |
GNU C++17 |
TESTS |
39 |
60 |
102400 |
|
2100 |
52222511 |
tnakao |
C |
April 2, 2019, 7:26 a.m. |
OK |
GNU C++17 |
TESTS |
39 |
62 |
409600 |
|
2100 |
67384901 |
Phortox |
C |
Dec. 21, 2019, 5:29 p.m. |
OK |
GNU C++17 |
TESTS |
39 |
62 |
716800 |
|
2100 |
68256265 |
kenimo |
C |
Jan. 5, 2020, 2:36 p.m. |
OK |
GNU C++17 |
TESTS |
39 |
998 |
54476800 |
|
2100 |
292451 |
Di735 |
C |
Feb. 20, 2011, 10:40 a.m. |
OK |
Java 6 |
TESTS |
39 |
80 |
43315200 |
|
2100 |
291119 |
niyaznigmatul |
C |
Feb. 19, 2011, 5:58 p.m. |
OK |
Java 6 |
TESTS |
39 |
90 |
43622400 |
|
2100 |
528517 |
S.Yesipenko |
C |
July 5, 2011, 5:34 a.m. |
OK |
Java 6 |
TESTS |
39 |
110 |
43212800 |
|
2100 |
293595 |
Akatsuki |
C |
Feb. 21, 2011, 3:11 p.m. |
OK |
Java 6 |
TESTS |
39 |
110 |
43315200 |
|
2100 |
292409 |
Di735 |
C |
Feb. 20, 2011, 9:52 a.m. |
OK |
Java 6 |
TESTS |
39 |
110 |
43315200 |
|
2100 |
291531 |
Hadi_Asiaie |
C |
Feb. 19, 2011, 7:15 p.m. |
OK |
Java 6 |
TESTS |
39 |
110 |
43315200 |
|
2100 |
291472 |
cerealguy |
C |
Feb. 19, 2011, 7:03 p.m. |
OK |
Java 6 |
TESTS |
39 |
110 |
43315200 |
|
2100 |
291283 |
Egor |
C |
Feb. 19, 2011, 6:43 p.m. |
OK |
Java 6 |
TESTS |
39 |
110 |
43315200 |
|
2100 |
290458 |
OgieKako |
C |
Feb. 19, 2011, 5:26 p.m. |
OK |
Java 6 |
TESTS |
39 |
110 |
43315200 |
|
2100 |
289788 |
winger |
C |
Feb. 19, 2011, 4:51 p.m. |
OK |
Java 6 |
TESTS |
39 |
110 |
43520000 |
|
2100 |
3718801 |
ftiasch |
C |
May 14, 2013, 4:01 a.m. |
OK |
Java 7 |
TESTS |
39 |
140 |
409600 |
|
2100 |
7279700 |
alibaba |
C |
July 28, 2014, 5:08 p.m. |
OK |
Java 7 |
TESTS |
39 |
154 |
204800 |
|
2100 |
7722376 |
Zyflair |
C |
Sept. 8, 2014, 3:17 p.m. |
OK |
Java 7 |
TESTS |
39 |
156 |
0 |
|
2100 |
5656500 |
Ahed-Alrashaida |
C |
Jan. 10, 2014, 5:59 p.m. |
OK |
Java 7 |
TESTS |
39 |
156 |
204800 |
|
2100 |
12880649 |
hama-du |
C |
Sept. 7, 2015, 6:45 a.m. |
OK |
Java 8 |
TESTS |
39 |
248 |
0 |
|
2100 |
57948431 |
WashRoom |
C |
July 29, 2019, 3:20 p.m. |
OK |
Java 8 |
TESTS |
39 |
342 |
0 |
|
2100 |
23390759 |
kws4679 |
C |
Dec. 29, 2016, 5:33 a.m. |
OK |
Java 8 |
TESTS |
39 |
374 |
20992000 |
|
2100 |
292499 |
tanzaku |
C |
Feb. 20, 2011, 11:17 a.m. |
OK |
Mono C# |
TESTS |
39 |
140 |
6041600 |
|
2100 |
5031238 |
Silent_coder |
C |
Nov. 8, 2013, 5:01 p.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
614400 |
|
2100 |
307867 |
Sigmar |
C |
Feb. 26, 2011, 10:24 a.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
1433600 |
|
2100 |
291988 |
NRCover |
C |
Feb. 20, 2011, 2:12 a.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
1536000 |
|
2100 |
293324 |
Cyin |
C |
Feb. 21, 2011, 9:39 a.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
1536000 |
|
2100 |
291381 |
_sunny |
C |
Feb. 19, 2011, 6:51 p.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
1536000 |
|
2100 |
291369 |
_sunny |
C |
Feb. 19, 2011, 6:49 p.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
1536000 |
|
2100 |
291365 |
balakrishnan |
C |
Feb. 19, 2011, 6:49 p.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
1536000 |
|
2100 |
289753 |
rem |
C |
Feb. 19, 2011, 4:49 p.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
1638400 |
|
2100 |
289417 |
cmd |
C |
Feb. 19, 2011, 4:36 p.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
1638400 |
|
2100 |
290089 |
Shef |
C |
Feb. 19, 2011, 5:05 p.m. |
OK |
MS C++ |
TESTS |
39 |
30 |
1638400 |
|
2100 |
292768 |
kyo_key |
C |
Feb. 20, 2011, 3:18 p.m. |
OK |
Python 2 |
TESTS |
39 |
90 |
3174400 |
|
2100 |
291391 |
-dp- |
C |
Feb. 19, 2011, 6:52 p.m. |
OK |
Python 2 |
TESTS |
39 |
200 |
7987200 |
|
2100 |
291660 |
yowa |
C |
Feb. 19, 2011, 7:52 p.m. |
OK |
Ruby |
TESTS |
39 |
220 |
4812800 |
|
2100 |
remove filters
Back to search problems