Submission #1595638


Source Code Expand

#include <iostream>
#include <cstdio>
#include <iostream>
using namespace std;

int main (void){
    long long i,j;
    long long wa = 0; 
    long long n;
    long long a[105000] = {0};
    long long count=0;

    scanf("%lld",&n);
    for(i=0;i<n;i++){
        scanf("%lld",&a[i]);
    }
    sort(a,a+n);
    i=0;
    while(i<n){
        if(a[i] != a[i+1]){
            wa++;
            i++;
            count = 0;
        }else{
            count++;
            if(count % 2 == 1){
                wa--;
            }else{
                wa++;
            }
            i++;
        }
    }
   

    printf("%d\n",wa);

    return 0;
}

Submission Info

Submission Time
Task C - Together
User tanimura
Language C++14 (Clang 3.8.0)
Score 0
Code Size 678 Byte
Status WA
Exec Time 17 ms
Memory 1656 KB

Compile Error

./Main.cpp:36:19: warning: format specifies type 'int' but the argument has type 'long long' [-Wformat]
    printf("%d\n",wa);
            ~~    ^~
            %lld
1 warning generated.

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 300
Status
AC × 1
WA × 2
AC × 1
WA × 8
Set Name Test Cases
Sample 0_000.txt, 0_001.txt, 0_002.txt
All 0_000.txt, 0_001.txt, 0_002.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt
Case Name Status Exec Time Memory
0_000.txt WA 5 ms 1656 KB
0_001.txt WA 2 ms 1024 KB
0_002.txt AC 2 ms 1152 KB
1_003.txt WA 2 ms 1024 KB
1_004.txt WA 10 ms 1024 KB
1_005.txt WA 12 ms 1024 KB
1_006.txt WA 12 ms 1024 KB
1_007.txt WA 14 ms 1024 KB
1_008.txt WA 17 ms 1024 KB