結果
| 問題 | No.116 門松列(1) |
| コンテスト | |
| ユーザー |
kou_kkk
|
| 提出日時 | 2024-02-26 10:08:18 |
| 言語 | Nim (2.2.10 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 370µs | |
| コード長 | 303 bytes |
| 記録 | |
| コンパイル時間 | 3,542 ms |
| コンパイル使用メモリ | 70,028 KB |
| 実行使用メモリ | 6,272 KB |
| 最終ジャッジ日時 | 2026-09-06 00:55:06 |
| 合計ジャッジ時間 | 5,341 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / 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