Codeforces Global Round 6

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
1266 Codeforces Global Round 6 FINISHED False 9000 160757711 Dec. 17, 2019, 3:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 16187 ) A Competitive Programmer PROGRAMMING chinese remainder theorem math 1000

B'Bob is a competitive programmer. He wants to become red, and for that he needs a strict training regime. He went to the annual meeting of grandmasters and asked n of them how much effort they needed to reach red. "Oh, I just spent x_i hours solving problems", said the i -th of them. Bob wants to train his math skills, so for each answer he wrote down the number of minutes ( 60 cdot x_i ), thanked the grandmasters and went home. Bob could write numbers with leading zeroes -- for example, if some grandmaster answered that he had spent 2 hours, Bob could write 000120 instead of 120 . Alice wanted to tease Bob and so she took the numbers Bob wrote down, and for each of them she did one of the following independently: This way, Alice generated n numbers, denoted y_1 , ..., y_n . For each of the numbers, help Bob determine whether y_i can be a permutation of a number divisible by 60 (possibly with leading zeroes). The first line contains a single integer n ( 1 <= q n <= q 418 ) -- the number of grandmasters Bob asked. Then n lines follow, the i -th of which contains a single integer y_i -- the number that Alice wrote down. Each of these numbers has between 2 and 100 digits '0 ' through '9 '. They can contain leading zeroes. Output n lines. For each i , output the following. If it is possible to rearrange the digits of y_i such that the resulting number is divisible by 60 , output "red" (quotes for clarity). Otherwise, output "cyan". In the first example, there is one rearrangement that yields a number divisible by 60 , and that is 360 . In the second example, there are two solutions. One is 060 and the second is 600 . In the third example, there are 6 possible rearrangments: 025 , 052 , 205 , 250 , 502 , 520 . None of these numbers is divisible by 60 . In the fourth exam'...

Tutorials

