# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1010578 | tarpent | Round words (IZhO13_rowords) | C++14 | 2097 ms | 348 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>
using namespace std;
string a,b;
int m,pr,od;
int main(){
cin>>a>>b;
m=-1;
for(int i = 0; i<a.size(); i++){
int j = pr;
while(true){
if(a[i]==b[j]){
od++;
pr=j;
if(m==-1) m=j;
}
if(j==b.size()-1){
j=0;
}
else j++;
if(j==m-1){
break;
}
}
}
cout<<od;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |