# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
562793 | silv723 | Laugh Analysis (IOI16_laugh) | C++14 | 4 ms | 724 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;
using ll=long long;
int longest_laugh(string s){
int ans=0;
s='z'+s;
int now=0;
for(int i=1;i<s.size();i++){
if(s[i]!='h'&&s[i]!='a'){
now=0;
continue;
}
if(s[i]==s[i-1]){
now=1;
continue;
}
now++;
ans=max(ans,now);
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |