# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
38472 | oTTo_22 | Three Friends (BOI14_friends) | C++14 | 500 ms | 15984 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define fi first
#define se second
#define ll long long
const int INF=1e9+1;
const int MAXN=1e5+1;
const int MOD=13371337;
using namespace std;
vector < int > pfunc(string str){
vector < int > p(str.size());
int k=0;
for (int l=1; l<str.size(); l++) {
while (k>0 && str[k]!=str[l])
k=p[k-1];
if (str[k]==str[l])
k++;
p[l]=k;
}
return p;
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
//freopen("input.txt","r",stdin);
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |