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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
s394115631 | p03657 | u288040231 | 1554714792 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 118 | A,B = map(int, input().split())
print('Possible' if (A % 3 = 0) or (B % 3 = 0) or ((A + B) % 3 = 0) else 'Impossible') |
s911116214 | p03657 | u288040231 | 1554714736 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 112 | A,B = map(int, input().split())
print('Possible' if A % 3 = 0 or B % 3 = 0 or (A + B) % 3 = 0 else 'Impossible') |
s024404447 | p03657 | u288040231 | 1554714661 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 106 | A,B = map(int, input().split())
print('Possible' if (A % 3 or B % 3 or (A + B) % 3) = 0 else 'Impossible') |
s622772250 | p03657 | u288040231 | 1554714576 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 96 | A,B = map(int, input().split())
print('Possible' if (A or B or A + B) % 3 = 0 else 'Impossible') |
s068980010 | p03657 | u363610900 | 1554633231 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 72 | A, B = map(int, input())
print('Possible' if A+B%3==0 else 'Impossible') |
s368641005 | p03657 | u798129018 | 1554240270 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 121 | A,B = map(int,input().split())
if (A % 3 == 0) or(B%3==0) or((A+B)%3==):
print("Possible")
else:
print("Impossible") |
s626869295 | p03657 | u143318682 | 1553701222 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | A, B = map(int, input().split())
if A % 3 == 0 or B % 3 == 0 or A + B % == 0:
print('Possible')
else:
print('Impossible') |
s066125741 | p03657 | u366959492 | 1553189666 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 126 | a,b=(iny(x) for x in input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
print("Possible")
else:
print("Impossible")
|
s437770395 | p03657 | u366959492 | 1553189594 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 129 | a,b=(iny(x) for x in input().split())
if a%3==0 or b%3==0 or a+b%3==0:
print("Possible")
else:
print("Impossible")
|
s417082014 | p03657 | u771532493 | 1552781106 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 171 | N=int(input())
lst=[int(i) for i in input().split()]
import numpy
res=numpy.cumsum(lst)
ans=10e10
for i in range(N):
ans=min(ans,abs(res[i]-(res[-1]-res[i])))
print(ans) |
s788432834 | p03657 | u878138257 | 1552633688 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 111 | a,b = map(int, input().split())
if a%3=0 or b%3=0 or (a+b)%3=0:
print("Possible")
else:
print("Impossible") |
s121119872 | p03657 | u724742135 | 1551839102 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3060 | 287 | from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
if (a+b)/3:
print('Possible')
else:
print('Impossible')
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
if (a+b)%3 == 0:
print('Possible')
else:
print('Impossible')
|
s507386054 | p03657 | u722535636 | 1551566969 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | a,b=map(int,input().split())
if not (a%3orb%3or(a+b)%3):
print('Possible')
else:
print('Impossible') |
s599487229 | p03657 | u007550226 | 1550778000 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 112 | A,B = map(int,input().split())
if A%3==0 or B%3==0 or (A+B)%==0:
print('Possible')
else:
print('Impossible') |
s669385552 | p03657 | u352623442 | 1550722458 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | a,b =map(int,input().split())
k = a%3
s = b%3
if k ==s and k != 0:
print("Impossible)
else:
print("Possible") |
s987137339 | p03657 | u449555432 | 1550721839 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 127 | a,b=map(int,input().split());print('Possible' if a%3==0 else 'Possible' if b%3==0 else 'Possible' (a+b)%3==0 else 'Impossible') |
s121087868 | p03657 | u449555432 | 1550721785 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 125 | a,b=map(int,input().split());print('Possible' if a%3==0 else 'Possible' if b%3==0 else 'Possible' a+b%3==0 else 'Impossible') |
s430409665 | p03657 | u964763428 | 1550543078 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 193 | #include <bits/stdc++.h>
using namespace std;
int main(){
int A, B;
cin >> A >> B;
if(A%3==0 || B%3==0 || (A+B)%2==0) cout << "Possible" << endl;
else cout << "Impossible" << endl;
}
|
s004519343 | p03657 | u992736202 | 1550287164 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 113 | a,b=int(input().split())
if (a%3==0) || (b%3==0) || ((a+b)%3==0):
print("Possible")
else:
print("Impossible") |
s591072885 | p03657 | u350049649 | 1550206848 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 103 | A,B=map(int,input())
if A%3==0 or B%3==0 or (A+B)%3==0:
print('Possible')
else:
print('Impossible') |
s760620082 | p03657 | u325264482 | 1549253077 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 207 | N = int(input())
a = list(map(int, input().split()))
X = sum(a)
b = [a[0]]
for i in range(1, N):
b.append(b[i-1] + a[i])
ans = []
for i in range(1, N):
ans.append(abs(X - 2*b[i]))
print(min(ans))
|
s442336477 | p03657 | u751605689 | 1548522148 | Python | PyPy3 (2.4.0) | py | Runtime Error | 198 | 40048 | 214 | N = int(input())
a = list(map(int, input().split()))
ans = abs(a[0]-sum(a[1:]))
for i in range(N-1):
x = sum(a[:i])
y = sum(a[i:])
if abs(x-y) < ans:
ans = abs(x-y)
if N == 2:
ans = abs(a[0]-a[1])
print(ans)
|
s630178450 | p03657 | u239342230 | 1546413193 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 95 | a,b,c=map(int,input().split())
print(['Impossible','Possible'][a%3==0 or b%3==0 or (a+b)%3==0]) |
s966220020 | p03657 | u239342230 | 1546413147 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 95 | a,b,c=map(int,input().split())
print(['Impossible','Possible'][a%3==0 or b%3==0 or (a+b)%3==0]) |
s271170727 | p03657 | u071061942 | 1546290605 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 125 | A,B = map(int,input().split())
if A % 3 == 0 or B % 3 == 0or A + B % 3 == 0:
print("Possible")
else:
print("Impossible")
|
s934613119 | p03657 | u726439578 | 1546132063 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 218 | a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
print("Possible")
else:
print("Impossible")a,b=int(input())
if a%3==0 or b%3==0 or (a+b)%3==0:
print("Possible")
else:
print("Impossible") |
s704599702 | p03657 | u726439578 | 1546131346 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 103 | a,b=int(input())
if a%3==0 or b%3==0 or (a+b)%3==0:
print("Possible")
else:
print("Impossible") |
s788263325 | p03657 | u434208140 | 1544906604 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 92 | a,b=map(int,input().split())
print('Possible'if a%3==0or b%3==0or(a+b)%3==0else'Impossible') |
s807248779 | p03657 | u728498511 | 1544072563 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 90 | if a/3 == 0 or b/3 == 0 or (a+b)/3 == 0:
print("Possible")
else :
print("Inpossible")
|
s369828722 | p03657 | u220870679 | 1541901146 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 121 | A, B = map(int, input().split())
if a % 3 or b % 3 or (A+B) % 3 == 0:
print("Possible")
else:
print("Impossible") |
s712226669 | p03657 | u604896914 | 1541674828 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 951 | sys.setrecursionlimit(1500)
import math
def gcd(a,b):
"""Compute the greatest common divisor of a and b"""
while b > 0:
a, b = b, a % b
return a
def lcm(a, b):
"""Compute the lowest common multiple of a and b"""
return a * b / gcd(a, b)
N = int(input())
# Y,P,i
adj = {}
for i in rang... |
s263445721 | p03657 | u791664126 | 1540855661 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 102 | f=lambda(x):x%3==0
a,b=map(int,input().split())
print(['Impossible','Possible'][f(a)or f(b)or f(a+b)]) |
s752579390 | p03657 | u131405882 | 1540659710 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 161 | num = list(map(int, input().split()))
a = num[0]
b = num[1]
c = num[2]
if a%3 == 0 or b%3 == 0 or (a+b) %3 ==0 :
print('Possible')
else:
print('Impossible')
|
s198872752 | p03657 | u603234915 | 1539964111 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 242 | def main():
N = int(input())
l = list(map(int, input().split()))
ans = []
X = sum(l)
x = 0
for i in range(N-1):
x += l[i]
ans.append(abs(X-2*x))
print(min(ans))
if __name__ == '__main__':
main() |
s104956921 | p03657 | u603234915 | 1539963939 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 231 | def main():
N = int(input())
l = list(map(int, input().split()))
ans = []
X = sum(l)
for i in range(N-1):
X = abs(X-2*l[i])
ans.append(X)
print(min(ans))
if __name__ == '__main__':
main()
|
s044868130 | p03657 | u505420467 | 1538778359 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 79 | a,b=map(int,input().split())
print['impossible','possible'][((a%3)+(b%3))%3==0] |
s814547017 | p03657 | u163449343 | 1538704298 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 128 | a,b=map(int, input().split())
if ((a%3 == 0) or (b%3 == 0)) or (sum(a,b)%3== 0):
print("Possible")
else:
print("Impossible") |
s183193967 | p03657 | u163449343 | 1538704245 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 126 | a,b=map(int, input().split())
if (a%3 == 0) or (b%3 == 0) or (sum(a,b)%3== 0):
print("Possible")
else:
print("Impossible") |
s047181187 | p03657 | u163449343 | 1538704185 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 120 | a,b=map(int, input().split())
if a%3 == 0 or b%3 == 0 or sum(a,b)%3== 0:
print("Possible")
else:
print("Impossible") |
s724520356 | p03657 | u601082779 | 1536026901 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 71 | a,b=map(int,input().split())print(('P','Imp')[a*b*(a+b)%3>0]+'ossible') |
s357360623 | p03657 | u601082779 | 1536026816 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 75 | a,b=map(int,input().split())print(('P'if a*b*(a+b)%3<0else'Imp')+'ossible') |
s595065940 | p03657 | u601082779 | 1536026757 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 73 | a,b=map(int,input().split())print('P'if a*b*(a+b)%3<0else'Imp'+'ossible') |
s686983483 | p03657 | u474270503 | 1535934656 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 100 | A,B=map(int,input().split())
print('Possible' for (A+B)%3==0 or A%3==0 or B%3==0 else 'Impossible')
|
s149285228 | p03657 | u982762220 | 1532662378 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 85 | print('Possible' if (sum(list(map(int, input().split()))) % 3 == 0 else 'Impossible') |
s672966118 | p03657 | u226746496 | 1529022759 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 137 | A = int(input('A : '))
B = int(input('B : '))
if A%3 == 0 or B%3==0 or (A+B)%3==0:
print('Possible')
else:
print('Impossible')
|
s188644122 | p03657 | u443569380 | 1527965318 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 131 | A,B = map(intinput().split())
if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
print("Possible")
else:
print("Impossible")
|
s397477523 | p03657 | u748135969 | 1518376248 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 132 | a, b, c = map(int, input().split())
if a % 3 == 0 or b % 3 == 0 or (a + b) % 3 ==0:
print("Possible")
else:
print("Impossible") |
s406831729 | p03657 | u667024514 | 1517374700 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 156 | n , k = map(int,input().split())
lis = list(map(int,input().split()))
lis = sorted(lis,reverse = True)
ans = 0
for i in range(k):
ans += lis[i]
print(ans) |
s818490962 | p03657 | u498401785 | 1511407162 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 143 | a, b = list(map(int, input().split()))
if(a % 3 == 0 or b % 3 ==0 or (a + b)4 5 % 3 == 0):
print("Possible")
else:
print("Impossible")
|
s301690128 | p03657 | u136090046 | 1510791828 | Python | Python (3.4.3) | py | Runtime Error | 20 | 3064 | 318 | import math
num = int(input())
cards = [int(x) for x in input().split()]
res = sum(cards)
res2 = 0
judge = math.inf
if num == 2:
judge = abs(cards[0]-cards[1])
else:
for i in cards:
res -= i
res2 += i
div = abs(res - res2)
judge = div if div < judge else judge
print(judge) |
s777334457 | p03657 | u825528847 | 1509968217 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 72 | print("Impossible" if sum(map(int, input.split())) % 3 else "Possible")
|
s160165820 | p03657 | u825528847 | 1509968192 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 64 | print("Impossible" if sum(map(int, input)) % 3 else "Possible")
|
s960688363 | p03657 | u818983162 | 1507492319 | Python | PyPy3 (2.4.0) | py | Runtime Error | 174 | 38256 | 155 | #coding: utf-8
n, k = [int(i) for i in input().split()]
l = input().split()
l.sort()
l.reverse()
re = 0
for i in range(k):
re += int(l[i])
print(re) |
s052841376 | p03657 | u363299657 | 1507241857 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 135 | a, b = map(int, raw_input().split())
if a % 3 == 0 or b % 3 == 0 or (a+b)%3==0:
print("Possible")
else:
print("Impossible")
|
s190668410 | p03657 | u867069435 | 1507213482 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3056 | 141 | A= map(int, input().split())
if A[0] % 3 == 0 or A[1] % 3 == 0 or (A[0] + A[1]) % 3 == 0:
print("Possible")
else:
print("Impossible") |
s351976593 | p03657 | u867069435 | 1507213450 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 136 | A= int(input().split())
if A[0] % 3 == 0 or A[1] % 3 == 0 or (A[0] + A[1]) % 3 == 0:
print("Possible")
else:
print("Impossible") |
s192779675 | p03657 | u867069435 | 1507213338 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 130 | A = int(input())
B = int(input())
if A % 3 == 0 or B % 3 == 0 or (A + B) % 3 == 0:
print("Possible")
else:
print("Impossible") |
s150941826 | p03657 | u909643606 | 1506717727 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 186 | N=int(input())
a=[int(i) for i in input().split()]
X=0
Y=0
min=10**11
for i in range(N):
X=X+a[i]
for j in range(N-1):
Y=Y+a[j]
if abs(X-2*Y) <= min:
min=abs(X-2*Y)
print(min)
|
s207888760 | p03657 | u425351967 | 1506613838 | Python | Python (3.4.3) | py | Runtime Error | 19 | 3064 | 511 | import sys
sys.setrecursionlimit(1000000)
N = int(input())
adj = [[] for n in range(N)]
for i in range(N-1):
a, b = [int(n)-1 for n in input().split()]
adj[a].append(b)
adj[b].append(a)
def dfs(now, cost, dic):
dic[now] = cost
for nx in adj[now]:
if nx not in dic:
dfs(nx, cost+1, dic)
dist_f = ... |
s549576338 | p03657 | u425351967 | 1506613804 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 511 | import sys
sys.setrecursionlimit(1000000)
N = int(input())
adj = [[] for n in range(N)]
for i in range(N-1):
a, b = [int(n)-1 for n in input().split()]
adj[a].append(b)
adj[b].append(a)
def dfs(now, cost, dic):
dic[now] = cost
for nx in adj[now]:
if nx not in dic:
dfs(nx, cost+1, dic)
dist_f = ... |
s070995113 | p03657 | u449998745 | 1504583436 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 226 | n=input()
a=list(map(int,input().split()))
an=[]
def aaa(i):
b=a[i:]
c=a[:i]
x=sum(b)
y=sum(c)
return x-y
for i in range(len(a)):
an+=[aaa(i)]
an=[abs(x) for x in an]
print(min(an))
|
s221322613 | p03657 | u515713863 | 1503651047 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 352 | def main():
goats =3
n = input()
list = [int(i) for i in input().split()]
if (list[0]%3==0 or list[1] %3==0 or (list[0]+list[1])%3==0):
print('Possible')
else:
print("Impossible")
if __name__ =... |
s191952505 | p03657 | u515713863 | 1503650945 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 304 | def main():
goats =3
n = input()
list = [int(i) for i in input().split()]
if (list[0]%3==0 or list[1] %3==0 or (list[0]+list[2])%3==0):
print('Possible')
else:
print("Impossible")
if __name__ == "__main__":
main() |
s002777090 | p03657 | u126747509 | 1503602144 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 188 | def main():
n, k = map(int, input().split())
l_list = sorted([int(i) for i in input().split()], reverse=True)
print(sum(l_list[:k]))
if __name__ == "__main__":
main() |
s714605132 | p03657 | u126747509 | 1503602107 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3056 | 188 | def main():
n, k = map(int, input().split())
l_list = sorted([int(i) for i in input().split()], reverse=True)
print(sum(l_list[:k]))
if __name__ == "__main__":
main() |
s478686870 | p03657 | u100403673 | 1502528760 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 139 | N, K = input().split()
l = input().split()
l = list(map(int, l))
l.sort(reverse=True)
sum = 0
for i in range(K):
sum += l[i]
print(sum) |
s033714814 | p03657 | u343437894 | 1502469117 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 158 | a, b = map(int, input().split(" "))
if (a%3 ==0) or (b%3 ==0) or ((a+b)%3 ==0):
print("Possible")
else:
print("Impossible")
|
s085658569 | p03657 | u343437894 | 1502469038 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 133 | a, b = map(int, input().split(" "))
if (a%3 ==0) or (b%3 ==0) or ((a+b)%3 ==0)):
print("Possible")
else:
print("Impossible") |
s037186494 | p03657 | u301823349 | 1502392662 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 139 | N,K=map(int,input().split())
st=list(map(int,input().split()))
len=0
st.sort()
st.reverse()
for x in range(K):
len=len+st[x]
print(len) |
s353492650 | p03657 | u112523623 | 1501785407 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 124 | a, b = input().split(' ')
c = int(a) + int(b)
if a%3==0 or b%3==0 or c%3==0:
print("Possible")
else:
print("Impossible") |
s595813822 | p03657 | u112523623 | 1501784935 | Python | Python (3.4.3) | py | Runtime Error | 18 | 2940 | 156 | a, b = input().split(' ')
c = int(a) + int(b)
if (a%3==0 and a > 3) or (b%3==0 and b>3) or (c%3==0 and c>3):
print("Possible")
else:
print("Impossible") |
s604773408 | p03657 | u112523623 | 1501784889 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 151 | a, b = input().split(' ')
c = int(a) + int(b)
if (a%3==0 and a > 3) or (b%3==0&&b>3) or (c%3==0 &&c>3):
print("Possible")
else:
print("Impossible") |
s571638839 | p03657 | u796424048 | 1501697905 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 138 | A B = map(int,input()split())
res = 'POSSIBLE'
if A%3 != 0:
if B%3 != 0:
if (A+B)%3 != 0:
res = 'IMPOSSIBLE'
print(res)
|
s420254788 | p03657 | u830580569 | 1501536554 | Python | Python (2.7.6) | py | Runtime Error | 257 | 17032 | 256 | import numpy as np
def splitting_pile():
n = int(raw_input())
nums = list(map(int, raw_input().split(" ")))
ans = np.inf
for i in range(1, n):
ans = min(ans, abs(sum(nums[:i])-sum(nums[i:])))
print ans
if __name__ == "__main__":
splitting_pile() |
s412865357 | p03657 | u564412408 | 1501420382 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 227 | a = input()
card_list = list(map((int),input().split(' ')))
sum_card = sum(card_list)
score = []
sunuke = 0
for i in range(int(a)-1):
sunuke += card_list[i]
score.append(abs(sum_card-2*sunuke))
print(min(score)) |
s457964809 | p03657 | u307757209 | 1501387775 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 202 | # coding: utf-8
# Here your code !
x=input()
a=int(x.split(" ")[0])
b=int(x.split(" ")[1])
y=input()
c=y.split(" ")
c=sorted(c,reverse=True)
sum = 0
for i in range(b):
sum += int(c[i])
print (sum) |
s922487191 | p03657 | u049354454 | 1501369926 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 226 | # coding: utf-8
# Here your code !
N=int(input())
b=input()
c=b.split(" ")
d=map(int,c)
a=list(d)
sum_a=abs(sum(a))
ans=sum_a%2
if sum_a==0:
A=map(abs,a)
B=list(A)
ans2=min(B)
print(ans2*2)
else:
print(ans) |
s461379409 | p03657 | u049354454 | 1501366045 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 164 | # coding: utf-8
# Here your code !
a=input()
b=a.split(" ")
A=b[0]
B=b[1]
C=A+B
if C%3==0 or A%3==0 or B%3==0:
print("Possible")
else:
print("Impossible")
|
s078011125 | p03657 | u564412408 | 1501365903 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 181 | a = input().split(' ')
b = list(map((int), a))
sum = sum(b)
A = sum[0]
B = sum[1]
if sum % 3 == 0 || A % 3 == 0 || B % 3 == 0:
print('Possible')
else:
print('Impossible')
|
s994219488 | p03657 | u049354454 | 1501365795 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 133 | # coding: utf-8
a=input()
b=a.split(" ")
A=b[0]
B=b[1]
C=A+B
print(b)
if C%3==0:
print("Possible")
else:
print("Impossible")
|
s272812655 | p03657 | u049354454 | 1501365645 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 144 | # coding: utf-8
# Here your code !
a=input()
b=a.split(" ")
A=b[0]
B=b[1]
C=A+B
if C%3==0:
print("Possible")
else:
print("Impossible")
|
s005282094 | p03657 | u049354454 | 1501365585 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 151 | # coding: utf-8
# Here your code !
a=input()
a=[2,3]
b=a.split(",")
A=b[0]
B=b[1]
C=A+B
if C%3==0:
print("Possible")
else:
print("Impossible") |
s657616220 | p03657 | u049354454 | 1501365444 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 144 | # coding: utf-8
# Here your code !
a=input()
b=a.split(" ")
A=b[0]
B=b[1]
C=A+B
if C%3==0:
print("Possible")
elif:
print("Impossible")
|
s914628759 | p03657 | u049354454 | 1501365420 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3064 | 144 | # coding: utf-8
# Here your code !
a=input()
b=a.split(" ")
A=b[0]
B=b[1]
C=A+B
if C%3==0:
print("Possible")
elif:
print("Impossible")
|
s104964053 | p03657 | u981890679 | 1501253730 | 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" |
s911499982 | p03657 | u059407991 | 1501207931 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 104 | l = input()
a, b = l.split(" ")
if (a + b) % 3 == 0:
print("Possible")
else:
print("Impossible") |
s868549748 | p03657 | u343437894 | 1501125666 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 107 | n, k = map(int, input().split(" "))
ls = list(map(int, input().split(" ")))
ls.sort()
print(ls[:k].sum()) |
s372023384 | p03657 | u343437894 | 1501125464 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 168 | a, b = input().split()
if (a+b) %3 == 0:
print("Possible")
elif a%3 == 0:
print("Possible")
elif b%3 == 0:
print("Possible")
else:
print("Impossible")
|
s442493597 | p03657 | u343437894 | 1501125390 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 171 | a, b = input().split(" ")
if (a+b) %3 == 0:
print("Possible")
elif a%3 == 0:
print("Possible")
elif b%3 == 0:
print("Possible")
else:
print("Impossible")
|
s080429134 | p03657 | u362829196 | 1501099371 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 339 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
input_line = sys.stdin.readline()
line = input_line.split(' ')
a = int(line[0])
b = int(lint[1])
c = a + b
if c > 2 and c % 3 == 0:
print('Possible')
if a > 2 and a % 3 == 0:
print('Possible')
return
if b > 2 and b % 3 == 0:
print('Possible')
return
p... |
s931471597 | p03657 | u413107439 | 1500701675 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 198 | N, M = map(int, raw_input().split())
if (N+M) % 3 == 0:
print "Possible"
return 0
if (N) % 3 == 0:
print "Possible"
return 0
if (M) % 3 == 0:
print "Possible"
return 0
print "Impossible" |
s703550107 | p03657 | u722670579 | 1500657023 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 166 | n,k=map(int,input().split())
nums=list(map(int,input().split()))
nums.sort()
nums.reverse()
ans=list()
for v in range(0,k):
ans.append(nums[v])
print(sum(ans)) |
s090098269 | p03657 | u318073603 | 1500611071 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 149 | m, n = map(int, input().split())
M = list(map(int, input().split()))
M.sort()
M.reverse()
A = []
for i in range(n):
A.append(M[i])
print(sum(A))
|
s301175283 | p03657 | u617575714 | 1500601788 | Python | Python (3.4.3) | py | Runtime Error | 17 | 2940 | 94 | a, b = map(int, input())
print("Possible" if (a+b)%3==0 or a%3==0 or b%3==0 else "Impossible") |
s543677682 | p03657 | u654951053 | 1500492117 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3064 | 418 | N = int(input())
list = input().rstrip().split()
a=[]
for i in range(N):
a = a + [int(list[i])]
sunuke=0
arai = 0
for i in range(N):
arai = arai + a[i]
for i in range(N):
sunuke1 = sunuke + a[i]
arai1 = arai - a[i]
if sunuke1 > arai1:
x = abs(sunuke-arai)
y = abs(sunuke1-arai1)
... |
s817600689 | p03657 | u379702654 | 1500424691 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 117 | a = input()
b = input()
if (a % 3) * (b % 3) * ((a + b) % 3) == 0:
print "Possible"
else:
print "Impossible" |
s288099511 | p03657 | u697421413 | 1500400075 | Python | Python (3.4.3) | py | Runtime Error | 18 | 3060 | 269 | N = int(input())
l = [0] * N
l = list(map(int, input().split()))
sum = 0
a = [0] * N
for i in range(N):
sum += l[i]
x = 0
result = 1145141919810931931
for i in range(N):
x += l[i]
if i + 1 < N:
result = min((result, abs(sum - 2 * x)))
print(result)
|
s251748911 | p03657 | u697421413 | 1500399769 | Python | Python (3.4.3) | py | Runtime Error | 17 | 3060 | 247 | N = int(input())
l = [0] * N
l = list(map(int, input().split()))
sum = 0
a = [0] * N
for i in range(N):
sum += l[i]
x = 0
result = 1145141919810931931
for i in range(N):
x += l[i]
result = min((result, abs(sum - 2 * x)))
print(result)
|
s218519880 | p03657 | u602753320 | 1500334464 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 294 | def solution(a):
A = a[0]
B = sum(a) - a[0]
Min = abs(A - B)
for i in xrange(1, len(a)-1):
A += a[i]
B -= a[i]
if Min > abs(A- B):
Min = abs(A - B)
print Min
import math
N = int(raw_input())
a = map( int, raw_input().split())
solution(a)
|
s594718963 | p03657 | u602753320 | 1500334427 | Python | Python (2.7.6) | py | Runtime Error | 10 | 2568 | 293 | def solution(a):
A = a[0]
B = sum(a) - a[0]
Min = abs(A - B)
for i in xrange(1, len(a)-1):
A += a[i]
B -= a[i]
if Min > abs(A- B):
Min = abs(A - B)
print Min
import math
N = int(raw_input())
a = map( int, raw_input().split())
solution(a) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.