結果

問題 No.590 Replacement
ユーザー Pulmn
提出日時 2017-04-14 21:47:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 311 bytes
コンパイル時間 519 ms
コンパイル使用メモリ 58,364 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-19 09:27:31
合計ジャッジ時間 3,304 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 47
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <assert.h>
using namespace std;

int n;

bool f(){
	vector<bool> a(n);
	for(int i=0;i<n;i++){
		int t;
		cin>>t;
		a[t-1]=1;
	}
	int num=0;
	for(int i=0;i<n;i++) if(a[i]) num++;
	return num==n;
}

int main(){
	cin>>n;
	assert(1<=n&&n<=100000);
	assert(f()&&f());
}
0