提出 #68113269


ソースコード 拡げる

#include<fstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<queue>
#include<unordered_set>
#include<unordered_map>
#include<map>
#include<cmath>
#include<numbers>
#include<algorithm>
#include<string>
#include<set>
#include<stack>
#include<random>
#include<bitset>
#include<cassert>
#include<exception>

using namespace std;
using ll=long long;
using uset=unordered_set<long long>;

int H,W;
vector<string> strs;

struct point{
	int x,y;
	point():x(0),y(0){}
	point(int x,int y):x(x),y(y){}
	point operator+(const point& a){
		return point(a.x+x,a.y+y);
	}
	bool rangeCheck(){
		return 0<=x&&x<W&&0<=y&&y<H;
	}
	bool mapCheck(){
		return rangeCheck()&&strs[y][x]=='.';
	}
};

template<typename T>
bool chmax(T& a,const T& b){
	if(a<b){
		a=b;
		return true;
	}
	return false;
}
template<typename T>
bool chmin(T& a,const T& b){
	if(a>b){
		a=b;
		return true;
	}
	return false;
}


int main(){
	int N,M;
	cin>>N>>M;
	vector<int> A(N);
	vector<int> B(M);
	for(int i=0;i<N;i++){
		cin>>A[i];
	}
	for(int i=0;i<M;i++){
		cin>>B[i];
	}
	B.push_back(1<<30);
	sort(B.begin(),B.end());
	auto ite=B.begin();
	for(int i=0;i<N;i++){

		while(A[i]>*ite)ite++;

		if(A[i]==*ite){
			ite++;
			continue;
		}
		cout<<A[i]<<endl;
	}

	return 0;
}

提出情報

提出日時
問題 B - Search and Delete
ユーザ Satsuki15
言語 C++ 20 (gcc 12.2)
得点 200
コード長 1338 Byte
結果 AC
実行時間 1 ms
メモリ 3632 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 2
AC × 28
セット名 テストケース
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
ケース名 結果 実行時間 メモリ
example_00.txt AC 1 ms 3400 KiB
example_01.txt AC 1 ms 3624 KiB
hand_00.txt AC 1 ms 3540 KiB
hand_01.txt AC 1 ms 3432 KiB
hand_02.txt AC 1 ms 3628 KiB
hand_03.txt AC 1 ms 3544 KiB
hand_04.txt AC 1 ms 3524 KiB
hand_05.txt AC 1 ms 3632 KiB
random_00.txt AC 1 ms 3540 KiB
random_01.txt AC 1 ms 3564 KiB
random_02.txt AC 1 ms 3560 KiB
random_03.txt AC 1 ms 3560 KiB
random_04.txt AC 1 ms 3464 KiB
random_05.txt AC 1 ms 3436 KiB
random_06.txt AC 1 ms 3488 KiB
random_07.txt AC 1 ms 3540 KiB
random_08.txt AC 1 ms 3544 KiB
random_09.txt AC 1 ms 3528 KiB
random_10.txt AC 1 ms 3432 KiB
random_11.txt AC 1 ms 3580 KiB
random_12.txt AC 1 ms 3564 KiB
random_13.txt AC 1 ms 3544 KiB
random_14.txt AC 1 ms 3448 KiB
random_15.txt AC 1 ms 3632 KiB
random_16.txt AC 1 ms 3628 KiB
random_17.txt AC 1 ms 3436 KiB
random_18.txt AC 1 ms 3464 KiB
random_19.txt AC 1 ms 3544 KiB