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 |
---|---|---|---|---|---|---|
1540 | Codeforces Round 728 (Div. 1) | FINISHED | False | 8100 | 107187899 | June 25, 2021, 3:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 639 ) | C1 | Converging Array (Easy Version) | PROGRAMMING | dp math |
B'This is the easy version of the problem. The only difference is that in this version q = 1 . You can make hacks only if both versions of the problem are solved. There is a process that takes place on arrays a and b of length n and length n-1 respectively. The process is an infinite sequence of operations. Each operation is as follows: It can be proven that array a converges, i. e. for each i there exists a limit a_i converges to. Let function F(a, b) return the value a_1 converges to after a process on a and b . You are given array b , but not array a . However, you are given a third array c . Array a is good if it contains only integers and satisfies 0 <= q a_i <= q c_i for 1 <= q i <= q n . Your task is to count the number of good arrays a where F(a, b) geq x for q values of x . Since the number of arrays can be very large, print it modulo 10^9+7 . The first line contains a single integer n ( 2 <= n <= 100 ). The second line contains n integers c_1, c_2 ldots, c_n ( 0 <= c_i <= 100 ). The third line contains n-1 integers b_1, b_2, ldots, b_{n-1} ( 0 <= b_i <= 100 ). The fourth line contains a single integer q ( q=1 ). The fifth line contains q space separated integers x_1, x_2, ldots, x_q ( -10^5 <= x_i <= 10^5 ). Output q integers, where the i -th integer is the answer to the i -th query, i. e. the number of good arrays a where F(a, b) geq x_i modulo 10^9+7 . The following explanation assumes b = [2, 1] and c=[2, 3, 4] (as in the sample). Examples of arrays a that are not good: One possible good array a is [0, 2, 4] . We can show that no operation has any effect on this array, so F(a, b) = a_1 = 0 . Another possible good array a is [0, 1, 4] . In a single operation'... |
Tutorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
120579416 | Isonan | C1 | June 25, 2021, 4:31 p.m. | OK | GNU C++11 | TESTS | 58 | 31 | 3891200 | ||
120595660 | idxcalcal | C1 | June 25, 2021, 5:08 p.m. | OK | GNU C++11 | TESTS | 58 | 31 | 3993600 | ||
120602581 | Rainbow_sjy.qwq | C1 | June 25, 2021, 5:28 p.m. | OK | GNU C++11 | TESTS | 58 | 31 | 7987200 | ||
120601007 | ghj1222 | C1 | June 25, 2021, 5:23 p.m. | OK | GNU C++11 | TESTS | 58 | 31 | 8806400 | ||
120604512 | KagamineRin | C1 | June 25, 2021, 5:34 p.m. | OK | GNU C++11 | TESTS | 58 | 46 | 0 | ||
120603245 | The_Cai | C1 | June 25, 2021, 5:30 p.m. | OK | GNU C++11 | TESTS | 58 | 46 | 8396800 | ||
120575407 | Argentina | C1 | June 25, 2021, 4:23 p.m. | OK | GNU C++11 | TESTS | 58 | 46 | 9318400 | ||
120597053 | eecs | C1 | June 25, 2021, 5:11 p.m. | OK | GNU C++11 | TESTS | 58 | 61 | 5324800 | ||
120595718 | yao11617 | C1 | June 25, 2021, 5:08 p.m. | OK | GNU C++11 | TESTS | 58 | 77 | 0 | ||
120628101 | AoLiGei | C1 | June 26, 2021, 2:20 a.m. | OK | GNU C++11 | TESTS | 58 | 77 | 4096000 | ||
120597111 | dlalswp25 | C1 | June 25, 2021, 5:11 p.m. | OK | GNU C++14 | TESTS | 58 | 46 | 614400 | ||
120600449 | shb | C1 | June 25, 2021, 5:21 p.m. | OK | GNU C++14 | TESTS | 58 | 61 | 4812800 | ||
120597230 | scli_weapon | C1 | June 25, 2021, 5:12 p.m. | OK | GNU C++14 | TESTS | 58 | 61 | 5529600 | ||
120564500 | peehs_moorhsum | C1 | June 25, 2021, 4:06 p.m. | OK | GNU C++14 | TESTS | 58 | 78 | 4505600 | ||
120603730 | TheOneYouWant | C1 | June 25, 2021, 5:32 p.m. | OK | GNU C++14 | TESTS | 58 | 93 | 307200 | ||
120581492 | ccf_n0i | C1 | June 25, 2021, 4:35 p.m. | OK | GNU C++14 | TESTS | 58 | 171 | 4198400 | ||
120605490 | Hollowed | C1 | June 25, 2021, 5:38 p.m. | OK | GNU C++14 | TESTS | 58 | 187 | 9011200 | ||
120594668 | PaiGuLong | C1 | June 25, 2021, 5:05 p.m. | OK | GNU C++14 | TESTS | 58 | 295 | 8499200 | ||
120567326 | Radewoosh | C1 | June 25, 2021, 4:10 p.m. | OK | GNU C++14 | TESTS | 58 | 295 | 9830400 | ||
120610959 | Marckess | C1 | June 25, 2021, 6:16 p.m. | OK | GNU C++14 | TESTS | 58 | 421 | 9318400 | ||
120599920 | sam.rei | C1 | June 25, 2021, 5:20 p.m. | OK | GNU C++17 | TESTS | 58 | 30 | 307200 | ||
120635764 | BigBag | C1 | June 26, 2021, 5:01 a.m. | OK | GNU C++17 | TESTS | 58 | 31 | 102400 | ||
120635607 | BigBag | C1 | June 26, 2021, 4:59 a.m. | OK | GNU C++17 | TESTS | 58 | 31 | 102400 | ||
120610836 | BigBag | C1 | June 25, 2021, 6:15 p.m. | OK | GNU C++17 | TESTS | 58 | 31 | 102400 | ||
120590591 | frokaikan | C1 | June 25, 2021, 4:55 p.m. | OK | GNU C++17 | TESTS | 58 | 31 | 102400 | ||
120610903 | Shef | C1 | June 25, 2021, 6:16 p.m. | OK | GNU C++17 | TESTS | 58 | 31 | 307200 | ||
120617392 | sam.rei | C1 | June 25, 2021, 7:40 p.m. | OK | GNU C++17 | TESTS | 58 | 31 | 2048000 | ||
120626577 | lyons | C1 | June 26, 2021, 1:19 a.m. | OK | GNU C++17 | TESTS | 58 | 31 | 8396800 | ||
120594225 | yokozuna57 | C1 | June 25, 2021, 5:04 p.m. | OK | GNU C++17 | TESTS | 58 | 31 | 8601600 | ||
120639293 | btzy | C1 | June 26, 2021, 5:55 a.m. | OK | GNU C++17 | TESTS | 58 | 31 | 240435200 | ||
120604350 | dfcmd | C1 | June 25, 2021, 5:34 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 0 | ||
120599792 | risujiroh | C1 | June 25, 2021, 5:19 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 0 | ||
120599310 | hitonanode | C1 | June 25, 2021, 5:18 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 0 | ||
120624413 | Ormlis | C1 | June 25, 2021, 11:28 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 102400 | ||
120593968 | noshi91 | C1 | June 25, 2021, 5:03 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 102400 | ||
120581034 | aid | C1 | June 25, 2021, 4:34 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 102400 | ||
120560194 | ecnerwala | C1 | June 25, 2021, 3:59 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 102400 | ||
120622802 | emorgan5289 | C1 | June 25, 2021, 10:06 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 716800 | ||
120628213 | AutumnKite | C1 | June 26, 2021, 2:23 a.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 819200 | ||
120596169 | NotaMotuaQAQ | C1 | June 25, 2021, 5:09 p.m. | OK | GNU C++17 (64) | TESTS | 58 | 31 | 4300800 | ||
120587922 | SecondThread | C1 | June 25, 2021, 4:49 p.m. | OK | Java 11 | TESTS | 58 | 1871 | 5017600 | ||
120611081 | hu_tao | C1 | June 25, 2021, 6:17 p.m. | OK | Java 8 | TESTS | 58 | 124 | 0 | ||
120611579 | Tlatoani | C1 | June 25, 2021, 6:21 p.m. | OK | Kotlin | TESTS | 58 | 919 | 1536000 | ||
120618298 | bcollet | C1 | June 25, 2021, 7:57 p.m. | OK | PyPy 2 | TESTS | 58 | 2698 | 9420800 | ||
120597503 | Kiri8128 | C1 | June 25, 2021, 5:13 p.m. | OK | PyPy 3 | TESTS | 58 | 155 | 10240000 | ||
120611129 | toomer | C1 | June 25, 2021, 6:18 p.m. | OK | Rust | TESTS | 58 | 78 | 102400 | ||
120605760 | qwerty787788 | C1 | June 25, 2021, 5:38 p.m. | OK | Rust | TESTS | 58 | 124 | 102400 |
Back to search problems