# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
956578 | DeltaStruct | Laugh Analysis (IOI16_laugh) | C++17 | 0 ms | 0 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>
#include "laugh.h"
using namespace std;
int longest_laugh(string s){
int r = 0;
for (int i(0),k(1);i < n;++i){
k = (s[i]=='a'||s[i]=='h'?k+1:0);
r = max(r,k);
}
return r;
}