結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー chaemonchaemon
提出日時 2023-12-02 14:42:56
言語 Nim
(2.0.2)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 15,033 bytes
コンパイル時間 5,137 ms
コンパイル使用メモリ 94,080 KB
実行使用メモリ 7,296 KB
最終ジャッジ日時 2024-09-26 17:13:07
合計ジャッジ時間 6,214 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 19 ms
5,760 KB
testcase_02 AC 24 ms
5,760 KB
testcase_03 AC 20 ms
7,296 KB
testcase_04 AC 21 ms
6,528 KB
testcase_05 AC 22 ms
6,656 KB
testcase_06 AC 139 ms
5,376 KB
testcase_07 AC 136 ms
5,376 KB
testcase_08 AC 143 ms
5,376 KB
testcase_09 AC 140 ms
5,376 KB
testcase_10 AC 141 ms
5,376 KB
testcase_11 AC 2 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 1 ms
5,376 KB
testcase_14 AC 2 ms
5,376 KB
testcase_15 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import macros
macro Please(x): untyped = nnkStmtList.newTree()

Please use Nim-ACL
Please use Nim-ACL
Please use Nim-ACL


static:
  when not defined SecondCompile:
    # md5sum: 1025af2bb93db634c09cd7f5518212ff  atcoder.tar.xz

    template getFileName():string = instantiationInfo().filename
    let fn = getFileName()
    block:
      let (output, ex) = gorgeEx("if [ -e ./atcoder ]; then exit 1; else exit 0; fi")
      # doAssert ex == 0, "atcoder directory already exisits"
    discard staticExec("echo \"/Td6WFoAAATm1rRGAgAhARwAAAAQz1jM4O//J3xdADCdCIqmAHyeLmzPetXzWpgQcDgKgJF+nO8CaeoEXtPQhDD5wlmpGZKJ3vTcfCbjSYSgUvQP5fxzVIvJf4RbVXtgFQMqOrLuLVYZq+3LhlUm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oJsz3HVEoNJcoBYYchX2ljImBLdxwMXCWq0LjnExE/4Kq9P9BYMio0JfMg6JlZq/x0zPa3GTa1sf3k2rujbKeHjRdgmOV6x5WIcfiIoVTIV+q2FLKAjllx+7zqPZ44Lv6QFY96gYb5R6yual6lWTKLfOZtbUH2CF+ck1dQ3x/plh8pTzpUv1a8cLBW224DEAHQ24pfBWnyi2iQFJ7+QlnYFQJmcAZMtrJaPY+3wTQEcrX8N9Iz4WuvDAjXa5enI7mGz3zcSmYQHoNJUsGsfJ4I0opXTbHSRlY7L23kcZapcByJXB9zJUV79tzCl1LH2YljOxqYNTgdQyDugHS3DtZVLfrIDzXcLa8uzqruUr8M4MKQlJY53k+GDSWtueQNJ/wytP2gTMeXF/BBS8/rD+aQX1h97X6O9OKTXrBwAAcMrYyl5w1pgAAZhPgOADADO6VYexxGf7AgAAAAAEWVo=\" | base64 -d > atcoder.tar.xz && tar -Jxvf atcoder.tar.xz")
    let (output, ex) = gorgeEx("nim cpp -d:release -d:SecondCompile -d:danger --path:./ --opt:speed --multimethods:on --warning[SmallLshouldNotBeUsed]:off --checks:off -o:a.out " & fn)
    discard staticExec("rm -rf ./atcoder");doAssert ex == 0, output;quit(0)


when defined SecondCompile:
  const DO_CHECK = false;const DEBUG = false
else:
  const DO_CHECK = true;const DEBUG = true
const
  USE_DEFAULT_TABLE = true
  DO_TEST = false

# see https://github.com/zer0-star/Nim-ACL/tree/master/src/atcoder/extra/header/chaemon_header.nim
include atcoder/extra/header/chaemon_header


proc solve() =
  let T = nextInt()
  for _ in T:
    let N, X = nextInt()
    var U = ((N + 1) * N) div 2
    if U > X:
      echo -1
    else:
      var
        X = X
        ans:seq[int]
      for i in N - 1:
        ans.add i + 1
        X -= i + 1
      ans.add X
      echo ans.join(" ")

  discard

solve()

0