PDF Archive

Easily share your PDF documents with your contacts, on the Web and Social Networks.

Share a file Manage my documents Convert Recover PDF Search Help Contact



problems.pdf


Preview of PDF document problems.pdf

Page 1 2 3 4 5 6 7 8 9 10 11 12 13

Text preview


ACM ICPC 2008–2009, NEERC, Northern Subregional Contest
St Petersburg, November 1, 2008
The next line contains m — the number of IP addresses to check (1 ≤ m ≤ 100 000). The following m
lines contain IP addresses to check, one per line.

Output
For each request output ‘A’ if it will be granted access to the resource, or ‘D’ if it will not be granted
access. Output all answers in one line, do not separate output by spaces.

Example
access.in
4
allow from 10.0.0.1
deny from 10.0.0.0/8
allow from 192.168.0.0/16
deny from 192.168.0.1
5
10.0.0.1
10.0.0.2
194.85.160.133
192.168.0.1
192.168.0.2

access.out
ADAAA

Page 2 of 13