結果

問題 No.116 門松列(1)
ユーザー maimai
提出日時 2017-04-30 02:54:23
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 211 bytes
コンパイル時間 2,144 ms
コンパイル使用メモリ 162,056 KB
実行使用メモリ 5,316 KB
最終ジャッジ日時 2023-09-18 23:09:27
合計ジャッジ時間 2,839 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 2 ms
4,380 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

inline bool kadomatu(int a,int b,int c){
    return a!=b&&b!=c&&c!=a&&((a<b && c<b)||(a>b && c>b));
}

{
  int n,a[1000],c=0;
  rd(n);rd(a(n));
  rep(i,0,n-3){
    c+=kadomatu(a[i],a[i+1],a[i+2]);
  }
  wt(c);
}
0