Codeforces Global Round 26

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
1984 Codeforces Global Round 26 FINISHED False 10800 19236263 June 9, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 21583 ) A Strange Splitting PROGRAMMING constructive algorithms

B'Define the range of a non-empty array to be the maximum value minus the minimum value. For example, the range of [1,4,2] is 4-1=3 . You are given an array a_1, a_2, ldots, a_n of length n geq 3 . It is guaranteed a is sorted. You have to color each element of a red or blue so that: If there does not exist any such coloring, you should report it. If there are multiple valid colorings, you can print any of them. The first line contains a single integer t ( 1 <= q t <= q 100 ) -- the number of test cases. The first line of each test case contains an integer n ( 3 <= q n <= q 50 ) -- the length of the array. The second line of each test case contains n integers a_1, a_2, ldots, a_n ( 1 <= q a_i <= q 10^9 ). It is guaranteed a_1 <= q a_2 <= q ldots <= q a_{n - 1} <= q a_{n} . For each test case, if it is impossible to color a to satisfy all the constraints, output texttt{NO} . Otherwise, first output texttt{YES} . Then, output a string s of length n . For 1 <= q i <= q n , if you color a_i red, s_i should be texttt{R} . For 1 <= q i <= q n , if you color a_i blue, s_i should be texttt{B} . In the first test case, given the array [1, 1, 2, 2] , we can color the second element blue and the remaining elements red; then the range of the red elements [1, 2, 2] is 2-1=1 , and the range of the blue elements [1] is 1-1=0 . In the second test case, we can color the first, second, fourth and fifth elements [1, 2, 4, 5] blue and the remaining elements [3] red. The range of the red elements is 3 - 3 = 0 and the range of the blue elements is 5 - 1 = 4 , which are different. In the third test case, it can be shown there is no way to color a = [3, 3, 3] to satisfy the constraints. '...

Tutorials

