Diferente pentru problema/bitwiseparty intre reviziile #1 si #2

Nu exista diferente intre titluri.

Diferente intre continut:

== include(page="template/taskheader" task_id="bitwiseparty") ==
Poveste şi cerinţă...
The new year has come and just like all the competitive programmers, our hero Stefan received an array with positive integers as a Christmas present as well! Now he wants to explore the array and to find new interesting properties as he always likes doing.
 
For this year, he wants to find out the maximum number of values we can take from the array such that both the bitwise AND and the bitwise XOR are different from $0$.
 
Since this is too easy for him, he also modifies his array and wants you to answer to the same question after each update.
h2. Date de intrare
Fişierul de intrare $bitwiseparty.in$ ...
The input file $bitwiseparty.in$ contains $n$, the number of integers from the array and $q$, the number of queries ($1 \le n, q \le 2 * 10^5$).
 
The next line contains $n$ integers, representing the numbers from Stefan's array ($1 \le v_i < 2^{20}$).
 
The next $q$ lines contain the queries. Each query is represented by two integers, $pos$ and $val$, representing that on the position $pos$, we will change its value to $val$ ($1 \le pos \le n$), ($1 \le val < 2^{20}$).
h2. Date de ieşire
În fişierul de ieşire $bitwiseparty.out$ ...
The output file $bitwiseparty.out$ will contain $q+1$ lines. On the first line you will print the answer before any updates, and on the next $q$ lines you will print the answer after each update.
h2. Restricţii
* $... &le; ... &le; ...$
* For tests worth $10$ points, $1 &le; v[i], val &le; 2$.
* For tests worth $20$ more points, $1 &le; n, q, val, v_i < 2^7$.
* For tests worth $20$ more points, $1 &le; n, q, val, v_i < 2^{10}$.
 
h2. Exemplu
table(example). |_. bitwiseparty.in |_. bitwiseparty.out |
| This is some
  text written on
  multiple lines.
| This is another
  text written on
  multiple lines.
| 5 8
3 2 4 1 5
1 1
2 3
3 3
4 2
3 6
4 5
5 2
1 6
| 3
3
4
5
4
3
4
3
4
|
h3. Explicaţie
 
...
 
== include(page="template/taskfooter" task_id="bitwiseparty") ==

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.