# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
562791 | 2022-05-15T10:02:08 Z | silv723 | Laugh Analysis (IOI16_laugh) | C++14 | 1 ms | 212 KB |
#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=0; continue; } now++; ans=max(ans,now); } return ans; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 KB | numbers differ - expected: '2', found: '1' |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 KB | numbers differ - expected: '2', found: '1' |
3 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Incorrect | 0 ms | 212 KB | numbers differ - expected: '2', found: '1' |
3 | Halted | 0 ms | 0 KB | - |