Codeforces Round 867 (Div. 3)

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
1822 Codeforces Round 867 (Div. 3) FINISHED False 8100 54833063 April 24, 2023, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 7327 ) G1 Magic Triples (Easy Version) PROGRAMMING brute force math number theory

B'This is the easy version of the problem. The only difference is that in this version, a_i <= 10^6 . For a given sequence of n integers a , a triple (i, j, k) is called magic if: Kolya received a sequence of integers a as a gift and now wants to count the number of magic triples for it. Help him with this task! Note that there are no constraints on the order of integers i , j and k . The first line contains a single integer t ( 1 <= t <= 10^4 ) -- the number of test cases. The description of the test cases follows. The first line of the test case contains a single integer n ( 3 <= n <= 2 cdot 10^5 ) -- the length of the sequence. The second line of the test contains n integers a_1, a_2, a_3, ... , a_n ( 1 <= a_i <= 10^6 ) -- the elements of the sequence a . The sum of n over all test cases does not exceed 2 cdot 10^5 . For each test case, output a single integer -- the number of magic triples for the sequence a . In the first example, there are 6 magic triples for the sequence a -- (2, 3, 5) , (2, 5, 3) , (3, 2, 5) , (3, 5, 2) , (5, 2, 3) , (5, 3, 2) . In the second example, there is a single magic triple for the sequence a -- (2, 1, 3) . '...

Tutorials

