2023-2024 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred)

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
1912 2023-2024 ICPC, NERC, Northern Eurasia Onsite (Unrated, Online Mirror, ICPC Rules, Teams Preferred) FINISHED False 18000 29370299 Dec. 13, 2023, 7:35 a.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 1524 ) D Divisibility Test PROGRAMMING math 1900

B'Daisy has recently learned divisibility rules for integers and she is fascinated by them. One of the tests she learned is a divisibility test by 3. You can find a sum of all digits of a decimal number and check if the resulting sum is divisible by 3. Moreover, the resulting sum of digits is congruent modulo 3 to the original number -- the remainder modulo 3 is preserved. For example, 75 equiv 7 + 5 pmod 3 . Daisy is specifically interested in such remainder preserving divisibility tests. There are more examples like that that she learned for decimal integers (integers base 10): Similar tests can be found in other bases. For example, to test divisibility modulo 5 for octal numbers (base 8), find an alternating sum of groups of two digits. For example, 1234_8 equiv -12_8 + 34_8 pmod 5 . Daisy wants to find such rules for a given base b . She is interested in three kinds of divisibility rules: It is not always possible to find such a divisibility rule. For example, in base 10 there is no such test for divisibility modulo 6, even though different approaches to testing divisibility by 6 exist. Given base b and modulo n , Daisy wants to know the smallest group size k for which such a divisibility test exits. There are several tests in the input. The first line of the input contains an integer t -- the number of tests. The next t lines describe the tests. Each test consists of a line with two integers b and n -- the base and the modulo ( b, n ge 2 ). The sum of all b values in the input does not exceed 10^6 , and the sum of all n values in the input does not exceed 10^6 . Write t lines -- a line for each test in the input. On a line for a test write a single integer 0 if the divisibility test for a given b and n does not exist. Otherwise, write two integers a and k , where a is the kind of the divisibility test (1, 2, or 3) and $'...

Tutorials

