Submission #75065076
Source Code Expand
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<n;i++)
int main() {
int n,m;
cin>>n>>m;
vector<int>type(n);
rep(i,n){
cin>>type.at(i);
}
set<int>s;
rep(i,n){
s.insert(type.at(i));
}
//ここまで入力
bool kaburi=true;
rep(i,n){
for(int j=i+1;j<n;j++){
if(type.at(i)==type.at(j)){
kaburi=false;
break;
}
}
}
if(kaburi==true){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
//ここまで異なる服着てるかの判定
if(s.size()==m){
cout<<"Yes"<<endl;
}
else{
cout<<"No"<<endl;
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Mapping |
| User | harukunkun |
| Language | C++23 (GCC 15.2.0) |
| Score | 200 |
| Code Size | 696 Byte |
| Status | AC |
| Exec Time | 1 ms |
| Memory | 3620 KiB |
Compile Error
./Main.cpp: In function 'int main()':
./Main.cpp:41:14: warning: comparison of integer expressions of different signedness: 'std::set<int>::size_type' {aka 'long unsigned int'} and 'int' [-Wsign-compare]
41 | if(s.size()==m){
| ~~~~~~~~^~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| 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 | 3568 KiB |
| 00_sample_01.txt | AC | 1 ms | 3572 KiB |
| 00_sample_02.txt | AC | 1 ms | 3368 KiB |
| 00_sample_03.txt | AC | 1 ms | 3552 KiB |
| 01_random_1_00.txt | AC | 1 ms | 3556 KiB |
| 01_random_1_01.txt | AC | 1 ms | 3620 KiB |
| 01_random_1_02.txt | AC | 1 ms | 3580 KiB |
| 02_random_2_00.txt | AC | 1 ms | 3420 KiB |
| 02_random_2_01.txt | AC | 1 ms | 3368 KiB |
| 02_random_2_02.txt | AC | 1 ms | 3464 KiB |
| 03_random_3_00.txt | AC | 1 ms | 3556 KiB |
| 03_random_3_01.txt | AC | 1 ms | 3568 KiB |
| 03_random_3_02.txt | AC | 1 ms | 3620 KiB |
| 04_random_4_00.txt | AC | 1 ms | 3436 KiB |
| 04_random_4_01.txt | AC | 1 ms | 3436 KiB |
| 04_random_4_02.txt | AC | 1 ms | 3464 KiB |
| 04_random_4_03.txt | AC | 1 ms | 3420 KiB |
| 04_random_4_04.txt | AC | 1 ms | 3580 KiB |
| 04_random_4_05.txt | AC | 1 ms | 3436 KiB |