페이지

2902번: KMP는 왜 KMP일까?

https://www.acmicpc.net/problem/2902


$O(l)$


#include<cstdio>
char s[102] = "-";
int main() {
    scanf("%s", s + 1);
    for (int i = 0; s[i]; i++) if (s[i] == '-') printf("%c", s[i + 1]);
    return 0;
}

댓글 없음 :

댓글 쓰기