Codeforces Round 920 (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
1921 Codeforces Round 920 (Div. 3) FINISHED False 8100 31850663 Jan. 15, 2024, 2:35 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 4039 ) F Sum of Progression PROGRAMMING brute force data structures implementation math

B'You are given an array a of n numbers. There are also q queries of the form s, d, k . For each query q , find the sum of elements a_s + a_{s+d} cdot 2 + ... + a_{s + d cdot (k - 1)} cdot k . In other words, for each query, it is necessary to find the sum of k elements of the array with indices starting from the s -th, taking steps of size d , multiplying it by the serial number of the element in the resulting sequence. Each test consists of several testcases. The first line contains one integer t ( 1 <= t <= 10^4 ) -- the number of testcases. Next lines contain descriptions of testcases. The first line of each testcase contains two numbers n, q ( 1 <= n <= 10^5, 1 <= q <= 2 cdot 10^5 ) -- the number of elements in the array a and the number of queries. The second line contains n integers a_1, ... a_n ( -10^8 <= a_1, ..., a_n <= 10^8 ) -- elements of the array a . The next q lines each contain three integers s , d , and k ( 1 <= s, d, k <= n , s + d cdot (k - 1) <= n ). It is guaranteed that the sum of n over all testcases does not exceed 10^5 , and that the sum of q over all testcases does not exceed 2 cdot 10^5 . For each testcase, print q numbers in a separate line -- the desired sums, separated with space. '...

Tutorials

