QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#743556#3132. The League of Sequence Designersvwxyz#WA 22ms12324kbPython31.2kb2024-11-13 19:29:412024-11-13 19:29:41

Judging History

你现在查看的是最新测评结果

  • [2024-11-13 19:29:41]
  • 评测
  • 测评结果:WA
  • 用时:22ms
  • 内存:12324kb
  • [2024-11-13 19:29:41]
  • 提交

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)
    print(len(ans_lst)*sum(ans_lst)-(len(ans_lst)-1)*sum(ans_lst[1:]))

詳細信息

Test #1:

score: 0
Wrong Answer
time: 22ms
memory: 12324kb

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)