hiho week 80 register

Ended

Participants:173

Verdict:Accepted
Score:100 / 100
Submitted:2016-01-11 00:03:48

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 <string>
#include <algorithm>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <cstdio>
using namespace std;
int target[3];
bool check(int a, int b , int c) {
    int tmp[3];
    tmp[0] = abs(a-b);
    tmp[1] = abs(a-c);
    tmp[2] = abs(b-c);
    sort(tmp, tmp+3);
    // cout << tmp[0] << " " << tmp[1] << " " << tmp[2] << endl;
    // cout << "-----------------------------------" << endl;
    for (int i = 0; i < 3; i++)
        if (tmp[i] != target[i])
            return false;
    return true;
}
int main() {
    int a, b, c;
    char ch;
    int cnt = 0;
    int mx = -1;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX