This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| using namespace std; | |
| #define MOD 1000000007 | |
| typedef unsigned long long ull; | |
| ull dp[1001]; // with rep |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <cstring> | |
| using namespace std; | |
| int buildlps (char * pat, int m, int *lps){ | |
| lps[0] = lps[1] = 0; | |
| for(int i=2; i<=m; i++){ | |
| int j = lps[i-1]; | |
| while(1){ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer