- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
modes = {'R': 1, 'W': 2, 'X': 4, 'read': 1, 'write': 2, 'execute': 4}
files = dict()
n = int(input())
for i in range(n):
line = input().split()
filename = line[0]
mask = 0
for mode in line[1:]:
mask |= modes[mode]
files[filename] = mask
m = int(input())
for i in range(m):
operation, filename = input().rstrip().split()
print('OK' if files[filename] & modes[operation] else 'Access denied')
Комментарии (0) RSS
Добавить комментарий