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 |
---|---|---|---|---|---|---|
1508 | Codeforces Round 715 (Div. 1) | FINISHED | False | 8100 | 118682663 | April 16, 2021, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 128 ) | F | Optimal Encoding | PROGRAMMING | brute force data structures |
B"Touko's favorite sequence of numbers is a permutation a_1, a_2, ... , a_n of 1, 2, ... , n , and she wants some collection of permutations that are similar to her favorite permutation. She has a collection of q intervals of the form [l_i, r_i] with 1 <= l_i <= r_i <= n . To create permutations that are similar to her favorite permutation, she coined the following definition: Yuu wants to figure out all k -similar permutations for Touko, but it turns out this is a very hard task; instead, Yuu will encode the set of all k -similar permutations with directed acylic graphs (DAG). Yuu also coined the following definitions for herself: Since Yuu is free today, she wants to figure out the minimum number of edges among all k -encodings for each k from 1 to q . The first line contains two integers n and q ( 1 <= n <= 25 ,000 , 1 <= q <= 100 ,000 ). The second line contains n integers a_1, a_2, ... , a_n which form a permutation of 1, 2, ... , n . The i -th of the following q lines contains two integers l_i and r_i . ( 1 <= l_i <= r_i <= n ). Print q lines. The k -th of them should contain a single integer -- The minimum number of edges among all k -encodings. For the first test case: "... |
Codeforces Round #715 Editorial |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
113275647 | rainboy | F | April 16, 2021, 9:05 p.m. | OK | GNU C11 | TESTS | 72 | 2199 | 716800 | ||
113295679 | jbpvns | F | April 17, 2021, 5:39 a.m. | OK | GNU C++11 | TESTS | 72 | 1138 | 1024000 | ||
113283153 | Ari | F | April 17, 2021, 1:17 a.m. | OK | GNU C++17 | TESTS | 72 | 2090 | 632422400 | ||
113288152 | 1-gon | F | April 17, 2021, 3:28 a.m. | OK | GNU C++17 | TESTS | 72 | 6161 | 450560000 | ||
113247954 | ecnerwala | F | April 16, 2021, 4:27 p.m. | OK | GNU C++17 (64) | TESTS | 71 | 998 | 1024000 | ||
113270243 | rainboy | F | April 16, 2021, 7:34 p.m. | OK | GNU C++17 (64) | TESTS | 72 | 1809 | 614400 | ||
113263512 | Benq | F | April 16, 2021, 6 p.m. | OK | GNU C++17 (64) | TESTS | 71 | 3244 | 1024000 | ||
113275748 | Benq | F | April 16, 2021, 9:07 p.m. | OK | GNU C++17 (64) | TESTS | 72 | 3743 | 668057600 | ||
113263058 | Kuroni | F | April 16, 2021, 5:56 p.m. | OK | GNU C++17 (64) | TESTS | 71 | 4461 | 802508800 |
Back to search problems