QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#743566 | #3132. The League of Sequence Designers | vwxyz# | WA | 17ms | 12344kb | Python3 | 1.2kb | 2024-11-13 19:30:41 | 2024-11-13 19:30:42 |
Judging History
answer
import bisect
import copy
import decimal
import fractions
import heapq
import itertools
import math
import random
import sys
import time
from collections import Counter,deque,defaultdict
from functools import lru_cache,reduce
from heapq import heappush,heappop,heapify,heappushpop,_heappop_max,_heapify_max
def _heappush_max(heap,item):
heap.append(item)
heapq._siftdown_max(heap, 0, len(heap)-1)
def _heappushpop_max(heap, item):
if heap and item < heap[0]:
item, heap[0] = heap[0], item
heapq._siftup_max(heap, 0)
return item
from math import gcd as GCD
read=sys.stdin.read
readline=sys.stdin.readline
readlines=sys.stdin.readlines
write=sys.stdout.write
#import pypyjit
#pypyjit.set_param('max_unroll_recursion=-1')
#sys.set_int_max_str_digits(10**9)
T=int(input())
for t in range(T):
K,L=map(int,input().split())
if 2000<=L:
print(-1)
continue
C=1999
S=K+1+C
ans_lst=[-1]
M=10**6
for c in range(C):
a=min(M,S)
ans_lst.append(a)
S-=a
assert len(ans_lst)<=2*10**3
print(len(ans_lst))
print(*ans_lst)
assert len(ans_lst)*sum(ans_lst)-(len(ans_lst)-1)*sum(ans_lst[1:])==K
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 17ms
memory: 12344kb
input:
3 8 3 612 7 4 2019
output:
2000 -1 2008 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0...
result:
wrong answer (test case 1)