結果

問題 No.938 賢人を探せ
コンテスト
ユーザー さとみん
提出日時 2019-12-30 11:08:07
言語 Fortran
(gFortran 15.2.0)
コンパイル:
gfortran _filename_ -O2 -o ./a.out
実行:
./a.out
結果
AC  
実行時間 558 ms / 2,000 ms
コード長 490 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 445 ms
コンパイル使用メモリ 39,040 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2026-05-08 06:01:51
合計ジャッジ時間 9,594 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge3_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

program main
    implicit none
    
    integer(8) :: n
    integer(8) :: i
    
    character(20), allocatable :: cheaters(:)
    character(20), allocatable :: students(:)
    
    read *, n
    
    allocate(cheaters(n))
    allocate(students(n))
    
    do i = 1, n
        read *, cheaters(i), students(i)
    end do
    
    do i = 1, n
        if (count(cheaters == students(i)) == 0 .and. count(students(: i-1) == students(i)) == 0) print *, students(i)
    end do
end program main
0