library

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

View the Project on GitHub rainbou-kpr/library

:heavy_check_mark: test/aoj-alds1-3-c.test.py

Depends on

Code

# verification-helper: PROBLEM https://onlinejudge.u-aizu.ac.jp/problems/ALDS1_3_C
from py.linkedlist import LinkedList


def main():
    l = LinkedList()
    for _ in range(int(input())):
        q = input().split()
        if q[0] == 'insert':
            l.appendleft(int(q[1]))
        elif q[0] == 'delete':
            i = l.find(int(q[1]))
            if i is not None:
                l.erase(i)
        elif q[0] == 'deleteFirst':
            l.popleft()
        else:
            l.pop()
    print(*l.values())


if __name__ == "__main__":
    main()
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/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.8.18/x64/lib/python3.8/site-packages/onlinejudge_verify/languages/python.py", line 93, in bundle
    raise NotImplementedError
NotImplementedError
Back to top page