Codeforces Round 933 (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
1941 Codeforces Round 933 (Div. 3) FINISHED False 8100 21655499 March 11, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 42638 ) A Rudolf and the Ticket PROGRAMMING brute force math sortings two pointers

B'Rudolf is going to visit Bernard, and he decided to take the metro to get to him. The ticket can be purchased at a machine that accepts exactly two coins, the sum of which does not exceed k . Rudolf has two pockets with coins. In the left pocket, there are n coins with denominations b_1, b_2, ... , b_n . In the right pocket, there are m coins with denominations c_1, c_2, ... , c_m . He wants to choose exactly one coin from the left pocket and exactly one coin from the right pocket (two coins in total). Help Rudolf determine how many ways there are to select indices f and s such that b_f + c_s <= k . The first line contains an integer t ( 1 <= t <= 100 ) -- the number of test cases. Then follows the description of each test case. The first line of each test case contains three natural numbers n , m , and k ( 1 <= n, m <= 100, 1 <= k <= 2000 ) -- the number of coins in the left and right pockets, and the maximum sum of two coins for the ticket payment at the counter, respectively. The second line of each test case contains n integers b_i ( 1 <= b_i <= 1000 ) -- the denominations of coins in the left pocket. The third line of each test case contains m integers c_i ( 1 <= c_i <= 1000 ) -- the denominations of coins in the right pocket. For each testcase, output a single integer -- the number of ways Rudolf can select two coins, taking one from each pocket, so that the sum of the coins does not exceed k . Note that the pairs indicate the indices of the coins in the array, not their denominations. In the first test case, Rudolf can choose the following pairs of coins: [1, 1], [1, 2], [1, 4], [2, 1], [2, 2], [2, 4] . In the second test case, Rudolf cannot choose one coin from each pocket in any way, as the sum of any two elements from the first and second arrays will exceed the value of k=4 . In the third test case, Rudolf can'...

Tutorials

