Submission #832857

# Submission time Handle Problem Language Result Execution time Memory
832857 2023-08-21T16:00:40 Z DarkMatter Laugh Analysis (IOI16_laugh) C++14
0 / 100
0 ms 212 KB
#include "laugh.h"
#include<bits/stdc++.h>

using namespace std;

int longest_laugh(std::string s)
{
	int ans = 0, cur = 0;
	int n = s.size();
	for (int i = 0; i < n; i++) {
		if (s[i] == 'a' || s[i] == 'h')
			cur++;
		else
			ans = max(ans, cur), cur = 0;
	}
	ans = max(ans, cur);
	return ans;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB numbers differ - expected: '2', found: '14'
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB numbers differ - expected: '2', found: '14'
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 0 ms 212 KB numbers differ - expected: '2', found: '14'
3 Halted 0 ms 0 KB -