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'N variables X1, xe2 x80 x89..., xe2 x80 x89XN can have positive integer values. You are given K constraints for these value that look like "the values of variables Xi1, xe2 x80 x89Xi2, xe2 x80 x89..., xe2 x80 x89XiM are different". Among all possible lists of values of these variables that satisfy these constraints select the ones which have minimum possible max(Xi). Output lexicographically least of these lists. The first line of input contains two integers n and k (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89N xe2 x80 x89 xe2 x89 xa4 xe2 x80 x8910, 1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89K xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89100) -- the number of variables and the number of constraints. The following K lines contain the constraints, formatted as follows: the first number in the line M (2 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89M xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89N) gives the number of variables in the constraint. After it follow M space-separated integers i1, xe2 x80 x89..., xe2 x80 x89iM -- the indices of the variables used in the constraint (1 xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89ij xe2 x80 x89 xe2 x89 xa4 xe2 x80 x89N). All ij in one constraint are different. Output the values of X1, xe2 x80 x89X2, xe2 x80 x89..., xe2 x80 x89XN in a single line, separated with single spaces.'... |
Tutorials
Submissions
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
40987118 |
ReaLNero1 |
I |
July 30, 2018, 8:59 p.m. |
OK |
Picat |
TESTS |
60 |
61 |
8192000 |
|
2600 |
10530924 |
agiffaryalfatah |
I |
March 31, 2015, 7:14 a.m. |
OK |
Picat |
TESTS |
60 |
140 |
0 |
|
2600 |
10520243 |
YakutovDmitriy |
I |
March 29, 2015, 9:18 p.m. |
OK |
Picat |
TESTS |
60 |
140 |
0 |
|
2600 |
11000667 |
K_D_M |
I |
May 4, 2015, 8:02 p.m. |
OK |
Picat |
TESTS |
60 |
202 |
0 |
|
2600 |
10558935 |
Amareelez |
I |
April 3, 2015, 10:31 a.m. |
OK |
Picat |
TESTS |
60 |
202 |
0 |
|
2600 |
10536687 |
wilcot |
I |
March 31, 2015, 8:04 p.m. |
OK |
Picat |
TESTS |
60 |
202 |
0 |
|
2600 |
10570330 |
jikiaedi |
I |
April 4, 2015, 7:11 a.m. |
OK |
Picat |
TESTS |
60 |
358 |
0 |
|
2600 |
10549916 |
nikacimakuridze |
I |
April 2, 2015, 11:01 a.m. |
OK |
Picat |
TESTS |
60 |
358 |
0 |
|
2600 |
10748962 |
gskhirtladze |
I |
April 17, 2015, 8:19 a.m. |
OK |
Picat |
TESTS |
60 |
389 |
0 |
|
2600 |
10641381 |
krijgertje |
I |
April 9, 2015, 3:09 p.m. |
OK |
Picat |
TESTS |
60 |
390 |
0 |
|
2600 |
remove filters
Back to search problems