提出 #75042249
ソースコード 拡げる
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(nullptr);
int N, M;
cin >> N >> M;
set<int> clothes;
int flag = 1;
for (int i = 0; i < N; ++i) {
int input;
cin >> input;
if (clothes.find(input) != clothes.end()) {
flag = 0;
}
clothes.insert(input);
}
cout << (flag ? "Yes" : "No") << '\n' << ((clothes.size() == M) ? "Yes" : "No");
}
提出情報
| 提出日時 | |
|---|---|
| 問題 | B - Mapping |
| ユーザ | bluerini |
| 言語 | C++23 (GCC 15.2.0) |
| 得点 | 200 |
| コード長 | 522 Byte |
| 結果 | AC |
| 実行時間 | 1 ms |
| メモリ | 3640 KiB |
コンパイルエラー
./Main.cpp: In function 'int main()':
./Main.cpp:21:63: warning: comparison of integer expressions of different signedness: 'std::set<long long int>::size_type' {aka 'long unsigned int'} and 'long long int' [-Wsign-compare]
21 | cout << (flag ? "Yes" : "No") << '\n' << ((clothes.size() == M) ? "Yes" : "No");
| ~~~~~~~~~~~~~~~^~~~
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 200 / 200 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| 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 | 3504 KiB |
| 00_sample_01.txt | AC | 1 ms | 3564 KiB |
| 00_sample_02.txt | AC | 1 ms | 3640 KiB |
| 00_sample_03.txt | AC | 1 ms | 3608 KiB |
| 01_random_1_00.txt | AC | 1 ms | 3636 KiB |
| 01_random_1_01.txt | AC | 1 ms | 3416 KiB |
| 01_random_1_02.txt | AC | 1 ms | 3576 KiB |
| 02_random_2_00.txt | AC | 1 ms | 3608 KiB |
| 02_random_2_01.txt | AC | 1 ms | 3484 KiB |
| 02_random_2_02.txt | AC | 1 ms | 3500 KiB |
| 03_random_3_00.txt | AC | 1 ms | 3564 KiB |
| 03_random_3_01.txt | AC | 1 ms | 3536 KiB |
| 03_random_3_02.txt | AC | 1 ms | 3640 KiB |
| 04_random_4_00.txt | AC | 1 ms | 3636 KiB |
| 04_random_4_01.txt | AC | 1 ms | 3548 KiB |
| 04_random_4_02.txt | AC | 1 ms | 3636 KiB |
| 04_random_4_03.txt | AC | 1 ms | 3404 KiB |
| 04_random_4_04.txt | AC | 1 ms | 3504 KiB |
| 04_random_4_05.txt | AC | 1 ms | 3488 KiB |