Tutorials (PDF)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
237106032 liuhengxi D Dec. 13, 2023, 11:34 p.m. OK GNU C++14 TESTS 29 15 0 1900
236993259 Survivor_winner superyijin CALLSIGN_NULL_ D Dec. 13, 2023, 8:36 a.m. OK GNU C++14 TESTS 29 15 0 1900
236986094 cage Whiteqwq crescent_yhw D Dec. 13, 2023, 7:51 a.m. OK GNU C++14 TESTS 29 15 1024000 1900
237007004 _Fake4Fun D Dec. 13, 2023, 9:53 a.m. OK GNU C++14 TESTS 29 15 3993600 1900
237114167 omeganot D Dec. 14, 2023, 3:30 a.m. OK GNU C++14 TESTS 29 15 6451200 1900
237107184 QQH D Dec. 14, 2023, 12:16 a.m. OK GNU C++14 TESTS 29 31 0 1900
237012868 xvzhiming D Dec. 13, 2023, 10:17 a.m. OK GNU C++14 TESTS 29 31 0 1900
236995132 The_way_to_Rome xlwang D Dec. 13, 2023, 8:43 a.m. OK GNU C++14 TESTS 29 31 0 1900
236993770 ship2077 Yu_Jie Samsara_soul D Dec. 13, 2023, 8:40 a.m. OK GNU C++14 TESTS 29 31 0 1900
236989981 zxx D Dec. 13, 2023, 8:17 a.m. OK GNU C++14 TESTS 29 31 0 1900
237039632 Komarzysko IcanBEyourHero hocki_klocki_myszka_miki D Dec. 13, 2023, 12:22 p.m. OK GNU C++17 TESTS 29 15 204800 1900
237002695 yyf_0404 D Dec. 13, 2023, 9:27 a.m. OK GNU C++17 TESTS 29 30 3993600 1900
237104896 SamuelLH D Dec. 13, 2023, 10:54 p.m. OK GNU C++17 TESTS 29 31 0 1900
237097481 linvg D Dec. 13, 2023, 8:31 p.m. OK GNU C++17 TESTS 29 31 0 1900
237013267 GJ.Ro D Dec. 13, 2023, 10:21 a.m. OK GNU C++17 TESTS 29 31 0 1900
237006053 wilcot D Dec. 13, 2023, 9:45 a.m. OK GNU C++17 TESTS 29 31 0 1900
236999392 Na2a SimB4 Temirulan D Dec. 13, 2023, 9:09 a.m. OK GNU C++17 TESTS 29 31 0 1900
236995692 pertifiedcobra shubhamgrg1000 Chimpanzee D Dec. 13, 2023, 8:48 a.m. OK GNU C++17 TESTS 29 31 0 1900
236993117 dhruvsomani vikram108 ParadigmShift D Dec. 13, 2023, 8:35 a.m. OK GNU C++17 TESTS 29 31 0 1900
236990391 Sung.An D Dec. 13, 2023, 8:20 a.m. OK GNU C++17 TESTS 29 31 0 1900
236991065 wzc_IOI_czw D Dec. 13, 2023, 8:25 a.m. OK GNU C++17 (64) TESTS 29 15 0 1900
236990089 OIerGuge1030 3_CelL t0LJR1st D Dec. 13, 2023, 8:18 a.m. OK GNU C++17 (64) TESTS 29 15 0 1900
236989626 arnold518 YeongTree Karuna D Dec. 13, 2023, 8:14 a.m. OK GNU C++17 (64) TESTS 29 15 0 1900
236995297 Nyanya_ clfzs ljr1234 D Dec. 13, 2023, 8:45 a.m. OK GNU C++17 (64) TESTS 29 15 1024000 1900
237041203 XH_v lxllxs D Dec. 13, 2023, 12:33 p.m. OK GNU C++17 (64) TESTS 29 31 0 1900
237003990 chy_2011 D Dec. 13, 2023, 9:38 a.m. OK GNU C++17 (64) TESTS 29 31 0 1900
236999210 jinqihao2026 leihonglongyin zwh2008 D Dec. 13, 2023, 9:08 a.m. OK GNU C++17 (64) TESTS 29 31 0 1900
236993606 suomynonA Cocoly1990 luanmenglei D Dec. 13, 2023, 8:39 a.m. OK GNU C++17 (64) TESTS 29 31 0 1900
236988954 CrTsIr SanweiTreap GeZhiyuan D Dec. 13, 2023, 8:08 a.m. OK GNU C++17 (64) TESTS 29 31 0 1900
236988908 painsacrifice locsey __chtholly__ D Dec. 13, 2023, 8:08 a.m. OK GNU C++17 (64) TESTS 29 31 0 1900
237092953 Radewoosh D Dec. 13, 2023, 7:30 p.m. OK GNU C++20 (64) TESTS 29 15 0 1900
237029570 fireheart17 swapash Abhi8803 D Dec. 13, 2023, 11:35 a.m. OK GNU C++20 (64) TESTS 29 15 0 1900
237026642 Akash. Amdadul Hasib_16 D Dec. 13, 2023, 11:28 a.m. OK GNU C++20 (64) TESTS 29 15 0 1900
237006313 Linx Bucketsmith D Dec. 13, 2023, 9:47 a.m. OK GNU C++20 (64) TESTS 29 15 0 1900
236996758 ub33 luckyanthonyan nella17 D Dec. 13, 2023, 8:57 a.m. OK GNU C++20 (64) TESTS 29 15 0 1900
236990414 -1e11 D Dec. 13, 2023, 8:20 a.m. OK GNU C++20 (64) TESTS 29 15 0 1900
236990050 cjZYZtcl chenyifanlx fzx D Dec. 13, 2023, 8:17 a.m. OK GNU C++20 (64) TESTS 29 15 0 1900
236990048 Sofapuden Temmie D Dec. 13, 2023, 8:17 a.m. OK GNU C++20 (64) TESTS 29 15 0 1900
236986591 maroonrk hos.lyric maspy D Dec. 13, 2023, 7:55 a.m. OK GNU C++20 (64) TESTS 29 15 0 1900
236993391 Turkhuuu D Dec. 13, 2023, 8:37 a.m. OK GNU C++20 (64) TESTS 29 15 102400 1900
236999722 yvbf D Dec. 13, 2023, 9:12 a.m. OK Java 8 TESTS 29 124 0 1900
236987780 arvindf232 D Dec. 13, 2023, 8:04 a.m. OK Kotlin 1.6 TESTS 29 202 409600 1900
237114030 surajcodeforce D Dec. 14, 2023, 3:27 a.m. OK PyPy 3 TESTS 29 217 6144000 1900
237105759 xiaowuc1 D Dec. 13, 2023, 11:24 p.m. OK PyPy 3-64 TESTS 29 124 11059200 1900
237006344 00zijian D Dec. 13, 2023, 9:47 a.m. OK PyPy 3-64 TESTS 29 139 9318400 1900
237122393 abineth D Dec. 14, 2023, 5:46 a.m. OK PyPy 3-64 TESTS 29 140 23654400 1900
237030152 mavr D Dec. 13, 2023, 11:40 a.m. OK PyPy 3-64 TESTS 29 155 9420800 1900
236996897 USYDLDH D Dec. 13, 2023, 8:58 a.m. OK PyPy 3-64 TESTS 29 187 8704000 1900
237096325 drNarzullayev D Dec. 13, 2023, 8:15 p.m. OK PyPy 3-64 TESTS 29 545 10035200 1900
237002266 Sunnat D Dec. 13, 2023, 9:23 a.m. OK Python 3 TESTS 29 326 0 1900
237080841 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900
237080821 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900
237080774 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900
237080721 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900
237080706 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900
237080702 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900
237080643 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900
237080629 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900
237080624 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900
237080513 D Dec. 13, 2023, 5:25 p.m. OK Unknown TESTS 0 0 0 1900

remove filters

Back to search problems