ログインしてください。
提出 #29179468
ソースコード 拡げる
n, m = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
a_count = [0] * 101
b_count = [0] * 101
for i in range(n):
a_count[a[i]] += 1
for i in range(m):
b_count[b[i]] += 1
for i in range(1, 101):
if (a_count[i] > 0) and (b_count[i] > 0):
print(i)
提出情報
| 提出日時 | |
|---|---|
| 問題 | C - 共通要素 (Common Elements) |
| ユーザ | Pro_ktmr |
| 言語 | PyPy3 (7.3.0) |
| 得点 | 100 |
| コード長 | 326 Byte |
| 結果 | AC |
| 実行時間 | 72 ms |
| メモリ | 61988 KiB |
ジャッジ結果
| セット名 | Sample | All | ||||
|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 100 / 100 | ||||
| 結果 |
|
|
| セット名 | テストケース |
|---|---|
| Sample | sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt |
| All | 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt, 01-14.txt, 01-15.txt, 01-16.txt, sample-01.txt, sample-02.txt, sample-03.txt, sample-04.txt |
| ケース名 | 結果 | 実行時間 | メモリ |
|---|---|---|---|
| 01-01.txt | AC | 72 ms | 61812 KiB |
| 01-02.txt | AC | 55 ms | 61696 KiB |
| 01-03.txt | AC | 53 ms | 61456 KiB |
| 01-04.txt | AC | 55 ms | 61988 KiB |
| 01-05.txt | AC | 55 ms | 61700 KiB |
| 01-06.txt | AC | 50 ms | 61472 KiB |
| 01-07.txt | AC | 59 ms | 61620 KiB |
| 01-08.txt | AC | 52 ms | 61536 KiB |
| 01-09.txt | AC | 51 ms | 61544 KiB |
| 01-10.txt | AC | 56 ms | 61436 KiB |
| 01-11.txt | AC | 51 ms | 61520 KiB |
| 01-12.txt | AC | 57 ms | 61524 KiB |
| 01-13.txt | AC | 58 ms | 61540 KiB |
| 01-14.txt | AC | 53 ms | 61476 KiB |
| 01-15.txt | AC | 54 ms | 61452 KiB |
| 01-16.txt | AC | 52 ms | 61812 KiB |
| sample-01.txt | AC | 55 ms | 61564 KiB |
| sample-02.txt | AC | 54 ms | 61312 KiB |
| sample-03.txt | AC | 52 ms | 61300 KiB |
| sample-04.txt | AC | 51 ms | 61628 KiB |