Submission #75049168


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
int n,m,x,ans1,ans2,cnt[105];
int main(){
	cin>>n>>m;
	for(int i=1;i<=n;i++) cin>>x,cnt[x]++;
	for(int i=1;i<=m;i++){
		if(cnt[i]==0) ans2=1;
		if(cnt[i]>1) ans1=1;
	}
	if(!ans1) cout<<"Yes\n";
	else cout<<"No\n";
	if(!ans2) cout<<"Yes\n";
	else cout<<"No\n";
} 

Submission Info

Submission Time
Task B - Mapping
User Rya_
Language C++23 (GCC 15.2.0)
Score 200
Code Size 321 Byte
Status AC
Exec Time 1 ms
Memory 3668 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 200 / 200
Status
AC × 4
AC × 19
Set Name Test Cases
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
Case Name Status Exec Time Memory
00_sample_00.txt AC 1 ms 3536 KiB
00_sample_01.txt AC 1 ms 3460 KiB
00_sample_02.txt AC 1 ms 3652 KiB
00_sample_03.txt AC 1 ms 3536 KiB
01_random_1_00.txt AC 1 ms 3540 KiB
01_random_1_01.txt AC 1 ms 3584 KiB
01_random_1_02.txt AC 1 ms 3536 KiB
02_random_2_00.txt AC 1 ms 3424 KiB
02_random_2_01.txt AC 1 ms 3460 KiB
02_random_2_02.txt AC 1 ms 3588 KiB
03_random_3_00.txt AC 1 ms 3460 KiB
03_random_3_01.txt AC 1 ms 3424 KiB
03_random_3_02.txt AC 1 ms 3648 KiB
04_random_4_00.txt AC 1 ms 3504 KiB
04_random_4_01.txt AC 1 ms 3580 KiB
04_random_4_02.txt AC 1 ms 3584 KiB
04_random_4_03.txt AC 1 ms 3580 KiB
04_random_4_04.txt AC 1 ms 3668 KiB
04_random_4_05.txt AC 1 ms 3648 KiB