Problem Description

Start with mask=0. Commands: GRANT k, REVOKE k, CHECK k. k is 0..30. CHECK prints 1/0.

Input Format

First line q. Next q lines.

Output Format

Outputs for CHECK.

Sample Test Case

Input:
6 GRANT 1 GRANT 3 CHECK 1 REVOKE 1 CHECK 1 CHECK 3
Output:
1 0 1

Constraints

q

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next