제출 #1276084

#제출 시각아이디문제언어결과실행 시간메모리
1276084cjspd_olyLaugh Analysis (IOI16_laugh)C++17
0 / 100
0 ms332 KiB
#include "laugh.h" int longest_laugh(std::string s) { int n = s.length(); int ans = 0; for (int i = 0; i < n; ++i) { int j = i; while (j + 1 < n && s[j + 1] != s[i] && (s[j + 1] == 'a' or s[j + 1] == 'h')) ++j; ans = std::max(ans, j - i + 1); i = j; } return ans; }

컴파일 시 표준 에러 (stderr) 메시지

laugh.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
laugh_c.h:1:9: warning: #pragma once in main file
    1 | #pragma once
      |         ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...