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 |
891
|
Codeforces Round 446 (Div. 1) |
FINISHED |
False |
7200 |
226596323 |
Nov. 17, 2017, 2:35 p.m. |
Problems
B"Sloth is bad, mkay? So we decided to prepare a problem to punish lazy guys. You are given a tree, you should count the number of ways to remove an edge from it and then add an edge to it such that the final graph is a tree and has a perfect matching. Two ways of this operation are considered different if their removed edges or their added edges aren't the same. The removed edge and the added edge can be equal. A perfect matching is a subset of edges such that each vertex is an endpoint of exactly one of these edges. The first line contains n (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x895 xc2 xb7105) -- the number of vertices. Each of the next n xe2 x80 x89- xe2 x80 x891 lines contains two integers a and b (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a, xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n) -- the endpoints of one edge. It's guaranteed that the graph is a tree. Output a single integer -- the answer to the problem. In first sample, there are 8 ways: "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
33148413 |
VPigeonKing |
D |
Dec. 12, 2017, 8:16 a.m. |
OK |
GNU C++ |
TESTS |
76 |
249 |
88576000 |
|
3000 |
36304215 |
alan_cty |
D |
March 15, 2018, 2:17 p.m. |
OK |
GNU C++ |
TESTS |
76 |
280 |
183398400 |
|
3000 |
40979142 |
ReaLNero1 |
D |
July 30, 2018, 4:57 p.m. |
OK |
GNU C++ |
TESTS |
76 |
296 |
86528000 |
|
3000 |
32563876 |
MemS |
D |
Nov. 23, 2017, 12:18 a.m. |
OK |
GNU C++ |
TESTS |
76 |
420 |
114483200 |
|
3000 |
39257622 |
robinliu |
D |
June 15, 2018, 5:07 a.m. |
OK |
GNU C++ |
TESTS |
76 |
421 |
143052800 |
|
3000 |
33022604 |
ytc020306 |
D |
Dec. 8, 2017, 12:44 p.m. |
OK |
GNU C++ |
TESTS |
76 |
467 |
158310400 |
|
3000 |
34622316 |
SanSiroWaltz |
D |
Jan. 28, 2018, 3:18 a.m. |
OK |
GNU C++ |
TESTS |
76 |
499 |
60006400 |
|
3000 |
32565624 |
vjudge2 |
D |
Nov. 23, 2017, 3:45 a.m. |
OK |
GNU C++ |
TESTS |
76 |
560 |
197222400 |
|
3000 |
32571694 |
vjudge1 |
D |
Nov. 23, 2017, 10:10 a.m. |
OK |
GNU C++ |
TESTS |
76 |
592 |
197222400 |
|
3000 |
32545781 |
vjudge1 |
D |
Nov. 22, 2017, 9:31 a.m. |
OK |
GNU C++ |
TESTS |
76 |
592 |
232960000 |
|
3000 |
33243766 |
jslijin |
D |
Dec. 14, 2017, 3:13 p.m. |
OK |
GNU C++11 |
TESTS |
76 |
358 |
65638400 |
|
3000 |
34532691 |
kingsnow |
D |
Jan. 25, 2018, 1:19 a.m. |
OK |
GNU C++11 |
TESTS |
76 |
374 |
107622400 |
|
3000 |
33228134 |
snowflake |
D |
Dec. 14, 2017, 2:01 a.m. |
OK |
GNU C++11 |
TESTS |
76 |
389 |
209100800 |
|
3000 |
57872502 |
lopare |
D |
July 28, 2019, 2:53 a.m. |
OK |
GNU C++11 |
TESTS |
76 |
390 |
151040000 |
|
3000 |
57768605 |
py_ultron |
D |
July 25, 2019, 10:29 p.m. |
OK |
GNU C++11 |
TESTS |
76 |
436 |
151040000 |
|
3000 |
32447402 |
matthew99 |
D |
Nov. 19, 2017, 4:48 a.m. |
OK |
GNU C++11 |
TESTS |
76 |
452 |
57651200 |
|
3000 |
33750155 |
zhouyuyang |
D |
Dec. 29, 2017, 4:19 a.m. |
OK |
GNU C++11 |
TESTS |
76 |
452 |
257945600 |
|
3000 |
33705889 |
FoolMike |
D |
Dec. 28, 2017, 9:46 a.m. |
OK |
GNU C++11 |
TESTS |
76 |
499 |
81612800 |
|
3000 |
32513172 |
laofudasuan |
D |
Nov. 20, 2017, 11:48 p.m. |
OK |
GNU C++11 |
TESTS |
76 |
499 |
229478400 |
|
3000 |
33264524 |
Durant_Lee |
D |
Dec. 15, 2017, 12:56 p.m. |
OK |
GNU C++11 |
TESTS |
76 |
545 |
199270400 |
|
3000 |
33918404 |
_SHENZHEBEI_ |
D |
Jan. 5, 2018, 8:59 a.m. |
OK |
GNU C++14 |
TESTS |
76 |
374 |
262144000 |
|
3000 |
60419205 |
melancholic_fat_otaku |
D |
Sept. 12, 2019, 4:49 a.m. |
OK |
GNU C++14 |
TESTS |
76 |
436 |
144486400 |
|
3000 |
32977114 |
FizzyDavid |
D |
Dec. 6, 2017, 1:30 p.m. |
OK |
GNU C++14 |
TESTS |
76 |
451 |
108646400 |
|
3000 |
34082900 |
tri |
D |
Jan. 11, 2018, 7:22 a.m. |
OK |
GNU C++14 |
TESTS |
76 |
452 |
179916800 |
|
3000 |
33024319 |
Georgia_001 |
D |
Dec. 8, 2017, 1:57 p.m. |
OK |
GNU C++14 |
TESTS |
76 |
514 |
152883200 |
|
3000 |
33100980 |
Misaka-Mikoto |
D |
Dec. 11, 2017, noon |
OK |
GNU C++14 |
TESTS |
76 |
545 |
146841600 |
|
3000 |
32544342 |
yfzcsc |
D |
Nov. 22, 2017, 8:28 a.m. |
OK |
GNU C++14 |
TESTS |
76 |
545 |
151040000 |
|
3000 |
44036693 |
dujvet |
D |
Oct. 9, 2018, 1:09 p.m. |
OK |
GNU C++14 |
TESTS |
76 |
561 |
206643200 |
|
3000 |
32407152 |
AndreiNet |
D |
Nov. 17, 2017, 6:11 p.m. |
OK |
GNU C++14 |
TESTS |
76 |
577 |
83660800 |
|
3000 |
32483292 |
vjudge4 |
D |
Nov. 19, 2017, 8:15 p.m. |
OK |
GNU C++14 |
TESTS |
76 |
655 |
79155200 |
|
3000 |
48272284 |
zhangqingqi |
D |
Jan. 12, 2019, 3:15 a.m. |
OK |
GNU C++17 |
TESTS |
76 |
420 |
142848000 |
|
3000 |
58470284 |
superguyjm |
D |
Aug. 8, 2019, 11:16 p.m. |
OK |
GNU C++17 |
TESTS |
76 |
545 |
127078400 |
|
3000 |
47875205 |
Benq |
D |
Jan. 3, 2019, 2:59 p.m. |
OK |
GNU C++17 |
TESTS |
76 |
639 |
83558400 |
|
3000 |
51126395 |
iamgood1 |
D |
March 10, 2019, 11:49 a.m. |
OK |
GNU C++17 |
TESTS |
76 |
826 |
261222400 |
|
3000 |
remove filters
Back to search problems