# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
957155 | 2024-04-03T05:30:58 Z | ALTAKEXE | Laugh Analysis (IOI16_laugh) | C++14 | 1 ms | 348 KB |
#include <bits/stdc++.h> using namespace std; int longest_laugh(string s) { int ans = 0, mx = 0; for (int i = 0; i < s.size(); i++) { mx = max(ans, mx); if (s[i] == 'a') ans++; if (s[i] == 'h' && s[i - 1] == 'a' || s[i + 1] == 'a') ans++; if (s[i] != 'a' && s[i] != 'h') ans = 0; } return mx; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | numbers differ - expected: '2', found: '12' |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | numbers differ - expected: '2', found: '12' |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 344 KB | Output is correct |
2 | Incorrect | 0 ms | 348 KB | numbers differ - expected: '2', found: '12' |
3 | Halted | 0 ms | 0 KB | - |