Codeforces Global Round 1

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
1110 Codeforces Global Round 1 FINISHED False 7200 187979123 Feb. 7, 2019, 1:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 9503 ) C Meaningless Operations PROGRAMMING constructive algorithms math number theory 1500

B"Can the greatest common divisor and bitwise operations have anything in common? It is time to answer this question. Suppose you are given a positive integer a . You want to choose some integer b from 1 to a - 1 inclusive in such a way that the greatest common divisor (GCD) of integers a oplus b and a > & > b is as large as possible. In other words, you'd like to compute the following function: f(a) = max_{0 < b < a}{gcd(a oplus b, a > & > b)}. Here oplus denotes the bitwise XOR operation, and & denotes the bitwise AND operation. The greatest common divisor of two integers x and y is the largest integer g such that both x and y are divided by g without remainder. You are given q integers a_1, a_2, ldots, a_q . For each of these integers compute the largest possible value of the greatest common divisor (when b is chosen optimally). The first line contains an integer q ( 1 <= q <= 10^3 ) -- the number of integers you need to compute the answer for. After that q integers are given, one per line: a_1, a_2, ldots, a_q ( 2 <= a_i <= 2^{25} - 1 ) -- the integers you need to compute the answer for. For each integer, print the answer in the same order as the integers are given in input. For the first integer the optimal choice is b = 1 , then a oplus b = 3 , a > & > b = 0 , and the greatest common divisor of 3 and 0 is 3 . For the second integer one optimal choice is b = 2 , then a oplus b = 1 , a > & > b = 2 , and the greatest common divisor of 1 and 2 is 1 . For the third integer the optimal choice is b = 2 , then a oplus b = 7 , a > & > b = 0 , and the greatest common divisor of 7 and 0 is 7 . "...

Tutorials

