Grakn Forces 2020

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
1408 Grakn Forces 2020 FINISHED False 9900 135703463 Sept. 30, 2020, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 2431 ) F Two Different PROGRAMMING bitmasks constructive algorithms divide and conquer greedy

B"You are given an integer n . You should find a list of pairs (x_1, y_1) , (x_2, y_2) , ..., (x_q, y_q) ( 1 <= q x_i, y_i <= q n ) satisfying the following condition. Let's consider some function f: mathbb{N} x mathbb{N} to mathbb{N} (we define mathbb{N} as the set of positive integers). In other words, f is a function that returns a positive integer for a pair of positive integers. Let's make an array a_1, a_2, ldots, a_n , where a_i = i initially. You will perform q operations, in i -th of them you will: In other words, you need to simultaneously change a_{x_i} and a_{y_i} to f(a_{x_i}, a_{y_i}) . Note that during this process f(p, q) is always the same for a fixed pair of p and q . In the end, there should be at most two different numbers in the array a . It should be true for any function f . Find any possible list of pairs. The number of pairs should not exceed 5 cdot 10^5 . The single line contains a single integer n ( 1 <= q n <= q 15 ,000 ). In the first line print q ( 0 <= q q <= q 5 cdot 10^5 ) -- the number of pairs. In each of the next q lines print two integers. In the i -th line print x_i , y_i ( 1 <= q x_i, y_i <= q n ). The condition described in the statement should be satisfied. If there exists multiple answers you can print any of them. In the first example, after performing the only operation the array a will be [f(a_1, a_2), f(a_1, a_2), a_3] . It will always have at most two different numbers. In the second example, after performing two operations the array a will be [f(a_1, a_2), f(a_1, a_2), f(a_3, a_4), f(a_3, a_4)] . It will always have at most two different numbers. "...

Tutorials

