Pls help me to find Task and Solutions for Russian olympiad of informatic 2009 !!!
# | User | Rating |
---|---|---|
1 | tourist | 3690 |
2 | jiangly | 3647 |
3 | Benq | 3581 |
4 | orzdevinwang | 3570 |
5 | Geothermal | 3569 |
5 | cnnfls_csy | 3569 |
7 | Radewoosh | 3509 |
8 | ecnerwala | 3486 |
9 | jqdai0815 | 3474 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 173 |
2 | awoo | 164 |
3 | adamant | 163 |
4 | TheScrasse | 160 |
5 | nor | 157 |
6 | maroonrk | 156 |
7 | -is-this-fft- | 152 |
8 | Petr | 146 |
8 | orz | 146 |
10 | pajenegod | 145 |
Pls help me to find Task and Solutions for Russian olympiad of informatic 2009 !!!
The sequence of non-negative integers A1, A2, ..., AN is given. You are to find some subsequence Ai1, Ai2, ..., Aik (1 <= i1 < i2 < ... < ik <= N) such, that Ai1 XOR Ai2 XOR ... XOR Aik has a maximum value.
Input The first line of the input file contains the integer number N (1 <= N <= 100). The second line contains the sequence A1, A2, ..., AN (0 <= Ai <= 10^18).
Output Write to the output file a single integer number -- the maximum possible value of Ai1 XOR Ai2 XOR ... XOR Aik.
Given a non directed graph G = (V,E) and K query, N vertices and M arcs. (N,M,K <= 100000) for i-th query, I have 2 number (u[i],v[i]), it mean, if arcs(u[i],v[i]) don't exist, I will add them. if arcs(u[i],v[i]) exist, I will delete them. In M arcs, I have N-1 arcs can't be delete, it's spanning tree. So for each i-th query, I must find the number of bridges on this graph. Pls give me some idea for this problems. thank!!!
P/s : sorry for my bad english
Name |
---|