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 |
---|---|---|---|---|---|---|
1823 | Codeforces Round 868 (Div. 2) | FINISHED | False | 7200 | 49217099 | April 27, 2023, 2:35 p.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 16211 ) | A | A-characteristic | PROGRAMMING | combinatorics constructive algorithms math |
B'Consider an array a_1, a_2, ... , a_n consisting of numbers 1 and -1 . Define A -characteristic of this array as a number of pairs of indices 1 <= i < j <= n , such that a_i cdot a_j = 1 . Find any array a with given length n with A -characteristic equal to the given value k . Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 100 ). The description of the test cases follows. The only line of each test case contains two integers n and k ( 2 <= n <= 100 ; 0 <= k <= frac{(n-1) n}{2} ) -- the length of required array and required A -characteristic. For each test case, if there is no array a with given A -characteristic k , print NO. Otherwise, print YES and n numbers 1 and -1 , which form the required array a . If there are multiple answers, print any of them. In the first test case, there is only one pair of different elements in the array, and their product is a_1 cdot a_2 = -1 neq 1 , hence its A -characteristic is 0 . In the second test case, there is only one pair of different elements in the array, and their product is a_1 cdot a_2 = 1 , hence its A -characteristic is 1 . In the third test case, there are three pairs of different elements in the array, and their product are: a_1 cdot a_2 = -1 , a_1 cdot a_3 = 1 , a_2 cdot a_3 = -1 , hence its A -characteristic is 1 . In the fourth test case, we can show, that there is no array with length 3 , which A -characteristic is 2 . '... |
115465 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
203704581 | timgouse | A | April 27, 2023, 3:52 p.m. | OK | C# 10 | TESTS | 4 | 77 | 307200 | ||
203744116 | bluemegane | A | April 27, 2023, 10:45 p.m. | OK | C# 8 | TESTS | 4 | 186 | 307200 | ||
203760343 | Nabil71-dev | A | April 28, 2023, 3:59 a.m. | OK | Clang++17 Diagnostics | TESTS | 4 | 30 | 0 | ||
203758380 | vvslaxman14 | A | April 28, 2023, 3:24 a.m. | OK | Clang++20 Diagnostics | TESTS | 4 | 30 | 0 | ||
203722709 | psrijith | A | April 27, 2023, 5:37 p.m. | OK | Clang++20 Diagnostics | TESTS | 4 | 31 | 0 | ||
203766538 | Ayush_45 | A | April 28, 2023, 5:46 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
203766457 | Priya_Patel | A | April 28, 2023, 5:44 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
203766164 | Susie.Rain | A | April 28, 2023, 5:39 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
203765341 | ninjaa_03 | A | April 28, 2023, 5:23 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
203765113 | SlavaKemDev | A | April 28, 2023, 5:19 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
203763975 | tyronem | A | April 28, 2023, 4:53 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
203759646 | Kazimierz | A | April 28, 2023, 3:47 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
203759637 | Dowry | A | April 28, 2023, 3:46 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
203759052 | vlgunsdaddy | A | April 28, 2023, 3:35 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 | ||
203758542 | sabbirahmeds877 | A | April 28, 2023, 3:27 a.m. | OK | GNU C++14 | TESTS | 4 | 0 | 0 |
Back to search problems