結果

問題 No.406 鴨等間隔の法則
ユーザー jjjj
提出日時 2016-08-05 22:45:42
言語 Fortran
(gFortran 13.2.0)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 599 bytes
コンパイル時間 647 ms
コンパイル使用メモリ 32,512 KB
実行使用メモリ 272,512 KB
最終ジャッジ日時 2024-04-24 17:33:34
合計ジャッジ時間 3,776 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
58,368 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 71 ms
53,120 KB
testcase_05 AC 44 ms
35,740 KB
testcase_06 AC 34 ms
25,856 KB
testcase_07 AC 35 ms
27,008 KB
testcase_08 AC 71 ms
51,840 KB
testcase_09 AC 52 ms
31,232 KB
testcase_10 AC 59 ms
49,920 KB
testcase_11 AC 107 ms
88,064 KB
testcase_12 AC 88 ms
76,928 KB
testcase_13 AC 49 ms
39,680 KB
testcase_14 MLE -
testcase_15 AC 3 ms
5,376 KB
testcase_16 AC 31 ms
28,288 KB
testcase_17 AC 17 ms
15,744 KB
testcase_18 AC 33 ms
31,616 KB
testcase_19 AC 37 ms
35,712 KB
testcase_20 AC 53 ms
50,048 KB
testcase_21 AC 52 ms
48,384 KB
testcase_22 AC 97 ms
90,368 KB
testcase_23 AC 36 ms
23,424 KB
testcase_24 AC 17 ms
5,376 KB
testcase_25 AC 100 ms
79,232 KB
testcase_26 AC 23 ms
5,376 KB
testcase_27 AC 22 ms
5,376 KB
testcase_28 AC 24 ms
5,376 KB
testcase_29 AC 51 ms
30,080 KB
testcase_30 AC 48 ms
27,008 KB
testcase_31 AC 53 ms
33,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

  integer::N,i,start=10**8,kankaku
  integer,allocatable::x(:)
  integer::zahyou(0:10**8)
  data zahyou/100000001*0/
  read *, N
  allocate(x(N))
  read *, x

  do i=1,N
     if(zahyou(x(i)).eq.1) then
        print '(a)', "NO"
        return
     end if
     zahyou(x(i)) = 1
     start = MIN(start, x(i))
  end do

  do i=start+1,10**8
     if(zahyou(i).eq.1) then
        kankaku = i - start
        exit
     end if
  end do

  do i=start, start+(N-1)*kankaku, kankaku
     if(zahyou(i).ne.1) then
        print '(a)', "NO"
        return
     end if
  end do

  print '(a)', "YES"
end program

0