結果
問題 | No.406 鴨等間隔の法則 |
ユーザー |
![]() |
提出日時 | 2016-08-06 11:47:45 |
言語 | Fortran (gFortran 14.2.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 674 bytes |
コンパイル時間 | 411 ms |
コンパイル使用メモリ | 32,640 KB |
実行使用メモリ | 272,512 KB |
最終ジャッジ日時 | 2024-11-07 05:00:07 |
合計ジャッジ時間 | 4,242 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 2 WA * 26 MLE * 1 |
ソースコード
program mainimplicit noneinteger::N,i,kankaku,tmpinteger,allocatable::x(:)integer::memo(0:10**8)integer::min1,min2data memo/100000001*0/read *, Nallocate(x(N))read *, xmin1 = MIN(x(1),x(2))min2 = MAX(x(1),x(2))if(min1.eq.min2) thenprint '(a)', "NO"returnend ifdo i=3,Nmemo(x(i)) = 1if(min1.gt.x(i)) thenmin2 = min1min1 = x(i)else if(min2.gt.x(i)) thenmin2 = x(i)end ifend dokankaku = min2 - min1tmp = min1 + kankaku*2do i=3,N-1if(memo(tmp).ne.0) thenprint '(a)', "NO"returnend ifend doprint '(a)', "YES"end program