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 |
---|---|---|---|---|---|---|
( 12417 ) | C | Strongly Composite | PROGRAMMING | greedy math number theory |
B"A prime number is an integer greater than 1 , which has exactly two divisors. For example, 7 is a prime, since it has two divisors {1, 7 } . A composite number is an integer greater than 1 , which has more than two different divisors. Note that the integer 1 is neither prime nor composite. Let's look at some composite number v . It has several divisors: some divisors are prime, others are composite themselves. If the number of prime divisors of v is less or equal to the number of composite divisors, let's name v as strongly composite. For example, number 12 has 6 divisors: {1, 2, 3, 4, 6, 12 } , two divisors 2 and 3 are prime, while three divisors 4 , 6 and 12 are composite. So, 12 is strongly composite. Other examples of strongly composite numbers are 4 , 8 , 9 , 16 and so on. On the other side, divisors of 15 are {1, 3, 5, 15 } : 3 and 5 are prime, 15 is composite. So, 15 is not a strongly composite. Other examples are: 2 , 3 , 5 , 6 , 7 , 10 and so on. You are given n integers a_1, a_2, ... , a_n ( a_i > 1 ). You have to build an array b_1, b_2, ... , b_k such that following conditions are satisfied: Find the size k of array b , or report, that there is no array b satisfying the conditions. Each test contains multiple test cases. The first line contains the number of test cases t ( 1 <= t <= 1000 ). The description of the test cases follows. The first line of each test case contains one integer n ( 1 <= n <= 1000 ) -- the size of the array a . The second line of each test case contains n integer a_1, a_2, ... a_n ( 2 <= a_i <= 10^7 ) -- the array a itself. It is guaranteed that the sum of n over all test cases does not exceed 1000 . For each test case, print th"... |
115465 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
203713160 | shiqi65 | C | April 27, 2023, 4:24 p.m. | OK | GNU C++14 | TESTS | 10 | 15 | 0 | ||
203767331 | ag822102 | C | April 28, 2023, 5:59 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 | ||
203764679 | _Sand_Box_ | C | April 28, 2023, 5:09 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 | ||
203763943 | willowcardigan | C | April 28, 2023, 4:52 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 | ||
203763810 | willowcardigan | C | April 28, 2023, 4:50 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 | ||
203762972 | ollo | C | April 28, 2023, 4:40 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 | ||
203762795 | Kazimierz | C | April 28, 2023, 4:36 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 | ||
203761308 | haohaoh4 | C | April 28, 2023, 4:13 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 | ||
203761272 | yinyizhe | C | April 28, 2023, 4:12 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 | ||
203760578 | purOnly | C | April 28, 2023, 4:02 a.m. | OK | GNU C++14 | TESTS | 10 | 15 | 204800 |
Back to search problems