結果

問題 No.938 賢人を探せ
ユーザー さとみん
提出日時 2019-12-30 11:08:07
言語 Fortran
(gFortran 14.2.0)
結果
AC  
実行時間 682 ms / 2,000 ms
コード長 490 bytes
コンパイル時間 1,898 ms
コンパイル使用メモリ 32,384 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 22:44:28
合計ジャッジ時間 10,218 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

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