| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1276086 | cjspd_oly | Laugh Analysis (IOI16_laugh) | C++17 | 3 ms | 612 KiB |
#include "laugh.h"
int longest_laugh(std::string s)
{
int n = s.size();
int mx = 0, cur = 0;
for (int i = 0; i < n; i++)
if (s[i] == 'h' or s[i] == 'a')
{
if (i > 0 and s[i] != s[i - 1])
++cur;
else
mx = std::max(mx, cur), cur = 1;
}
else
mx = std::max(mx, cur), cur = 0;
return std::max(mx, cur);
}
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... | ||||
