結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー kou_kkkkou_kkk
提出日時 2024-03-28 17:39:27
言語 Nim
(2.0.2)
結果
AC  
実行時間 181 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 4,372 ms
コンパイル使用メモリ 65,744 KB
実行使用メモリ 22,848 KB
最終ジャッジ日時 2024-03-28 17:39:35
合計ジャッジ時間 7,765 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 14 ms
18,624 KB
testcase_01 AC 27 ms
21,184 KB
testcase_02 AC 28 ms
21,440 KB
testcase_03 AC 27 ms
22,848 KB
testcase_04 AC 28 ms
22,720 KB
testcase_05 AC 29 ms
22,592 KB
testcase_06 AC 179 ms
18,624 KB
testcase_07 AC 178 ms
18,624 KB
testcase_08 AC 179 ms
18,624 KB
testcase_09 AC 177 ms
18,624 KB
testcase_10 AC 181 ms
18,624 KB
testcase_11 AC 14 ms
18,624 KB
testcase_12 AC 14 ms
18,624 KB
testcase_13 AC 14 ms
18,624 KB
testcase_14 AC 14 ms
18,624 KB
testcase_15 AC 14 ms
18,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math, sequtils, strutils

let
  t = parseInt readLine stdin
  list = cumsummed toSeq (0..1000000)

for _ in 0..<t:
  let
    nx = stdin.readLine.split.map parseInt
    n = nx[0]
    x = nx[1]
    
  if x >= list[n]:
    var result = (1..<n).toSeq
    result.add x.pred list[n.pred]
    echo result.join " "
  else:
    echo -1
0