Codeforces Round #867 (Div. 3) Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
203351155 1435730 G1 April 24, 2023, 5:24 p.m. OK GNU C11 TESTS 17 405 8806400
203353768 Cu_OH_2 G1 April 24, 2023, 5:44 p.m. OK GNU C++14 TESTS 17 249 8294400
203395654 KhaledFarhat G1 April 25, 2023, 4:54 a.m. OK GNU C++14 TESTS 22 249 52838400
203379718 DitaMirika G1 April 25, 2023, 12:05 a.m. OK GNU C++14 TESTS 22 295 6553600
203393451 xbzxzn G1 April 25, 2023, 4:19 a.m. OK GNU C++14 TESTS 22 436 8294400
203346881 faraz16iqbal G1 April 24, 2023, 5 p.m. OK GNU C++14 TESTS 15 436 42700800
203390395 icesmoke G1 April 25, 2023, 3:33 a.m. OK GNU C++14 TESTS 22 452 14643200
203385742 tahoangquan2 G1 April 25, 2023, 2:15 a.m. OK GNU C++14 TESTS 22 546 16281600
203358384 pikachuuuu G1 April 24, 2023, 6:26 p.m. OK GNU C++14 TESTS 17 561 4812800
203395487 qasxcvgwe G1 April 25, 2023, 4:51 a.m. OK GNU C++14 TESTS 22 639 9011200
203379752 bianyuxuan88 G1 April 25, 2023, 12:06 a.m. OK GNU C++14 TESTS 22 685 8806400
203358205 regain0002 G1 April 24, 2023, 6:24 p.m. OK GNU C++17 TESTS 17 139 8396800
203394777 Mo-Ehab G1 April 25, 2023, 4:40 a.m. OK GNU C++17 TESTS 22 139 13619200
203387890 Hex-willappear G1 April 25, 2023, 2:54 a.m. OK GNU C++17 TESTS 22 140 5632000
203389404 WaAccept G1 April 25, 2023, 3:18 a.m. OK GNU C++17 TESTS 22 140 160358400
203378985 Robshak G1 April 24, 2023, 11:46 p.m. OK GNU C++17 TESTS 22 187 8294400
203360932 LLIEPJIOK G1 April 24, 2023, 6:51 p.m. OK GNU C++17 TESTS 17 202 8294400
203370049 Ghost_in_LCL G1 April 24, 2023, 8:44 p.m. OK GNU C++17 TESTS 22 202 14745600
203393469 Cheerio2021 G1 April 25, 2023, 4:19 a.m. OK GNU C++17 TESTS 22 265 9216000
203379329 lxyb G1 April 24, 2023, 11:55 p.m. OK GNU C++17 TESTS 22 265 12390400
203360434 Ertugrul28 G1 April 24, 2023, 6:46 p.m. OK GNU C++17 TESTS 17 280 18841600
203349238 Colblue G1 April 24, 2023, 5:12 p.m. OK GNU C++17 (64) TESTS 17 78 4812800
203392870 inzamam_inz G1 April 25, 2023, 4:10 a.m. OK GNU C++17 (64) TESTS 22 186 9625600
203383364 Aurora0915 G1 April 25, 2023, 1:25 a.m. OK GNU C++17 (64) TESTS 22 187 156160000
203352087 fan_of_han1 G1 April 24, 2023, 5:31 p.m. OK GNU C++17 (64) TESTS 17 202 29798400
203379956 yangjl G1 April 25, 2023, 12:10 a.m. OK GNU C++17 (64) TESTS 22 218 5632000
203349808 alicetheprincess G1 April 24, 2023, 5:16 p.m. OK GNU C++17 (64) TESTS 17 264 6144000
203348963 Be11T_ G1 April 24, 2023, 5:10 p.m. OK GNU C++17 (64) TESTS 17 264 13926400
203351616 illume2021 G1 April 24, 2023, 5:27 p.m. OK GNU C++17 (64) TESTS 17 280 6963200
203350120 alicetheprincess G1 April 24, 2023, 5:18 p.m. OK GNU C++17 (64) TESTS 17 327 6144000
203365548 wisetree G1 April 24, 2023, 7:41 p.m. OK GNU C++17 (64) TESTS 17 343 9625600
203346202 Greedious G1 April 24, 2023, 4:57 p.m. OK GNU C++20 (64) TESTS 15 62 4812800
203362003 fishcathu. G1 April 24, 2023, 7:02 p.m. OK GNU C++20 (64) TESTS 17 78 819200
203356227 Ycy0fmine G1 April 24, 2023, 6:05 p.m. OK GNU C++20 (64) TESTS 17 78 4812800
203375513 Hadi_Alhamed G1 April 24, 2023, 10:25 p.m. OK GNU C++20 (64) TESTS 22 78 11776000
203380627 zhangmanyi G1 April 25, 2023, 12:25 a.m. OK GNU C++20 (64) TESTS 22 93 4812800
203349229 nazmuShakib G1 April 24, 2023, 5:12 p.m. OK GNU C++20 (64) TESTS 17 93 10137600
203389297 threethreetwothree G1 April 25, 2023, 3:16 a.m. OK GNU C++20 (64) TESTS 22 93 18534400
203353564 acfmidinsw G1 April 24, 2023, 5:43 p.m. OK GNU C++20 (64) TESTS 17 109 13721600
203398103 mohit13579_ G1 April 25, 2023, 5:29 a.m. OK GNU C++20 (64) TESTS 22 109 40140800
203380426 KM_Parvez G1 April 25, 2023, 12:21 a.m. OK GNU C++20 (64) TESTS 22 124 6144000
203398314 0x3F G1 April 25, 2023, 5:31 a.m. OK Go TESTS 22 249 12083200
203370842 v13 G1 April 24, 2023, 8:56 p.m. OK Go TESTS 22 1669 14131200
203389083 0x3F G1 April 25, 2023, 3:13 a.m. OK Go TESTS 22 1903 12083200
203388725 0x3F G1 April 25, 2023, 3:08 a.m. OK Go TESTS 22 2152 11980800
203352507 the_unseen G1 April 24, 2023, 5:34 p.m. OK Java 11 TESTS 17 686 77926400
203361950 ch2001 G1 April 24, 2023, 7:02 p.m. OK Java 11 TESTS 17 748 12492800
203361223 SkadiTheCorruptHeart G1 April 24, 2023, 6:54 p.m. OK Java 11 TESTS 17 966 16076800
203354220 SkadiTheCorruptHeart G1 April 24, 2023, 5:48 p.m. OK Java 11 TESTS 17 982 15974400
203350133 g_square G1 April 24, 2023, 5:18 p.m. OK Java 11 TESTS 17 1184 20070400
203346557 uttaran_das G1 April 24, 2023, 4:58 p.m. OK Java 11 TESTS 15 1528 18329600
203350891 dzhi G1 April 24, 2023, 5:22 p.m. OK Java 11 TESTS 17 2339 8294400
203345079 the_unseen G1 April 24, 2023, 4:53 p.m. OK Java 11 TESTS 15 3603 16998400
203375946 Yousef_Badr G1 April 24, 2023, 10:34 p.m. OK Java 11 TESTS 22 3806 7987200
203367323 aruniscoding G1 April 24, 2023, 8:04 p.m. OK Java 17 TESTS 22 374 17510400
203392427 CCS_Covenant G1 April 25, 2023, 4:02 a.m. OK Java 17 TESTS 22 514 10240000
203367532 aruniscoding G1 April 24, 2023, 8:07 p.m. OK Java 17 TESTS 22 623 16384000
203352519 chenxiaoming G1 April 24, 2023, 5:34 p.m. OK Java 17 TESTS 17 2808 9113600
203392793 IanISam G1 April 25, 2023, 4:09 a.m. OK Java 8 TESTS 22 358 14028800
203389340 IanISam G1 April 25, 2023, 3:17 a.m. OK Java 8 TESTS 22 358 14745600
203391569 IanISam G1 April 25, 2023, 3:50 a.m. OK Java 8 TESTS 22 358 15052800
203395822 IanISam G1 April 25, 2023, 4:56 a.m. OK Java 8 TESTS 22 358 15462400
203393327 IanISam G1 April 25, 2023, 4:17 a.m. OK Java 8 TESTS 22 373 14028800
203383919 IanISam G1 April 25, 2023, 1:37 a.m. OK Java 8 TESTS 22 373 15257600
203396854 IanISam G1 April 25, 2023, 5:11 a.m. OK Java 8 TESTS 22 389 12288000
203396748 IanISam G1 April 25, 2023, 5:10 a.m. OK Java 8 TESTS 22 389 12288000
203396501 chuquwan9964 G1 April 25, 2023, 5:06 a.m. OK Java 8 TESTS 22 405 13209600
203395701 IanISam G1 April 25, 2023, 4:54 a.m. OK Java 8 TESTS 22 405 14131200
203394315 ishybee G1 April 25, 2023, 4:33 a.m. OK MS C++ 2017 TESTS 22 1669 4812800
203395190 ishybee G1 April 25, 2023, 4:47 a.m. OK MS C++ 2017 TESTS 22 1715 5632000
203395994 ishybee G1 April 25, 2023, 4:59 a.m. OK MS C++ 2017 TESTS 22 1824 5632000
203395887 ishybee G1 April 25, 2023, 4:57 a.m. OK MS C++ 2017 TESTS 22 2230 5632000
203381264 andy0liang G1 April 25, 2023, 12:40 a.m. OK PyPy 3 TESTS 22 1606 24473600
203381234 andy0liang G1 April 25, 2023, 12:39 a.m. OK PyPy 3 TESTS 22 1653 24371200
203381568 andy0liang G1 April 25, 2023, 12:46 a.m. OK PyPy 3 TESTS 22 1684 24371200
203381271 andy0liang G1 April 25, 2023, 12:40 a.m. OK PyPy 3 TESTS 22 1715 24473600
203353630 agarwalkomalmay20 G1 April 24, 2023, 5:43 p.m. OK PyPy 3 TESTS 17 2791 24166400
203351998 dinoracks G1 April 24, 2023, 5:30 p.m. OK PyPy 3 TESTS 17 2823 24268800
203382005 liupengsay G1 April 25, 2023, 12:56 a.m. OK PyPy 3 TESTS 22 3727 190976000
203366600 gardengnome G1 April 24, 2023, 7:55 p.m. OK PyPy 3-64 TESTS 17 373 44441600
203372766 gardengnome G1 April 24, 2023, 9:28 p.m. OK PyPy 3-64 TESTS 22 420 44441600
203382516 liupengsay G1 April 25, 2023, 1:07 a.m. OK PyPy 3-64 TESTS 22 530 49049600
203372958 hxu10 G1 April 24, 2023, 9:31 p.m. OK PyPy 3-64 TESTS 22 842 45875200
203387342 pythonist_viking G1 April 25, 2023, 2:45 a.m. OK PyPy 3-64 TESTS 22 1044 51609600
203382357 liupengsay G1 April 25, 2023, 1:04 a.m. OK PyPy 3-64 TESTS 22 1045 50688000
203386258 pythonist_viking G1 April 25, 2023, 2:24 a.m. OK PyPy 3-64 TESTS 22 1201 40550400
203372619 hxu10 G1 April 24, 2023, 9:25 p.m. OK PyPy 3-64 TESTS 22 1450 33177600
203371070 hvbird G1 April 24, 2023, 9 p.m. OK PyPy 3-64 TESTS 22 1575 31129600
203389128 Little_Sheep_Yawn G1 April 25, 2023, 3:14 a.m. OK PyPy 3-64 TESTS 22 1762 36454400
203361435 khom G1 April 24, 2023, 6:56 p.m. OK Python 3 TESTS 17 2168 128102400
203359406 khom G1 April 24, 2023, 6:37 p.m. OK Python 3 TESTS 17 2947 166092800
203345686 0npata G1 April 24, 2023, 4:55 p.m. OK Rust 2021 TESTS 15 343 13824000
203352336 God_Man G1 April 24, 2023, 5:32 p.m. OK Rust 2021 TESTS 17 577 9113600
203347638 naut3 G1 April 24, 2023, 5:03 p.m. OK Rust 2021 TESTS 15 577 9113600
203396059 cpchenpi G1 April 25, 2023, 4:59 a.m. OK Rust 2021 TESTS 22 1044 12492800
203368452 titia G1 April 24, 2023, 8:20 p.m. OK Rust 2021 TESTS 22 1201 9728000

remove filters

Back to search problems