The Editorial of the First Codeforces Global Round

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
49596599 ruban C Feb. 7, 2019, 3:32 p.m. OK Delphi TESTS 12 31 41676800 1500
49655033 bcr_233 C Feb. 9, 2019, 9:27 a.m. OK FPC TESTS 12 30 0 1500
55749461 LaSWeeG C June 19, 2019, 11:56 a.m. OK FPC TESTS 12 31 0 1500
49584431 ayatsevich C Feb. 7, 2019, 2:37 p.m. OK FPC TESTS 12 31 0 1500
49621825 ilya_kas C Feb. 8, 2019, 9:49 a.m. OK FPC TESTS 12 31 0 1500
49655110 luogu_bot5 C Feb. 9, 2019, 9:30 a.m. OK FPC TESTS 12 31 0 1500
49595380 PandaIsTheBest C Feb. 7, 2019, 3:27 p.m. OK FPC TESTS 12 31 102400 1500
52140855 sansen C April 1, 2019, 6:38 a.m. OK GNU C11 TESTS 12 30 0 1500
49590733 zilioner C Feb. 7, 2019, 3:05 p.m. OK GNU C11 TESTS 12 30 0 1500
50930049 IAmAPlate C March 7, 2019, 1:32 p.m. OK GNU C11 TESTS 12 30 0 1500
49655539 geeyiiz C Feb. 9, 2019, 9:43 a.m. OK GNU C11 TESTS 12 31 0 1500
49596049 MayankG C Feb. 7, 2019, 3:30 p.m. OK GNU C11 TESTS 12 31 0 1500
51128767 yudashen C March 10, 2019, 12:50 p.m. OK GNU C11 TESTS 12 31 0 1500
49590537 DanielixS C Feb. 7, 2019, 3:04 p.m. OK GNU C11 TESTS 12 31 409600 1500
49656180 samreen22 C Feb. 9, 2019, 10:03 a.m. OK GNU C11 TESTS 12 46 0 1500
49650916 ahshafi C Feb. 9, 2019, 7:35 a.m. OK GNU C11 TESTS 12 46 0 1500
49591401 MYNAMEISSHARIFUL C Feb. 7, 2019, 3:08 p.m. OK GNU C11 TESTS 12 46 0 1500
58848910 vjudge3 C Aug. 15, 2019, 6:40 a.m. OK GNU C++11 TESTS 12 15 0 1500
56822381 lzoilxy C July 11, 2019, 1:44 a.m. OK GNU C++11 TESTS 12 15 0 1500
54914445 oklen C June 1, 2019, 12:56 p.m. OK GNU C++11 TESTS 12 15 0 1500
53094345 BlakeGriffin C April 21, 2019, 12:46 p.m. OK GNU C++11 TESTS 12 15 0 1500
52384302 Filippovich C April 6, 2019, 11:28 a.m. OK GNU C++11 TESTS 12 15 0 1500
52377448 Gankutsuou C April 6, 2019, 8:47 a.m. OK GNU C++11 TESTS 12 15 0 1500
52375502 luogu_bot4 C April 6, 2019, 8:05 a.m. OK GNU C++11 TESTS 12 15 0 1500
52278500 Denisov C April 3, 2019, 3:49 p.m. OK GNU C++11 TESTS 12 15 0 1500
66542818 luogu_bot1 C Dec. 9, 2019, 12:10 p.m. OK GNU C++11 TESTS 12 15 0 1500
60334147 Owen_codeisking C Sept. 10, 2019, 7:39 a.m. OK GNU C++11 TESTS 12 15 0 1500
59809541 arshad2117 C Aug. 31, 2019, 1:09 p.m. OK GNU C++14 TESTS 12 15 0 1500
60267833 79brue C Sept. 8, 2019, 2:08 p.m. OK GNU C++14 TESTS 12 15 0 1500
60472773 vjudge4 C Sept. 13, 2019, 6:29 a.m. OK GNU C++14 TESTS 12 15 0 1500
60474277 vjudge4 C Sept. 13, 2019, 7:14 a.m. OK GNU C++14 TESTS 12 15 0 1500
61980856 L_user C Oct. 6, 2019, 11:59 a.m. OK GNU C++14 TESTS 12 15 0 1500
62517287 vjudge3 C Oct. 13, 2019, 2:43 p.m. OK GNU C++14 TESTS 12 15 0 1500
64100896 vjudge2 C Nov. 2, 2019, 3:25 p.m. OK GNU C++14 TESTS 12 15 0 1500
68951505 aman_703 C Jan. 16, 2020, 6:08 p.m. OK GNU C++14 TESTS 12 15 0 1500
59511006 tingyu C Aug. 26, 2019, 8 a.m. OK GNU C++14 TESTS 12 15 0 1500
58949466 Raj_CF C Aug. 17, 2019, 10:22 a.m. OK GNU C++14 TESTS 12 15 0 1500
62749939 magdy.hasan C Oct. 17, 2019, 12:27 a.m. OK GNU C++17 TESTS 12 15 0 1500
69948497 vjudge5 C Feb. 1, 2020, 8:16 a.m. OK GNU C++17 TESTS 12 15 0 1500
69866097 avisharma C Jan. 30, 2020, 8:28 p.m. OK GNU C++17 TESTS 12 15 0 1500
69522403 vjudge3 C Jan. 25, 2020, 1:49 p.m. OK GNU C++17 TESTS 12 15 0 1500
68886931 OctoBronze C Jan. 15, 2020, 10:18 p.m. OK GNU C++17 TESTS 12 15 0 1500
68311589 dbadulin C Jan. 6, 2020, 11:26 a.m. OK GNU C++17 TESTS 12 15 0 1500
67956100 mr_backlog C Dec. 30, 2019, 9:43 a.m. OK GNU C++17 TESTS 12 15 0 1500
66544695 vjudge4 C Dec. 9, 2019, 12:48 p.m. OK GNU C++17 TESTS 12 15 0 1500
65700039 poshak396 C Nov. 25, 2019, 10:20 a.m. OK GNU C++17 TESTS 12 15 0 1500
62573898 cprayer C Oct. 14, 2019, 3:18 p.m. OK GNU C++17 TESTS 12 15 0 1500
49609431 savinov C Feb. 7, 2019, 10:06 p.m. OK Go TESTS 12 31 716800 1500
49586866 chanbakjsd C Feb. 7, 2019, 2:48 p.m. OK Go TESTS 12 46 0 1500
49891133 sui_generis_ C Feb. 14, 2019, 3:45 a.m. OK Haskell TESTS 12 46 102400 1500
49813885 Black_Fregat C Feb. 12, 2019, 4:01 a.m. OK Haskell TESTS 12 77 5324800 1500
49624704 Celesta C Feb. 8, 2019, 11:19 a.m. OK Java 8 TESTS 12 108 0 1500
49603695 Ziklon C Feb. 7, 2019, 6:21 p.m. OK Java 8 TESTS 12 108 0 1500
51762381 MaxHeap C March 23, 2019, 2:19 p.m. OK Java 8 TESTS 12 108 0 1500
49848332 Sharon C Feb. 13, 2019, 12:40 a.m. OK Java 8 TESTS 12 108 0 1500
49659210 xodiac C Feb. 9, 2019, 11:33 a.m. OK Java 8 TESTS 12 108 0 1500
50034344 di_halt C Feb. 16, 2019, 7:53 p.m. OK Java 8 TESTS 12 109 0 1500
68025198 saurabhs1206 C Jan. 1, 2020, 5:01 a.m. OK Java 8 TESTS 12 109 0 1500
50472999 happybelly C Feb. 25, 2019, 3:14 a.m. OK Java 8 TESTS 12 109 0 1500
50034009 falken_great C Feb. 16, 2019, 7:32 p.m. OK Java 8 TESTS 12 109 0 1500
49674529 ashubeckham C Feb. 9, 2019, 6:52 p.m. OK Java 8 TESTS 12 109 0 1500
50553727 exs C Feb. 27, 2019, 6:38 a.m. OK Kotlin TESTS 12 140 0 1500
49903007 glider.g C Feb. 14, 2019, 10:24 a.m. OK Kotlin TESTS 12 170 0 1500
49639404 Giangvp C Feb. 8, 2019, 8:36 p.m. OK Mono C# TESTS 12 46 0 1500
55569576 og.kostya C June 14, 2019, 5:46 p.m. OK Mono C# TESTS 12 46 0 1500
49591594 Coder_D C Feb. 7, 2019, 3:09 p.m. OK Mono C# TESTS 12 46 0 1500
49589443 mircea85 C Feb. 7, 2019, 2:59 p.m. OK Mono C# TESTS 12 46 102400 1500
49590577 omikad C Feb. 7, 2019, 3:05 p.m. OK Mono C# TESTS 12 62 102400 1500
51240840 nemars C March 12, 2019, 9:52 p.m. OK Mono C# TESTS 12 62 4198400 1500
52917651 TrabajoNocturno C April 17, 2019, 4:29 p.m. OK Mono C# TESTS 12 62 69120000 1500
66543469 vjudge5 C Dec. 9, 2019, 12:24 p.m. OK MS C++ TESTS 12 15 0 1500
51110658 vjudge2 C March 10, 2019, 4:06 a.m. OK MS C++ TESTS 12 30 0 1500
50081558 vjudge4 C Feb. 18, 2019, 4:33 a.m. OK MS C++ TESTS 12 30 0 1500
64107502 tarattata1 C Nov. 2, 2019, 5:16 p.m. OK MS C++ TESTS 12 30 0 1500
64105009 vjudge3 C Nov. 2, 2019, 4:17 p.m. OK MS C++ TESTS 12 30 0 1500
66543568 vjudge4 C Dec. 9, 2019, 12:26 p.m. OK MS C++ TESTS 12 31 0 1500
66542639 vjudge5 C Dec. 9, 2019, 12:06 p.m. OK MS C++ TESTS 12 31 0 1500
66544176 vjudge2 C Dec. 9, 2019, 12:37 p.m. OK MS C++ TESTS 12 31 0 1500
66544885 vjudge1 C Dec. 9, 2019, 12:52 p.m. OK MS C++ TESTS 12 31 0 1500
66545691 vjudge4 C Dec. 9, 2019, 1:07 p.m. OK MS C++ TESTS 12 31 0 1500
49618800 CLF C Feb. 8, 2019, 8:01 a.m. OK MS C++ 2017 TESTS 12 15 0 1500
49587274 hahaleyile C Feb. 7, 2019, 2:49 p.m. OK MS C++ 2017 TESTS 12 30 0 1500
52792102 Kucha C April 15, 2019, 5:59 p.m. OK MS C++ 2017 TESTS 12 30 0 1500
62349069 coder_pikachu C Oct. 11, 2019, 8:43 a.m. OK MS C++ 2017 TESTS 12 30 0 1500
66541797 zhanghengrui C Dec. 9, 2019, 11:48 a.m. OK MS C++ 2017 TESTS 12 30 0 1500
50077662 stoundmire C Feb. 17, 2019, 11:58 p.m. OK MS C++ 2017 TESTS 12 30 0 1500
49611532 jongheon C Feb. 8, 2019, 1:30 a.m. OK MS C++ 2017 TESTS 12 30 0 1500
62916754 AleksanderBalobanov C Oct. 19, 2019, 8:52 a.m. OK MS C++ 2017 TESTS 12 31 0 1500
66541966 vjudge2 C Dec. 9, 2019, 11:52 a.m. OK MS C++ 2017 TESTS 12 31 0 1500
64727854 yuanyuan2048 C Nov. 12, 2019, 7:10 a.m. OK MS C++ 2017 TESTS 12 31 0 1500
49833593 Stanislav666 C Feb. 12, 2019, 3:02 p.m. OK PascalABC.NET TESTS 12 327 0 1500
49590210 Mukundan314 C Feb. 7, 2019, 3:03 p.m. OK PyPy 2 TESTS 12 124 204800 1500
51431483 andiso C March 18, 2019, 12:56 a.m. OK PyPy 2 TESTS 12 155 204800 1500
50726945 sy_chen C March 3, 2019, 10:09 a.m. OK PyPy 2 TESTS 12 202 2252800 1500
49586230 _kawaii_neko_ C Feb. 7, 2019, 2:45 p.m. OK PyPy 2 TESTS 12 202 2457600 1500
58345591 soumyasarkar1998 C Aug. 5, 2019, 2:50 p.m. OK PyPy 2 TESTS 12 217 2662400 1500
49696236 dut200901102 C Feb. 10, 2019, 1:54 p.m. OK PyPy 2 TESTS 12 218 2457600 1500
49587142 gatsko C Feb. 7, 2019, 2:49 p.m. OK PyPy 2 TESTS 12 701 2150400 1500
49619320 adshin21 C Feb. 8, 2019, 8:23 a.m. OK PyPy 3 TESTS 12 140 1228800 1500
49637240 Stephan C Feb. 8, 2019, 7:21 p.m. OK PyPy 3 TESTS 12 155 614400 1500
49600112 abhishekbhr C Feb. 7, 2019, 4:51 p.m. OK PyPy 3 TESTS 12 155 921600 1500
49599495 njw1204 C Feb. 7, 2019, 4:41 p.m. OK PyPy 3 TESTS 12 155 921600 1500
49608327 bkalra92 C Feb. 7, 2019, 9:04 p.m. OK PyPy 3 TESTS 12 171 1126400 1500
52363157 chaudhary_19 C April 5, 2019, 9:25 p.m. OK PyPy 3 TESTS 12 171 1228800 1500
49634259 MotaSanyal C Feb. 8, 2019, 5:50 p.m. OK PyPy 3 TESTS 12 171 1945600 1500
49641645 meooow C Feb. 8, 2019, 10:37 p.m. OK PyPy 3 TESTS 12 171 2150400 1500
54586741 Aidos C May 25, 2019, 7:11 a.m. OK PyPy 3 TESTS 12 171 2252800 1500
49585105 111vad111 C Feb. 7, 2019, 2:40 p.m. OK PyPy 3 TESTS 12 171 2867200 1500
49590160 fourteenflames C Feb. 7, 2019, 3:03 p.m. OK Python 2 TESTS 12 187 0 1500
52944933 Nika86 C April 18, 2019, 11:08 a.m. OK Python 2 TESTS 12 202 512000 1500
52279998 Revenant_ C April 3, 2019, 4:30 p.m. OK Python 2 TESTS 12 217 0 1500
49596323 AntiLeaf C Feb. 7, 2019, 3:31 p.m. OK Python 2 TESTS 12 311 0 1500
49675081 thenewguy39 noob77777 C Feb. 9, 2019, 7:12 p.m. OK Python 2 TESTS 12 452 307200 1500
49618264 keerthi11 C Feb. 8, 2019, 7:38 a.m. OK Python 3 TESTS 12 108 0 1500
49605597 nikeshthapa255 C Feb. 7, 2019, 7:18 p.m. OK Python 3 TESTS 12 109 0 1500
49587254 julianferres C Feb. 7, 2019, 2:49 p.m. OK Python 3 TESTS 12 109 0 1500
49586713 jluo27 C Feb. 7, 2019, 2:47 p.m. OK Python 3 TESTS 12 109 0 1500
49584452 tiantian5 C Feb. 7, 2019, 2:37 p.m. OK Python 3 TESTS 12 109 0 1500
68430974 nealzane C Jan. 9, 2020, 6:48 a.m. OK Python 3 TESTS 12 109 307200 1500
49782338 Forsten C Feb. 11, 2019, 6:04 p.m. OK Python 3 TESTS 12 109 409600 1500
49588241 Kochan C Feb. 7, 2019, 2:54 p.m. OK Python 3 TESTS 12 109 409600 1500
49586601 okumura C Feb. 7, 2019, 2:47 p.m. OK Python 3 TESTS 12 109 409600 1500
61570025 LintuStorm C Sept. 30, 2019, 6:20 p.m. OK Python 3 TESTS 12 124 0 1500
49587652 rahdpp C Feb. 7, 2019, 2:51 p.m. OK Ruby TESTS 12 62 0 1500
49590540 mash97 C Feb. 7, 2019, 3:04 p.m. OK Ruby TESTS 12 77 0 1500
49948190 yakamoto C Feb. 15, 2019, 12:57 p.m. OK Scala TESTS 12 452 0 1500

remove filters

Back to search problems