Submission #68119252


Source Code Expand

//#pragma GCC optimize("Ofast")
//#pragma GCC target("avx,avx2,fma")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4.1,sse4.2,sse4a,avx,avx2,popcnt,tune=native")
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
#include <array>
#include <climits>
using namespace std;

#ifdef LOCAL
	#define eprintf(...) {fprintf(stderr, __VA_ARGS__);fflush(stderr);}
#else
	#define eprintf(...) 42
#endif

using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
	return (ull)rng() % B;
}

#define mp make_pair
#define all(x) (x).begin(),(x).end()

clock_t startTime;
double getCurrentTime() {
	return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}

ll floor_div(ll x, ll y) {
	assert(y != 0);
	if (y < 0) {
		y = -y;
		x = -x;
	}
	if (x >= 0) return x / y;
	return (x + 1) / y - 1;
}
ll ceil_div(ll x, ll y) {
	assert(y != 0);
	if (y < 0) {
		y = -y;
		x = -x;
	}
	if (x <= 0) return x / y;
	return (x - 1) / y + 1;
}
template<typename T>
T sqr(T x) {
	return x * x;
}

int main() {
	startTime = clock();
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);

	multiset<int> setik;
	int n, m;
	cin >> n >> m;
	while(n--) {
		int x;
		cin >> x;
		setik.insert(x);
	}
	while(m--) {
		int x;
		cin >> x;
		if (setik.find(x) != setik.end())
			setik.erase(setik.find(x));
	}
	for (int x : setik)
		cout << x << " ";
	cout << endl;

	return 0;
}

Submission Info

Submission Time
Task B - Search and Delete
User Um_nik
Language C++ 20 (gcc 12.2)
Score 200
Code Size 1976 Byte
Status AC
Exec Time 1 ms
Memory 3720 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 2
AC × 28
Set Name Test Cases
Sample example_00.txt, example_01.txt
All example_00.txt, example_01.txt, hand_00.txt, hand_01.txt, hand_02.txt, hand_03.txt, hand_04.txt, hand_05.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, random_12.txt, random_13.txt, random_14.txt, random_15.txt, random_16.txt, random_17.txt, random_18.txt, random_19.txt
Case Name Status Exec Time Memory
example_00.txt AC 1 ms 3516 KiB
example_01.txt AC 1 ms 3708 KiB
hand_00.txt AC 1 ms 3428 KiB
hand_01.txt AC 1 ms 3624 KiB
hand_02.txt AC 1 ms 3564 KiB
hand_03.txt AC 1 ms 3592 KiB
hand_04.txt AC 1 ms 3528 KiB
hand_05.txt AC 1 ms 3432 KiB
random_00.txt AC 1 ms 3532 KiB
random_01.txt AC 1 ms 3500 KiB
random_02.txt AC 1 ms 3552 KiB
random_03.txt AC 1 ms 3492 KiB
random_04.txt AC 1 ms 3532 KiB
random_05.txt AC 1 ms 3636 KiB
random_06.txt AC 1 ms 3532 KiB
random_07.txt AC 1 ms 3568 KiB
random_08.txt AC 1 ms 3508 KiB
random_09.txt AC 1 ms 3508 KiB
random_10.txt AC 1 ms 3552 KiB
random_11.txt AC 1 ms 3500 KiB
random_12.txt AC 1 ms 3596 KiB
random_13.txt AC 1 ms 3560 KiB
random_14.txt AC 1 ms 3564 KiB
random_15.txt AC 1 ms 3720 KiB
random_16.txt AC 1 ms 3440 KiB
random_17.txt AC 1 ms 3532 KiB
random_18.txt AC 1 ms 3716 KiB
random_19.txt AC 1 ms 3636 KiB