hiho week 97 register

Ended

Participants:296

Verdict:Accepted
Score:100 / 100
Submitted:2016-05-14 12:59:46

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 <cstdio>  
#include <cstring>  
#include <cstdlib>  
#include <algorithm>  
using namespace std;  
typedef long long LL;  
const int MAXN = 1e3+5;  
void Ex_gcd(LL a, LL b, LL &x, LL &y)  
{  
    if(b == 0)  
    {  
        x = 1;  
        y = 0;  
        return ;  
    }  
    LL x1, y1;  
    Ex_gcd(b, a%b, x1, y1);  
    x = y1;  
    y = x1-(a/b)*y1;  
}  
LL GCD(LL a, LL b)  
{  
    if(b == 0)  
        return a;  
    return GCD(b, a%b);  
}  
LL m[MAXN],r[MAXN], n;  
LL Solve()  
{  
    LL M = m[1], R = r[1], d, k1, k2, c;  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX