結果

問題 No.1692 Expectations
ユーザー first_vilfirst_vil
提出日時 2020-10-05 08:24:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 114 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 438 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 107,232 KB
最終ジャッジ日時 2023-09-26 15:30:39
合計ジャッジ時間 3,558 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,176 KB
testcase_01 AC 69 ms
71,312 KB
testcase_02 AC 70 ms
71,212 KB
testcase_03 AC 69 ms
71,180 KB
testcase_04 AC 69 ms
71,308 KB
testcase_05 AC 72 ms
71,368 KB
testcase_06 AC 73 ms
71,340 KB
testcase_07 AC 69 ms
71,584 KB
testcase_08 AC 70 ms
71,256 KB
testcase_09 AC 69 ms
71,596 KB
testcase_10 AC 109 ms
103,568 KB
testcase_11 AC 105 ms
103,244 KB
testcase_12 AC 67 ms
71,100 KB
testcase_13 AC 68 ms
71,212 KB
testcase_14 AC 74 ms
77,628 KB
testcase_15 AC 107 ms
103,248 KB
testcase_16 AC 74 ms
77,520 KB
testcase_17 AC 89 ms
89,096 KB
testcase_18 AC 79 ms
80,916 KB
testcase_19 AC 114 ms
107,188 KB
testcase_20 AC 103 ms
103,260 KB
testcase_21 AC 108 ms
107,232 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def main():
    import sys
    input=sys.stdin.readline
    n,m=map(int,input().split())
    c=[0]*(m+1)
    ans=0
    for a in list(map(int,input().split())):
        if c[a]==0:
            ans+=1
        c[a]+=1
    print(ans,1 if ans==1 and n==m else 0)
main()
0