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 |
---|---|---|---|---|---|---|
1423 | Bubble Cup 13 - Finals [Online Mirror, unrated, Div. 1] | FINISHED | False | 10800 | 129920099 | Oct. 5, 2020, 1:05 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 151 ) | N | BubbleSquare Tokens | PROGRAMMING |
B'BubbleSquare social network is celebrating 13^{th} anniversary and it is rewarding its members with special edition BubbleSquare tokens. Every member receives one personal token. Also, two additional tokens are awarded to each member for every friend they have on the network. Yet, there is a twist xe2 x80 x93 everyone should end up with different number of tokens from all their friends. Each member may return one received token. Also, each two friends may agree to each return one or two tokens they have obtained on behalf of their friendship. First line of input contains two integer numbers n and k ( 2 <= q n <= q 12500 , 1 <= q k <= q 1000000 ) - number of members in network and number of friendships. Next k lines contain two integer numbers a_i and b_i ( 1 <= q a_i , b_i <= q n , a_i neq b_i ) - meaning members a_i and b_i are friends. First line of output should specify the number of members who are keeping their personal token. The second line should contain space separated list of members who are keeping their personal token. Each of the following k lines should contain three space separated numbers, representing friend pairs and number of tokens each of them gets on behalf of their friendship. In the first test case, only the first member will keep its personal token and no tokens will be awarded for friendship between the first and the second member. In the second test case, none of the members will keep their personal token. The first member will receive two tokens (for friendship with the third member), the second member will receive one token (for friendship with the third member) and the third member will receive three tokens (for friendships with the first and the second member). '... |
FinalsEditorial2020.pdf |
No solutions yet.