hiho week 80 register

Ended

Participants:173

Verdict:Accepted
Score:100 / 100
Submitted:2016-01-13 22:17:18

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<iostream>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
#define NUM 20010
char c[NUM];
int cur,max1,a[3],b[3],cy,cb,cr;
bool judge(int a,int b){
    
    return a<b;
}
bool j2(){
    sort(&b[0],&b[3],judge);
    for(int i=0;i<3;i++){
        if(a[i]!=b[i]){
            return false;
        }
    }
    return true;
    
}
void update(){
    cur++;
    b[0]=abs(cy-cb);
    b[1]=abs(cy-cr);
    b[2]=abs(cr-cb);
    
    bool p=j2();
    if(p){
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX