We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Python
- Collections
- Collections.deque()
- Discussions
Collections.deque()
Collections.deque()
Sort by
recency
|
638 Discussions
|
Please Login in order to post a comment
from collections import deque
if name == 'main': N = int(input()) d = deque()
from collections import deque n = int(input()) d = deque() for _ in range(n): x =input().split() m = x[0] try: v= x[1] except Exception as e: pass
#
print(*d)
from collections import deque
d=deque([]) n=int(input()) for _ in range(n): method,*args=input().split() if args: getattr(d,method)(*map(int,args)) else: getattr(d,method)() print(*d)