提出 #75090375


ソースコード 拡げる

#include<bits/stdc++.h>
using namespace std;
int n,m,f[105],b[105];
int main(){
	cin>>n>>m;
	for(int i=1;i<=n;i++){
		cin>>f[i];
		b[f[i]]++;
	}
	bool flat=1;
	for(int i=1;i<=n;i++){
		for(int j=1;j<=n;j++){
			if(f[j]==f[i]&&j!=i){
				
				flat=0;
				break;
			}
		}
		if(flat==0){
			break;
		}
	}
	if(flat) cout<<"Yes"<<endl;
	else cout<<"No"<<endl;
	bool h;
	h=1;
	for(int i=1;i<=m;i++){
		if(b[i]== 0){
			h=0;
			break;
		}
	}
	if(h) cout<<"Yes";
	else cout<<"No";
}

提出情報

提出日時
問題 B - Mapping
ユーザ bb123123456
言語 C++23 (GCC 15.2.0)
得点 200
コード長 508 Byte
結果 AC
実行時間 1 ms
メモリ 3568 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 200 / 200
結果
AC × 4
AC × 19
セット名 テストケース
Sample 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt
All 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 01_random_1_00.txt, 01_random_1_01.txt, 01_random_1_02.txt, 02_random_2_00.txt, 02_random_2_01.txt, 02_random_2_02.txt, 03_random_3_00.txt, 03_random_3_01.txt, 03_random_3_02.txt, 04_random_4_00.txt, 04_random_4_01.txt, 04_random_4_02.txt, 04_random_4_03.txt, 04_random_4_04.txt, 04_random_4_05.txt
ケース名 結果 実行時間 メモリ
00_sample_00.txt AC 1 ms 3472 KiB
00_sample_01.txt AC 1 ms 3468 KiB
00_sample_02.txt AC 1 ms 3336 KiB
00_sample_03.txt AC 1 ms 3552 KiB
01_random_1_00.txt AC 1 ms 3472 KiB
01_random_1_01.txt AC 1 ms 3520 KiB
01_random_1_02.txt AC 1 ms 3500 KiB
02_random_2_00.txt AC 1 ms 3380 KiB
02_random_2_01.txt AC 1 ms 3432 KiB
02_random_2_02.txt AC 1 ms 3432 KiB
03_random_3_00.txt AC 1 ms 3432 KiB
03_random_3_01.txt AC 1 ms 3428 KiB
03_random_3_02.txt AC 1 ms 3396 KiB
04_random_4_00.txt AC 1 ms 3380 KiB
04_random_4_01.txt AC 1 ms 3568 KiB
04_random_4_02.txt AC 1 ms 3380 KiB
04_random_4_03.txt AC 1 ms 3468 KiB
04_random_4_04.txt AC 1 ms 3336 KiB
04_random_4_05.txt AC 1 ms 3432 KiB