s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s674398334
p03657
u463836923
1500322158
Python
Python (3.4.3)
py
Runtime Error
17
3064
1518
#coding=UTF-8 N=int(input()) moti=list(range(0,N,1)) #initalize for idx in range(0,N,1): moti[idx]=[] #input for idx in range(0,N-1,1): mozir=input() hyo=mozir.split(' ') a=int(hyo[0])-1 b=int(hyo[1])-1 moti[a].append(b) moti[b].append(a) #path 0 to N-1 #width serach belong=list(range(0...
s244635075
p03657
u558720836
1500266637
Python
Python (2.7.6)
py
Runtime Error
10
2568
220
N = int(input()) a = map(int, raw_input().split()) x = a[0] y = sum(a) - a[0] min = abs(x - y) for i in range (1,N-1): y -= a[i] x += a[i] dummy = abs(x - y) if min > dummy: min = dummy print min
s710715692
p03657
u150117535
1500262924
Python
PyPy3 (2.4.0)
py
Runtime Error
166
38384
116
A,B=map(int,input().split()) if A%3==0 pr B%3==0 or (A+B)%3==0: print("Possible") else: print("Impossible")
s693527042
p03657
u642905089
1500258717
Python
Python (3.4.3)
py
Runtime Error
17
2940
166
Inp = list(map(int, input().split())) Blist = list(map(int, input().split())) Blist.sort() out = 0 for i in range(Imp[0,1]): out += Blist[-(i+1)] print(out)
s781620242
p03657
u642905089
1500257803
Python
Python (3.4.3)
py
Runtime Error
17
3064
216
Imp = input() A = int(Imp[0]) B = int(Imp[2]) re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: print("Possible") else: print("Impossible")
s739838997
p03657
u642905089
1500257573
Python
Python (3.4.3)
py
Runtime Error
17
3060
216
Imp = input() A = int(Imp[0]) B = int(Imp[2]) re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: print("Possible") else: print("Impossible")
s457261339
p03657
u642905089
1500257092
Python
Python (3.4.3)
py
Runtime Error
17
3060
213
Imp = int(raw_input()) A = Imp[0] B = Imp[1] re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: print("Possible") else: print("Impossible")
s233594930
p03657
u642905089
1500256592
Python
Python (3.4.3)
py
Runtime Error
17
3056
244
import sys Imp = [int(i) for i in sys.stdin] A = Imp[0] B = Imp[1] re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: print("Possible") else: print("Impossible")
s012148108
p03657
u637175065
1500256568
Python
Python (3.4.3)
py
Runtime Error
61
6476
653
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools sys.setrecursionlimit(10**7) inf = 10**20 mod = 10**9 + 7 def LI(): return [int(x) for x in sys.stdin.readline().split()] def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()] def LF(): return [float(x...
s821375551
p03657
u642905089
1500256506
Python
Python (3.4.3)
py
Runtime Error
17
3060
216
Imp = raw_input().split() A = Imp[0] B = Imp[1] re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: print("Possible") else: print("Impossible")
s481832863
p03657
u642905089
1500256359
Python
Python (3.4.3)
py
Runtime Error
17
3064
212
Imp = input().split() A = Imp[0] B = Imp[1] re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: print("Possible") else: print("Impossible")
s662490622
p03657
u642905089
1500255910
Python
Python (3.4.3)
py
Runtime Error
17
2940
204
Imp = <STDIN> A = Imp[0] B = Imp[1] re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: print("Possible") else: print("Impossible")
s807545221
p03657
u642905089
1500255823
Python
Python (3.4.3)
py
Runtime Error
17
2940
205
Imp = input() A = Imp[0] B = Imp[1] re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: print("Possible") else: print("Impossible")
s716801817
p03657
u642905089
1500255609
Python
Python (3.4.3)
py
Runtime Error
17
2940
189
re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: print("Possible") else: print("Impossible")
s122436355
p03657
u642905089
1500254600
Python
Python (3.4.3)
py
Runtime Error
17
2940
208
re = 0 if A % 3 == 0: re = 1 if B % 3 == 0: re = 1 if (A+B) % 3 == 0: re = 1 if re ==1: return "Possible" else: return "Impossible"
s225850018
p03657
u674569298
1500253151
Python
Python (3.4.3)
py
Runtime Error
17
3064
259
def sa(_a,_b): a = max(_a,_b) b = min(_a,_b) return a-b n = int(input()) l = list(map(int,input().split())) m = sum(l) a = l[0] b = m - a ans = sa(a,b) for i in range(1,len(l)-1): a += l[i] b -= l[i] ans = min(ans,sa(a,b)) print(ans)
s624472130
p03657
u565009467
1500222433
Python
Python (2.7.6)
py
Runtime Error
10
2696
884
import sys sys.setrecursionlimit(1000000) n=input() graph=[[] for i in range(n+1)] for i in range(n-1): v,u=list(map(int,raw_input().split())) graph[v].append(u) graph[u].append(v) dist= [-1 for i in range(n+1)] dist[1]=0 son=[[] for i in range(n+1)] queue=[1] father=[0 for i in range(n+1)] def bfs(u): ...
s342684932
p03657
u891212850
1500178254
Python
Python (3.4.3)
py
Runtime Error
22
3060
242
def solution(n, k, l_list): l_list.sort(reverse=True) result = sum(l_list[:k]) return result N, K = [int(value) for value in input().split(' ')] l_list = [int(value) for value in input().split(' ')] print(solution(N, K, l_list))
s083280898
p03657
u891212850
1500177568
Python
Python (3.4.3)
py
Runtime Error
17
2940
292
def solution(a, b): total = a + b if total % 3 == 0: print('Possible') elif a % 3 == 0: print('Possible') elif: b % 3 == 0: print('Possible') else: print('Impossible') A, B = input().split(' ') A, B = int(A), int(B) solution(A, B)
s776637247
p03657
u891212850
1500177358
Python
Python (2.7.6)
py
Runtime Error
10
2568
206
def solution(a, b): total = a + b if (total % 3 == 0) and total >= 3: print('Possible') else: print('Impossible') A, B = input().split(' ') A, B = int(A), int(B) solution(A, B)
s611249643
p03657
u891212850
1500175714
Python
Python (2.7.6)
py
Runtime Error
11
2568
212
def solution(a, b): total = a + b if (total % 3 == 0) and total >= 3: print('Possible') else: print('Impossible') A, B = raw_input().split(' ') A, B = int(A), int(B) solution((A, B))
s610425003
p03657
u525117558
1500173661
Python
Python (3.4.3)
py
Runtime Error
17
2940
117
A=int(input()) % 3 B=int(input()) % 3 C=A + B if A==0 or B==0 or C==0: print("Possible") else: print("Impossible")
s984535292
p03657
u525117558
1500173550
Python
Python (3.4.3)
py
Runtime Error
18
2940
113
a=int(input()) b=int(input()) c=a+b if a%3==0 or b%3==0 or c%3==0: print("Possible") else: print("Impossible")
s474156102
p03657
u525117558
1500173461
Python
Python (3.4.3)
py
Runtime Error
17
2940
115
a=int(input()) b=int(input()) c=a + b if a%3==0 or b%3==0 or c%3==0: print("Possible") else: print("Impossible")
s600551893
p03657
u525117558
1500173269
Python
Python (3.4.3)
py
Runtime Error
17
2940
115
A=int(input()) B=int(input()) C=A + B if A%3==0 or B%3==0 or C%3==0: print("Possible") else: print("Impossible")
s802335151
p03657
u451017206
1500173057
Python
Python (3.4.3)
py
Runtime Error
17
3064
456
N=int(input()) an=list(map(int,input().split())) s = sum(an) h = s/2 f=int(N/2) x = sum(an[:f]) y = s - x z=abs(x-y) for i in range(f): if f+1 >= N: break t1=x + an[f+1] t2=y - an[f+1] t3=x - an[f-1] t4=y + an[f-1] print(t1,t2) k1=abs(t1-t2) k2=abs(t3-t4) p=0 k = min(k1,k...
s371073131
p03657
u314057689
1500173009
Python
Python (3.4.3)
py
Runtime Error
18
3064
1461
def main(): N = int(input()) tree = [[] for i in range(N)] for n in range(N-1): a, b = map(lambda x: int(x)-1, input().split()) tree[a].append(b) tree[b].append(a) # print(np.array(tree)) Q = [(x, [0, x], 0) for x in tree[0]] reached = [1] + [0]*(N-2) + [0] while l...
s841771402
p03657
u075012704
1500172664
Python
Python (3.4.3)
py
Runtime Error
17
3064
315
N = int(input()) Roads = [] for i in range(N-1): Roads.append(input().split()) black = 0 black_list = [] white = 0 white_list = [] for i in Roads: if 1 in i and N not in i: black += 1 if N in i and 1 not in i: white += 1 if black > white : print("Fennec") else: print("Snuke")
s527070850
p03657
u797118559
1500172406
Python
Python (3.4.3)
py
Runtime Error
17
2940
77
if (a+b)%3 or a%3 or b%3==0: print ('Possible') else: print('Impossible')
s668868998
p03657
u781627321
1500171916
Python
PyPy3 (2.4.0)
py
Runtime Error
172
38640
552
if __name__=='__main__': alls = int(input()) num_src = input().split(' ') num_cards = [] ans = 0 for i in num_src: num_cards.append(int(i)) ans += abs(int(i)) x = 0 y = 0 for i in range(0,alls-1): x=0 y=0 for j in range(0,alls): if j <=...
s932337089
p03657
u525117558
1500171183
Python
Python (3.4.3)
py
Runtime Error
17
2940
129
A=int(input()) B=int(input()) C=A + B if A % 3 == 0 or B % 3 == 0 or C % 3 == 0: print("Possible") else: print("Impossible")
s665577219
p03657
u981890679
1500170909
Python
Python (2.7.6)
py
Runtime Error
10
2568
207
# -*- coding: utf-8 -*- import sys c = map[int, input().split()] c[0] = c[0] % 3 c[1] = c[1] % 3 if c[0] % 3 == 0 || c[1]%3 == 0 || (c[0] + c[1])%3 == 0: print "Possible " else: print "Impossible"
s889085610
p03657
u525117558
1500170886
Python
Python (3.4.3)
py
Runtime Error
17
2940
219
A=int(input()) B=int(input()) C=A + B if A % 3 == 0 : print("Possible") else: print("Impossible") if B % 3 == 0 : print("Possible") else: print("Impossible") if C % 3 == 0 : print("Possible") else: print("Impossible")
s851684848
p03657
u981890679
1500170818
Python
Python (2.7.6)
py
Runtime Error
10
2568
174
# -*- coding: utf-8 -*- import sys c = map[int, input().split()] if c[0] % 3 == 0 || c[1]%3 == 0 || (c[0] + c[1])%3 == 0: print "Possible " else: print "Impossible"
s890488425
p03657
u260764548
1500170633
Python
Python (3.4.3)
py
Runtime Error
18
3060
344
# -*- coding:utf-8 -*- N = int(input()) a = list(map(int,input().split())) SUM_CARD = sum(a) i=1 diff_sum = 0 sunuke = sum(a[0:i]) diff_sum = abs(sunuke*2-SUM_CARD) i+=1 while(i<N): sunuke = sum(a[0:i]) diff_sum_new = abs(sunuke*2-SUM_CARD) if diff_sum_new<diff_sum: diff_sum = diff_sum_new ...
s048992581
p03657
u744898490
1500170572
Python
Python (3.4.3)
py
Runtime Error
18
3060
285
n= int(input()) card = input().split(' ') card = [int(s) for s in card] min_s = 20000000 sum1 = sum(card[:1]) sum2 = sum(card[1:]) for i in range(n - 1): dif = abs(sum1-sum2) if dif < min_s: min_s = dif sum1 += card[i+1] sum2 = sum2 - card[i+1] print(min_s)
s610940941
p03657
u525117558
1500170398
Python
Python (3.4.3)
py
Runtime Error
17
2940
213
A=int(input()) B=int(input()) if A % 3 == 0 : print("Possible") else: print("Impossible") if B % 3 == 0 : print("Possible") else: print("Impossible") if A+B % 3 == 0 : print("Possible") else: print("Impossible")
s758872039
p03657
u744898490
1500169278
Python
Python (3.4.3)
py
Runtime Error
17
2940
223
n= int(input()) card = input().split(' ') card = [int(s) for s in card] min_s = 1000000000000 for i in range(n -1): dif =abs(sum(card[:i+1]) - sum(card[i+1:])) if dif < min_s: min_s= dif print(min_s)
s111678574
p03657
u584459098
1500169026
Python
PyPy3 (2.4.0)
py
Runtime Error
204
38640
151
N = int(input()) a = list(map(int, input().split())) diff = [] for i in range(N-1): diff.append(abs(sum(a[:i+1]) - sum(a[i+1:]))) print(min(diff))
s007964706
p03657
u417798683
1500168571
Python
Python (3.4.3)
py
Runtime Error
17
2940
128
n,k=[int(i) for i in input().split()] l=[int(i) for i in input().split()] l.sort() a=0 for i in range(k): a+=l[n-1-i] print(a)
s076223662
p03657
u177756077
1500168102
Python
Python (2.7.6)
py
Runtime Error
10
2568
125
#!/usr/bin/env python N,K=map(int,raw_input().split()) l=map(int,raw_input().split()) l.sort() print sum(l[len(l)-K:len(l)])
s554622720
p03657
u494209838
1500167672
Python
Python (3.4.3)
py
Runtime Error
17
2940
143
# -*- coding: utf-8 -*- N, K = [int(x) for x in input().split()] l = [int(x) for x in input().split()] l.sort(reverse=True) print(sum(l[:K]))
s932196269
p03657
u384579799
1500167399
Python
Python (3.4.3)
py
Runtime Error
17
2940
225
# -*- coding: utf-8 -*- import sys A, B = map(int, input().split()) C = A + B if A%3 == 0: print('Possible') else if B%3 == 0: print('Possible') else if C%3 == 0: print('Possible') else: print('Impossible')
s720628987
p03657
u314057689
1500167238
Python
Python (3.4.3)
py
Runtime Error
17
3064
223
def main(): N, K = map(int, input().split()) L = list(map(int, input().split())) L.sort(reverse=True) print(sum(L[:K])) if __name__ == "__main__": # global stime # stime = time.clock() main()
s854835019
p03658
u546853743
1599406104
Python
Python (3.8.2)
py
Runtime Error
26
8976
122
n,k=map(int,input().split()) l=list(map(int,input().split())) l.sort() for i in range(n-k): al = sum(l)-l[i] print(al)
s550289527
p03658
u546853743
1599406043
Python
Python (3.8.2)
py
Runtime Error
23
8916
100
n,k=map(int,input().split()) l=list(map(int,input().split())) l.sort() al = sum(l)-l[:n-k] print(al)
s174756978
p03658
u546853743
1599405962
Python
Python (3.8.2)
py
Runtime Error
22
9004
104
n,k=map(int,input().split()) for i in range(n): l = [input()] l.sort() al = sum(l)-l[:n-k] print(al)
s570424132
p03658
u468972478
1598406620
Python
Python (3.8.2)
py
Runtime Error
21
9080
104
n, k = map(int, input().split()) s = list(map(int, input().split())) s.sort() print(sum(s[len(n) - k:]))
s950133766
p03658
u612975321
1598373563
Python
Python (3.8.2)
py
Runtime Error
26
9160
109
n, k = map(int,input().split()) a = list(map(int,input().split())) a.sort(reverse=True) print(a[0]+a[1]+a[2])
s336814982
p03658
u190866453
1597461996
Python
Python (3.8.2)
py
Runtime Error
22
8952
45
15 14 50 26 27 21 41 7 42 35 7 5 5 36 39 1 45
s080474976
p03658
u107639613
1596668541
Python
PyPy3 (7.3.0)
py
Runtime Error
94
74720
234
import sys def input(): return sys.stdin.readline().strip() def main(): n, k = map(int, input().split()) L = list(map(int, input().split())) L.sort(reverse=True) print(sum[:K]) if __name__ == "__main__": main()
s220077231
p03658
u075303794
1596077864
Python
Python (3.8.2)
py
Runtime Error
21
9100
92
N,K=map(int,input()) L=list(map(int,input().split())) L.sort(reverse=True) print(sum(L[:K]))
s337356356
p03658
u210295876
1595274381
Python
Python (3.8.2)
py
Runtime Error
23
8880
228
int main() { int N; int K; int a[55]; cin >> N >> K; for(int i=0; i<N; ++i) { cin >> a[i]; } sort(a,a+N,greater<int>()); int ans=0; for(int i=0; i<=K; ++i) { ans += a[i]; } cout << ans << endl; }
s412034695
p03658
u595952233
1594482171
Python
Python (3.8.2)
py
Runtime Error
26
9020
109
n, k = map(int, input().split()) l = list(map(int, input().split())) l.sort(reversed=True) print(sum(l[:k]))
s479920290
p03658
u063614215
1593789196
Python
Python (3.8.2)
py
Runtime Error
24
9176
170
N = int(input()) K = int(input()) ls = sorted([int(i) for i in input().split(' ')], reverse=True) l_sum = 0 for k in range(K): l = ls[k] l_sum += l print(l_sum)
s482688905
p03658
u063614215
1593789142
Python
Python (3.8.2)
py
Runtime Error
20
9212
170
N = int(input()) K = int(input()) ls = sorted([int(i) for i in input().split(' ')], reverse=True) l_sum = 0 for k in range(K): l = ls[k] l_sum += l print(l_sum)
s597565255
p03658
u608088992
1593733385
Python
Python (3.8.2)
py
Runtime Error
25
9128
182
def solve(): N, K = map(int, input().split()) L = [int(i) for i in input().split()] L.sort(reversed = True) print(sum(L[:K])) if __name__ == "__main__": solve()
s286167842
p03658
u743272507
1593731483
Python
Python (3.8.2)
py
Runtime Error
23
8928
78
l,k = map(int,input().split()) print(sum(sorted(map(int,input().split())[:k]))
s200715772
p03658
u088488125
1593436818
Python
Python (3.8.2)
py
Runtime Error
21
9176
128
n,k=int(input()) l=list(map(int, input().split())) l.sort(reverse=True) length=0 for i in range(k): length+=l[i] print(length)
s158214604
p03658
u917558625
1593232092
Python
Python (3.8.2)
py
Runtime Error
21
9068
97
N,K=map(int,input().split()) l=list(map(int,input().split())) l.sort(reverse=True) print(sum[:K])
s093586051
p03658
u179025808
1593052029
Python
Python (3.8.2)
py
Runtime Error
24
8912
73
N, K = map(int, input().split()) l = list(map(int, input().split())) x =
s141534593
p03658
u750651325
1592370390
Python
Python (3.4.3)
py
Runtime Error
16
2940
118
N, K = map(int, input().split()) l = list(map(int, input().split())) l = sorted(l. reverse = True) print(sum(l[:K]))
s070704798
p03658
u357751375
1592016260
Python
Python (3.4.3)
py
Runtime Error
17
2940
147
n,k = map(int,input().split()) l = list(map(int,input().split())) l = list.sort(l,reverse = True) c = 0 for i in range(l): c += l[i] print(c)
s909713574
p03658
u918770092
1591925130
Python
Python (3.4.3)
py
Runtime Error
17
2940
153
n, k = map(int, input().split()) l = list() for _ in range(n): l.append(int(input())) l.sort(reverse = True) for i in range(k): a += l[i] print(a)
s438281558
p03658
u247211039
1591043924
Python
Python (3.4.3)
py
Runtime Error
17
2940
137
N, K =map(int, input().split()) l = [map(int, input().split())] l = sorted(l)[::-1] ans = 0 for i in range(K): ans += l[i] print(ans)
s291868233
p03658
u957198490
1589593040
Python
Python (3.4.3)
py
Runtime Error
17
2940
150
N,K = map(int,input().split()) l = list(map(int,input().split())) l.sort(reverse = True) length = 0 for i in range(K): length += l[i] print(leng
s369185184
p03658
u551109821
1589413191
Python
Python (3.4.3)
py
Runtime Error
18
2940
144
n,k = map(int,input().split()) l = list(map(int,input().split())) l.sort(reverse=True) sum = 0 for i in range(K): sum += l[i] print(sum)
s031699833
p03658
u551109821
1589413159
Python
Python (3.4.3)
py
Runtime Error
17
2940
136
n,k = map(int,input().split()) l = list(map(int,input())) l.sort(reverse=True) sum = 0 for i in range(K): sum += l[i] print(sum)
s928455837
p03658
u551109821
1589413086
Python
Python (3.4.3)
py
Runtime Error
17
2940
105
n,k = map(int,input().split()) l = list(map(int,input())) l.sort() print(l[-1]+l[len(l)-2]+l[len(l)-3])
s530495417
p03658
u551109821
1589413038
Python
Python (3.4.3)
py
Runtime Error
17
2940
93
n,k = map(int,input().split()) l = list(map(int,input())) l.sort() print(l[-1]+l[-2]+l[-3])
s160042413
p03658
u227085629
1589069397
Python
Python (3.4.3)
py
Runtime Error
17
3060
156
n,k = map(int,input().split()) l_list = list(map(int,input().split())) s_l_list = sorted(l_list,reverse = True) ans_list = a_l_list[:k] print(sum(ans_list))
s275443261
p03658
u029000441
1588706797
Python
Python (3.4.3)
py
Runtime Error
22
3316
817
import sys input = sys.stdin.readline sys.setrecursionlimit(10**7) from collections import Counter, deque from collections import defaultdict from itertools import combinations, permutations, accumulate, groupby, product from bisect import bisect_left,bisect_right from heapq import heapify, heappop, heappush from math ...
s984773791
p03658
u437215432
1587923357
Python
Python (3.4.3)
py
Runtime Error
17
2940
101
n, k = map(int, l.split()) l = list(map(int, l.split())) l = sorted(l) l = l[::-1] print(sum(l[:k]))
s715501263
p03658
u549161102
1587836398
Python
Python (3.4.3)
py
Runtime Error
17
2940
80
N,K = map(int, input().split()) l = input() lrev = l[::-1] print(sum(lrev[:K]))
s725230109
p03658
u549161102
1587832056
Python
Python (3.4.3)
py
Runtime Error
18
3064
89
N,K = map(int, input().split()) l = [input()] l.sort(reverse = True) print(sum(l[0::K]))
s140286213
p03658
u549161102
1587831823
Python
Python (3.4.3)
py
Runtime Error
17
2940
127
N,K = map(int, input().split()) l = [input()] l.sort(reverse = True) toral = 0 for i in range(K): total += l[i] print(total)
s658726869
p03658
u549161102
1587831793
Python
Python (3.4.3)
py
Runtime Error
17
2940
151
N,K = map(int, input().split()) l = [int(i) for i in input().split()] l.sort(reverse = True) toral = 0 for i in range(K): total += l[i] print(total)
s163310668
p03658
u549161102
1587831675
Python
Python (3.4.3)
py
Runtime Error
18
2940
156
N,K = map(int, input().split()) l = [int(i) for i in input().split()] ls = l.sort(reverse = True) toral = 0 for i in range(K): total += ls[i] print(total)
s648749625
p03658
u252964975
1587520711
Python
Python (3.4.3)
py
Runtime Error
18
3064
103
N,K=map(int, input().split()) L=list(map(int, input().split())) L.sort(reverse=True) print(sum(L[0,K]))
s496593806
p03658
u189397279
1586459323
Python
Python (3.4.3)
py
Runtime Error
17
2940
142
import sys N, K = map(int, sys.stdin.readline()) L = sorted(list(map(int, sys.stdin.readline().split(" "))), reverse=True) print(sum(L[0:K]))
s392535100
p03658
u123745130
1586043769
Python
Python (3.4.3)
py
Runtime Error
17
2940
91
n,k=map(int,input().split()) l=sorted(int(input().split()) ,reverse=True) print(sum(l[:k]))
s658318687
p03658
u123745130
1586043401
Python
Python (3.4.3)
py
Runtime Error
17
2940
100
n,k=map(int,input().split()) l=sorted(int(input()) for _ in range(n),reverse=True) print(sum(l[:k]))
s066796221
p03658
u438662618
1585714952
Python
Python (3.4.3)
py
Runtime Error
17
2940
322
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int n, k; cin >> n >> k; int l[k]; rep(i, n) cin >> l[i]; sort(l, l+n, greater<int>()); int sum = 0; rep(i, k) sum += l[i]; cout << sum << endl; ...
s818745776
p03658
u440129511
1585700154
Python
Python (3.4.3)
py
Runtime Error
17
2940
136
n,k=map(int(input().split())) l=list(map(int,input().split())) l1 = sorted(l, reverse=True) s=0 for i in range(k): s+=l1[i] print(s)
s182843090
p03658
u440129511
1585700124
Python
Python (3.4.3)
py
Runtime Error
17
2940
131
n,k=int(input().split()) l=list(map(int,input().split())) l1 = sorted(l, reverse=True) s=0 for i in range(k): s+=l1[i] print(s)
s774727933
p03658
u440129511
1585700071
Python
Python (3.4.3)
py
Runtime Error
17
2940
123
n,k=int(input().split()) l=list(map(int,input())) l1 = sorted(l, reverse=True) s=0 for i in range(k): s+=l1[i] print(s)
s061053178
p03658
u440129511
1585699604
Python
Python (3.4.3)
py
Runtime Error
17
2940
94
n,k=int(input()) l=list(map(int,input())) l.sort() s=0 for i in range(k): s+=l[i] print(s)
s322880588
p03658
u440129511
1585699487
Python
Python (3.4.3)
py
Runtime Error
17
2940
107
n,k=int(input()) l=list(map(int,input().split())) l.sort() s=0 for i in range(k): s+=l[i] print(s)
s996309533
p03658
u016323272
1585241052
Python
Python (3.4.3)
py
Runtime Error
17
2940
118
#ABC067.B N,K = map(int,input().split()) l = [map(int,input().split())] l.sort() L = l[(N-K):] ans = sum(L) print(ans)
s332470621
p03658
u016323272
1585240814
Python
Python (3.4.3)
py
Runtime Error
17
2940
113
N,K = map(int,input().split()) l = [int(input())for i in range(N)] l.sort() L = l[(N-K):] ans = sum(L) print(ans)
s037623997
p03658
u835924161
1585011960
Python
Python (3.4.3)
py
Runtime Error
18
2940
127
n,k=map(int,input().split()) A=list(map(int,input().split())) A.sort() ans=int(0) for i in ramge(n-k,n): ans+=A[i] print(ans)
s324133196
p03658
u835924161
1584963318
Python
Python (3.4.3)
py
Runtime Error
17
2940
129
n,k=map(int,input().split()) A=list(map(int,input().split())) A.sort() ans=int(0) for i in ramge(n-k,n): ans+=A[i] print(ans)
s273853752
p03658
u835924161
1584963195
Python
Python (3.4.3)
py
Runtime Error
17
2940
129
n,k=map(int,input().split()) A=list(map(int,input().split())) A.sort() ans=int(0) for i in ramge(n-k,n): ans+=A[i] print(ans)
s296390085
p03658
u836737505
1584963119
Python
Python (3.4.3)
py
Runtime Error
17
2940
99
n,m = map(int, input().split()) a = sorted(list(map(int,input().split()))) print(a[-1]+a[-2]+a[-3])
s125919439
p03658
u260036763
1584825025
Python
Python (3.4.3)
py
Runtime Error
17
2940
133
N, K = map(int, input().split()) l = sorted(map(int, input().split()), reverse=True) ans = 0 ans += l[i] for i in range(K) print(ans)
s630516512
p03658
u699944218
1583894941
Python
Python (3.4.3)
py
Runtime Error
17
2940
128
N ,K = map(int, input().split()) L = list(map(int, input().split())) snake = 0 for i in range(K+1): snake += L[i] print(snake)
s057594859
p03658
u699944218
1583894699
Python
Python (3.4.3)
py
Runtime Error
18
2940
136
N, K = list(map(int, input().split())) L = llst(map(int, input().split())) sort.L(reverse = True) print(sum(l in L for k in range(K+1)))
s051061295
p03658
u354618612
1583612300
Python
Python (3.4.3)
py
Runtime Error
17
2940
158
k = int(input().split('')[1]) sticks = sorted(list(map(int,input().split())),reverse=True) total = 0 for i in range(k): total += sticks[i] print(total)
s955230007
p03658
u354618612
1583611762
Python
Python (3.4.3)
py
Runtime Error
18
3064
155
k = input().split('')[1] sticks = sorted(list(map(int,input().split(''))),reverse=True) total = 0 for i in range(k): total += sticks[i] print(total)
s403828280
p03658
u354618612
1583611619
Python
Python (3.4.3)
py
Runtime Error
17
2940
175
n = input().split('')[0] k = input().split('')[1] sticks = sorted(map(int,input().split('')),reverse=True) total = 0 for i in range(k): total += sticks[i] print(total)