# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
88423 | xiaowuc1 | Laugh Analysis (IOI16_laugh) | C++14 | 10 ms | 2788 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;
int solve(string a, string b) {
int r = 0;
int c = 0;
for(int i = 0; i < a.size(); i++) {
if(a[i] == b[i%b.size()]) c++;
else c = 0;
r = max(r, c);
}
return r;
}
int longest_laugh(string s) {
return max(solve(s, "ha"), solve(s, "ah"));
}
/*
void solve() {
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
solve();
}
*/
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... |