Codeforces Global Round 6 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
67122642 RadioShrek A Dec. 17, 2019, 6:48 p.m. OK Clang++17 Diagnostics TESTS 11 46 1024000 1000
67106934 daut-dlang A Dec. 17, 2019, 4:27 p.m. OK D TESTS 10 30 0 1000
67080892 fluffyowl A Dec. 17, 2019, 3:15 p.m. OK D TESTS 10 31 0 1000
67099626 iica A Dec. 17, 2019, 3:58 p.m. OK D TESTS 10 31 4300800 1000
67084459 hos.lyric A Dec. 17, 2019, 3:21 p.m. OK D TESTS 10 46 0 1000
67086282 Gassa A Dec. 17, 2019, 3:25 p.m. OK D TESTS 10 46 0 1000
67079503 ruban A Dec. 17, 2019, 3:12 p.m. OK Delphi TESTS 10 31 13721600 1000
67080461 LaSWeeG A Dec. 17, 2019, 3:14 p.m. OK FPC TESTS 10 30 409600 1000
67088469 Dbvivi A Dec. 17, 2019, 3:29 p.m. OK FPC TESTS 10 31 204800 1000
67080029 darkkcyan A Dec. 17, 2019, 3:14 p.m. OK FPC TESTS 10 31 307200 1000
67462056 Aftery142 A Dec. 23, 2019, 9:34 a.m. OK FPC TESTS 11 31 409600 1000
67085575 Samartha A Dec. 17, 2019, 3:23 p.m. OK GNU C11 TESTS 10 15 0 1000
67081889 Nepumi A Dec. 17, 2019, 3:17 p.m. OK GNU C11 TESTS 10 15 0 1000
67097097 ShuvoMalakar A Dec. 17, 2019, 3:51 p.m. OK GNU C11 TESTS 10 15 0 1000
67098190 Triumph_2000 A Dec. 17, 2019, 3:54 p.m. OK GNU C11 TESTS 10 15 0 1000
67109557 haitrinh A Dec. 17, 2019, 4:39 p.m. OK GNU C11 TESTS 10 15 0 1000
67118427 Bawa A Dec. 17, 2019, 5:30 p.m. OK GNU C11 TESTS 10 15 0 1000
67119045 rainboy A Dec. 17, 2019, 5:33 p.m. OK GNU C11 TESTS 10 15 0 1000
67175812 ratul_supertramp A Dec. 18, 2019, 7:11 p.m. OK GNU C11 TESTS 11 15 0 1000
67082163 shubh101220001 A Dec. 17, 2019, 3:17 p.m. OK GNU C11 TESTS 10 15 0 1000
67093370 tushar3105 A Dec. 17, 2019, 3:40 p.m. OK GNU C11 TESTS 10 15 11059200 1000
67656179 DavidLescano A Dec. 26, 2019, 1:59 p.m. OK GNU C++11 TESTS 11 15 0 1000
67656819 FuadBinAkhter A Dec. 26, 2019, 2:13 p.m. OK GNU C++11 TESTS 11 15 0 1000
67973777 KhandokerEbrahim A Dec. 30, 2019, 4:03 p.m. OK GNU C++11 TESTS 11 15 0 1000
67996985 9957 A Dec. 31, 2019, 8:44 a.m. OK GNU C++11 TESTS 11 15 0 1000
68029307 Sakamoto A Jan. 1, 2020, 8:11 a.m. OK GNU C++11 TESTS 11 15 0 1000
68329201 luogu_bot2 A Jan. 6, 2020, 6:02 p.m. OK GNU C++11 TESTS 11 15 0 1000
68470025 shengzihang A Jan. 10, 2020, 12:28 a.m. OK GNU C++11 TESTS 11 15 0 1000
68696114 ioc_20 A Jan. 13, 2020, 7:58 a.m. OK GNU C++11 TESTS 11 15 0 1000
69003397 salmadwekat37 A Jan. 17, 2020, 8:58 p.m. OK GNU C++11 TESTS 11 15 0 1000
69549235 89264270823 A Jan. 26, 2020, 5:30 a.m. OK GNU C++11 TESTS 11 15 0 1000
68655686 Ezio-Sarthak A Jan. 12, 2020, 12:09 p.m. OK GNU C++14 TESTS 11 15 0 1000
69586047 yez-zain A Jan. 26, 2020, 7:32 p.m. OK GNU C++14 TESTS 11 15 0 1000
69252731 TearinFree A Jan. 21, 2020, 2:45 p.m. OK GNU C++14 TESTS 11 15 0 1000
69189956 BORN.FOR.PORN A Jan. 20, 2020, 1:12 p.m. OK GNU C++14 TESTS 11 15 0 1000
68999432 vjudge5 A Jan. 17, 2020, 6:52 p.m. OK GNU C++14 TESTS 11 15 0 1000
68993539 yuvi0403 A Jan. 17, 2020, 4:16 p.m. OK GNU C++14 TESTS 11 15 0 1000
68991173 vjudge4 A Jan. 17, 2020, 3:15 p.m. OK GNU C++14 TESTS 11 15 0 1000
68882856 _BabaYAGA_ A Jan. 15, 2020, 7:35 p.m. OK GNU C++14 TESTS 11 15 0 1000
68871303 anushkaagr275 A Jan. 15, 2020, 3:18 p.m. OK GNU C++14 TESTS 11 15 0 1000
68847411 KasugaAyumu A Jan. 15, 2020, 7:52 a.m. OK GNU C++14 TESTS 11 15 0 1000
68714947 BLACK_DARK A Jan. 13, 2020, 2:09 p.m. OK GNU C++17 TESTS 11 15 0 1000
68770253 1351753894 A Jan. 14, 2020, 11:35 a.m. OK GNU C++17 TESTS 11 15 0 1000
68847603 AbduSharif A Jan. 15, 2020, 7:55 a.m. OK GNU C++17 TESTS 11 15 0 1000
68971407 qqq17770027225 A Jan. 17, 2020, 7:09 a.m. OK GNU C++17 TESTS 11 15 0 1000
69014546 shining_flash A Jan. 18, 2020, 4:54 a.m. OK GNU C++17 TESTS 11 15 0 1000
69047229 maverick_S A Jan. 18, 2020, 11:26 a.m. OK GNU C++17 TESTS 11 15 0 1000
69056184 lehanh19 A Jan. 18, 2020, 2:34 p.m. OK GNU C++17 TESTS 11 15 0 1000
69183858 peroon A Jan. 20, 2020, 11:14 a.m. OK GNU C++17 TESTS 11 15 0 1000
69195415 Ragubans A Jan. 20, 2020, 2:46 p.m. OK GNU C++17 TESTS 11 15 0 1000
69252891 Panji A Jan. 21, 2020, 2:48 p.m. OK GNU C++17 TESTS 11 15 0 1000
67079641 caidodo0_0 A Dec. 17, 2019, 3:13 p.m. OK Go TESTS 10 31 0 1000
67194766 stasomega1 A Dec. 19, 2019, 8:35 a.m. OK Go TESTS 11 109 0 1000
67091181 Aidar.Babanov A Dec. 17, 2019, 3:35 p.m. OK Go TESTS 10 109 0 1000
67176110 Russell_Emerine A Dec. 18, 2019, 7:20 p.m. OK Haskell TESTS 11 46 102400 1000
67869976 serafimkoo A Dec. 29, 2019, 11:05 a.m. OK Java 11 TESTS 11 171 0 1000
67625884 __dip__ A Dec. 25, 2019, 9:44 p.m. OK Java 11 TESTS 11 171 0 1000
67144558 satya_p54 A Dec. 18, 2019, 8:16 a.m. OK Java 11 TESTS 11 171 0 1000
67128034 nick_301 A Dec. 17, 2019, 9:13 p.m. OK Java 11 TESTS 11 171 0 1000
67080659 avijit_agarwal A Dec. 17, 2019, 3:15 p.m. OK Java 11 TESTS 10 171 0 1000
67080247 vaibhavpulastya A Dec. 17, 2019, 3:14 p.m. OK Java 11 TESTS 10 171 0 1000
67078102 eatmore A Dec. 17, 2019, 3:09 p.m. OK Java 11 TESTS 10 171 0 1000
68097797 Anonymous A Jan. 2, 2020, 10:26 p.m. OK Java 11 TESTS 11 186 0 1000
67079916 machhra A Dec. 17, 2019, 3:13 p.m. OK Java 11 TESTS 10 186 0 1000
68369628 Lucina A Jan. 7, 2020, 5:15 p.m. OK Java 11 TESTS 11 187 0 1000
67138996 Shokersss A Dec. 18, 2019, 5:51 a.m. OK Java 8 TESTS 11 93 0 1000
67083115 danielgalvis98 A Dec. 17, 2019, 3:19 p.m. OK Java 8 TESTS 10 93 0 1000
68213317 asafiul A Jan. 4, 2020, 8:41 p.m. OK Java 8 TESTS 11 108 0 1000
67677908 flyingpurplepeopleeater A Dec. 27, 2019, 4:09 a.m. OK Java 8 TESTS 11 108 0 1000
67287835 MubtasimShahriar A Dec. 20, 2019, 2:45 p.m. OK Java 8 TESTS 11 108 0 1000
67165230 supriya14 A Dec. 18, 2019, 3:19 p.m. OK Java 8 TESTS 11 108 0 1000
67146330 garg_vibhor A Dec. 18, 2019, 9 a.m. OK Java 8 TESTS 11 108 0 1000
67140232 saurabh0611 A Dec. 18, 2019, 6:25 a.m. OK Java 8 TESTS 11 108 0 1000
67136731 Optimist_Code A Dec. 18, 2019, 4:42 a.m. OK Java 8 TESTS 11 108 0 1000
67130802 SpargelTarzan A Dec. 17, 2019, 11:51 p.m. OK Java 8 TESTS 11 108 0 1000
67193268 Duy A Dec. 19, 2019, 7:59 a.m. OK JavaScript TESTS 11 30 102400 1000
69450092 Nobita_Noobie A Jan. 24, 2020, 5:45 a.m. OK JavaScript TESTS 11 31 921600 1000
69071186 vjudge4 A Jan. 18, 2020, 10:01 p.m. OK JavaScript TESTS 11 46 921600 1000
67134696 Spheniscine A Dec. 18, 2019, 3:18 a.m. OK Kotlin TESTS 11 109 0 1000
67212049 duckladydinh A Dec. 19, 2019, 2:23 p.m. OK Kotlin TESTS 11 124 0 1000
67134903 Spheniscine A Dec. 18, 2019, 3:27 a.m. OK Kotlin TESTS 11 124 0 1000
67129847 Tlatoani A Dec. 17, 2019, 10:39 p.m. OK Kotlin TESTS 11 139 0 1000
67188415 nevergiveup2.0 A Dec. 19, 2019, 5:59 a.m. OK Kotlin TESTS 11 139 0 1000
67083913 Differum A Dec. 17, 2019, 3:20 p.m. OK Kotlin TESTS 10 140 0 1000
67096645 agent-10 A Dec. 17, 2019, 3:49 p.m. OK Kotlin TESTS 10 140 0 1000
67779970 a11eca A Dec. 28, 2019, 10:34 a.m. OK Kotlin TESTS 11 156 0 1000
67082504 AsuraPro A Dec. 17, 2019, 3:18 p.m. OK Kotlin TESTS 10 202 921600 1000
67078646 tomomo2b2 A Dec. 17, 2019, 3:11 p.m. OK Mono C# TESTS 10 31 512000 1000
67115914 ravinem1 A Dec. 17, 2019, 5:15 p.m. OK Mono C# TESTS 10 46 0 1000
67196198 nadilk A Dec. 19, 2019, 9:08 a.m. OK Mono C# TESTS 11 46 0 1000
67084901 _DAC_ A Dec. 17, 2019, 3:22 p.m. OK Mono C# TESTS 10 61 0 1000
67152126 TRR A Dec. 18, 2019, 11:12 a.m. OK Mono C# TESTS 11 61 0 1000
67130353 kolokolo21kolo A Dec. 17, 2019, 11:12 p.m. OK Mono C# TESTS 11 61 0 1000
67113091 thetansquared A Dec. 17, 2019, 4:58 p.m. OK Mono C# TESTS 10 61 0 1000
67129909 bziook A Dec. 17, 2019, 10:43 p.m. OK Mono C# TESTS 11 61 3788800 1000
67629796 camypaper A Dec. 26, 2019, 2:46 a.m. OK Mono C# TESTS 11 61 54579200 1000
67084683 mban259 A Dec. 17, 2019, 3:22 p.m. OK Mono C# TESTS 10 62 102400 1000
67080437 math957963 A Dec. 17, 2019, 3:14 p.m. OK MS C++ TESTS 10 30 0 1000
67105234 LebArt A Dec. 17, 2019, 4:19 p.m. OK MS C++ TESTS 10 30 0 1000
67085518 tarattata1 A Dec. 17, 2019, 3:23 p.m. OK MS C++ TESTS 10 30 0 1000
68635259 vjudge1 A Jan. 12, 2020, 5:30 a.m. OK MS C++ TESTS 11 31 0 1000
68590165 vjudge4 A Jan. 11, 2020, 12:25 p.m. OK MS C++ TESTS 11 31 0 1000
67207917 vjudge5 A Dec. 19, 2019, 1:05 p.m. OK MS C++ TESTS 11 31 0 1000
67194572 platter A Dec. 19, 2019, 8:30 a.m. OK MS C++ TESTS 11 31 0 1000
67078194 CrashMaster A Dec. 17, 2019, 3:09 p.m. OK MS C++ 2017 TESTS 10 15 0 1000
67082025 De1phin A Dec. 17, 2019, 3:17 p.m. OK MS C++ 2017 TESTS 10 15 0 1000
67081999 MinhNguye A Dec. 17, 2019, 3:17 p.m. OK MS C++ 2017 TESTS 10 15 0 1000
67079710 JuicyCloud12609 A Dec. 17, 2019, 3:13 p.m. OK MS C++ 2017 TESTS 10 15 0 1000
67079339 youx A Dec. 17, 2019, 3:12 p.m. OK MS C++ 2017 TESTS 10 15 0 1000
67077803 Prostoegor239 A Dec. 17, 2019, 3:08 p.m. OK MS C++ 2017 TESTS 10 15 0 1000
67141034 PersistentProgrammer A Dec. 18, 2019, 6:47 a.m. OK MS C++ 2017 TESTS 11 15 102400 1000
67302076 karthiking A Dec. 20, 2019, 7:11 p.m. OK MS C++ 2017 TESTS 11 30 0 1000
68581488 vjudge5 A Jan. 11, 2020, 10:12 a.m. OK MS C++ 2017 TESTS 11 30 0 1000
67272494 beemax A Dec. 20, 2019, 8:52 a.m. OK MS C++ 2017 TESTS 11 30 0 1000
67099531 tomadimitrie A Dec. 17, 2019, 3:58 p.m. OK Node.js TESTS 10 156 2048000 1000
67086772 AliAbdallah A Dec. 17, 2019, 3:26 p.m. OK Node.js TESTS 10 187 2150400 1000
67083161 shivam1420 A Dec. 17, 2019, 3:19 p.m. OK Node.js TESTS 10 218 2048000 1000
67175031 Nidavellir A Dec. 18, 2019, 6:51 p.m. OK PascalABC.NET TESTS 11 342 102400 1000
67079807 rsFalse A Dec. 17, 2019, 3:13 p.m. OK Perl TESTS 10 62 102400 1000
67078012 bcollet A Dec. 17, 2019, 3:09 p.m. OK PyPy 2 TESTS 10 124 819200 1000
67079169 parasmehan123 A Dec. 17, 2019, 3:12 p.m. OK PyPy 2 TESTS 10 140 1740800 1000
67078096 alexwice A Dec. 17, 2019, 3:09 p.m. OK PyPy 2 TESTS 10 155 512000 1000
67079689 pajenegod A Dec. 17, 2019, 3:13 p.m. OK PyPy 2 TESTS 10 155 1331200 1000
67141309 iamprayush A Dec. 18, 2019, 6:53 a.m. OK PyPy 2 TESTS 11 156 1843200 1000
67079079 MVP A Dec. 17, 2019, 3:12 p.m. OK PyPy 2 TESTS 10 170 1843200 1000
67080751 Mukundan314 A Dec. 17, 2019, 3:15 p.m. OK PyPy 2 TESTS 10 171 1126400 1000
67106898 Pyar.Mahobat.Dhoka.Hai A Dec. 17, 2019, 4:27 p.m. OK PyPy 2 TESTS 10 171 1945600 1000
67078283 akifpatel A Dec. 17, 2019, 3:10 p.m. OK PyPy 2 TESTS 10 218 2457600 1000
67085866 shehebe A Dec. 17, 2019, 3:24 p.m. OK PyPy 2 TESTS 10 312 8601600 1000
67136740 anishde85 A Dec. 18, 2019, 4:42 a.m. OK PyPy 3 TESTS 11 155 1433600 1000
67080337 love_wjn A Dec. 17, 2019, 3:14 p.m. OK PyPy 3 TESTS 10 155 1638400 1000
67988510 nealzane A Dec. 31, 2019, 2:03 a.m. OK PyPy 3 TESTS 11 155 1740800 1000
67079738 Akash_123 A Dec. 17, 2019, 3:13 p.m. OK PyPy 3 TESTS 10 155 1945600 1000
67083516 pineriver A Dec. 17, 2019, 3:20 p.m. OK PyPy 3 TESTS 10 155 2252800 1000
67081827 wishcode A Dec. 17, 2019, 3:17 p.m. OK PyPy 3 TESTS 10 155 2457600 1000
67168975 IrOty1oX5uSp4 A Dec. 18, 2019, 4:35 p.m. OK PyPy 3 TESTS 11 155 2867200 1000
67093959 hamdi.bamar A Dec. 17, 2019, 3:42 p.m. OK PyPy 3 TESTS 10 156 1331200 1000
67104721 ltphuochieu A Dec. 17, 2019, 4:17 p.m. OK PyPy 3 TESTS 10 156 1638400 1000
67153697 wtf A Dec. 18, 2019, 11:45 a.m. OK PyPy 3 TESTS 11 156 1843200 1000
67102967 elistark A Dec. 17, 2019, 4:10 p.m. OK Python 2 TESTS 10 170 0 1000
69549053 vjudge3 A Jan. 26, 2020, 5:23 a.m. OK Python 2 TESTS 11 171 0 1000
67082701 grayGoose A Dec. 17, 2019, 3:18 p.m. OK Python 2 TESTS 10 171 0 1000
67456787 SoSooding A Dec. 23, 2019, 7:16 a.m. OK Python 2 TESTS 11 171 102400 1000
67078691 nwi A Dec. 17, 2019, 3:11 p.m. OK Python 2 TESTS 10 186 102400 1000
67084976 kpiiitb A Dec. 17, 2019, 3:22 p.m. OK Python 2 TESTS 10 187 0 1000
67194468 tanay67 A Dec. 19, 2019, 8:28 a.m. OK Python 2 TESTS 11 202 0 1000
67083374 ashu249 A Dec. 17, 2019, 3:19 p.m. OK Python 2 TESTS 10 202 0 1000
67157464 Himanshu77 A Dec. 18, 2019, 12:56 p.m. OK Python 2 TESTS 11 218 102400 1000
67478747 bhavsar A Dec. 23, 2019, 3:16 p.m. OK Python 3 TESTS 11 93 307200 1000
67108391 RachitTiwari A Dec. 17, 2019, 4:33 p.m. OK Python 3 TESTS 10 93 307200 1000
68703702 mehulk5245 A Jan. 13, 2020, 10:24 a.m. OK Python 3 TESTS 11 108 0 1000
67179859 FlyingBag65 A Dec. 18, 2019, 9:49 p.m. OK Python 3 TESTS 11 108 0 1000
67110050 nguyenduyminhthong A Dec. 17, 2019, 4:41 p.m. OK Python 3 TESTS 10 108 0 1000
67457198 Jsxft A Dec. 23, 2019, 7:28 a.m. OK Python 3 TESTS 11 108 307200 1000
67104691 rkguptagkp462 A Dec. 17, 2019, 4:17 p.m. OK Python 3 TESTS 10 108 307200 1000
67095145 guru_280 A Dec. 17, 2019, 3:45 p.m. OK Python 3 TESTS 10 108 307200 1000
67094520 bhavyanarang09 A Dec. 17, 2019, 3:43 p.m. OK Python 3 TESTS 10 108 307200 1000
67091339 iphone_wala_cm_banega A Dec. 17, 2019, 3:35 p.m. OK Python 3 TESTS 10 108 307200 1000
67988917 Rara. A Dec. 31, 2019, 2:34 a.m. OK Ruby TESTS 11 93 204800 1000
67080051 sansen A Dec. 17, 2019, 3:14 p.m. OK Rust TESTS 10 30 204800 1000
67111358 Valdem A Dec. 17, 2019, 4:48 p.m. OK Rust TESTS 10 31 0 1000
67078536 tuna_salad A Dec. 17, 2019, 3:10 p.m. OK Rust TESTS 10 31 307200 1000
67133988 kobae964 A Dec. 18, 2019, 2:41 a.m. OK Rust TESTS 11 31 512000 1000
67086962 manta1130 A Dec. 17, 2019, 3:26 p.m. OK Rust TESTS 10 46 102400 1000
67080288 wrick A Dec. 17, 2019, 3:14 p.m. OK Scala TESTS 10 499 0 1000

remove filters

Back to search problems