Educational Codeforces Round 104 (Rated for Div. 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
1487 Educational Codeforces Round 104 (Rated for Div. 2) FINISHED False 7200 118423499 Feb. 15, 2021, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 14242 ) C Minimum Ties PROGRAMMING brute force constructive algorithms dfs and similar graphs greedy implementation math

B'A big football championship will occur soon! n teams will compete in it, and each pair of teams will play exactly one game against each other. There are two possible outcomes of a game: The score of a team is the number of points it gained during all games that it played. You are interested in a hypothetical situation when all teams get the same score at the end of the championship. A simple example of that situation is when all games result in ties, but you want to minimize the number of ties as well. Your task is to describe a situation (choose the result of each game) so that all teams get the same score, and the number of ties is the minimum possible. The first line contains one integer t ( 1 <= t <= 100 ) -- the number of test cases. Then the test cases follow. Each test case is described by one line containing one integer n ( 2 <= n <= 100 ) -- the number of teams. For each test case, print frac{n(n - 1)}{2} integers describing the results of the games in the following order: the first integer should correspond to the match between team 1 and team 2 , the second -- between team 1 and team 3 , then 1 and 4 , ..., 1 and n , 2 and 3 , 2 and 4 , ..., 2 and n , and so on, until the game between the team n - 1 and the team n . The integer corresponding to the game between the team x and the team y should be 1 if x wins, -1 if y wins, or 0 if the game results in a tie. All teams should get the same score, and the number of ties should be the minimum possible. If there are multiple optimal answers, print any of them. It can be shown that there always exists a way to make all teams have the same score. In the first test case of the example, both teams get 1 point since the game between them is a tie. In the second test case of the example, team 1 defeats team 2 (team 1 '...

Tutorials

