Advertisement
KateWilson

Файлы. Вирусы. X, R, W

Aug 11th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. #Условие задачи см в Питошке. Тема: Множества и словари ;)
  2. d = dict()
  3. N = int(input())
  4.  
  5. for i in range(N):
  6.     name, operations = input().split(maxsplit = 1)
  7.     d[name] = set(operations.split())
  8.  
  9. m = int(input())
  10.  
  11. for i in range(m):
  12.     access, name = input().split()
  13.     if access in d[name]:
  14.         print('Ок')
  15.     else:
  16.         print('Access denied')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement