結果
問題 | No.118 門松列(2) |
ユーザー |
![]() |
提出日時 | 2016-09-17 00:35:46 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 561 bytes |
コンパイル時間 | 166 ms |
コンパイル使用メモリ | 32,632 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-17 08:06:11 |
合計ジャッジ時間 | 1,270 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 9 WA * 17 |
ソースコード
program mainimplicit noneinteger::N,dist(1:100),i,j,total,res,res2integer,allocatable::A(:)data dist/100*0/,total/0/read *,Nallocate(A(N))read *,Ado i=1, Ndist(A(i)) = dist(A(i)) + 1end dores = Ndo i=1,100if(dist(i).eq.0) cycleres = res - dist(i)res2 = resdo j=i+1,100if(dist(j).eq.0) cycleres2 = res2 - dist(j)total = total + dist(i)*dist(j)*res2total = MOD(total,10**9+7)if(res2.eq.0) exitend doend doprint '(i0)', totalend program main