結果

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

ソースコード

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