hiho week 49 register

Ended

Participants:509

Verdict:Wrong Answer
Score:20 / 100
Submitted:2015-06-07 23:06:57

Lang:GCC

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>
static int sum,n,r1;
int q(int a[],int b[],int c[],int m,int ch,int n1,int d[]);
int main()
{
    int i,m,n1,k,ch,r;
    int a[60000]={0},b[60000],c[60000],d[20000]={0};
    scanf("%d",&n1);
    scanf("%d",&m);
    
    for(i=0;i<m;i++)
    {
        scanf("%d",&b[i]);
        scanf("%d",&c[i]);
    }
    for(i=0;i<m;i++)
    {
        n=1;sum=0;r1=2;
        for(r=0;r<m;r++)
        {
            a[r]=0;
        }
        for(r=0;r<n1;r++)
        {
            d[r]=0;
        }
        ch=c[i];
        a[0]=i+1;
        d[0]=b[i];
        d[1]=c[i];
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX