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 |
---|---|---|---|---|---|---|
1662 | SWERC 2021-2022 - Online Mirror (Unrated, ICPC Rules, Teams Preferred) | FINISHED | False | 18000 | 86468063 | April 24, 2022, 11:05 a.m. |
Solved$ |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
---|---|---|---|---|---|---|
( 346 ) | C | European Trip | PROGRAMMING | graphs |
B'The map of Europe can be represented by a set of n cities, numbered from 1 through n , which are connected by m bidirectional roads, each of which connects two distinct cities. A trip of length k is a sequence of k+1 cities v_1, v_2, ldots, v_{k+1} such that there is a road connecting each consecutive pair v_i , v_{i+1} of cities, for all 1 <= i <= k . A special trip is a trip that does not use the same road twice in a row, i.e., a sequence of k+1 cities v_1, v_2, ldots, v_{k+1} such that it forms a trip and v_i neq v_{i + 2} , for all 1 <= i <= k - 1 . Given an integer k , compute the number of distinct special trips of length k which begin and end in the same city. Since the answer might be large, give the answer modulo 998 ,244 ,353 . The first line contains three integers n , m and k ( 3 <= n <= 100 , 1 <= m <= n(n - 1) / 2 , 1 <= k <= 10^4 ) -- the number of cities, the number of roads and the length of trips to consider. Each of the following m lines contains a pair of distinct integers a and b ( 1 <= a, b <= n ) -- each pair represents a road connecting cities a and b . It is guaranteed that the roads are distinct (i.e., each pair of cities is connected by at most one road). Print the number of special trips of length k which begin and end in the same city, modulo 998 ,244 ,353 . In the first sample, we are looking for special trips of length 2 , but since we cannot use the same road twice once we step away from a city we cannot go back, so the answer is 0 . In the second sample, we have the following 12 special trips of length 3 which begin and end in the same city: (1, 2, 4, 1) , (1, 3, 4, 1) , (1, 4, 2, 1) , (1, 4, 3, 1) , (2, 1, 4, 2) , (2, 4, 1, 2) , (3, 1, 4, 3) , (3, 4, 1, 3) , (4, 1, 3, 4) , '... |
102042 |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
---|---|---|---|---|---|---|---|---|---|---|---|
154884098 | nhho | C | April 24, 2022, 7:07 p.m. | OK | GNU C++14 | TESTS | 30 | 1091 | 5529600 | ||
154860027 | LZDQ Neal_lee Asuka | C | April 24, 2022, 2:03 p.m. | OK | GNU C++14 | TESTS | 30 | 1388 | 3686400 | ||
154868770 | gisp_zjz Roundgod | C | April 24, 2022, 3:38 p.m. | OK | GNU C++17 | TESTS | 30 | 998 | 3584000 | ||
154853488 | TeaTime Ormlis Pechalka | C | April 24, 2022, 12:59 p.m. | OK | GNU C++17 | TESTS | 30 | 1045 | 921600 | ||
154897013 | DerekFeng | C | April 25, 2022, 2:01 a.m. | OK | GNU C++17 | TESTS | 30 | 1123 | 1024000 | ||
154853290 | ugly2333 | C | April 24, 2022, 12:57 p.m. | OK | GNU C++17 | TESTS | 30 | 1138 | 44032000 | ||
154897085 | DerekFeng | C | April 25, 2022, 2:03 a.m. | OK | GNU C++17 | TESTS | 30 | 1372 | 1024000 | ||
154895626 | a10n | C | April 24, 2022, 11:15 p.m. | OK | GNU C++17 | TESTS | 30 | 1622 | 1638400 | ||
154850724 | LJC00118 | C | April 24, 2022, 12:33 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 234 | 1740800 | ||
154867713 | gs18115 Retro3014 Gom | C | April 24, 2022, 3:27 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 327 | 1331200 | ||
154855613 | djq_cpp hehezhou MiracleFaFa | C | April 24, 2022, 1:21 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 655 | 1024000 | ||
154866677 | Mr_Eight ZGS_WZY yuyue | C | April 24, 2022, 3:15 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 686 | 2457600 | ||
154869422 | zhangguangxuan99 nvmdava Maripium | C | April 24, 2022, 3:43 p.m. | OK | GNU C++17 (64) | TESTS | 30 | 811 | 3174400 | ||
154896319 | Alan233 | C | April 24, 2022, 11:37 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 218 | 1536000 | ||
154855856 | KillerX Eric_hooo He_Ren | C | April 24, 2022, 1:23 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 234 | 1228800 | ||
154905498 | Nero | C | April 25, 2022, 5:17 a.m. | OK | GNU C++20 (64) | TESTS | 30 | 280 | 921600 | ||
154899406 | Asuka | C | April 25, 2022, 3:03 a.m. | OK | GNU C++20 (64) | TESTS | 30 | 374 | 3891200 | ||
154856447 | jiangly | C | April 24, 2022, 1:29 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 546 | 614400 | ||
154859739 | Golovanov399 amethyst0 AndreySergunin | C | April 24, 2022, 2 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 608 | 307200 | ||
154859544 | Merkurev KAN Um_nik | C | April 24, 2022, 1:58 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 686 | 614400 | ||
154863028 | Endagorion | C | April 24, 2022, 2:35 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 810 | 51609600 | ||
154863150 | Gary2005 tzxydby platelet | C | April 24, 2022, 2:36 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 1185 | 45670400 | ||
154868116 | atodo lucaperju apostoldaniel854 | C | April 24, 2022, 3:31 p.m. | OK | GNU C++20 (64) | TESTS | 30 | 1279 | 2969600 |
Back to search problems