# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
956591 | DeltaStruct | Laugh Analysis (IOI16_laugh) | C++17 | 4 ms | 612 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(0),j(0);i < s.size();++i){
k = (s[i]==string("ah")[k&1]?k+1:(int)(s[i]=='a'));
j = (s[i]==string("ha")[j&1]?j+1:(int)(s[i]=='h'));
r = max({r,k,j});
}
return r;
}
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... |