結果
| 問題 |
No.29 パワーアップ
|
| コンテスト | |
| ユーザー |
con
|
| 提出日時 | 2019-06-17 11:31:29 |
| 言語 | Fortran (gFortran 14.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 462 bytes |
| コンパイル時間 | 422 ms |
| コンパイル使用メモリ | 44,568 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-24 21:10:22 |
| 合計ジャッジ時間 | 1,196 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
implicit none
integer(8) i,n,m,j,a,b
integer(8),allocatable :: x(:,:)
integer(8),allocatable :: y(:)
read(*,*) n
allocate (x(1:n+1,1:3))
allocate (y(1:10))
x=0
y=0
a=0
b=0
do i=1,n
read(*,*) (x(i,m),m=1,3)
do j=1,3
y(x(i,j))=y(x(i,j))+1
if (y(x(i,j))==2) then
a=a+1
y(x(i,j))=y(x(i,j))-2
end if
end do
end do
do i=1,11
if (y(i) == 1) then
b=b+1
end if
end do
b=b/4
write(*,*) a+b
end
con