We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bbcb208 commit ca81c11Copy full SHA for ca81c11
12/3.cpp
@@ -16,7 +16,7 @@ int solution(string s) {
16
// 다른 문자열이 나왔다면(더 이상 압축하지 못하는 경우라면)
17
else {
18
compressed += (cnt >= 2)? to_string(cnt) + prev : prev;
19
- prev += s.substr(j, step); // 다시 상태 초기화
+ prev = s.substr(j, step); // 다시 상태 초기화
20
cnt = 1;
21
}
22
@@ -26,4 +26,4 @@ int solution(string s) {
26
answer = min(answer, (int)compressed.size());
27
28
return answer;
29
-}
+}
0 commit comments