87873

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
107469635 ruban C Feb. 15, 2021, 4:33 p.m. OK Delphi TESTS 5 155 15769600
107496978 kyriezzx C Feb. 16, 2021, 2:57 a.m. OK GNU C++11 TESTS 6 30 7884800
107498982 0319 C Feb. 16, 2021, 4:02 a.m. OK GNU C++11 TESTS 6 46 0
107498561 Hakunamatata25 C Feb. 16, 2021, 3:50 a.m. OK GNU C++11 TESTS 6 46 0
107475008 Shaad7 C Feb. 15, 2021, 5:02 p.m. OK GNU C++11 TESTS 5 46 0
107472758 WyyOIER C Feb. 15, 2021, 4:46 p.m. OK GNU C++11 TESTS 5 46 0
107472436 xcatf C Feb. 15, 2021, 4:44 p.m. OK GNU C++11 TESTS 5 46 0
107465604 AliceLiCF C Feb. 15, 2021, 4:27 p.m. OK GNU C++11 TESTS 5 46 0
107464934 superstarch C Feb. 15, 2021, 4:25 p.m. OK GNU C++11 TESTS 5 46 0
107496761 C_Aric C Feb. 16, 2021, 2:50 a.m. OK GNU C++11 TESTS 6 46 409600
107498877 tychanges C Feb. 16, 2021, 3:59 a.m. OK GNU C++11 TESTS 6 46 11980800
107504446 Apache_16 C Feb. 16, 2021, 5:58 a.m. OK GNU C++14 TESTS 6 30 0
107501138 mr_cchef C Feb. 16, 2021, 4:54 a.m. OK GNU C++14 TESTS 6 30 0
107483903 QSR_ranroader C Feb. 15, 2021, 7:01 p.m. OK GNU C++14 TESTS 5 30 0
107501497 YLone C Feb. 16, 2021, 5:02 a.m. OK GNU C++14 TESTS 6 31 0
107501271 Fury20 C Feb. 16, 2021, 4:57 a.m. OK GNU C++14 TESTS 6 31 0
107497225 jinboy73 C Feb. 16, 2021, 3:06 a.m. OK GNU C++14 TESTS 6 31 0
107495090 mc_progw12 C Feb. 16, 2021, 1:41 a.m. OK GNU C++14 TESTS 6 31 0
107491463 Chaves C Feb. 15, 2021, 10:18 p.m. OK GNU C++14 TESTS 5 31 0
107486840 canaryInCoalMine C Feb. 15, 2021, 7:58 p.m. OK GNU C++14 TESTS 5 31 0
107486596 Saman. C Feb. 15, 2021, 7:53 p.m. OK GNU C++14 TESTS 5 31 0
107496468 harikumar329 C Feb. 16, 2021, 2:39 a.m. OK GNU C++17 TESTS 6 15 0
107494989 kguniverse C Feb. 16, 2021, 1:34 a.m. OK GNU C++17 TESTS 6 15 0
107465226 royo_sea C Feb. 15, 2021, 4:26 p.m. OK GNU C++17 TESTS 5 15 2150400
107502714 yashashwi90 C Feb. 16, 2021, 5:27 a.m. OK GNU C++17 TESTS 6 30 0
107496036 manav_06 C Feb. 16, 2021, 2:23 a.m. OK GNU C++17 TESTS 6 30 0
107493217 NecRpyedt C Feb. 15, 2021, 11:49 p.m. OK GNU C++17 TESTS 6 30 0
107488160 bada55 C Feb. 15, 2021, 8:29 p.m. OK GNU C++17 TESTS 5 30 0
107487437 rahroh8686 C Feb. 15, 2021, 8:12 p.m. OK GNU C++17 TESTS 5 30 0
107482123 Bench0310 C Feb. 15, 2021, 6:31 p.m. OK GNU C++17 TESTS 5 30 0
107473349 Su1Ka C Feb. 15, 2021, 4:50 p.m. OK GNU C++17 TESTS 5 30 0
107493982 Bondo C Feb. 16, 2021, 12:38 a.m. OK GNU C++17 (64) TESTS 6 30 0
107479291 RetiredRadwan C Feb. 15, 2021, 5:49 p.m. OK GNU C++17 (64) TESTS 5 30 0
107474753 Ayalla C Feb. 15, 2021, 5 p.m. OK GNU C++17 (64) TESTS 5 30 0
107503491 _tarek007 C Feb. 16, 2021, 5:42 a.m. OK GNU C++17 (64) TESTS 6 31 0
107497328 LethalPuppy C Feb. 16, 2021, 3:10 a.m. OK GNU C++17 (64) TESTS 6 31 0
107496210 nicholask C Feb. 16, 2021, 2:30 a.m. OK GNU C++17 (64) TESTS 6 31 0
107484298 Septimelon C Feb. 15, 2021, 7:08 p.m. OK GNU C++17 (64) TESTS 5 31 0
107481640 BikAdi C Feb. 15, 2021, 6:23 p.m. OK GNU C++17 (64) TESTS 5 31 0
107480215 kwee C Feb. 15, 2021, 6:02 p.m. OK GNU C++17 (64) TESTS 5 31 0
107476416 shiv_17 C Feb. 15, 2021, 5:15 p.m. OK GNU C++17 (64) TESTS 5 31 0
107471698 Airflow C Feb. 15, 2021, 4:41 p.m. OK Haskell TESTS 5 311 102400
107492889 rafee69029 C Feb. 15, 2021, 11:28 p.m. OK Java 11 TESTS 6 171 0
107471847 bittubittu C Feb. 15, 2021, 4:41 p.m. OK Java 11 TESTS 5 171 0
107469466 nirvana_rsc C Feb. 15, 2021, 4:33 p.m. OK Java 11 TESTS 5 186 0
107500175 namitnayan C Feb. 16, 2021, 4:32 a.m. OK Java 11 TESTS 6 187 0
107481296 kumarsaksham54 C Feb. 15, 2021, 6:18 p.m. OK Java 11 TESTS 5 187 0
107497873 veeraballidharantej C Feb. 16, 2021, 3:29 a.m. OK Java 11 TESTS 6 202 0
107495351 takeuchi-masaki C Feb. 16, 2021, 1:54 a.m. OK Java 11 TESTS 6 202 0
107471902 Sarvjeet619 C Feb. 15, 2021, 4:42 p.m. OK Java 11 TESTS 5 217 0
107497306 veeraballidharantej C Feb. 16, 2021, 3:09 a.m. OK Java 11 TESTS 6 218 0
107495249 yuruiyin C Feb. 16, 2021, 1:50 a.m. OK Java 11 TESTS 6 218 0
107493314 Abdallah_Ragab00 C Feb. 15, 2021, 11:55 p.m. OK Java 8 TESTS 6 108 0
107464769 KachiTachi C Feb. 15, 2021, 4:25 p.m. OK Java 8 TESTS 5 109 0
107489661 RonWonWon C Feb. 15, 2021, 9:12 p.m. OK Java 8 TESTS 5 124 0
107476360 reennn C Feb. 15, 2021, 5:15 p.m. OK Java 8 TESTS 5 124 0
107471032 vaibhav7 C Feb. 15, 2021, 4:38 p.m. OK Java 8 TESTS 5 124 0
107468734 kaskelot C Feb. 15, 2021, 4:32 p.m. OK Java 8 TESTS 5 139 0
107473668 InANutshell C Feb. 15, 2021, 4:52 p.m. OK Java 8 TESTS 5 140 0
107469828 Leksiq C Feb. 15, 2021, 4:34 p.m. OK Java 8 TESTS 5 140 0
107467244 YahiaSherif C Feb. 15, 2021, 4:30 p.m. OK Java 8 TESTS 5 140 0
107464518 Extends C Feb. 15, 2021, 4:25 p.m. OK Java 8 TESTS 5 140 0
107494747 Spheniscine C Feb. 16, 2021, 1:21 a.m. OK Kotlin TESTS 6 155 1126400
107477587 WiwiHo C Feb. 15, 2021, 5:28 p.m. OK Kotlin TESTS 5 171 0
107478275 Potassium C Feb. 15, 2021, 5:36 p.m. OK Kotlin TESTS 5 171 307200
107478920 Potassium C Feb. 15, 2021, 5:44 p.m. OK Kotlin TESTS 5 202 307200
107503693 kkdying C Feb. 16, 2021, 5:46 a.m. OK MS C++ TESTS 6 233 0
107478649 kritias C Feb. 15, 2021, 5:41 p.m. OK MS C++ 2017 TESTS 5 46 0
107503158 AmalSN C Feb. 16, 2021, 5:36 a.m. OK MS C++ 2017 TESTS 6 77 0
107503959 WCmidschool C Feb. 16, 2021, 5:50 a.m. OK MS C++ 2017 TESTS 6 78 0
107464625 NikoSun C Feb. 15, 2021, 4:25 p.m. OK MS C++ 2017 TESTS 5 124 7987200
107501572 FLself C Feb. 16, 2021, 5:04 a.m. OK MS C++ 2017 TESTS 6 264 0
107471634 Vitazzz C Feb. 15, 2021, 4:40 p.m. OK MS C++ 2017 TESTS 5 264 0
107497376 FLself C Feb. 16, 2021, 3:12 a.m. OK MS C++ 2017 TESTS 6 265 2048000
107467756 Liniou C Feb. 15, 2021, 4:31 p.m. OK MS C++ 2017 TESTS 5 280 0
107502127 dear-john C Feb. 16, 2021, 5:15 a.m. OK MS C++ 2017 TESTS 6 280 2048000
107465871 VladislavArt C Feb. 15, 2021, 4:27 p.m. OK MS C++ 2017 TESTS 5 342 307200
107473132 rsFalse C Feb. 15, 2021, 4:48 p.m. OK Perl TESTS 5 733 921600
107492482 lebron87 C Feb. 15, 2021, 11:05 p.m. OK PyPy 2 TESTS 5 342 12595200
107492445 lebron87 C Feb. 15, 2021, 11:03 p.m. OK PyPy 2 TESTS 5 342 13209600
107469990 sk_loves_Ritika C Feb. 15, 2021, 4:34 p.m. OK PyPy 3 TESTS 5 140 8192000
107492101 lucifer1004 C Feb. 15, 2021, 10:45 p.m. OK PyPy 3 TESTS 5 233 9216000
107472694 Anshuman2043 C Feb. 15, 2021, 4:46 p.m. OK PyPy 3 TESTS 5 248 9523200
107472900 rajbit C Feb. 15, 2021, 4:47 p.m. OK PyPy 3 TESTS 5 249 8294400
107497423 raxtar C Feb. 16, 2021, 3:14 a.m. OK PyPy 3 TESTS 6 265 7168000
107475221 rivnam C Feb. 15, 2021, 5:04 p.m. OK PyPy 3 TESTS 5 265 7680000
107475690 navam C Feb. 15, 2021, 5:08 p.m. OK PyPy 3 TESTS 5 265 9932800
107479249 rivnam C Feb. 15, 2021, 5:48 p.m. OK PyPy 3 TESTS 5 280 8601600
107480829 rivnam C Feb. 15, 2021, 6:11 p.m. OK PyPy 3 TESTS 5 280 9113600
107478823 reddevil100 C Feb. 15, 2021, 5:43 p.m. OK PyPy 3 TESTS 5 296 8601600
107497545 sh1194 C Feb. 16, 2021, 3:18 a.m. OK Python 3 TESTS 6 77 0
107465027 risrogiss22 C Feb. 15, 2021, 4:26 p.m. OK Python 3 TESTS 5 77 204800
107477128 akb_039 C Feb. 15, 2021, 5:23 p.m. OK Python 3 TESTS 5 77 4403200
107484428 peakypo C Feb. 15, 2021, 7:10 p.m. OK Python 3 TESTS 5 93 204800
107495070 kihyo C Feb. 16, 2021, 1:39 a.m. OK Python 3 TESTS 6 295 819200
107486063 jinsong C Feb. 15, 2021, 7:42 p.m. OK Python 3 TESTS 5 405 307200
107473264 hepta C Feb. 15, 2021, 4:49 p.m. OK Python 3 TESTS 5 483 1536000
107466144 TanKaiYi C Feb. 15, 2021, 4:28 p.m. OK Python 3 TESTS 5 576 307200
107472947 aparahuja123 C Feb. 15, 2021, 4:47 p.m. OK Python 3 TESTS 5 592 307200
107469233 jassin11 C Feb. 15, 2021, 4:33 p.m. OK Python 3 TESTS 5 592 307200
107484905 igor.v.karp C Feb. 15, 2021, 7:19 p.m. OK Scala TESTS 5 530 0

remove filters

Back to search problems