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 |
|---|---|---|---|---|---|---|
| 100 | Unknown Language Round 3 | FINISHED | False | 10800 | 464400023 | July 30, 2011, 6 a.m. |
Solved |
Index |
Name |
Type |
Tags |
Community Tag |
Rating |
|---|---|---|---|---|---|---|
| ( 364 ) | D | World of Mouth | PROGRAMMING | *special strings | 1600 |
There are a lot of rumors in the media these days. One day Aida decided to find out how rumors are made. She asked n of her friends to help her. They all formed a circle and Aida told the person to her right a piece of news which was just a simple string. Then each person told the string to the person on his/her right. But they didn't tell the string exactly as they'd heard it. Each person made at most one of these two types of changes: Removing one character from the end of the heard string. Adding a character to the end of the heard string. Finally when the rumor passed exactly n moves (a complete cycle), Aida heard something quite different from what she expected from the person on her left. She thinks someone has cheated and made some changes other than those explained above. Now she wants you to write a Pike piece of code which gets the initial and final strings and tells Aida whether it's possible to get to the final string from the initial one, by the rules described above. The first line contains a single integer n ( 2 ≤ n ≤ 8 × 10 6 ), the number of Aida's friends. The following two lines contain a non-empty string each — initial and final strings. The lengths of strings are at most 10 7 and they only contain English alphabet letters. Write a single YES or NO . Write YES only if it's possible to get to the final string from the initial string. The input is case-sensitive, while the output is not. |
Submission Id |
Author(s) |
Index |
Submitted |
Verdict |
Language |
Test Set |
Tests Passed |
Time taken (ms) |
Memory Consumed (bytes) |
Tags |
Rating |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 23222175 | biltharesatyendra | D | Dec. 22, 2016, 10:30 a.m. | OK | Pike | TESTS | 26 | 794 | 36044800 | 1600 | |
| 24451740 | pr0grammer | D | Feb. 5, 2017, 1:04 p.m. | OK | Pike | TESTS | 26 | 857 | 36147200 | 1600 | |
| 713148 | Archon.JK | D | Sept. 23, 2011, 8:13 a.m. | OK | Pike | TESTS | 26 | 890 | 59392000 | 1600 | |
| 24451758 | vjudge4 | D | Feb. 5, 2017, 1:04 p.m. | OK | Pike | TESTS | 26 | 904 | 36044800 | 1600 | |
| 41009099 | ReaLNero1 | D | July 31, 2018, 11:38 a.m. | OK | Pike | TESTS | 26 | 919 | 28672000 | 1600 | |
| 572252 | Gassa | D | July 30, 2011, 8:25 a.m. | OK | Pike | TESTS | 26 | 920 | 59392000 | 1600 | |
| 35836275 | _____i_____ | D | March 2, 2018, 12:53 p.m. | OK | Pike | TESTS | 26 | 935 | 35532800 | 1600 | |
| 35836273 | _____k_____ | D | March 2, 2018, 12:53 p.m. | OK | Pike | TESTS | 26 | 935 | 35532800 | 1600 | |
| 35836272 | ______u______ | D | March 2, 2018, 12:53 p.m. | OK | Pike | TESTS | 26 | 935 | 35532800 | 1600 | |
| 35836271 | ______n______ | D | March 2, 2018, 12:53 p.m. | OK | Pike | TESTS | 26 | 935 | 35532800 | 1600 |
Back to search problems