127018

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
250864320 chenxu2001 A March 12, 2024, 1:47 a.m. OK C# 10 TESTS 3 31 1433600
250872145 sh_arman A March 12, 2024, 3:43 a.m. OK C# 10 TESTS 3 46 1536000
250876204 mirvahabinima A March 12, 2024, 4:33 a.m. OK C++14 (GCC 6-32) TESTS 3 0 0
250875767 muskan1010 A March 12, 2024, 4:28 a.m. OK C++14 (GCC 6-32) TESTS 3 0 0
250844837 akramzaabi7 A March 11, 2024, 8:36 p.m. OK C++14 (GCC 6-32) TESTS 3 0 0
250825666 Joy4057 A March 11, 2024, 5:52 p.m. OK C++14 (GCC 6-32) TESTS 3 0 0
250828554 shivacharan.17 A March 11, 2024, 6:12 p.m. OK C++14 (GCC 6-32) TESTS 3 0 0
250877129 tiaokeng A March 12, 2024, 4:45 a.m. OK C++14 (GCC 6-32) TESTS 3 0 0
250837131 loj05 A March 11, 2024, 7:24 p.m. OK C++14 (GCC 6-32) TESTS 3 0 102400
250849712 abgt797 A March 11, 2024, 9:29 p.m. OK C++14 (GCC 6-32) TESTS 3 0 102400
250843203 Mohmed-gado A March 11, 2024, 8:20 p.m. OK C++14 (GCC 6-32) TESTS 3 0 102400
250831136 KRISHNA. A March 11, 2024, 6:32 p.m. OK C++14 (GCC 6-32) TESTS 3 0 102400
250875906 _Samar A March 12, 2024, 4:30 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250883657 orange_rain A March 12, 2024, 5:47 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250882738 Rachin02 A March 12, 2024, 5:40 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250882650 HU__N A March 12, 2024, 5:39 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250880365 Abdallah_Alqiran A March 12, 2024, 5:20 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250880066 lzh99594 A March 12, 2024, 5:17 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250877350 VA_Fu A March 12, 2024, 4:47 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250877299 ymr_ymr_ A March 12, 2024, 4:47 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250875009 Bin1234 A March 12, 2024, 4:18 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250874970 VNG232605_Tran_Xuan_Dat A March 12, 2024, 4:18 a.m. OK C++17 (GCC 7-32) TESTS 3 0 0
250853215 bluemegane A March 11, 2024, 10:20 p.m. OK C# 8 TESTS 3 108 1228800
250857845 muntasirmuhammad555 A March 11, 2024, 11:49 p.m. OK GNU C11 TESTS 3 15 0
250864979 dheeraj_0207 A March 12, 2024, 1:59 a.m. OK GNU C11 TESTS 3 15 0
250849758 11017 A March 11, 2024, 9:30 p.m. OK GNU C11 TESTS 3 15 0
250834967 hurdi A March 11, 2024, 7:04 p.m. OK GNU C11 TESTS 3 15 0
250821643 Dhikshitha A March 11, 2024, 5:27 p.m. OK GNU C11 TESTS 3 15 307200
250828858 EmranAli A March 11, 2024, 6:15 p.m. OK GNU C11 TESTS 3 15 307200
250835799 rishabh_sankla A March 11, 2024, 7:11 p.m. OK GNU C11 TESTS 3 15 307200
250834139 ar_prosonno A March 11, 2024, 6:56 p.m. OK GNU C11 TESTS 3 15 307200
250826269 Saad01 A March 11, 2024, 5:56 p.m. OK GNU C11 TESTS 3 15 307200
250824411 EmranAli A March 11, 2024, 5:43 p.m. OK GNU C11 TESTS 3 15 307200
250885192 tom_pan1901 A March 12, 2024, 6 a.m. OK Go TESTS 3 15 307200
250829273 nguyenquocthao00 A March 11, 2024, 6:18 p.m. OK Go TESTS 3 15 921600
250864211 _ShenHua_ A March 12, 2024, 1:45 a.m. OK Java 21 TESTS 3 217 0
250832468 aishwarykesarwani A March 11, 2024, 6:42 p.m. OK Java 21 TESTS 3 217 0
250869960 fightingxjz A March 12, 2024, 3:14 a.m. OK Java 21 TESTS 3 218 0
250877764 ramitg254 A March 12, 2024, 4:51 a.m. OK Java 21 TESTS 3 218 0
250827320 abinash0150 A March 11, 2024, 6:03 p.m. OK Java 21 TESTS 3 218 307200
250868550 luuyv A March 12, 2024, 2:54 a.m. OK Java 21 TESTS 3 234 0
250880736 Bill35 A March 12, 2024, 5:24 a.m. OK Java 21 TESTS 3 234 0
250871187 Renull A March 12, 2024, 3:31 a.m. OK Java 21 TESTS 3 248 0
250828469 Edward_200 A March 11, 2024, 6:12 p.m. OK Java 21 TESTS 3 248 716800
250870459 Clovis_RU A March 12, 2024, 3:21 a.m. OK Java 21 TESTS 3 248 819200
250876012 Mr.Numerator_007 A March 12, 2024, 4:31 a.m. OK Java 8 TESTS 3 93 0
250875916 TheBoogeyman_429 A March 12, 2024, 4:30 a.m. OK Java 8 TESTS 3 93 0
250867126 tinku_vishnu A March 12, 2024, 2:34 a.m. OK Java 8 TESTS 3 93 0
250867114 51Hz A March 12, 2024, 2:34 a.m. OK Java 8 TESTS 3 93 0
250854481 Yousef_Badr A March 11, 2024, 10:44 p.m. OK Java 8 TESTS 3 93 0
250831385 Sumitsingh7 A March 11, 2024, 6:33 p.m. OK Java 8 TESTS 3 93 5734400
250874587 ycnetsisnoc A March 12, 2024, 4:13 a.m. OK Java 8 TESTS 3 108 0
250857315 profchi A March 11, 2024, 11:38 p.m. OK Java 8 TESTS 3 108 21913600
250882732 siddhi_04 A March 12, 2024, 5:40 a.m. OK Java 8 TESTS 3 109 0
250875157 2100031465 A March 12, 2024, 4:20 a.m. OK Java 8 TESTS 3 109 0
250823669 bio-duplex A March 11, 2024, 5:39 p.m. OK Kotlin 1.9 TESTS 3 202 1126400
250858897 crapcode A March 12, 2024, 12:10 a.m. OK PHP TESTS 3 61 0
250848603 joaozao A March 11, 2024, 9:16 p.m. OK PyPy 3 TESTS 3 108 1740800
250872975 momenelmesady4803 A March 12, 2024, 3:53 a.m. OK PyPy 3 TESTS 3 108 1843200
250851330 Sovi_11 A March 11, 2024, 9:50 p.m. OK PyPy 3 TESTS 3 109 1843200
250860763 ashays A March 12, 2024, 12:46 a.m. OK PyPy 3 TESTS 3 109 2048000
250829650 white_wolf19 A March 11, 2024, 6:20 p.m. OK PyPy 3 TESTS 3 155 1740800
250833731 brave_umbrella A March 11, 2024, 6:53 p.m. OK PyPy 3-64 TESTS 3 46 2048000
250880254 dirac_e A March 12, 2024, 5:18 a.m. OK PyPy 3-64 TESTS 3 46 2150400
250837697 Aditya_Metkar A March 11, 2024, 7:29 p.m. OK PyPy 3-64 TESTS 3 46 2150400
250852203 kinglykang A March 11, 2024, 10:03 p.m. OK PyPy 3-64 TESTS 3 61 1843200
250834290 gardengnome A March 11, 2024, 6:58 p.m. OK PyPy 3-64 TESTS 3 61 1843200
250841137 Sami_g95 A March 11, 2024, 8:02 p.m. OK PyPy 3-64 TESTS 3 61 1945600
250836610 ser0p A March 11, 2024, 7:19 p.m. OK PyPy 3-64 TESTS 3 61 2048000
250828155 swastiswi13 A March 11, 2024, 6:09 p.m. OK PyPy 3-64 TESTS 3 61 2150400
250832341 nuredinbederu10k A March 11, 2024, 6:41 p.m. OK PyPy 3-64 TESTS 3 61 2662400
250861241 Mohamed-_-Gamal A March 12, 2024, 12:53 a.m. OK PyPy 3-64 TESTS 3 61 3379200
250852382 jjaymapari A March 11, 2024, 10:06 p.m. OK Python 3 TESTS 3 31 102400
250841661 tesfaymebre A March 11, 2024, 8:06 p.m. OK Python 3 TESTS 3 31 102400
250822159 YuVaRaAj A March 11, 2024, 5:30 p.m. OK Python 3 TESTS 3 31 102400
250854867 Ante_ A March 11, 2024, 10:51 p.m. OK Python 3 TESTS 3 31 204800
250854811 Ante_ A March 11, 2024, 10:50 p.m. OK Python 3 TESTS 3 31 204800
250837274 ania.kubik A March 11, 2024, 7:25 p.m. OK Python 3 TESTS 3 31 204800
250823931 abhijit07cf A March 11, 2024, 5:40 p.m. OK Python 3 TESTS 3 31 1126400
250875863 vishruth_21 A March 12, 2024, 4:29 a.m. OK Python 3 TESTS 3 46 0
250877349 mobiwusij A March 12, 2024, 4:47 a.m. OK Python 3 TESTS 3 46 102400
250833960 abeni505 A March 11, 2024, 6:55 p.m. OK Python 3 TESTS 3 46 102400

remove filters

Back to search problems