Editorial for Codeforces Round 920 (Div. 3)

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
241854266 BandL F Jan. 15, 2024, 7:42 p.m. OK C# 10 TESTS 23 811 404582400
241843827 Gassa F Jan. 15, 2024, 5:51 p.m. OK D TESTS 23 810 563814400
241845923 Gassa F Jan. 15, 2024, 6:06 p.m. OK D TESTS 23 1684 222003200
241845825 Gassa F Jan. 15, 2024, 6:06 p.m. OK D TESTS 23 1809 348262400
241845878 Gassa F Jan. 15, 2024, 6:06 p.m. OK D TESTS 23 1933 153600000
241842261 XingRin F Jan. 15, 2024, 5:39 p.m. OK GNU C++14 TESTS 23 358 12800000
241831592 Guslix F Jan. 15, 2024, 4:47 p.m. OK GNU C++14 TESTS 23 374 12800000
241831701 KanzouYamashiro F Jan. 15, 2024, 4:48 p.m. OK GNU C++14 TESTS 23 390 12800000
241871742 jiangzhihui F Jan. 16, 2024, 2:55 a.m. OK GNU C++14 TESTS 26 624 13107200
241849112 alexkrunker F Jan. 15, 2024, 6:34 p.m. OK GNU C++14 TESTS 23 639 641638400
241875039 HYH85797457 F Jan. 16, 2024, 3:46 a.m. OK GNU C++14 TESTS 26 764 513433600
241870565 TJUHuangTao F Jan. 16, 2024, 2:34 a.m. OK GNU C++14 TESTS 26 780 642150400
241849567 alexkrunker F Jan. 15, 2024, 6:39 p.m. OK GNU C++14 TESTS 23 794 401203200
241873299 zltzlt F Jan. 16, 2024, 3:18 a.m. OK GNU C++14 TESTS 26 810 257536000
241839007 papa-ka-para F Jan. 15, 2024, 5:17 p.m. OK GNU C++14 TESTS 23 810 520601600
241837579 Shah_Hussain_8855 F Jan. 15, 2024, 5:09 p.m. OK GNU C++17 TESTS 23 343 6860800
241851072 vikram_kv F Jan. 15, 2024, 6:54 p.m. OK GNU C++17 TESTS 23 389 167116800
241881532 NishkaShrimali F Jan. 16, 2024, 5:16 a.m. OK GNU C++17 TESTS 26 421 6860800
241867510 liympanda F Jan. 16, 2024, 1:28 a.m. OK GNU C++17 TESTS 26 421 19865600
241863260 nibirjoydhar F Jan. 15, 2024, 11:11 p.m. OK GNU C++17 TESTS 26 482 19148800
241851206 vikram_kv F Jan. 15, 2024, 6:56 p.m. OK GNU C++17 TESTS 23 498 165478400
241844905 NGC2264_ F Jan. 15, 2024, 5:58 p.m. OK GNU C++17 TESTS 23 545 14540800
241835405 VS-Codes F Jan. 15, 2024, 4:58 p.m. OK GNU C++17 TESTS 23 546 47513600
241835028 blackred F Jan. 15, 2024, 4:56 p.m. OK GNU C++17 TESTS 23 561 522649600
241843832 crystaalroo F Jan. 15, 2024, 5:51 p.m. OK GNU C++17 TESTS 23 576 14950400
241868814 sandoval95 F Jan. 16, 2024, 1:58 a.m. OK GNU C++17 (64) TESTS 26 280 10956800
241882532 Mag1sk F Jan. 16, 2024, 5:27 a.m. OK GNU C++17 (64) TESTS 26 342 15462400
241849495 fanhuaxingyu F Jan. 15, 2024, 6:38 p.m. OK GNU C++17 (64) TESTS 23 420 642150400
241860014 Krzychuo F Jan. 15, 2024, 9:23 p.m. OK GNU C++17 (64) TESTS 26 421 489779200
241872580 Jayint F Jan. 16, 2024, 3:08 a.m. OK GNU C++17 (64) TESTS 26 436 489369600
241846650 fanhuaxingyu F Jan. 15, 2024, 6:12 p.m. OK GNU C++17 (64) TESTS 23 452 509030400
241853375 serialcomder F Jan. 15, 2024, 7:23 p.m. OK GNU C++17 (64) TESTS 23 467 401510400
241846208 fanhuaxingyu F Jan. 15, 2024, 6:09 p.m. OK GNU C++17 (64) TESTS 23 467 642048000
241853446 serialcomder F Jan. 15, 2024, 7:24 p.m. OK GNU C++17 (64) TESTS 23 468 381440000
241853355 serialcomder F Jan. 15, 2024, 7:22 p.m. OK GNU C++17 (64) TESTS 23 483 501760000
241835366 _Nepenthes F Jan. 15, 2024, 4:58 p.m. OK GNU C++20 (64) TESTS 23 140 6860800
241851356 VicMac F Jan. 15, 2024, 6:58 p.m. OK GNU C++20 (64) TESTS 23 140 7680000
241851239 VicMac F Jan. 15, 2024, 6:56 p.m. OK GNU C++20 (64) TESTS 23 140 7680000
241850861 VicMac F Jan. 15, 2024, 6:52 p.m. OK GNU C++20 (64) TESTS 23 140 7680000
241864156 gabriel88766 F Jan. 15, 2024, 11:50 p.m. OK GNU C++20 (64) TESTS 26 155 6860800
241881924 thanhdno F Jan. 16, 2024, 5:20 a.m. OK GNU C++20 (64) TESTS 26 155 13824000
241850795 VicMac F Jan. 15, 2024, 6:52 p.m. OK GNU C++20 (64) TESTS 23 156 7680000
241883408 shlokagrawal F Jan. 16, 2024, 5:37 a.m. OK GNU C++20 (64) TESTS 26 156 9011200
241834044 leeminhduc2 F Jan. 15, 2024, 4:52 p.m. OK GNU C++20 (64) TESTS 23 156 11161600
241881677 thanhdno F Jan. 16, 2024, 5:18 a.m. OK GNU C++20 (64) TESTS 26 156 20889600
241867067 0x3F F Jan. 16, 2024, 1:17 a.m. OK Go TESTS 26 717 505651200
241867027 0x3F F Jan. 16, 2024, 1:16 a.m. OK Go TESTS 26 733 505753600
241865893 0x3F F Jan. 16, 2024, 12:48 a.m. OK Go TESTS 26 1622 553369600
241866054 0x3F F Jan. 16, 2024, 12:52 a.m. OK Go TESTS 26 1840 553369600
241871428 kevbamboo F Jan. 16, 2024, 2:50 a.m. OK Java 11 TESTS 26 1138 991539200
241875144 man-ray F Jan. 16, 2024, 3:47 a.m. OK Java 21 TESTS 26 1044 798822400
241884711 frey4 F Jan. 16, 2024, 5:50 a.m. OK Java 21 TESTS 26 1045 928153600
241884221 frey4 F Jan. 16, 2024, 5:45 a.m. OK Java 21 TESTS 26 1123 928563200
241884498 frey4 F Jan. 16, 2024, 5:48 a.m. OK Java 21 TESTS 26 1153 928051200
241872357 Zhanzhe_Lee F Jan. 16, 2024, 3:05 a.m. OK Java 21 TESTS 26 1278 928358400
241841859 MintCat F Jan. 15, 2024, 5:36 p.m. OK Java 8 TESTS 23 982 424755200
241859276 arvindf232 F Jan. 15, 2024, 9:07 p.m. OK Kotlin 1.9 TESTS 26 1403 1073766400
241876404 SoleProprietor F Jan. 16, 2024, 4:05 a.m. OK PyPy 3-64 TESTS 26 701 80076800
241854917 AloFrut F Jan. 15, 2024, 7:51 p.m. OK PyPy 3-64 TESTS 23 842 535859200
241843820 gardengnome F Jan. 15, 2024, 5:50 p.m. OK PyPy 3-64 TESTS 23 872 107520000
241878976 hxu10 F Jan. 16, 2024, 4:43 a.m. OK PyPy 3-64 TESTS 26 873 545484800
241837964 Rumors F Jan. 15, 2024, 5:11 p.m. OK PyPy 3-64 TESTS 23 888 391372800
241859855 gardengnome F Jan. 15, 2024, 9:19 p.m. OK PyPy 3-64 TESTS 26 951 104345600
241844369 gardengnome F Jan. 15, 2024, 5:54 p.m. OK PyPy 3-64 TESTS 23 982 108646400
241837855 Divyanshu_52 F Jan. 15, 2024, 5:10 p.m. OK PyPy 3-64 TESTS 23 1045 64921600
241869624 cperkkk F Jan. 16, 2024, 2:16 a.m. OK PyPy 3-64 TESTS 26 1138 592076800
241863859 pulcher F Jan. 15, 2024, 11:36 p.m. OK PyPy 3-64 TESTS 26 1200 544563200
241854089 snamy520 F Jan. 15, 2024, 7:39 p.m. OK Rust 2021 TESTS 23 249 241868800
241841104 TecTrixer F Jan. 15, 2024, 5:30 p.m. OK Rust 2021 TESTS 23 436 171520000
241863825 liut F Jan. 15, 2024, 11:35 p.m. OK Rust 2021 TESTS 26 686 525926400
241851279 inverse_ackerman F Jan. 15, 2024, 6:57 p.m. OK Rust 2021 TESTS 23 1091 745676800

remove filters

Back to search problems