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"One particularly well-known fact about zombies is that they move and think terribly slowly. While we still don't know why their movements are so sluggish, the problem of laggy thinking has been recently resolved. It turns out that the reason is not (as previously suspected) any kind of brain defect xe2 x80 x93 it's the opposite! Independent researchers confirmed that the nervous system of a zombie is highly complicated xe2 x80 x93 it consists of n brains (much like a cow has several stomachs). They are interconnected by brain connectors, which are veins capable of transmitting thoughts between brains. There are two important properties such a brain network should have to function properly: If both properties are satisfied, we say that the nervous system is valid. Unfortunately (?), if the system is not valid, the zombie stops thinking and becomes (even more) dead. Your task is to analyze a given nervous system of a zombie and find out whether it is valid. The first line of the input contains two space-separated integers n and m (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, xe2 x80 x89m xe2 x80 x89 xe2 x89 xa4 xe2 x80 x891000) denoting the number of brains (which are conveniently numbered from 1 to n) and the number of brain connectors in the nervous system, respectively. In the next m lines, descriptions of brain connectors follow. Every connector is given as a pair of brains a xe2 x80 x82b it connects (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89a, xe2 x80 x89b xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n, a xe2 x80 x89 xe2 x89 xa0 xe2 x80 x89b). The output consists of one line, containing either yes or no depending on whether the nervous system is valid. "... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
19031556 |
ruban |
C1 |
July 11, 2016, 1:48 p.m. |
OK |
Delphi |
TESTS |
18 |
31 |
176742400 |
|
1400 |
19000317 |
lkmcfj mostcleverboy |
C1 |
July 10, 2016, 8:37 a.m. |
OK |
FPC |
TESTS |
18 |
15 |
0 |
|
1400 |
19001181 |
Coward |
C1 |
July 10, 2016, 8:51 a.m. |
OK |
FPC |
TESTS |
18 |
15 |
0 |
|
1400 |
26963426 |
VladProg |
C1 |
May 8, 2017, 7:35 p.m. |
OK |
FPC |
TESTS |
18 |
15 |
0 |
|
1400 |
46953352 |
AlifSaddid |
C1 |
Dec. 12, 2018, 11:36 p.m. |
OK |
FPC |
TESTS |
18 |
15 |
409600 |
|
1400 |
19002613 |
programmer228 Wind_Eagle |
C1 |
July 10, 2016, 9:19 a.m. |
OK |
FPC |
TESTS |
18 |
15 |
4915200 |
|
1400 |
19000510 |
ice_tea |
C1 |
July 10, 2016, 8:40 a.m. |
OK |
FPC |
TESTS |
18 |
30 |
1024000 |
|
1400 |
18999036 |
Yurij_Bugaychuck BagInCode Ekaterina_Saenko |
C1 |
July 10, 2016, 8:20 a.m. |
OK |
FPC |
TESTS |
18 |
30 |
3993600 |
|
1400 |
19003663 |
0lkeh |
C1 |
July 10, 2016, 9:45 a.m. |
OK |
FPC |
TESTS |
18 |
31 |
0 |
|
1400 |
18999819 |
llgyc ceerRep aspi |
C1 |
July 10, 2016, 8:30 a.m. |
OK |
FPC |
TESTS |
18 |
31 |
0 |
|
1400 |
19033275 |
k2nt |
C1 |
July 11, 2016, 3:35 p.m. |
OK |
FPC |
TESTS |
18 |
31 |
0 |
|
1400 |
19028629 |
double301 |
C1 |
July 11, 2016, 11:22 a.m. |
OK |
GNU C |
TESTS |
18 |
15 |
204800 |
|
1400 |
19046300 |
srijansingh |
C1 |
July 12, 2016, 8:34 a.m. |
OK |
GNU C |
TESTS |
18 |
15 |
1024000 |
|
1400 |
19003068 |
codemart786 |
C1 |
July 10, 2016, 9:30 a.m. |
OK |
GNU C |
TESTS |
18 |
15 |
3993600 |
|
1400 |
19002678 |
F_cff |
C1 |
July 10, 2016, 9:21 a.m. |
OK |
GNU C |
TESTS |
18 |
15 |
4096000 |
|
1400 |
19002057 |
sgtlaugh |
C1 |
July 10, 2016, 9:08 a.m. |
OK |
GNU C |
TESTS |
18 |
15 |
4096000 |
|
1400 |
19002677 |
Zhaoyz shiyilang Cookier |
C1 |
July 10, 2016, 9:21 a.m. |
OK |
GNU C |
TESTS |
18 |
15 |
4198400 |
|
1400 |
19004775 |
gautam12 |
C1 |
July 10, 2016, 10:16 a.m. |
OK |
GNU C |
TESTS |
18 |
31 |
4096000 |
|
1400 |
22341225 |
Mezbaur |
C1 |
Nov. 20, 2016, 6 a.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
41410332 |
vjudge5 |
C1 |
Aug. 9, 2018, 7:41 p.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
27421948 |
vjudge1 |
C1 |
May 29, 2017, 2:05 a.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
27414477 |
sohelpust |
C1 |
May 28, 2017, 2:05 p.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
27400414 |
vjudge4 |
C1 |
May 28, 2017, 4:07 a.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
27400378 |
vjudge4 |
C1 |
May 28, 2017, 4:04 a.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
27399701 |
vjudge4 |
C1 |
May 28, 2017, 3 a.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
27399554 |
abcdef6199 |
C1 |
May 28, 2017, 2:47 a.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
27399038 |
vjudge4 |
C1 |
May 28, 2017, 1:52 a.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
22701683 |
Xolas |
C1 |
Dec. 4, 2016, 6:48 p.m. |
OK |
GNU C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
56863495 |
NetravatPendsey |
C1 |
July 12, 2019, 1:26 a.m. |
OK |
GNU C11 |
TESTS |
18 |
31 |
102400 |
|
1400 |
27365664 |
Noam527 |
C1 |
May 27, 2017, 1:27 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
22607817 |
ITDOI tundra |
C1 |
Nov. 29, 2016, 6:05 p.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
22490192 |
ngochai94 |
C1 |
Nov. 25, 2016, 1:50 p.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
20392343 |
20140355 |
C1 |
Sept. 5, 2016, 2:59 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
20351501 |
whipppedcream |
C1 |
Sept. 3, 2016, 2:38 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
20268778 |
aias |
C1 |
Aug. 30, 2016, 3:07 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
19600275 |
Ferathorn |
C1 |
Aug. 3, 2016, 2:58 p.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
40984173 |
ReaLNero1 |
C1 |
July 30, 2018, 7:13 p.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
19450498 |
_zhou_gao |
C1 |
July 27, 2016, 11 p.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
19594250 |
Mindstorm |
C1 |
Aug. 3, 2016, 8:49 a.m. |
OK |
GNU C++11 |
TESTS |
18 |
15 |
0 |
|
1400 |
27421944 |
fadedsun |
C1 |
May 29, 2017, 2:05 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
0 |
|
1400 |
27400093 |
_HossamYehia_ |
C1 |
May 28, 2017, 3:35 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
0 |
|
1400 |
22944837 |
Al2K |
C1 |
Dec. 14, 2016, 9 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
0 |
|
1400 |
22615805 |
xiaowuc1 |
C1 |
Nov. 30, 2016, 7:14 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
0 |
|
1400 |
29541362 |
tossy |
C1 |
Aug. 18, 2017, 1:42 a.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
0 |
|
1400 |
29645822 |
chien.than |
C1 |
Aug. 21, 2017, 2:28 p.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
102400 |
|
1400 |
57607791 |
vjudge2 |
C1 |
July 23, 2019, 6:49 p.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
204800 |
|
1400 |
54812590 |
jain.vivektkg |
C1 |
May 29, 2019, 5:45 p.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
204800 |
|
1400 |
46007287 |
melissimo |
C1 |
Nov. 20, 2018, 5:44 p.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
204800 |
|
1400 |
40896013 |
Ziben |
C1 |
July 28, 2018, 7:51 p.m. |
OK |
GNU C++14 |
TESTS |
18 |
15 |
204800 |
|
1400 |
41568099 |
Laboon |
C1 |
Aug. 13, 2018, 6:53 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
102400 |
|
1400 |
51902295 |
p.ackermann |
C1 |
March 27, 2019, 1:57 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
204800 |
|
1400 |
51460957 |
Umm |
C1 |
March 18, 2019, 7:41 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
204800 |
|
1400 |
39235647 |
z_karaulashvili |
C1 |
June 14, 2018, 8:17 a.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
204800 |
|
1400 |
56519264 |
naimul_haque |
C1 |
July 4, 2019, 2:12 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
204800 |
|
1400 |
67611628 |
vijyant27 |
C1 |
Dec. 25, 2019, 3:36 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
204800 |
|
1400 |
57608666 |
vjudge2 |
C1 |
July 23, 2019, 7:18 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
204800 |
|
1400 |
68938117 |
ivan100sic |
C1 |
Jan. 16, 2020, 1:32 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
204800 |
|
1400 |
57610221 |
vjudge4 |
C1 |
July 23, 2019, 8:16 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
819200 |
|
1400 |
38813306 |
Lvitsa |
C1 |
May 31, 2018, 8:30 p.m. |
OK |
GNU C++17 |
TESTS |
18 |
15 |
3379200 |
|
1400 |
19001739 |
robostac |
C1 |
July 10, 2016, 9:01 a.m. |
OK |
Go |
TESTS |
18 |
15 |
307200 |
|
1400 |
19730414 |
stejaax |
C1 |
Aug. 8, 2016, 2:21 p.m. |
OK |
Haskell |
TESTS |
18 |
31 |
53248000 |
|
1400 |
19094470 |
alibaba |
C1 |
July 13, 2016, 6:51 p.m. |
OK |
Java 7 |
TESTS |
18 |
108 |
0 |
|
1400 |
19058842 |
MazzForces |
C1 |
July 12, 2016, 10:08 p.m. |
OK |
Java 7 |
TESTS |
18 |
108 |
0 |
|
1400 |
19005642 |
shubhch32 |
C1 |
July 10, 2016, 10:41 a.m. |
OK |
Java 7 |
TESTS |
18 |
124 |
0 |
|
1400 |
19001915 |
Stole95 Dekacc |
C1 |
July 10, 2016, 9:05 a.m. |
OK |
Java 7 |
TESTS |
18 |
155 |
0 |
|
1400 |
20262311 |
Dimaspool |
C1 |
Aug. 29, 2016, 6:48 p.m. |
OK |
Java 8 |
TESTS |
18 |
109 |
0 |
|
1400 |
53949386 |
vaibhavpulastya |
C1 |
May 10, 2019, 8:40 a.m. |
OK |
Java 8 |
TESTS |
18 |
109 |
0 |
|
1400 |
22687056 |
TurtleShip |
C1 |
Dec. 4, 2016, 1:26 a.m. |
OK |
Java 8 |
TESTS |
18 |
109 |
0 |
|
1400 |
19001976 |
eatmore |
C1 |
July 10, 2016, 9:06 a.m. |
OK |
Java 8 |
TESTS |
18 |
109 |
0 |
|
1400 |
19000449 |
Hossam ZhassanB |
C1 |
July 10, 2016, 8:39 a.m. |
OK |
Java 8 |
TESTS |
18 |
109 |
0 |
|
1400 |
47891263 |
kunal725725 |
C1 |
Jan. 4, 2019, 6:46 a.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
1400 |
22615205 |
Lewin |
C1 |
Nov. 30, 2016, 6:32 a.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
1400 |
22041837 |
pitfall |
C1 |
Nov. 4, 2016, 7:35 p.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
1400 |
20761483 |
I_love_tigersugar |
C1 |
Sept. 19, 2016, 5:17 p.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
1400 |
19434486 |
kafy83 |
C1 |
July 27, 2016, 6:14 a.m. |
OK |
Java 8 |
TESTS |
18 |
124 |
0 |
|
1400 |
31184470 |
darkkcyan |
C1 |
Oct. 10, 2017, 8:35 a.m. |
OK |
JavaScript |
TESTS |
18 |
30 |
307200 |
|
1400 |
19124584 |
Mur |
C1 |
July 14, 2016, 5:39 p.m. |
OK |
JavaScript |
TESTS |
18 |
31 |
204800 |
|
1400 |
18999545 |
Mebius shalal545 denisx9.0c |
C1 |
July 10, 2016, 8:27 a.m. |
OK |
Mono C# |
TESTS |
18 |
62 |
307200 |
|
1400 |
19000089 |
ahong cacad PieceOfCode |
C1 |
July 10, 2016, 8:34 a.m. |
OK |
Mono C# |
TESTS |
18 |
62 |
1433600 |
|
1400 |
19230723 |
drWoZD |
C1 |
July 19, 2016, 11:40 a.m. |
OK |
Mono C# |
TESTS |
18 |
77 |
4403200 |
|
1400 |
23801948 |
og.kostya |
C1 |
Jan. 14, 2017, 8:54 a.m. |
OK |
MS C# |
TESTS |
18 |
46 |
9113600 |
|
1400 |
18998745 |
azukun |
C1 |
July 10, 2016, 8:17 a.m. |
OK |
MS C# |
TESTS |
18 |
62 |
2662400 |
|
1400 |
19035174 |
SisAdminos |
C1 |
July 11, 2016, 6:13 p.m. |
OK |
MS C# |
TESTS |
18 |
62 |
3276800 |
|
1400 |
28304936 |
balalaika |
C1 |
July 5, 2017, 1:24 p.m. |
OK |
MS C# |
TESTS |
18 |
62 |
11980800 |
|
1400 |
19132002 |
Alexicon |
C1 |
July 14, 2016, 6:45 p.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
23020665 |
Akama_Daa |
C1 |
Dec. 16, 2016, 1:05 a.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
19304118 |
Abdallah_Mohamed55 |
C1 |
July 21, 2016, 2:26 p.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
19004159 |
DigitalNerd |
C1 |
July 10, 2016, 9:59 a.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
19003567 |
HanhThong |
C1 |
July 10, 2016, 9:42 a.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
19003004 |
14310120133 |
C1 |
July 10, 2016, 9:28 a.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
19001767 |
katan |
C1 |
July 10, 2016, 9:02 a.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
19001610 |
13048047792 |
C1 |
July 10, 2016, 8:59 a.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
19000762 |
xiaobo slahser feishi |
C1 |
July 10, 2016, 8:44 a.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
19000476 |
Bloodnaix grandrogue |
C1 |
July 10, 2016, 8:39 a.m. |
OK |
MS C++ |
TESTS |
18 |
15 |
0 |
|
1400 |
64696102 |
Mad112233 |
C1 |
Nov. 11, 2019, 1:23 p.m. |
OK |
MS C++ 2017 |
TESTS |
18 |
46 |
307200 |
|
1400 |
19011888 |
mayakin |
C1 |
July 10, 2016, 2:55 p.m. |
OK |
PHP |
TESTS |
18 |
717 |
512000 |
|
1400 |
18999284 |
SIvan |
C1 |
July 10, 2016, 8:23 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
109 |
1126400 |
|
1400 |
57609685 |
vjudge1 |
C1 |
July 23, 2019, 7:55 p.m. |
OK |
PyPy 3 |
TESTS |
18 |
170 |
2252800 |
|
1400 |
39063474 |
Taz |
C1 |
June 9, 2018, 8:02 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
171 |
1228800 |
|
1400 |
57612854 |
vjudge1 |
C1 |
July 23, 2019, 10:24 p.m. |
OK |
PyPy 3 |
TESTS |
18 |
171 |
1843200 |
|
1400 |
19008012 |
Vosatorp |
C1 |
July 10, 2016, 11:51 a.m. |
OK |
PyPy 3 |
TESTS |
18 |
186 |
1228800 |
|
1400 |
19044382 |
iSea |
C1 |
July 12, 2016, 7:21 a.m. |
OK |
Python 2 |
TESTS |
18 |
46 |
307200 |
|
1400 |
19003876 |
Joshua_su |
C1 |
July 10, 2016, 9:51 a.m. |
OK |
Python 2 |
TESTS |
18 |
46 |
614400 |
|
1400 |
29992720 |
abcdef6199 |
C1 |
Sept. 1, 2017, 4:36 p.m. |
OK |
Python 2 |
TESTS |
18 |
62 |
0 |
|
1400 |
36082932 |
oyldz93 |
C1 |
March 8, 2018, 10:14 p.m. |
OK |
Python 2 |
TESTS |
18 |
62 |
4710400 |
|
1400 |
19900596 |
YamanQ |
C1 |
Aug. 16, 2016, 5:25 a.m. |
OK |
Python 2 |
TESTS |
18 |
62 |
5427200 |
|
1400 |
19001193 |
vladimir.v.macko |
C1 |
July 10, 2016, 8:51 a.m. |
OK |
Python 2 |
TESTS |
18 |
77 |
102400 |
|
1400 |
31797267 |
yugle7 |
C1 |
Oct. 27, 2017, 1:38 p.m. |
OK |
Python 3 |
TESTS |
18 |
62 |
0 |
|
1400 |
19010610 |
Vetand |
C1 |
July 10, 2016, 1:29 p.m. |
OK |
Python 3 |
TESTS |
18 |
62 |
307200 |
|
1400 |
18999611 |
mikkerlo irka1804 |
C1 |
July 10, 2016, 8:27 a.m. |
OK |
Python 3 |
TESTS |
18 |
62 |
614400 |
|
1400 |
25767226 |
YakutovDmitriy |
C1 |
March 24, 2017, 8:58 a.m. |
OK |
Python 3 |
TESTS |
18 |
62 |
4608000 |
|
1400 |
18998683 |
platypus179 cdkrot |
C1 |
July 10, 2016, 8:16 a.m. |
OK |
Python 3 |
TESTS |
18 |
77 |
614400 |
|
1400 |
31797080 |
yugle7 |
C1 |
Oct. 27, 2017, 1:33 p.m. |
OK |
Python 3 |
TESTS |
18 |
78 |
0 |
|
1400 |
25883649 |
mordig |
C1 |
March 28, 2017, 9:02 p.m. |
OK |
Python 3 |
TESTS |
18 |
93 |
6246400 |
|
1400 |
40401587 |
smi |
C1 |
July 16, 2018, 7:53 a.m. |
OK |
Python 3 |
TESTS |
18 |
124 |
0 |
|
1400 |
19003839 |
netoctone |
C1 |
July 10, 2016, 9:49 a.m. |
OK |
Ruby |
TESTS |
18 |
77 |
921600 |
|
1400 |
19414145 |
johnc1231 |
C1 |
July 26, 2016, 3:47 a.m. |
OK |
Scala |
TESTS |
18 |
311 |
0 |
|
1400 |
remove filters
Back to search problems