結果
問題 | No.2560 A_1 < A_2 < ... < A_N |
ユーザー | YuuuT |
提出日時 | 2023-12-02 15:25:29 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 174 ms / 2,000 ms |
コード長 | 725 bytes |
コンパイル時間 | 314 ms |
コンパイル使用メモリ | 81,700 KB |
実行使用メモリ | 88,720 KB |
最終ジャッジ日時 | 2023-12-02 15:25:34 |
合計ジャッジ時間 | 3,025 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 38 ms
55,756 KB |
testcase_01 | AC | 79 ms
83,764 KB |
testcase_02 | AC | 85 ms
86,628 KB |
testcase_03 | AC | 80 ms
88,720 KB |
testcase_04 | AC | 83 ms
86,216 KB |
testcase_05 | AC | 86 ms
88,488 KB |
testcase_06 | AC | 174 ms
78,128 KB |
testcase_07 | AC | 125 ms
77,484 KB |
testcase_08 | AC | 126 ms
77,484 KB |
testcase_09 | AC | 161 ms
78,508 KB |
testcase_10 | AC | 132 ms
77,536 KB |
testcase_11 | AC | 45 ms
63,796 KB |
testcase_12 | AC | 45 ms
63,916 KB |
testcase_13 | AC | 42 ms
63,788 KB |
testcase_14 | AC | 46 ms
63,796 KB |
testcase_15 | AC | 50 ms
66,648 KB |
ソースコード
import sys,math #if len(sys.argv)==2:sys.stdin=open(sys.argv[1]) from collections import defaultdict,deque from itertools import combinations,permutations,accumulate,product from bisect import bisect,bisect_left,bisect_right from heapq import heappop,heappush,heapify #from sortedcontainers import SortedList,SortedSet def input(): return sys.stdin.readline().rstrip() def ii(): return int(input()) def ms(): return map(int, input().split()) def li(): return list(map(int,input().split())) T = ii() for _ in range(T): N,X = ms() ans = list() S = 0 ng = False for i in range(1,N+1): S += i if S>X: print(-1) ng = True break ans.append(i) if ng: continue ans[-1] += X-S print(*ans)