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 |
|---|---|---|---|---|---|---|
| 241 | Bayan 2012-2013 Elimination Round (ACM ICPC Rules, English statements) | FINISHED | False | 10800 | 424708185 | Nov. 1, 2012, 3:30 p.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 395 ) | D | Numbers | PROGRAMMING | 2900 |
You have a sequence of n distinct integers a 1 , a 2 , ..., a n (1 ≤ a i ≤ n ) . You want to remove some integers in such a way that the resulting sequence of integers satisfies the following three conditions: the resulting sequence is not empty; the exclusive or ( xor operation) of all the integers in the resulting sequence equals 0 ; if you write all the integers of the resulting sequence (from beginning to the end) in a row in the decimal numeral system and without any spaces, the written number is divisible by p . You are given the sequence of n integers a and a prime number p , find a way to satisfy the described conditions. The first line of the input contains two integers n and p (1 ≤ n , p ≤ 50000) . Next line contains n space-separated distinct integers a 1 , a 2 , ..., a n (1 ≤ a i ≤ n ) . It is guaranteed that p is a prime number. If there is no solution for the given input, print " No " (without quotes) in the only line of the output. Otherwise print " Yes " in the first line of output. The second line should contain an integer k ( k > 0) specifying the number of remaining elements and the third line should contain k distinct integers x 1 , x 2 , ..., x k (1 ≤ x i ≤ n ) . These integers mean that you should remove all integers from the sequence except integers a x 1 , a x 2 , ..., a x k to satisfy the described conditions. If there are multiple solutions, any of them will be accepted. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 39976196 | daifucong | D | July 5, 2018, 7:19 a.m. | OK | GNU C++ | TESTS | 33 | 31 | 307200 | 2900 | |
| 39978583 | daifucong | D | July 5, 2018, 9:08 a.m. | OK | GNU C++ | TESTS | 33 | 46 | 307200 | 2900 | |
| 39978564 | daifucong | D | July 5, 2018, 9:07 a.m. | OK | GNU C++ | TESTS | 33 | 46 | 307200 | 2900 | |
| 39977004 | daifucong | D | July 5, 2018, 8:16 a.m. | OK | GNU C++ | TESTS | 33 | 46 | 307200 | 2900 | |
| 39976908 | daifucong | D | July 5, 2018, 8:13 a.m. | OK | GNU C++ | TESTS | 33 | 46 | 307200 | 2900 | |
| 39976838 | daifucong | D | July 5, 2018, 8:11 a.m. | OK | GNU C++ | TESTS | 33 | 46 | 307200 | 2900 | |
| 39976355 | daifucong | D | July 5, 2018, 7:25 a.m. | OK | GNU C++ | TESTS | 33 | 46 | 307200 | 2900 | |
| 39976289 | daifucong | D | July 5, 2018, 7:23 a.m. | OK | GNU C++ | TESTS | 33 | 46 | 307200 | 2900 | |
| 39976265 | daifucong | D | July 5, 2018, 7:22 a.m. | OK | GNU C++ | TESTS | 33 | 46 | 307200 | 2900 | |
| 39976177 | daifucong | D | July 5, 2018, 7:19 a.m. | OK | GNU C++ | TESTS | 33 | 46 | 307200 | 2900 | |
| 7993908 | zshi | D | Sept. 28, 2014, 12:04 p.m. | OK | GNU C++0x | TESTS | 33 | 93 | 219136000 | 2900 | |
| 9238908 | equation314 | D | Dec. 24, 2014, 8:22 a.m. | OK | GNU C++0x | TESTS | 33 | 140 | 51507200 | 2900 | |
| 8247248 | jiry_2 | D | Oct. 16, 2014, 11:45 a.m. | OK | GNU C++0x | TESTS | 33 | 249 | 211660800 | 2900 | |
| 2488636 | watashi | D | Nov. 2, 2012, 12:01 a.m. | OK | GNU C++0x | TESTS | 33 | 406 | 64102400 | 2900 | |
| 51414856 | codaras | D | March 17, 2019, 1:34 p.m. | OK | GNU C++11 | TESTS | 33 | 46 | 0 | 2900 | |
| 39975796 | daifucong | D | July 5, 2018, 7:02 a.m. | OK | GNU C++11 | TESTS | 33 | 46 | 0 | 2900 | |
| 39976121 | daifucong | D | July 5, 2018, 7:17 a.m. | OK | GNU C++11 | TESTS | 33 | 46 | 307200 | 2900 | |
| 39975970 | daifucong | D | July 5, 2018, 7:11 a.m. | OK | GNU C++11 | TESTS | 33 | 46 | 307200 | 2900 | |
| 39975905 | daifucong | D | July 5, 2018, 7:08 a.m. | OK | GNU C++11 | TESTS | 33 | 46 | 307200 | 2900 | |
| 39975811 | daifucong | D | July 5, 2018, 7:03 a.m. | OK | GNU C++11 | TESTS | 33 | 46 | 307200 | 2900 | |
| 39975784 | daifucong | D | July 5, 2018, 7:02 a.m. | OK | GNU C++11 | TESTS | 33 | 46 | 307200 | 2900 | |
| 40014161 | yugao | D | July 5, 2018, 11:56 p.m. | OK | GNU C++11 | TESTS | 33 | 46 | 4198400 | 2900 | |
| 54053377 | luogu_bot2 | D | May 13, 2019, 6:21 a.m. | OK | GNU C++11 | TESTS | 33 | 61 | 0 | 2900 | |
| 45310025 | prayerhgq | D | Nov. 5, 2018, 2:57 a.m. | OK | GNU C++11 | TESTS | 33 | 61 | 0 | 2900 | |
| 23662082 | Ali.Pi | D | Jan. 9, 2017, 7:54 a.m. | OK | GNU C++14 | TESTS | 33 | 78 | 1945600 | 2900 | |
| 22726564 | jasonvictoryan | D | Dec. 6, 2016, 9:12 a.m. | OK | GNU C++14 | TESTS | 33 | 93 | 0 | 2900 | |
| 35671050 | boook | D | Feb. 25, 2018, 7:24 a.m. | OK | GNU C++14 | TESTS | 33 | 186 | 207872000 | 2900 | |
| 39975793 | _SHENZHEBEI_ | D | July 5, 2018, 7:02 a.m. | OK | GNU C++14 | TESTS | 33 | 186 | 265216000 | 2900 | |
| 39975705 | _SHENZHEBEI_ | D | July 5, 2018, 6:58 a.m. | OK | GNU C++14 | TESTS | 33 | 186 | 265830400 | 2900 | |
| 39975744 | _SHENZHEBEI_ | D | July 5, 2018, 7 a.m. | OK | GNU C++14 | TESTS | 33 | 187 | 265216000 | 2900 | |
| 25413929 | Kaban-5 | D | March 11, 2017, 5:35 p.m. | OK | GNU C++14 | TESTS | 33 | 358 | 72499200 | 2900 | |
| 62601472 | vjudge4 | D | Oct. 15, 2019, 5:48 a.m. | OK | MS C++ | TESTS | 33 | 61 | 204800 | 2900 | |
| 62601510 | vjudge3 | D | Oct. 15, 2019, 5:49 a.m. | OK | MS C++ | TESTS | 33 | 93 | 409600 | 2900 | |
| 3916463 | masha_and_beer | D | June 19, 2013, 7:33 a.m. | OK | MS C++ | TESTS | 33 | 171 | 3686400 | 2900 |
Back to search problems