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

wht is wrong?? visual C
Posted by Shubham Murarka 16 Sep 2014 23:44
#include<stdio.h>
int main()
{
    int n, i, j;
    long int m;
    long long int pro[15000], stu[15000];
    int count = 0;
    scanf("%d", &n);
    for (i = 1; i <= n; i++)
    {
        scanf("%lld\n", &pro[i]);
    }
    scanf("%ld\n", &m);
    for (i = 1; i <= m; i++)
    {
        scanf("%lld\n", &stu[i]);
        for (j = 1; j <= n; j++)
        {
            if (stu[i] == pro[j])
                count++;
        }
    }
    printf("%d", count);
    return 0;
}