提出 #43069942


ソースコード 拡げる

def main():
    import sys
    sys.setrecursionlimit(10 ** 9)
    input = sys.stdin.readline

    N = int(input())
    names = set()
    ans = []

    for i in range(N):
        s = input()[:-1]
        if s in names:  # 既に名前が登録済みの場合は登録しない
            continue
        else:  # 新規の名前の場合
            names.add(s)  # 申請された名前を登録
            ans.append(i+1)  # 申請日を答えの配列に格納

    print(*ans, sep='\n')


if __name__ == '__main__':
    main()

提出情報

提出日時
問題 027 - Sign Up Requests (★2)
ユーザ shoshi888
言語 Python (3.8.2)
得点 2
コード長 553 Byte
結果 AC
実行時間 97 ms
メモリ 24560 KiB

ジャッジ結果

セット名 Sample All
得点 / 配点 0 / 0 2 / 2
結果
AC × 3
AC × 26
セット名 テストケース
Sample sample_01.txt, sample_02.txt, sample_03.txt
All all_different_01.txt, all_different_02.txt, all_different_03.txt, all_different_04.txt, all_same_01.txt, all_same_02.txt, all_same_03.txt, all_same_04.txt, all_same_05.txt, max_01.txt, max_02.txt, max_03.txt, min_01.txt, min_02.txt, min_03.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, sample_01.txt, sample_02.txt, sample_03.txt
ケース名 結果 実行時間 メモリ
all_different_01.txt AC 94 ms 24292 KiB
all_different_02.txt AC 96 ms 24424 KiB
all_different_03.txt AC 97 ms 24560 KiB
all_different_04.txt AC 94 ms 23744 KiB
all_same_01.txt AC 49 ms 9076 KiB
all_same_02.txt AC 43 ms 9160 KiB
all_same_03.txt AC 42 ms 8996 KiB
all_same_04.txt AC 42 ms 8988 KiB
all_same_05.txt AC 43 ms 8884 KiB
max_01.txt AC 52 ms 10564 KiB
max_02.txt AC 52 ms 10604 KiB
max_03.txt AC 53 ms 10756 KiB
min_01.txt AC 19 ms 8876 KiB
min_02.txt AC 18 ms 9012 KiB
min_03.txt AC 24 ms 9044 KiB
random_01.txt AC 58 ms 11508 KiB
random_02.txt AC 45 ms 9120 KiB
random_03.txt AC 45 ms 9344 KiB
random_04.txt AC 43 ms 9036 KiB
random_05.txt AC 43 ms 8988 KiB
random_06.txt AC 44 ms 9036 KiB
random_07.txt AC 44 ms 9048 KiB
random_08.txt AC 44 ms 9044 KiB
sample_01.txt AC 20 ms 8980 KiB
sample_02.txt AC 20 ms 9152 KiB
sample_03.txt AC 19 ms 9096 KiB