hihoCoder Challenge 18 register

Ended

Participants:318

Verdict:Accepted
Submitted:2016-02-14 20:32:24

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<set>
#include<map>
#include<vector>
#define rep(i,j,k) for(int i=(int)j;i<=(int)k;i++)
#define per(i,j,k) for(int i=(int)j;i>=(int)k;i--)
using namespace std;
typedef long long LL;
typedef double db;
const int N=105;
LL ji[N];
int n,m;
const int P=1000000007;
LL gt[N];
int work(int a,int b){
    memset(ji,-1,sizeof ji);
    LL V=gt[a]^gt[b];
    if(a==b)V=gt[a];
    rep(i,1,m)if(i^a)if(i^b){
        LL x=gt[i];
        int bt=-1;
        rep(j,0,n-1)if(x&(1ll<<j)){
            if(ji[j]>=0){
                x^=ji[j];
            }
            else{
                bt=j;break;
            }
        }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX