AtCoder-Library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub ryusuke920/AtCoder-Library

:x: Test/yukicoder/0204.test.py

Code

# verification-helper: PROBLEM https://yukicoder.me/problems/no/204


def main() -> None:
    d = int(input())
    c1 = input()
    c2 = input()
    s = "x" * 14 + c1 + c2 + "x" * 14
    ans = 0
    for i in range(27):
        if i + d > 42:
            continue
        p = [i for i in s]
        cnt = 0
        for j in range(d):
            if p[i + j] == "x":
                cnt += 1    
                p[i + j] = "o"
        if cnt <= d:
            num = 0
            for i in range(42):
                if p[i] == "o":
                    num += 1
                else:
                    ans = max(ans, num)
                    num = 0
            ans = max(ans, num)
    
    print(ans)


if __name__ == "__main__":
    main()
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
    bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.5/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/python.py", line 96, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page