CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!)

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
1704 CodeTON Round 2 (Div. 1 + Div. 2, Rated, Prizes!) FINISHED False 9000 77903663 July 31, 2022, 2:05 p.m.

Problems

Solved$
Index
Name
Type
Tags
Community Tag
Rating
( 115 ) G Mio and Lucky Array PROGRAMMING constructive algorithms fft math strings

B'Mio has an array a consisting of n integers, and an array b consisting of m integers. Mio can do the following operation to a : Mio wants to transform a so that it will contain b as a subarray. Could you answer her question, and provide a sequence of operations to do so, if it is possible? An array b is a subarray of an array a if b can be obtained from a by deletion of several (possibly, zero or all) elements from the beginning and several (possibly, zero or all) elements from the end. The input consists of multiple test cases. The first line contains a single integer t ( 1 <= q t <= q 10^4 ) -- the number of test cases. The description of test cases follows. The first line of each test case contains one integer n ( 2 <= q n <= q 2 cdot 10^5 ) -- the number of elements in a . The second line of the test case contains n integers a_1, a_2, cdots, a_n ( -10^5 <= q a_i <= q 10^5 ), where a_i is the i -th element of a . The third line of the test case contains one integer m ( 2 <= q m <= q n ) -- the number of elements in b . The fourth line of the test case contains m integers b_1, b_2, cdots, b_m ( -10^{12} <= q b_i <= q 10^{12} ), where b_i is the i -th element of b . It is guaranteed that the sum of n over all test cases does not exceed 2 cdot 10^5 . If it is impossible to transform a so that it contains b as a subarray, output -1 . Otherwise, the first line of output should contain an integer k ( 0 <= q k <= q n ), the number of operations to be done. The second line should contain k distinct integers, representing the operations done in order. If there are multiple solutions, you can output any. Notice that you do not need to minimize the number of operations. In the first test case, the sequence a = [1,2,3,4,5] . One of the p'...

Tutorials

CodeTON Round 2 Editorial

Submissions

Submission Id
Author(s)
Index
Submitted
Verdict
Language
Test Set
Tests Passed
Time taken (ms)
Memory Consumed (bytes)
Tags
Rating
166431306 hydd G Aug. 1, 2022, 2:16 a.m. OK GNU C++14 TESTS 119 1341 37376000
166429177 errorgorn G Aug. 1, 2022, 1:42 a.m. OK GNU C++17 (64) TESTS 119 966 52121600
166432232 AoLiGei G Aug. 1, 2022, 2:31 a.m. OK GNU C++17 (64) TESTS 119 2527 47411200
166428808 Qingyu G Aug. 1, 2022, 1:37 a.m. OK GNU C++20 (64) TESTS 119 280 97280000
166397270 ksun48 G July 31, 2022, 4:22 p.m. OK GNU C++20 (64) TESTS 119 390 32768000
166392509 jiangly G July 31, 2022, 3:58 p.m. OK GNU C++20 (64) TESTS 119 1809 9216000
166405574 YoussefObama G July 31, 2022, 6:12 p.m. OK GNU C++20 (64) TESTS 119 1965 70553600
166399832 tourist G July 31, 2022, 4:34 p.m. OK GNU C++20 (64) TESTS 119 1965 70553600
166405958 djq_cpp G July 31, 2022, 6:14 p.m. OK GNU C++20 (64) TESTS 119 2137 31539200
166398104 slime G July 31, 2022, 4:26 p.m. OK GNU C++20 (64) TESTS 119 2760 8806400

remove filters

Back to search problems