Submission #1577826


Source Code Expand

Copy
#include <iostream>
#include <map>
using namespace std;

int main(){
	int n;
	cin >> n;
	int64_t a[n];
	for(int64_t &i:a) cin >> i;
	map<int64_t, int> m;
	for(int64_t &i:a){
		int p = 1 - m[i];
		m[i] = p;
	}
	int ans = 0;
	for(auto p:m) if(p.second) ans++;
	cout << ans << endl;
}

Submission Info

Submission Time
Task C - Write and Erase
User jbyxm
Language C++14 (GCC 5.4.1)
Score 300
Code Size 298 Byte
Status
Exec Time 86 ms
Memory 7296 KB

Judge Result

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt, sample_03.txt
All 300 / 300 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, sample_01.txt, sample_02.txt, sample_03.txt
Case Name Status Exec Time Memory
01.txt 41 ms 1024 KB
02.txt 41 ms 1024 KB
03.txt 86 ms 7296 KB
04.txt 42 ms 1024 KB
05.txt 79 ms 5248 KB
06.txt 48 ms 1024 KB
07.txt 25 ms 1024 KB
08.txt 53 ms 1152 KB
sample_01.txt 1 ms 256 KB
sample_02.txt 1 ms 256 KB
sample_03.txt 1 ms 256 KB