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 1196. History Exam

Where is wrong
Posted by csyzcyj 27 Feb 2013 09:24
My program:
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
long long i,j,n,m,count=0,aa;
bool a[1000000001];
int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    //memset(a,false,sizeof(a));
    scanf("%lld",&n);
    for(i=1;i<=n;i++)
    {
          scanf("%lld",&aa);
          a[aa]=true;
          }
    scanf("%lld",&m);
    for(i=1;i<=m;i++)
    {
          scanf("%lld",&aa);
          if(a[aa]==true)  count++;
          }
    printf("%lld",count);
    //system("pause");
    return 0;
}

It said that "Runtime error (access violation)" in test 10,so why?Please help!!!