Grakn Forces -- Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
94341265 hos.lyric F Sept. 30, 2020, 4:53 p.m. OK D TESTS 31 93 4198400
94373019 fr200110217102 F Oct. 1, 2020, 4:22 a.m. OK GNU C++11 TESTS 32 31 3993600
94334631 s_r_f F Sept. 30, 2020, 4:19 p.m. OK GNU C++11 TESTS 31 31 4300800
94340750 hs-black F Sept. 30, 2020, 4:50 p.m. OK GNU C++11 TESTS 31 31 8089600
94372836 olimpo F Oct. 1, 2020, 4:18 a.m. OK GNU C++11 TESTS 32 46 0
94366419 Eric_hooo F Oct. 1, 2020, 1:28 a.m. OK GNU C++11 TESTS 32 46 1433600
94343256 201465 F Sept. 30, 2020, 5:04 p.m. OK GNU C++11 TESTS 31 46 1433600
94366792 Acceptedumbrella F Oct. 1, 2020, 1:39 a.m. OK GNU C++11 TESTS 32 46 1433600
94344983 auto_mowu_machine F Sept. 30, 2020, 5:12 p.m. OK GNU C++11 TESTS 31 46 1433600
94369825 Ahaooops F Oct. 1, 2020, 3:05 a.m. OK GNU C++11 TESTS 32 46 1536000
94366934 YJJ_Konnyaku F Oct. 1, 2020, 1:44 a.m. OK GNU C++11 TESTS 32 46 1536000
94353487 bktl1love F Sept. 30, 2020, 6:50 p.m. OK GNU C++14 TESTS 32 46 1126400
94348305 hkyiitd F Sept. 30, 2020, 5:48 p.m. OK GNU C++14 TESTS 31 46 1638400
94362859 Zaher F Sept. 30, 2020, 10:54 p.m. OK GNU C++14 TESTS 32 46 1638400
94353162 SlowDecay F Sept. 30, 2020, 6:46 p.m. OK GNU C++14 TESTS 32 46 1638400
94343530 KKOOPP F Sept. 30, 2020, 5:05 p.m. OK GNU C++14 TESTS 31 46 1638400
94341916 tzxydby F Sept. 30, 2020, 4:56 p.m. OK GNU C++14 TESTS 31 46 1638400
94340972 shanin F Sept. 30, 2020, 4:51 p.m. OK GNU C++14 TESTS 31 46 1638400
94337195 jo_on F Sept. 30, 2020, 4:32 p.m. OK GNU C++14 TESTS 31 46 1638400
94337003 lovemathboy F Sept. 30, 2020, 4:31 p.m. OK GNU C++14 TESTS 31 46 1638400
94363151 stefanbalaz2 F Sept. 30, 2020, 11:09 p.m. OK GNU C++14 TESTS 32 46 1740800
94336504 DebNatkh F Sept. 30, 2020, 4:28 p.m. OK GNU C++17 TESTS 31 31 2867200
94332797 noblegas_user F Sept. 30, 2020, 4:10 p.m. OK GNU C++17 TESTS 31 46 1433600
94341611 Nson F Sept. 30, 2020, 4:55 p.m. OK GNU C++17 TESTS 31 46 1638400
94353936 MorePositiva F Sept. 30, 2020, 6:57 p.m. OK GNU C++17 TESTS 32 46 1638400
94342987 rdd6584 F Sept. 30, 2020, 5:02 p.m. OK GNU C++17 TESTS 31 46 1638400
94377964 Ajax F Oct. 1, 2020, 5:52 a.m. OK GNU C++17 TESTS 32 46 1638400
94368766 dovgopoly F Oct. 1, 2020, 2:36 a.m. OK GNU C++17 TESTS 32 46 1638400
94365118 tourifeng F Oct. 1, 2020, 12:38 a.m. OK GNU C++17 TESTS 32 46 1638400
94360001 Nson F Sept. 30, 2020, 9:03 p.m. OK GNU C++17 TESTS 32 46 1638400
94354085 scopeInfinity F Sept. 30, 2020, 7 p.m. OK GNU C++17 TESTS 32 46 1638400
94345609 IgorSmirnov F Sept. 30, 2020, 5:15 p.m. OK GNU C++17 (64) TESTS 31 31 2252800
94354252 MorePositiva F Sept. 30, 2020, 7:03 p.m. OK GNU C++17 (64) TESTS 32 31 2252800
94366695 RiverHamster F Oct. 1, 2020, 1:37 a.m. OK GNU C++17 (64) TESTS 32 31 4198400
94343248 zed4419 F Sept. 30, 2020, 5:04 p.m. OK GNU C++17 (64) TESTS 31 46 0
94348796 Maripium F Sept. 30, 2020, 5:52 p.m. OK GNU C++17 (64) TESTS 31 46 0
94357057 Mohamed.Sobhy F Sept. 30, 2020, 7:53 p.m. OK GNU C++17 (64) TESTS 32 46 1126400
94337958 emthrm F Sept. 30, 2020, 4:35 p.m. OK GNU C++17 (64) TESTS 31 46 1433600
94337113 _Ash__ F Sept. 30, 2020, 4:31 p.m. OK GNU C++17 (64) TESTS 31 46 1945600
94331619 natsugiri F Sept. 30, 2020, 4:05 p.m. OK GNU C++17 (64) TESTS 31 46 2048000
94375998 Ausmosian F Oct. 1, 2020, 5:21 a.m. OK GNU C++17 (64) TESTS 32 46 2150400
94356857 bobib F Sept. 30, 2020, 7:50 p.m. OK Java 11 TESTS 32 186 0
94357739 qlf9 F Sept. 30, 2020, 8:08 p.m. OK Java 11 TESTS 32 217 0
94331024 lucasr F Sept. 30, 2020, 4:02 p.m. OK Java 11 TESTS 31 218 0
94341104 mphillotry F Sept. 30, 2020, 4:52 p.m. OK Java 11 TESTS 31 233 0
94356617 Jevin F Sept. 30, 2020, 7:46 p.m. OK Java 11 TESTS 32 233 0
94355937 Ahmad F Sept. 30, 2020, 7:33 p.m. OK Java 11 TESTS 32 233 0
94337196 eatmore F Sept. 30, 2020, 4:32 p.m. OK Java 11 TESTS 31 234 0
94360882 skittles1412 F Sept. 30, 2020, 9:30 p.m. OK Java 11 TESTS 32 248 6860800
94343735 slinSSS F Sept. 30, 2020, 5:06 p.m. OK Java 11 TESTS 31 249 0
94334018 Dukkha F Sept. 30, 2020, 4:16 p.m. OK Java 11 TESTS 31 264 0
94364589 cwise F Oct. 1, 2020, 12:16 a.m. OK Java 8 TESTS 32 140 0
94348526 golions F Sept. 30, 2020, 5:50 p.m. OK Java 8 TESTS 31 140 0
94362829 YahiaSherif F Sept. 30, 2020, 10:52 p.m. OK Java 8 TESTS 32 140 0
94355537 fetetriste F Sept. 30, 2020, 7:26 p.m. OK Java 8 TESTS 32 155 0
94337371 AnandOza F Sept. 30, 2020, 4:33 p.m. OK Java 8 TESTS 31 155 0
94372057 flyman3046 F Oct. 1, 2020, 4:02 a.m. OK Java 8 TESTS 32 155 0
94349575 Hemose F Sept. 30, 2020, 5:59 p.m. OK Java 8 TESTS 31 155 0
94352130 MagentaCobra F Sept. 30, 2020, 6:31 p.m. OK Java 8 TESTS 32 155 2457600
94355507 fetetriste F Sept. 30, 2020, 7:25 p.m. OK Java 8 TESTS 32 155 2969600
94336731 overACer F Sept. 30, 2020, 4:30 p.m. OK Java 8 TESTS 31 156 0
94334700 Tlatoani F Sept. 30, 2020, 4:19 p.m. OK Kotlin TESTS 31 171 4198400
94348586 azukun F Sept. 30, 2020, 5:50 p.m. OK Mono C# TESTS 31 156 9318400
94339028 shirowa F Sept. 30, 2020, 4:41 p.m. OK MS C++ 2017 TESTS 31 62 204800
94344408 baep_j F Sept. 30, 2020, 5:10 p.m. OK MS C++ 2017 TESTS 31 62 2355200
94341011 ialakhtin F Sept. 30, 2020, 4:51 p.m. OK MS C++ 2017 TESTS 31 139 1945600
94346376 Yupiteru F Sept. 30, 2020, 5:18 p.m. OK .NET Core C# TESTS 31 124 14643200
94339067 EmK F Sept. 30, 2020, 4:41 p.m. OK .NET Core C# TESTS 31 140 10956800
94358577 Hitikkumar F Sept. 30, 2020, 8:27 p.m. OK PyPy 2 TESTS 32 2121 11468800
94351264 manish.17 F Sept. 30, 2020, 6:19 p.m. OK PyPy 3 TESTS 32 218 12390400
94354315 FlakeLCR F Sept. 30, 2020, 7:04 p.m. OK PyPy 3 TESTS 32 265 16691200
94339869 pineriver F Sept. 30, 2020, 4:45 p.m. OK PyPy 3 TESTS 31 265 19046400
94332094 FlakeLCR F Sept. 30, 2020, 4:07 p.m. OK PyPy 3 TESTS 31 280 16691200
94355556 zii.hrs F Sept. 30, 2020, 7:26 p.m. OK PyPy 3 TESTS 32 280 18227200
94351210 nehan_der_thal F Sept. 30, 2020, 6:18 p.m. OK PyPy 3 TESTS 32 296 9523200
94349210 emil18 F Sept. 30, 2020, 5:56 p.m. OK PyPy 3 TESTS 31 296 10547200
94339879 Kiri8128 F Sept. 30, 2020, 4:45 p.m. OK PyPy 3 TESTS 31 312 11468800
94374223 Kira_1234 F Oct. 1, 2020, 4:48 a.m. OK PyPy 3 TESTS 32 327 10137600
94340209 throwawayatcoder F Sept. 30, 2020, 4:47 p.m. OK PyPy 3 TESTS 31 327 26214400
94358740 Hitikkumar F Sept. 30, 2020, 8:31 p.m. OK Python 2 TESTS 32 389 10752000
94345312 r57shell F Sept. 30, 2020, 5:14 p.m. OK Python 3 TESTS 31 421 11980800
94350941 sh1194 F Sept. 30, 2020, 6:15 p.m. OK Python 3 TESTS 32 436 11878400
94350868 sh1194 F Sept. 30, 2020, 6:14 p.m. OK Python 3 TESTS 32 451 11980800
94350643 sh1194 F Sept. 30, 2020, 6:11 p.m. OK Python 3 TESTS 32 452 11980800
94348152 titia F Sept. 30, 2020, 5:47 p.m. OK Python 3 TESTS 31 467 7680000
94377104 sansen F Oct. 1, 2020, 5:38 a.m. OK Rust TESTS 32 46 2150400
94335090 sansen F Sept. 30, 2020, 4:21 p.m. OK Rust TESTS 31 46 2150400
94350569 ngtkana F Sept. 30, 2020, 6:10 p.m. OK Rust TESTS 32 966 2150400

remove filters

Back to search problems