VK Cup 2016 - Round 2

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
641 VK Cup 2016 - Round 2 FINISHED False 7200 314976285 April 24, 2016, 4:35 p.m.

Problems

Solved
Index
Name
Type
Tags
Community Tag
Rating
( 243 ) F Little Artem and 2-SAT PROGRAMMING 2900

Little Artem is a very smart programmer. He knows many different difficult algorithms. Recently he has mastered in 2-SAT one. In computer science, 2-satisfiability (abbreviated as 2-SAT ) is the special case of the problem of determining whether a conjunction (logical AND ) of disjunctions (logical OR ) have a solution, in which all disjunctions consist of no more than two arguments (variables). For the purpose of this problem we consider only 2-SAT formulas where each disjunction consists of exactly two arguments. Consider the following 2-SAT problem as an example: . Note that there might be negations in 2-SAT formula (like for x 1 and for x 4 ). Artem now tries to solve as many problems with 2-SAT as possible. He found a very interesting one, which he can not solve yet. Of course, he asks you to help him. The problem is: given two 2-SAT formulas f and g , determine whether their sets of possible solutions are the same. Otherwise, find any variables assignment x such that f ( x ) ≠ g ( x ) . The first line of the input contains three integers n , m 1 and m 2 ( 1 ≤ n ≤ 1000 , 1 ≤ m 1 , m 2 ≤ n 2 ) — the number of variables, the number of disjunctions in the first formula and the number of disjunctions in the second formula, respectively. Next m 1 lines contains the description of 2-SAT formula f . The description consists of exactly m 1 pairs of integers x i ( - n ≤ x i ≤ n , x i ≠ 0 ) each on separate line, where x i > 0 corresponds to the variable without negation, while x i < 0 corresponds to the variable with negation. Each pair gives a single disjunction. Next m 2 lines contains formula g in the similar format. If both formulas share the same set of solutions, output a single word " SIMILAR " (without quotes). Otherwise output exactly n integers x i ( ) — any set of values x such that f ( x ) ≠ g ( x ) . First sample has two equal formulas, so they are similar by definition. In second sample if we compute first function with x 1 = 0 and x 2 = 0 we get

Tutorials

VK Cup 2016 — Раунд 2 (editorial)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
35887017 ______M______ F March 3, 2018, 1:57 p.m. OK GNU C++ TESTS 110 764 3072000 2900
31911442 F.Darcy F Oct. 31, 2017, 5:50 a.m. OK GNU C++ TESTS 110 780 71782400 2900
20968197 jiyutian F Sept. 28, 2016, 1:28 p.m. OK GNU C++ TESTS 110 982 66252800 2900
18643588 Tzn-40 F June 22, 2016, 9:11 a.m. OK GNU C++ TESTS 110 1294 1024000 2900
28568785 progg_admin F July 15, 2017, 8:57 a.m. OK GNU C++ TESTS 110 1294 3174400 2900
19655290 Jia_style F Aug. 5, 2016, 4:29 p.m. OK GNU C++ TESTS 110 1325 51200000 2900
18045743 Khusainova F May 23, 2016, 3:52 p.m. OK GNU C++ TESTS 110 1356 113049600 2900
17771171 anewhandle F May 7, 2016, 6:18 a.m. OK GNU C++ TESTS 110 1559 3276800 2900
54502781 WOSHIGEPACHONG2 F May 23, 2019, 12:17 a.m. OK GNU C++11 TESTS 110 249 21196800 2900
40984864 ReaLNero1 F July 30, 2018, 7:37 p.m. OK GNU C++11 TESTS 110 296 21196800 2900
17766790 KADR F May 6, 2016, 7:20 p.m. OK GNU C++11 TESTS 110 296 23449600 2900
17566774 yarrr F April 29, 2016, 1:24 p.m. OK GNU C++11 TESTS 110 343 23347200 2900
17566783 yarrr F April 29, 2016, 1:25 p.m. OK GNU C++11 TESTS 110 343 23449600 2900
17497663 maksay KADR F April 24, 2016, 6:32 p.m. OK GNU C++11 TESTS 110 374 23449600 2900
17766813 KADR F May 6, 2016, 7:22 p.m. OK GNU C++11 TESTS 110 436 23449600 2900
17568502 yarrr F April 29, 2016, 3:31 p.m. OK GNU C++11 TESTS 110 483 23347200 2900
37238356 zhouyuyang F April 12, 2018, 3:27 a.m. OK GNU C++11 TESTS 110 764 4608000 2900
17497116 ifsmirnov Arterm F April 24, 2016, 6:29 p.m. OK GNU C++11 TESTS 110 779 3379200 2900
32306978 NiroBC F Nov. 14, 2017, 8:44 a.m. OK GNU C++14 TESTS 110 1060 1126400 2900
23409254 Ali.Pi F Dec. 29, 2016, 8:54 p.m. OK GNU C++14 TESTS 110 1278 50995200 2900
39689587 samjia2000 F June 27, 2018, 2:57 a.m. OK GNU C++14 TESTS 110 2854 73625600 2900
39689471 samjia2000 F June 27, 2018, 2:49 a.m. OK GNU C++14 TESTS 110 2870 73625600 2900
50502009 kefaa2 F Feb. 25, 2019, 5:41 p.m. OK GNU C++17 TESTS 110 1232 21196800 2900
69839901 Lower_Rating F Jan. 30, 2020, 12:52 p.m. OK GNU C++17 TESTS 110 1294 1024000 2900
17507018 mmaxio F April 25, 2016, 10:33 a.m. OK Java 8 TESTS 110 1606 71372800 2900
17496325 V--o_o--V LHiC F April 24, 2016, 6:23 p.m. OK MS C++ TESTS 110 1996 57548800 2900

remove filters

Back to search problems