Submission #3600602
Source Code Expand
#include <iostream> #include <vector> #include <map> #include <algorithm> using namespace std; int main() { int N; cin >> N; vector<long long int> A; for(int i=0; i<N; i++) { long long int a; cin >> a; A.push_back(a); } map<long long int,int> m; for(int i=0; i<N; i++) { m[A[i]] = 0; } for(int i=0; i<N; i++) { m[A[i]]++; } vector<long long int> S; sort(A.begin(),A.end()); S.push_back(A[0]); for(int i=1; i<N; i++) { if(A[i]!=A[i-1]) S.push_back(A[i]); } int cnt = 0; for(int i=0; i<A.size(); i++) { if(m[S[i]]%2!=0) cnt++; } cout << cnt << endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Write and Erase |
User | stu987 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 748 Byte |
Status | RE |
Exec Time | 155 ms |
Memory | 8820 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt, sample_03.txt |
All | 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 | AC | 47 ms | 1780 KB |
02.txt | WA | 48 ms | 1780 KB |
03.txt | AC | 113 ms | 8820 KB |
04.txt | RE | 142 ms | 1400 KB |
05.txt | AC | 104 ms | 6772 KB |
06.txt | RE | 150 ms | 1400 KB |
07.txt | RE | 123 ms | 1400 KB |
08.txt | RE | 155 ms | 1400 KB |
sample_01.txt | AC | 1 ms | 256 KB |
sample_02.txt | AC | 1 ms | 256 KB |
sample_03.txt | AC | 1 ms | 256 KB |