結果
| 問題 | No.116 門松列(1) |
| コンテスト | |
| ユーザー |
kou_kkk
|
| 提出日時 | 2024-02-26 10:08:18 |
| 言語 | Nim (2.2.8) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 303 bytes |
| 記録 | |
| コンパイル時間 | 3,215 ms |
| コンパイル使用メモリ | 69,800 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-04-15 20:48:03 |
| 合計ジャッジ時間 | 4,605 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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