提出 #75053155


ソースコード 拡げる

N, M = map(int,input().split())
F = list(map(int,input().split()))

m = [0 for _ in range(M+1)] 
c = 0
ans1 = "Yes"
ans2 = "No"
for f in F:
  if m[f] < 1:
    c += 1
  else:
    ans1 = "No"
  m[f] += 1

if c >= M:
  ans2 = "Yes"
  
print(ans1)
print(ans2)

提出情報

提出日時
問題 B - Mapping
ユーザ YH0
言語 Python (CPython 3.13.7)
得点 200
コード長 273 Byte
結果 AC
実行時間 11 ms
メモリ 9252 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 11 ms 9096 KiB
00_sample_01.txt AC 11 ms 9208 KiB
00_sample_02.txt AC 11 ms 9200 KiB
00_sample_03.txt AC 11 ms 9060 KiB
01_random_1_00.txt AC 11 ms 9164 KiB
01_random_1_01.txt AC 11 ms 9108 KiB
01_random_1_02.txt AC 11 ms 9008 KiB
02_random_2_00.txt AC 11 ms 9008 KiB
02_random_2_01.txt AC 11 ms 9208 KiB
02_random_2_02.txt AC 11 ms 9084 KiB
03_random_3_00.txt AC 11 ms 9252 KiB
03_random_3_01.txt AC 11 ms 9200 KiB
03_random_3_02.txt AC 11 ms 9252 KiB
04_random_4_00.txt AC 11 ms 9208 KiB
04_random_4_01.txt AC 11 ms 9164 KiB
04_random_4_02.txt AC 11 ms 9164 KiB
04_random_4_03.txt AC 11 ms 9104 KiB
04_random_4_04.txt AC 11 ms 9096 KiB
04_random_4_05.txt AC 11 ms 9108 KiB