Submission #48796667
Source Code Expand
import numpy as np
import copy
def goint(a):
a=a.split()
b=[int(s) for s in a]
return b
S=input()
N,Q=goint(S)
S=input()
R=goint(S)
R.sort()
for i in range(0,Q):
x=0
j=0
a=int(input())
if sum(R)<=a:
print(N)
else:
while(a>=x):
x=x+R[j]
j=j+1
print(j-1)
Submission Info
| Submission Time | |
|---|---|
| Task | D - Reindeer and Sleigh |
| User | s1901108 |
| Language | Python (CPython 3.11.4) |
| Score | 0 |
| Code Size | 313 Byte |
| Status | TLE |
| Exec Time | 2213 ms |
| Memory | 56104 KiB |
Judge Result
| Set Name | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 400 | ||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | sample00.txt, sample01.txt, sample02.txt |
| All | sample00.txt, sample01.txt, sample02.txt, testcase00.txt, testcase01.txt, testcase02.txt, testcase03.txt, testcase04.txt, testcase05.txt, testcase06.txt, testcase07.txt, testcase08.txt, testcase09.txt, testcase10.txt, testcase11.txt, testcase12.txt, testcase13.txt, testcase14.txt, testcase15.txt, testcase16.txt, testcase17.txt, testcase18.txt, testcase19.txt, testcase20.txt, testcase21.txt, testcase22.txt, testcase23.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| sample00.txt | AC | 80 ms | 31820 KiB |
| sample01.txt | AC | 80 ms | 31740 KiB |
| sample02.txt | AC | 79 ms | 31972 KiB |
| testcase00.txt | TLE | 2210 ms | 55160 KiB |
| testcase01.txt | TLE | 2210 ms | 55992 KiB |
| testcase02.txt | TLE | 2210 ms | 54384 KiB |
| testcase03.txt | TLE | 2210 ms | 55892 KiB |
| testcase04.txt | TLE | 2210 ms | 54456 KiB |
| testcase05.txt | TLE | 2210 ms | 55792 KiB |
| testcase06.txt | TLE | 2210 ms | 55932 KiB |
| testcase07.txt | TLE | 2210 ms | 55960 KiB |
| testcase08.txt | TLE | 2210 ms | 53500 KiB |
| testcase09.txt | TLE | 2210 ms | 55980 KiB |
| testcase10.txt | TLE | 2210 ms | 54852 KiB |
| testcase11.txt | TLE | 2210 ms | 55772 KiB |
| testcase12.txt | TLE | 2210 ms | 54160 KiB |
| testcase13.txt | TLE | 2210 ms | 55900 KiB |
| testcase14.txt | TLE | 2210 ms | 54944 KiB |
| testcase15.txt | TLE | 2210 ms | 56024 KiB |
| testcase16.txt | TLE | 2210 ms | 55380 KiB |
| testcase17.txt | TLE | 2210 ms | 56104 KiB |
| testcase18.txt | TLE | 2209 ms | 55036 KiB |
| testcase19.txt | TLE | 2213 ms | 55952 KiB |
| testcase20.txt | TLE | 2210 ms | 55028 KiB |
| testcase21.txt | TLE | 2210 ms | 55956 KiB |
| testcase22.txt | TLE | 2210 ms | 55380 KiB |
| testcase23.txt | TLE | 2210 ms | 55936 KiB |