Submission #1793909


Source Code Expand

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <fstream>
#include <string>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <stack>
#include <queue>
#include <complex>
#include <set>
#include <list>
#include <iomanip>
#include <map>
#include <memory.h>



using namespace std;
static const double EPS = 1e-9;
typedef long long ll;
typedef unsigned long long ull;
#define FOR(i,n) for(int i=0;i<(int)n;++i)
#define FORNUM(p, x) for (int num = p; num < (int)(x); ++num)
#define FORI(p, x) for (int i = p; i < (int)(x); ++i)
#define FORJ(p, x) for (int j = p; j < (int)(x); ++j)
#define FORK(p, x) for (int k = p; k < (int)(x); ++k)
#define FORL(p, x) for (int l = p; l < (int)(x); ++l)

typedef pair<int,int>P;
#define INF 1000000000
 
struct edge { 
	int from, to; 
	edge (int from, int to){
		this->from=from; this->to=to;
	}
};
 
int V,E;
typedef vector<edge> edges;
vector<edges> G;

int n, a;


int main(){
	scanf("%d ", &n);
	map<int, int> m;
	FORI(0, n) {
		scanf("%d ", &a);
		m[a]++;
	}
	int ans = 0;
	for (map<int, int>::iterator p = m.begin(); p != m.end(); p++) {
		ans += p->second % 2;
	}
	printf("%d\n", ans);
	return 0;
}

Submission Info

Submission Time
Task C - Write and Erase
User cypher512
Language C++14 (GCC 5.4.1)
Score 300
Code Size 1228 Byte
Status AC
Exec Time 75 ms
Memory 4992 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:48:18: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d ", &n);
                  ^
./Main.cpp:51:19: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
   scanf("%d ", &a);
                   ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 300 / 300
Status
AC × 3
AC × 11
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 14 ms 256 KB
02.txt AC 14 ms 256 KB
03.txt AC 75 ms 4992 KB
04.txt AC 15 ms 256 KB
05.txt AC 43 ms 3328 KB
06.txt AC 17 ms 256 KB
07.txt AC 12 ms 256 KB
08.txt AC 20 ms 384 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