Codeforces Round 685 (Div. 2)


A. Subtract or Divide
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
6
1
2
3
4
6
9
Output
0
1
2
2
2
3
----------------------------------------------------------------------------------------------------
B. Non-Substring Subsequence
time limit per test: 1 second
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
2
6 3
001000
2 4
1 3
3 5
4 2
1111
1 4
2 3
Output
YES
NO
YES
NO
YES
----------------------------------------------------------------------------------------------------
C. String Equality
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
3 3
abc
bcd
4 2
abba
azza
2 1
zz
aa
6 2
aaabba
ddddcc
Output
No
Yes
No
Yes
----------------------------------------------------------------------------------------------------
D. Circle Game
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
5
2 1
5 2
10 3
25 4
15441 33
Output
Utkarsh
Ashish
Utkarsh
Utkarsh
Ashish
----------------------------------------------------------------------------------------------------
E1. Bitwise Queries (Easy Version)
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
0
2
3
Output
OR 1 2
OR 2 3
XOR 2 4
! 0 0 2 3
----------------------------------------------------------------------------------------------------
E2. Bitwise Queries (Hard Version)
time limit per test: 4 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
0
2
3
Output
OR 1 2
OR 2 3
XOR 2 4
! 0 0 2 3
----------------------------------------------------------------------------------------------------
F. Nullify The Matrix
time limit per test: 2 seconds
memory limit per test: 256 megabytes
input: standard input
output: standard output

Examples
Input
4
1 1
0
1 3
0 0 5
2 2
0 1
1 0
3 3
1 2 3
4 5 6
7 8 9
Output
Jeel
Ashish
Jeel
Ashish
----------------------------------------------------------------------------------------------------
