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 1021. Sacrament of the Sum

WHY IS IT CRASHING?? PLSSSSS ANS
Posted by BUET ASS 25 Oct 2008 23:06
 It is my code ..pls check it and ans me why is it crashing??

#include<stdio.h>

int main()
{
    int f[20],n,i,j,s[20],m=0,k;
    scanf("%d",&n);
    for(i=0;i<n;i++)
        scanf("%d",&f[i]);

    scanf("%d",&k);
    for(j=0;j<k;j++)
        scanf("%d",&s[j]);

    for(i=0;i<n;i++){
        for(j=0;j<k;j++)
            if(f[i]+s[j]==10000){
                m=1;
                break;
            }
    }
    if(m==0)
        printf("NO\n");
    else
        printf("YES\n");

    return 0;
}