MSBOP 2015 Round3 register

Ended

Participants:978

Verdict:AC | WA
Submitted:2015-05-09 16:23:43

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<stdio.h>
#include<string.h>
#include<algorithm>
using namespace std;
struct robot
{
    int id;
    int st;
    int ed;
    int maxcount;
    double mid;
    double totmid;
};
robot r[18];
int num[100005];
int totcount[18],nowcount[18];
long long tot[18];
int counterid[18];
int c[18];
int n,k;
bool cmp(const robot &a,const robot &b)
{
    //if(a.mid!=b.mid)return a.mid<b.mid;
    if(a.totmid!=b.totmid)return a.totmid<b.totmid;
    return a.mid<b.mid;
}
int lowbit(int x)
{
    return x&-x;
}
void add(int x,int y)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX