結果
| 問題 |
No.116 門松列(1)
|
| コンテスト | |
| ユーザー |
kou_kkk
|
| 提出日時 | 2024-02-26 10:08:18 |
| 言語 | Nim (2.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 303 bytes |
| コンパイル時間 | 3,977 ms |
| コンパイル使用メモリ | 66,572 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-09-29 11:35:28 |
| 合計ジャッジ時間 | 3,980 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(13, 10) Warning: type 'int' is too big to be a `set` element, assuming a range of 0..65535, explicitly write this range to get rid of warning [AboveMaxSizeSet]
ソースコード
import sequtils, strutils
let
n = parseInt readLine stdin
a = stdin.readLine.split.map parseInt
var
cnt = 0
for i in 2..<n:
let
max = max a[i.pred(2)..i]
min = min a[i.pred(2)..i]
mm = {max, min}
if a[i] notin mm:
inc cnt
if a[i.pred 2] notin mm:
inc cnt
echo cnt
kou_kkk