Codeforces Global Round 26 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
264997633 xzzduang A June 10, 2024, 4:06 a.m. OK C++14 (GCC 6-32) TESTS 4 31 0
264985102 dragonc0der A June 9, 2024, 11:58 p.m. OK C++14 (GCC 6-32) TESTS 4 31 0
264967291 sashshaikh12 A June 9, 2024, 6:47 p.m. OK C++14 (GCC 6-32) TESTS 4 31 0
265002915 Srihitha_Potta A June 10, 2024, 5:14 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
265000461 ShengaTime A June 10, 2024, 4:44 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
264999055 iit2022213 A June 10, 2024, 4:25 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
264996723 ParasJoshi2005 A June 10, 2024, 3:52 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
264997915 mtnvdsk A June 10, 2024, 4:10 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
265004823 lianhao A June 10, 2024, 5:35 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
265003466 one_punch_Moon A June 10, 2024, 5:20 a.m. OK C++14 (GCC 6-32) TESTS 4 46 0
264967980 amrendrakr A June 9, 2024, 6:53 p.m. OK C++17 (GCC 7-32) TESTS 4 30 0
265003266 pangs A June 10, 2024, 5:18 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
265001464 aayush_369 A June 10, 2024, 4:56 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
264998738 ankit1373 A June 10, 2024, 4:21 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
264995290 Byte_Explorer A June 10, 2024, 3:30 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
264990642 Anas_Refaei A June 10, 2024, 2:15 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
264990460 leviathanX A June 10, 2024, 2:12 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
264985444 Hiyabye A June 10, 2024, 12:09 a.m. OK C++17 (GCC 7-32) TESTS 4 30 0
264975782 Ansh0216 A June 9, 2024, 8:28 p.m. OK C++17 (GCC 7-32) TESTS 4 30 0
265005953 agarwalkunal A June 10, 2024, 5:47 a.m. OK C++17 (GCC 7-32) TESTS 4 30 7987200
264982169 HI2BA A June 9, 2024, 10:28 p.m. OK C++20 (GCC 13-64) TESTS 4 30 0
265007458 mzyx A June 10, 2024, 6:02 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
265000886 summersnowflake A June 10, 2024, 4:50 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
264990504 Nlll A June 10, 2024, 2:12 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
264989993 -RAGNAR- A June 10, 2024, 2:03 a.m. OK C++20 (GCC 13-64) TESTS 4 30 0
264983165 _A7mad A June 9, 2024, 10:55 p.m. OK C++20 (GCC 13-64) TESTS 4 30 0
264981944 LipArcanjo A June 9, 2024, 10:22 p.m. OK C++20 (GCC 13-64) TESTS 4 30 0
264985017 dcchendada A June 9, 2024, 11:55 p.m. OK C++20 (GCC 13-64) TESTS 4 30 4403200
265006747 Ankity_07 A June 10, 2024, 5:55 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
265003735 pradyumnkangule A June 10, 2024, 5:23 a.m. OK C++20 (GCC 13-64) TESTS 4 31 0
264981696 bluemegane A June 9, 2024, 10:15 p.m. OK C# 8 TESTS 4 108 102400
264965377 anirudh2005 A June 9, 2024, 6:32 p.m. OK GNU C11 TESTS 4 30 0
265003174 rishabh_sankla A June 10, 2024, 5:17 a.m. OK GNU C11 TESTS 4 30 102400
264997216 Oberlin A June 10, 2024, 4 a.m. OK GNU C11 TESTS 4 31 102400
264971687 eh_Sami A June 9, 2024, 7:33 p.m. OK GNU C11 TESTS 4 46 0
265006677 fr0st A June 10, 2024, 5:54 a.m. OK Go TESTS 4 61 102400
264978138 crapcode A June 9, 2024, 9:04 p.m. OK Go TESTS 4 62 102400
264983893 nithin_bharathi A June 9, 2024, 11:19 p.m. OK Java 21 TESTS 4 187 204800
264969650 sg2themax A June 9, 2024, 7:08 p.m. OK Java 21 TESTS 4 218 409600
264967467 himneesh9 A June 9, 2024, 6:49 p.m. OK Java 21 TESTS 4 218 409600
264967308 kalyanburri A June 9, 2024, 6:47 p.m. OK Java 21 TESTS 4 233 614400
265001747 relaxgameing20212012 A June 10, 2024, 5 a.m. OK Java 21 TESTS 4 233 921600
264981637 rajeeb199 A June 9, 2024, 10:13 p.m. OK Java 21 TESTS 4 249 0
264987648 goalboy A June 10, 2024, 1:10 a.m. OK Java 21 TESTS 4 249 307200
265003282 frey4 A June 10, 2024, 5:18 a.m. OK Java 21 TESTS 4 249 512000
264960102 aka_rsh A June 9, 2024, 5:27 p.m. OK Java 21 TESTS 4 249 512000
264997508 Teja__ A June 10, 2024, 4:05 a.m. OK Java 21 TESTS 4 249 716800
264985779 desaizeeshan22 A June 10, 2024, 12:20 a.m. OK Java 8 TESTS 4 140 0
264957920 Itaki_Ukika A June 9, 2024, 5:19 p.m. OK Java 8 TESTS 4 155 0
264998322 om172 A June 10, 2024, 4:15 a.m. OK Java 8 TESTS 4 171 0
264968890 chay10ya A June 9, 2024, 7:01 p.m. OK Java 8 TESTS 4 187 0
264999010 y4n9b0 A June 10, 2024, 4:25 a.m. OK Kotlin 1.9 TESTS 4 155 0
264997338 y4n9b0 A June 10, 2024, 4:02 a.m. OK Kotlin 1.9 TESTS 4 186 102400
264996700 diyuuu A June 10, 2024, 3:52 a.m. OK PyPy 3 TESTS 4 77 1536000
265003170 jhdonghj112 A June 10, 2024, 5:17 a.m. OK PyPy 3 TESTS 4 93 1638400
264979519 rashadalsharpini A June 9, 2024, 9:28 p.m. OK PyPy 3 TESTS 4 108 2457600
264965946 sai-17 A June 9, 2024, 6:36 p.m. OK PyPy 3 TESTS 4 109 1638400
264979417 rashadalsharpini A June 9, 2024, 9:26 p.m. OK PyPy 3 TESTS 4 109 2457600
264953629 shubham22488 A June 9, 2024, 5:04 p.m. OK PyPy 3 TESTS 4 124 1536000
264957302 TLE_Pussy A June 9, 2024, 5:17 p.m. OK PyPy 3 TESTS 4 124 2048000
264979605 rashadalsharpini A June 9, 2024, 9:29 p.m. OK PyPy 3 TESTS 4 124 2457600
264991616 Samaritan02 A June 10, 2024, 2:32 a.m. OK PyPy 3 TESTS 4 218 2048000
264983371 nealzane A June 9, 2024, 11:02 p.m. OK PyPy 3 TESTS 4 265 4915200
264975687 jvatsal0709 A June 9, 2024, 8:26 p.m. OK PyPy 3-64 TESTS 4 61 1331200
264977085 FTGUPP A June 9, 2024, 8:47 p.m. OK PyPy 3-64 TESTS 4 62 0
264969700 eugalt A June 9, 2024, 7:09 p.m. OK PyPy 3-64 TESTS 4 62 0
264980076 Leo25Darklight A June 9, 2024, 9:38 p.m. OK PyPy 3-64 TESTS 4 77 0
265004194 hjc4 A June 10, 2024, 5:28 a.m. OK PyPy 3-64 TESTS 4 77 1331200
264997601 papdichaat A June 10, 2024, 4:06 a.m. OK PyPy 3-64 TESTS 4 77 1331200
264977718 pTaran17 A June 9, 2024, 8:57 p.m. OK PyPy 3-64 TESTS 4 77 1331200
264977123 pTaran17 A June 9, 2024, 8:47 p.m. OK PyPy 3-64 TESTS 4 77 1331200
264971940 talha_javed27 A June 9, 2024, 7:37 p.m. OK PyPy 3-64 TESTS 4 77 1331200
264970705 gleblk A June 9, 2024, 7:21 p.m. OK PyPy 3-64 TESTS 4 77 1331200
264998744 biltharesatyendra A June 10, 2024, 4:21 a.m. OK Python 2 TESTS 4 62 0
264976924 NotQuiteMyTempo A June 9, 2024, 8:44 p.m. OK Python 3 TESTS 4 46 0
264968326 wildwarrior_44 A June 9, 2024, 6:56 p.m. OK Python 3 TESTS 4 46 0
264995722 RookieCookie777 A June 10, 2024, 3:37 a.m. OK Python 3 TESTS 4 46 1024000
264982023 lo_krlo_baatt A June 9, 2024, 10:24 p.m. OK Python 3 TESTS 4 46 1024000
264996078 ___a_s_1_2___ A June 10, 2024, 3:42 a.m. OK Python 3 TESTS 4 61 0
264977070 muhammadosama984 A June 9, 2024, 8:47 p.m. OK Python 3 TESTS 4 61 0
265005030 hegos34578 A June 10, 2024, 5:37 a.m. OK Python 3 TESTS 4 62 0
265000442 Qa_2me A June 10, 2024, 4:44 a.m. OK Python 3 TESTS 4 62 0
264997978 manoharsingh2402 A June 10, 2024, 4:11 a.m. OK Python 3 TESTS 4 62 0
264983288 Brackets12 A June 9, 2024, 10:59 p.m. OK Python 3 TESTS 4 62 0
264974154 0x81 A June 9, 2024, 8:05 p.m. OK Ruby 3 TESTS 4 343 1228800
264957381 fieubat2x A June 9, 2024, 5:17 p.m. OK Rust 2021 TESTS 4 46 0

remove filters

Back to search problems