ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1100. Final Standings

Error-Reg
Posted by MUTHUVEERAPPAN SP 14 Dec 2011 16:26
#include<stdio.h>
int main()
{
        int M[20],ID[20],N,temp,temp1,i,j;
    scanf("%d",&N);
    if(N>150000||ID[20]>10^7||M[20]>100)
            printf("Invalid input\n");
    else
    {
    printf("Enter the No.of.teams:\n",N);
    for(i=0;i<N;i++)
    {
            scanf("%d %d",&ID[i],&M[i]);
    }
    for(i=0;i<N;i++)
    {
        printf("ID:%d    M:%d\n",ID[i],M[i]);
    }
    for(i=0;i<N;i++)
        for(j=0;j<N-1;j++)
        {
        if(M[j]<M[j+1])
        {
            temp=M[j];
            M[j]=M[j+1];
            M[j+1]=temp;
            temp1=ID[j];
            ID[j]=ID[j+1];
            ID[j+1]=temp1;
        }
        }
    printf("Bubble sort desending order\n");
    for(i=0;i<N;i++)
    {
        printf("ID: %d M:%d \n",ID[i],M[i]);
    }
    }
}


Whats wrong with this code. Any one know means pls tell the error.