Good Bye 2017

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
908 Good Bye 2017 FINISHED False 9000 217261199 Dec. 29, 2017, 3:40 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 385 ) H New Year and Boolean Bridges PROGRAMMING 3000

B'Your friend has a hidden directed graph with n nodes. Let f(u, xe2 x80 x89v) be true if there is a directed path from node u to node v, and false otherwise. For each pair of distinct nodes, u, xe2 x80 x89v, you know at least one of the three statements is true: Here AND, OR and XOR mean AND, OR and exclusive OR operations, respectively. You are given an n by n matrix saying which one of the three statements holds for each pair of vertices. The entry in the u-th row and v-th column has a single character. Note that it is possible that a pair of nodes may satisfy multiple statements, in which case, the character given will represent one of the true statements for that pair. This matrix is also guaranteed to be symmetric. You would like to know if there is a directed graph that is consistent with this matrix. If it is impossible, print the integer -1. Otherwise, print the minimum number of edges that could be consistent with this information. The first line will contain an integer n (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89n xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8947), the number of nodes. The next n lines will contain n characters each: the matrix of what you know about the graph connectivity in the format described in the statement. Print the minimum number of edges that is consistent with the given information, or -1 if it is impossible. Sample 1: The hidden graph is a strongly connected graph. We can put all four nodes in a cycle. Sample 2: One valid graph is 3 xe2 x80 x89 xe2 x86 x92 xe2 x80 x891 xe2 x80 x89 xe2 x86 x92 xe2 x80 x892. For each distinct pair, exactly one of f(u, xe2 x80 x89v), xe2 x80 x89f(v, xe2 x80 x89u) holds. '...

Tutorials

Good Bye 2017 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
33975786 lastans H Jan. 7, 2018, 3:44 a.m. OK GNU C++ TESTS 23 249 43929600 3000
41821983 99hgz H Aug. 19, 2018, 10:04 a.m. OK GNU C++ TESTS 23 264 100659200 3000
41824292 99hgz H Aug. 19, 2018, 11:13 a.m. OK GNU C++ TESTS 23 280 100659200 3000
41825821 99hgz H Aug. 19, 2018, 11:59 a.m. OK GNU C++ TESTS 23 389 100659200 3000
34649495 F.Darcy H Jan. 29, 2018, 4:24 a.m. OK GNU C++ TESTS 23 436 102912000 3000
41426727 Stump H Aug. 10, 2018, 9:48 a.m. OK GNU C++ TESTS 23 452 100966400 3000
33861771 suchang H Jan. 2, 2018, 10:41 a.m. OK GNU C++ TESTS 23 577 405504000 3000
36726471 zjo_2001 H March 29, 2018, 4:25 p.m. OK GNU C++ TESTS 23 904 171929600 3000
35846547 Created_equal H March 2, 2018, 4:23 p.m. OK GNU C++ TESTS 23 1169 169984000 3000
37136483 zhan8855 H April 10, 2018, 5:48 a.m. OK GNU C++ TESTS 23 1326 123596800 3000
33904077 Maniac_Wallnut H Jan. 4, 2018, 1:31 p.m. OK GNU C++11 TESTS 23 15 2048000 3000
33894557 zhouyuyang H Jan. 4, 2018, 12:25 a.m. OK GNU C++11 TESTS 23 15 2048000 3000
33874218 rajat1603 H Jan. 2, 2018, 10 p.m. OK GNU C++11 TESTS 23 15 2150400 3000
34239613 lbn187 H Jan. 17, 2018, 4:21 a.m. OK GNU C++11 TESTS 23 30 2048000 3000
35115365 miaomiao_yali H Feb. 10, 2018, 7:35 a.m. OK GNU C++11 TESTS 23 31 2048000 3000
33874206 rajat1603 H Jan. 2, 2018, 9:59 p.m. OK GNU C++11 TESTS 23 46 2150400 3000
51479975 __23333 H March 19, 2019, 11:10 a.m. OK GNU C++11 TESTS 23 156 50483200 3000
47242419 JORFOT H Dec. 19, 2018, 3:05 a.m. OK GNU C++11 TESTS 23 156 100864000 3000
61760217 luogu_bot1 H Oct. 3, 2019, 6:51 a.m. OK GNU C++11 TESTS 23 171 100864000 3000
47242454 luogu_bot3 H Dec. 19, 2018, 3:07 a.m. OK GNU C++11 TESTS 23 171 100864000 3000
33896036 zhouyuyang233 H Jan. 4, 2018, 4:27 a.m. OK GNU C++14 TESTS 23 15 1945600 3000
33882876 giorgi H Jan. 3, 2018, 10:48 a.m. OK GNU C++14 TESTS 23 15 1945600 3000
33794220 MiFaFaOvO H Dec. 29, 2017, 7:58 p.m. OK GNU C++14 TESTS 23 15 1945600 3000
33794124 MiFaFaOvO H Dec. 29, 2017, 7:53 p.m. OK GNU C++14 TESTS 23 15 1945600 3000
33794344 MiFaFaOvO H Dec. 29, 2017, 8:02 p.m. OK GNU C++14 TESTS 23 15 2048000 3000
34507509 MeePwn H Jan. 24, 2018, 7:32 a.m. OK GNU C++14 TESTS 23 30 1945600 3000
40978776 ReaLNero1 H July 30, 2018, 4:47 p.m. OK GNU C++14 TESTS 23 31 0 3000
33794102 MiFaFaOvO H Dec. 29, 2017, 7:52 p.m. OK GNU C++14 TESTS 23 109 1945600 3000
33817130 pmnox H Dec. 30, 2017, 6:01 p.m. OK GNU C++14 TESTS 23 124 2048000 3000
51605519 ugly2333 H March 21, 2019, 7:13 a.m. OK GNU C++14 TESTS 23 156 204800 3000
47317441 G20202502 H Dec. 21, 2018, 5:18 a.m. OK GNU C++17 TESTS 23 421 120524800 3000
38396716 cdzhangjiajie H May 18, 2018, 9:42 a.m. OK GNU C++17 TESTS 23 452 100864000 3000
47302422 vjudge2 H Dec. 20, 2018, 2:52 p.m. OK GNU C++17 TESTS 23 483 201932800 3000
69094070 zhongyuwei H Jan. 19, 2020, 11:20 a.m. OK GNU C++17 TESTS 23 545 168243200 3000
47334003 vjudge4 H Dec. 21, 2018, 2:15 p.m. OK GNU C++17 TESTS 23 717 201932800 3000
63709653 HyscereXD H Oct. 29, 2019, 9:35 a.m. OK GNU C++17 TESTS 23 748 100864000 3000
47349162 vjudge1 H Dec. 21, 2018, 11:57 p.m. OK GNU C++17 TESTS 23 1247 201932800 3000
52933896 Shayan.P H April 18, 2019, 5:01 a.m. OK GNU C++17 TESTS 23 1669 134656000 3000
45167432 Benq H Nov. 1, 2018, 11:35 a.m. OK GNU C++17 TESTS 23 1684 68403200 3000
42279852 Hany01 H Aug. 30, 2018, 1:38 p.m. OK GNU C++17 TESTS 23 1699 67481600 3000
34933648 JialinOuyang H Feb. 5, 2018, 4:39 a.m. OK Java 8 TESTS 23 701 131481600 3000
33804340 uwi H Dec. 30, 2017, 8:26 a.m. OK Java 8 TESTS 23 872 148275200 3000
33804220 uwi H Dec. 30, 2017, 8:21 a.m. OK Java 8 TESTS 23 873 148275200 3000
33804312 uwi H Dec. 30, 2017, 8:25 a.m. OK Java 8 TESTS 23 889 131481600 3000
33804138 uwi H Dec. 30, 2017, 8:16 a.m. OK Java 8 TESTS 23 889 148275200 3000
33804277 uwi H Dec. 30, 2017, 8:24 a.m. OK Java 8 TESTS 23 997 131481600 3000
33803896 uwi H Dec. 30, 2017, 8:03 a.m. OK Java 8 TESTS 23 1794 282931200 3000
35524620 bondarev H Feb. 20, 2018, 2:42 p.m. OK Java 8 TESTS 23 2838 114688000 3000
33787330 Petr H Dec. 29, 2017, 5:30 p.m. OK Java 8 TESTS 23 2917 114790400 3000
34933559 JialinOuyang H Feb. 5, 2018, 4:23 a.m. OK Java 8 TESTS 23 2994 131584000 3000

remove filters

Back to search problems