node_ids listlengths 4 1.4k | edge_index listlengths 1 2.22k | text listlengths 4 1.4k | source stringlengths 14 427k |
|---|---|---|---|
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
31,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
39,
13,
13,
4,
13,
4,
13,
13,
18,
13,
39,
17,
14,
40,
2,
13,
13,
13,
4,
13,
17,
41,
28,
13,
4,
13,
13,
4,
2,
13,
17... | [
[
78,
2
],
[
78,
11
],
[
15,
13
],
[
79,
42
],
[
49,
48
],
[
48,
54
],
[
69,
68
],
[
78,
76
],
[
78,
79
]
] | [
"N, L = map(int, input().split())\n*A, = map(int, input().split())\nfor i, (a1, a2) in enumerate(zip(A, A[1:])):\n if a1 + a2 >= L:\n print('Possible')\n print(*([j+1 for j in range(i)]+[j+1 for j in range(N-2, i, -1)]+[i+1]), sep='\\n')\n break\nelse:\n print('Impossible')",
"N, L = ma... | N, L = map(int, input().split())
*A, = map(int, input().split())
for i, (a1, a2) in enumerate(zip(A, A[1:])):
if a1 + a2 >= L:
print('Possible')
print(*([j+1 for j in range(i)]+[j+1 for j in range(N-2, i, -1)]+[i+1]), sep='\n')
break
else:
print('Impossible') |
[
7,
15,
13,
15,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,
17,
28,
13,
4,
13,
13,
4,... | [
[
86,
6
],
[
86,
15
],
[
80,
17
],
[
30,
29
],
[
84,
33
],
[
81,
39
],
[
29,
40
],
[
81,
42
],
[
29,
44
],
[
87,
46
],
[
52,
51
],
[
29,
54
],
[
51,
58
],
[
... | [
"import sys\nimport os\n\nN, L = map(int,input().split())\nA = list(map(int,input().split()))\nfor i in range(N-1):\n if A[i] + A[i+1] >= L:\n print(\"Possible\")\n for j in range(i):\n print(j+1)\n for j in range(N-1,i,-1):\n print(j)\n sys.exit()\nprint(\"Impos... | import sys
import os
N, L = map(int,input().split())
A = list(map(int,input().split()))
for i in range(N-1):
if A[i] + A[i+1] >= L:
print("Possible")
for j in range(i):
print(j+1)
for j in range(N-1,i,-1):
print(j)
sys.exit()
print("Impossible")
|
[
7,
12,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
17,
13,
14,
40,
2,
18,
13,
2,
13,
17,
18,
13,
13,
13,
4,
13,
17,
28,
13,
4,
13,
17,
13,
4,
13,
13... | [
[
5,
4
],
[
5,
13
],
[
16,
15
],
[
28,
27
],
[
4,
31
],
[
15,
36
],
[
27,
38
],
[
15,
41
],
[
27,
42
],
[
13,
43
],
[
49,
48
],
[
27,
52
],
[
48,
55
],
[
58... | [
"def main():\n N, L = map(int, input().split())\n A = list(map(int, input().split()))\n for i in range(1, N):\n if A[i-1] + A[i] >= L:\n print(\"Possible\")\n for j in range(1, i):\n print(j)\n for j in range(N-1, i-1, -1):\n print(j)\n ... | def main():
N, L = map(int, input().split())
A = list(map(int, input().split()))
for i in range(1, N):
if A[i-1] + A[i] >= L:
print("Possible")
for j in range(1, i):
print(j)
for j in range(N-1, i-1, -1):
print(j)
return... |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
4,
13,
39,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
13,
0,
13,
39,
14,
40,
13,
13,
4,... | [
[
4,
3
],
[
3,
12
],
[
130,
14
],
[
130,
16
],
[
20,
19
],
[
19,
28
],
[
118,
30
],
[
121,
33
],
[
119,
39
],
[
119,
42
],
[
121,
47
],
[
112,
49
],
[
122,
53
],
... | [
"N, L = [int(_) for _ in input().split()]\nA = [int(_) for _ in input().split()]\nl, i = max((A[i] + A[i - 1], i) for i in range(1, N))\nans = []\nif l >= L:\n print('Possible')\n if i < N - 1:\n ans += list(range(N - 1, i, -1))\n ans += list(range(1, i + 1))\n else:\n ans += list(rang... | N, L = [int(_) for _ in input().split()]
A = [int(_) for _ in input().split()]
l, i = max((A[i] + A[i - 1], i) for i in range(1, N))
ans = []
if l >= L:
print('Possible')
if i < N - 1:
ans += list(range(N - 1, i, -1))
ans += list(range(1, i + 1))
else:
ans += list(range(1, i + 1))
... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
13,
0,
13,
17,
3,
14,
40,
13,
... | [
[
153,
2
],
[
153,
11
],
[
147,
13
],
[
138,
25
],
[
29,
28
],
[
154,
32
],
[
148,
38
],
[
28,
39
],
[
148,
41
],
[
28,
43
],
[
133,
45
],
[
123,
47
],
[
28,
48
]... | [
"# coding: utf-8\nN, L = map(int, input().split())\nA = list(map(int, input().split()))\n# Lより小さい組み合わせしか無い場合おわり\nflag = False\nfor i in range(N-1):\n if A[i] + A[i+1] >= L:\n importance_i = i\n flag = True\n break\nif not flag:\n print(\"Impossible\")\n exit()\n\nl, r = 0, N-1\nprint(\... | # coding: utf-8
N, L = map(int, input().split())
A = list(map(int, input().split()))
# Lより小さい組み合わせしか無い場合おわり
flag = False
for i in range(N-1):
if A[i] + A[i+1] >= L:
importance_i = i
flag = True
break
if not flag:
print("Impossible")
exit()
l, r = 0, N-1
print("Possible")
ans = []
wh... |
[
7,
15,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
18,
18,
13,
13,
13,
15,
15,
15,
15,
15,
15,
15,
15,
12,
13,
23,
13,
23,
13,
0,
13,
4,
13,
17,
0,
13,
2,
2,
17,
17,
17,
12,
13,
28,
13,
13,
23,
12,
13,
23,
13,
12,
1... | [
[
261,
11
],
[
28,
28
],
[
30,
30
],
[
246,
32
],
[
282,
37
],
[
47,
46
],
[
52,
52
],
[
64,
63
],
[
262,
67
],
[
63,
73
],
[
82,
81
],
[
91,
91
],
[
95,
94
],
... | [
"#\n# ⋀_⋀ \n# (・ω・) \n# ./ U ∽ U\\n# │* 合 *│\n# │* 格 *│ \n# │* 祈 *│ \n# │* 願 *│ \n# │* *│ \n#  ̄\n#\nimport sys\nsys.setrecursionlimit(10**6)\ninput=sys.stdin.readline\nfrom math import floor,sqrt,factorial,hypot,log #log2ないyp\nfrom heapq import heappop, heappush, heappushpop\nfrom collections i... | #
# ⋀_⋀
# (・ω・)
# ./ U ∽ U\
# │* 合 *│
# │* 格 *│
# │* 祈 *│
# │* 願 *│
# │* *│
#  ̄
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,sqrt,factorial,hypot,log #log2ないyp
from heapq import heappop, heappush, heappushpop
from collections import Counter,default... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
17,
13,
13,
13,
31,
13,
28,
13,
13,
13,
4,
13,
4,
13,
17,
13,
13,
18,
13,
39,
17,
14,
40,
2,
13,
13,
13,
4,
13,
17,
10,
4,
13,
10,
4,
13
] | [
[
46,
2
],
[
46,
15
],
[
46,
16
],
[
44,
27
],
[
47,
38
],
[
46,
44
],
[
46,
47
]
] | [
"N,L,*A=map(int,open(0).read().split())\nfor i,a,b in zip(range(1,N),A,A[1:]):\n if a+b>=L:print(\"Possible\",*range(1,i));print(*range(N-1,i-1,-1));quit()\nprint(\"Impossible\")",
"N,L,*A=map(int,open(0).read().split())",
"N",
"map(int,open(0).read().split())",
"map",
"int",
"open(0).read().split()"... | N,L,*A=map(int,open(0).read().split())
for i,a,b in zip(range(1,N),A,A[1:]):
if a+b>=L:print("Possible",*range(1,i));print(*range(N-1,i-1,-1));quit()
print("Impossible") |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,... | [
[
4,
3
],
[
3,
12
],
[
134,
14
],
[
134,
16
],
[
20,
19
],
[
19,
28
],
[
140,
30
],
[
137,
33
],
[
37,
36
],
[
135,
40
],
[
141,
46
],
[
36,
47
],
[
141,
49
],
... | [
"N, L = (int(i) for i in input().split())\na = [int(i) for i in input().split()]\nP = \"Possible\"\nfor i in range(N-1):\n if a[i] + a[i+1] >= L:\n start = i\n break \nelse:\n P = \"Impossible\"\nprint(P)\n\nif P == \"Possible\":\n ans = [start]\n if start > 0:\n ans += reversed(list(range(start)))\n ... | N, L = (int(i) for i in input().split())
a = [int(i) for i in input().split()]
P = "Possible"
for i in range(N-1):
if a[i] + a[i+1] >= L:
start = i
break
else:
P = "Impossible"
print(P)
if P == "Possible":
ans = [start]
if start > 0:
ans += reversed(list(range(start)))
if start != N-2:
ans ... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
2,
18,
13,
17,
18,
13,
17,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
2,
2,
18,
13,
2,
13,
17,
18,
13,
2,
... | [
[
127,
2
],
[
127,
11
],
[
15,
14
],
[
14,
23
],
[
130,
25
],
[
112,
28
],
[
131,
31
],
[
131,
34
],
[
118,
36
],
[
40,
39
],
[
128,
43
],
[
131,
49
],
[
39,
51
]... | [
"n,l=map(int,input().split())\nA=[int(i) for i in input().split()]\nlength,knot=A[0]+A[1],1\nfor i in range(n-2):\n if A[i+1]+A[i+2]>length:\n length=A[i+1]+A[i+2]\n knot=i+2\nif length<l:\n print(\"Impossible\")\nelse:\n print(\"Possible\")\n for i in range(1,knot):\n print(i)\n for i in range(knot,n... | n,l=map(int,input().split())
A=[int(i) for i in input().split()]
length,knot=A[0]+A[1],1
for i in range(n-2):
if A[i+1]+A[i+2]>length:
length=A[i+1]+A[i+2]
knot=i+2
if length<l:
print("Impossible")
else:
print("Possible")
for i in range(1,knot):
print(i)
for i in range(knot,n):
print(n+knot-i-... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
17,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,
17,
28,
13,
4,
13,
17,
2,
13,
17,
4,
... | [
[
81,
2
],
[
81,
11
],
[
78,
13
],
[
26,
25
],
[
76,
30
],
[
79,
36
],
[
25,
37
],
[
79,
39
],
[
25,
41
],
[
82,
43
],
[
49,
48
],
[
25,
53
],
[
48,
57
],
[
... | [
"n,l = map(int, input().split())\na = list(map(int, input().split()))\n\nfor i in range(0,n-1):\n if a[i] + a[i+1] >= l:\n print('Possible')\n for j in range(1,i+1):\n print(j)\n for j in range(n-1,i,-1):\n print(j)\n break\nelse:\n print('Impossible')",
"n,... | n,l = map(int, input().split())
a = list(map(int, input().split()))
for i in range(0,n-1):
if a[i] + a[i+1] >= l:
print('Possible')
for j in range(1,i+1):
print(j)
for j in range(n-1,i,-1):
print(j)
break
else:
print('Impossible') |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
17,
0,
13,
39,
28,
13,
4,
13,
2,
13,
17,
0,
13,
2,
18,
13,
13,
18,
13,
2,
13,
17,
... | [
[
4,
3
],
[
3,
12
],
[
114,
14
],
[
114,
16
],
[
20,
19
],
[
19,
28
],
[
120,
30
],
[
123,
33
],
[
105,
36
],
[
40,
39
],
[
109,
43
],
[
111,
46
],
[
121,
49
],
... | [
"n, l = [int(v) for v in input().split()]\na_s = [int(v) for v in input().split()]\n\npiv = -1\nb_s = []\nfor i in range(n - 1):\n a2 = a_s[i] + a_s[i + 1]\n b_s.append(a2)\n if a2 >= l:\n piv = i\n\nif piv == -1:\n print(\"Impossible\")\nelse:\n print(\"Possible\")\n for i in range(piv):\n print(i + 1)... | n, l = [int(v) for v in input().split()]
a_s = [int(v) for v in input().split()]
piv = -1
b_s = []
for i in range(n - 1):
a2 = a_s[i] + a_s[i + 1]
b_s.append(a2)
if a2 >= l:
piv = i
if piv == -1:
print("Impossible")
else:
print("Possible")
for i in range(piv):
print(i + 1)
for i in range(n-2, pi... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
12,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
29,
13,
29,
17,
0,
13,
4,
13,
14,
2,
13,... | [
[
98,
2
],
[
98,
11
],
[
95,
13
],
[
28,
27
],
[
90,
31
],
[
96,
37
],
[
27,
38
],
[
96,
40
],
[
27,
42
],
[
99,
44
],
[
27,
46
],
[
86,
50
],
[
93,
52
],
[
... | [
"N, L = map(int,input().split())\na_list = list(map(int,input().split()))\n\ndef equal_or_over_idx():\n for i in range(N-1):\n if a_list[i]+a_list[i+1] >=L:\n return i\n return -1\n\nidx = equal_or_over_idx()\nif idx == -1:\n print(\"Impossible\")\nelse:\n print(\"Possible\")\n for ... | N, L = map(int,input().split())
a_list = list(map(int,input().split()))
def equal_or_over_idx():
for i in range(N-1):
if a_list[i]+a_list[i+1] >=L:
return i
return -1
idx = equal_or_over_idx()
if idx == -1:
print("Impossible")
else:
print("Possible")
for i in range(idx):
... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,
17,
0,
13,
2,
2,
39,
2,
13,
17,
4,
13,
... | [
[
90,
2
],
[
90,
11
],
[
87,
13
],
[
26,
25
],
[
85,
29
],
[
88,
35
],
[
25,
36
],
[
88,
38
],
[
25,
40
],
[
91,
42
],
[
81,
47
],
[
25,
52
],
[
25,
58
],
[
... | [
"n,l=map(int,input().split())\na=list(map(int,input().split()))\nfor i in range(n-1):\n if a[i]+a[i+1]>=l:\n print('Possible')\n ans=[i+1]+list(range(i,0,-1))+list(range(i+2,n))\n print(*ans[::-1],sep='\\n')\n break\nelse:print('Impossible')",
"n,l=map(int,input().split())",
"n",
"map(int,input()... | n,l=map(int,input().split())
a=list(map(int,input().split()))
for i in range(n-1):
if a[i]+a[i+1]>=l:
print('Possible')
ans=[i+1]+list(range(i,0,-1))+list(range(i+2,n))
print(*ans[::-1],sep='\n')
break
else:print('Impossible') |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
2,
13,
17,
3,
14,
2,
13,
17,
... | [
[
100,
2
],
[
100,
11
],
[
88,
13
],
[
97,
25
],
[
29,
28
],
[
95,
32
],
[
89,
38
],
[
28,
39
],
[
89,
41
],
[
28,
43
],
[
101,
45
],
[
91,
47
],
[
28,
49
],
[
... | [
"n, l = map(int,input().split())\na = list(map(int,input().split()))\n\nloc = -1\nfor i in range(n-1):\n if a[i] + a[i + 1] >= l:\n loc = i + 1\n break\n\nif loc < 0:\n print(\"Impossible\")\n exit()\n\nprint(\"Possible\")\n\nfor i in range(1, loc):\n print(i)\nfor i in range(n - 1, loc - ... | n, l = map(int,input().split())
a = list(map(int,input().split()))
loc = -1
for i in range(n-1):
if a[i] + a[i + 1] >= l:
loc = i + 1
break
if loc < 0:
print("Impossible")
exit()
print("Possible")
for i in range(1, loc):
print(i)
for i in range(n - 1, loc - 1, -1):
print(i)
|
[
7,
15,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
2,
13,
17,
18,
13,
13,
13,
0,
13,... | [
[
112,
4
],
[
112,
13
],
[
17,
16
],
[
16,
25
],
[
100,
27
],
[
115,
30
],
[
118,
33
],
[
37,
36
],
[
113,
40
],
[
101,
46
],
[
36,
48
],
[
101,
51
],
[
36,
52
],... | [
"import sys\nN,L=map(int,input().split())\nA=[int(i) for i in input().split()]\nflag=True\na=-1\nfor i in range(N-1):\n if A[i+1]+A[i]>=L:\n flag=False\n a=i+1\n break\nif flag:\n print('Impossible')\n sys.exit()\nprint('Possible')\nfor i in range(1,a):\n print(i)\nfor i in range(N-... | import sys
N,L=map(int,input().split())
A=[int(i) for i in input().split()]
flag=True
a=-1
for i in range(N-1):
if A[i+1]+A[i]>=L:
flag=False
a=i+1
break
if flag:
print('Impossible')
sys.exit()
print('Possible')
for i in range(1,a):
print(i)
for i in range(N-1,a,-1):
print(i)... |
[
7,
0,
13,
2,
17,
17,
15,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
13,
4,
13,
17,
... | [
[
120,
2
],
[
135,
9
],
[
135,
18
],
[
123,
20
],
[
33,
32
],
[
133,
36
],
[
124,
42
],
[
32,
43
],
[
124,
45
],
[
32,
47
],
[
136,
49
],
[
126,
51
],
[
32,
52
],... | [
"K=10**10\nimport sys\nN,L=map(int,input().split())\nT=list(map(int,input().split()))\nfor i in range(N-1):\n if T[i]+T[i+1]>=L:\n K=i\n print(\"Possible\")\n break\nif K==10**10:\n print(\"Impossible\")\n sys.exit()\nK=K+1\nR=list(range(1,K))\nM=list(range(K+1,N))\nM.reverse()\nR.extend(M)\nR.append(K)... | K=10**10
import sys
N,L=map(int,input().split())
T=list(map(int,input().split()))
for i in range(N-1):
if T[i]+T[i+1]>=L:
K=i
print("Possible")
break
if K==10**10:
print("Impossible")
sys.exit()
K=K+1
R=list(range(1,K))
M=list(range(K+1,N))
M.reverse()
R.extend(M)
R.append(K)
for i in range(N-1):
pr... |
[
7,
15,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
2,
17,
17,
0,
13,
2,
2,
17,
17,
17,
12,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,... | [
[
128,
22
],
[
125,
27
],
[
37,
36
],
[
37,
47
],
[
50,
49
],
[
62,
61
],
[
65,
64
],
[
36,
68
],
[
49,
73
],
[
64,
74
],
[
49,
76
],
[
64,
78
],
[
47,
80
],
[
... | [
"import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time\n\nsys.setrecursionlimit(10**7)\ninf = 10**10\nmod = 10**9 + 7\n\n\ndef f():\n n,l = list(map(int, input().split()))\n a = list(map(int, input().split()))\n g = 0\n for i in range(1,n):\n if a[i] + a[i-1] >=... | import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time
sys.setrecursionlimit(10**7)
inf = 10**10
mod = 10**9 + 7
def f():
n,l = list(map(int, input().split()))
a = list(map(int, input().split()))
g = 0
for i in range(1,n):
if a[i] + a[i-1] >= l:
g... |
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
41,
28,
13,
13,
4,
13,
13,
18,
13,
39,
17,
4,
2,
13,
13,
0,
13,
13,
0,
13,
4,
13,
13,
14,
40,
13,
13,
0,
... | [
[
5,
4
],
[
5,
15
],
[
18,
17
],
[
17,
34
],
[
17,
36
],
[
45,
44
],
[
48,
47
],
[
44,
50
],
[
47,
53
],
[
15,
54
],
[
57,
56
],
[
44,
60
],
[
47,
62
],
[
6... | [
"# AGC002C - Knot Puzzle\ndef main():\n N, L = tuple(map(int, input().split()))\n A = tuple(map(int, input().split()))\n B = [i + j for i, j in zip(A, A[1:])]\n x = max(B)\n if x >= L:\n idx = B.index(x) + 1\n ans = [i for i in range(1, idx)] \n ans += [i for i in range(N - 1, id... | # AGC002C - Knot Puzzle
def main():
N, L = tuple(map(int, input().split()))
A = tuple(map(int, input().split()))
B = [i + j for i, j in zip(A, A[1:])]
x = max(B)
if x >= L:
idx = B.index(x) + 1
ans = [i for i in range(1, idx)]
ans += [i for i in range(N - 1, idx, -1)] + [idx... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
2,
4,
13,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
... | [
[
113,
2
],
[
113,
11
],
[
116,
13
],
[
125,
25
],
[
117,
28
],
[
128,
30
],
[
119,
33
],
[
37,
36
],
[
117,
42
],
[
117,
48
],
[
36,
49
],
[
117,
51
],
[
36,
53
... | [
"N, L = map(int, input().split())\na = list(map(int, input().split()))\nS = sum(a)\n\nt = 0\nm = 0\nfor k in range(len(a)-1):\n if a[k]+a[k+1]>=L:\n t = 1\n m = k+1\n break\nif t == 0:\n print(\"Impossible\")\n exit()\nelse:\n print(\"Possible\")\n for k in range(1,m):\n p... | N, L = map(int, input().split())
a = list(map(int, input().split()))
S = sum(a)
t = 0
m = 0
for k in range(len(a)-1):
if a[k]+a[k+1]>=L:
t = 1
m = k+1
break
if t == 0:
print("Impossible")
exit()
else:
print("Possible")
for k in range(1,m):
print(k)
for l in range... |
[
7,
15,
13,
12,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
1... | [
[
7,
6
],
[
14,
13
],
[
6,
20
],
[
14,
22
],
[
26,
25
],
[
6,
29
],
[
25,
34
],
[
37,
36
],
[
40,
39
],
[
13,
43
],
[
36,
49
],
[
39,
50
],
[
36,
52
],
[
39... | [
"import sys\n\ndef solve():\n input = sys.stdin.readline\n N, L = map(int, input().split())\n A = [int(a) for a in input().split()]\n for i in range(N - 1):\n if A[i] + A[i+1] >= L:\n print(\"Possible\")\n for k in range(i): print(k + 1)\n for k in reversed(range(... | import sys
def solve():
input = sys.stdin.readline
N, L = map(int, input().split())
A = [int(a) for a in input().split()]
for i in range(N - 1):
if A[i] + A[i+1] >= L:
print("Possible")
for k in range(i): print(k + 1)
for k in reversed(range(i + 1, N - 1)): p... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,
17,
3,
4,
13,
17,
4,
13,
0,
13,
2,
2,
4... | [
[
95,
2
],
[
95,
11
],
[
86,
13
],
[
26,
25
],
[
96,
29
],
[
87,
35
],
[
25,
36
],
[
87,
38
],
[
25,
40
],
[
90,
42
],
[
92,
53
],
[
96,
69
],
[
81,
80
],
[
... | [
"n,l = map(int,input().split())\na = list(map(int,input().split()))\nfor i in range(n-1):\n if a[i] + a[i+1] >= l:\n print(\"Possible\")\n break\nelse:\n print(\"Impossible\")\n exit()\nli = list(range(1,i+1))+list(range(n-1,i+1,-1))+[i+1]\nfor x in li:\n print(x)",
"n,l = map(int,input().split())",
"... | n,l = map(int,input().split())
a = list(map(int,input().split()))
for i in range(n-1):
if a[i] + a[i+1] >= l:
print("Possible")
break
else:
print("Impossible")
exit()
li = list(range(1,i+1))+list(range(n-1,i+1,-1))+[i+1]
for x in li:
print(x) |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
13,
14,
40,
2,
18,
13,
2,
13,
17,
18,
13,
13,
13,
0,
13,
17,
3,
14,
13,
4,
13,
17,
28,
13,... | [
[
91,
2
],
[
91,
11
],
[
88,
13
],
[
94,
25
],
[
29,
28
],
[
92,
32
],
[
89,
37
],
[
28,
39
],
[
89,
42
],
[
28,
43
],
[
86,
44
],
[
82,
46
],
[
56,
55
],
[
... | [
"N, L = map(int, input().split())\na = list(map(int, input().split()))\n\nok = 0\nfor i in range(1, N):\n if a[i-1] + a[i] >= L:\n ok = 1\n break\n\nif ok:\n print('Possible')\n for j in range(1, i):\n print(j)\n for j in range(N-1, i, -1):\n print(j)\n print(i)\nelse:\n ... | N, L = map(int, input().split())
a = list(map(int, input().split()))
ok = 0
for i in range(1, N):
if a[i-1] + a[i] >= L:
ok = 1
break
if ok:
print('Possible')
for j in range(1, i):
print(j)
for j in range(N-1, i, -1):
print(j)
print(i)
else:
print('Impossible')
|
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
13,
3,
14,
2,
13,
17,
... | [
[
102,
2
],
[
102,
13
],
[
96,
15
],
[
90,
27
],
[
31,
30
],
[
94,
34
],
[
97,
40
],
[
30,
41
],
[
97,
43
],
[
30,
45
],
[
103,
47
],
[
99,
49
],
[
30,
50
],
[
... | [
"\nn, length = list(map(int, input().split()))\nnums = list(map(int, input().split()))\n\nidx = -1\nfor i in range(n-1):\n if nums[i] + nums[i+1] >= length:\n idx = i\n break\nif idx < 0:\n print('Impossible')\n exit()\n\nprint('Possible')\nfor i in range(idx):\n print(i+1)\nfor i in rever... |
n, length = list(map(int, input().split()))
nums = list(map(int, input().split()))
idx = -1
for i in range(n-1):
if nums[i] + nums[i+1] >= length:
idx = i
break
if idx < 0:
print('Impossible')
exit()
print('Possible')
for i in range(idx):
print(i+1)
for i in reversed(range(idx, n-1)):... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
28,
13,
4,
13,
17,
13,
14,
40,
2,
18,
13,
2,
13,
17,
18,
13,
13,
13,
4,
13,
17,
28,
13,
18,
4,
13,
2,
13,
17... | [
[
82,
2
],
[
82,
11
],
[
15,
14
],
[
14,
23
],
[
85,
25
],
[
29,
28
],
[
83,
32
],
[
86,
37
],
[
28,
39
],
[
86,
42
],
[
28,
43
],
[
80,
44
],
[
50,
49
],
[
... | [
"n,l=map(int,input().split())\na=[int(j)for j in input().split()]\nfor i in range(1,n):\n if a[i-1]+a[i]>=l:\n print(\"Possible\")\n for j in range(i+1,n)[::-1]:\n print(j)\n for j in range(1,i+1):\n print(j)\n exit()\nprint(\"Impossible\")",
"n,l=map(int,input... | n,l=map(int,input().split())
a=[int(j)for j in input().split()]
for i in range(1,n):
if a[i-1]+a[i]>=l:
print("Possible")
for j in range(i+1,n)[::-1]:
print(j)
for j in range(1,i+1):
print(j)
exit()
print("Impossible") |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
2,
13,
2,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
2,
18,
13,
13,
18,
... | [
[
118,
2
],
[
118,
11
],
[
106,
13
],
[
109,
25
],
[
121,
28
],
[
119,
29
],
[
32,
31
],
[
119,
35
],
[
110,
39
],
[
113,
39
],
[
107,
42
],
[
31,
43
],
[
107,
45
... | [
"n, l = map(int, input().split())\na = list(map(int, input().split()))\n\ncheck_min = 0\nindex_min = n\n\nfor i in range(n-1):\n if check_min < a[i] + a[i+1]:\n check_min = a[i] + a[i+1]\n index_min = i\n\nif check_min < l:\n print('Impossible')\nelse:\n print('Possible')\n for i in range(... | n, l = map(int, input().split())
a = list(map(int, input().split()))
check_min = 0
index_min = n
for i in range(n-1):
if check_min < a[i] + a[i+1]:
check_min = a[i] + a[i+1]
index_min = i
if check_min < l:
print('Impossible')
else:
print('Possible')
for i in range(index_min):
... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
41,
28,
13,
4,
13,
2,
13,
17,
4,
2,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
13,
14,
2,
4,
13,
13,
13,
4,
13,
17,
4,
13,
... | [
[
103,
2
],
[
103,
11
],
[
106,
13
],
[
27,
26
],
[
101,
30
],
[
107,
35
],
[
26,
36
],
[
107,
38
],
[
26,
40
],
[
112,
43
],
[
113,
49
],
[
104,
50
],
[
97,
58
]... | [
"N, L = map(int, input().split())\nA = list(map(int, input().split()))\nd = [A[i] + A[i+1] for i in range(N-1)]\nif max(d) < L:\n print(\"Impossible\")\nelse:\n print(\"Possible\")\n j = 0\n while d[j] < L:\n j += 1\n for i in range(j):\n print(i+1)\n for i in range(j, N-1):\n print(N-i+j-1)",
"N, ... | N, L = map(int, input().split())
A = list(map(int, input().split()))
d = [A[i] + A[i+1] for i in range(N-1)]
if max(d) < L:
print("Impossible")
else:
print("Possible")
j = 0
while d[j] < L:
j += 1
for i in range(j):
print(i+1)
for i in range(j, N-1):
print(N-i+j-1) |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
17,
17,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
17,
13,
14,
2,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
... | [
[
120,
2
],
[
120,
11
],
[
102,
13
],
[
103,
26
],
[
108,
31
],
[
105,
34
],
[
38,
37
],
[
121,
41
],
[
103,
46
],
[
37,
47
],
[
103,
49
],
[
37,
51
],
[
109,
53
... | [
"N,L = map(int,input().split())\nA = list(map(int,input().split()))\nA.insert(0,0)\ncmax = 0\nind = -1\nfor i in range(1,N):\n if A[i]+A[i+1]>cmax:\n cmax = A[i]+A[i+1]\n ind = i\nif cmax>=L:\n print(\"Possible\")\n for i in range(1,ind):\n print(i)\n for i in range(N-1,ind-1,-1):\n... | N,L = map(int,input().split())
A = list(map(int,input().split()))
A.insert(0,0)
cmax = 0
ind = -1
for i in range(1,N):
if A[i]+A[i+1]>cmax:
cmax = A[i]+A[i+1]
ind = i
if cmax>=L:
print("Possible")
for i in range(1,ind):
print(i)
for i in range(N-1,ind-1,-1):
print(i)
else... |
[
7,
15,
13,
12,
13,
0,
13,
39,
28,
13,
4,
13,
17,
2,
4,
13,
2,
13,
17,
17,
14,
2,
2,
13,
13,
17,
4,
18,
13,
13,
13,
14,
40,
13,
2,
13,
13,
4,
18,
13,
13,
2,
13,
13,
29,
13,
23,
13,
0,
13,
4,
13,
4,
13,
13,
4... | [
[
7,
6
],
[
10,
9
],
[
47,
17
],
[
47,
23
],
[
9,
24
],
[
6,
28
],
[
9,
30
],
[
9,
33
],
[
47,
35
],
[
9,
36
],
[
6,
39
],
[
47,
42
],
[
9,
43
],
[
6,
4... | [
"import math\n\ndef make_divisors(n):\n divisors = []\n for i in range(1, int(n**0.5)+1):\n if n % i == 0:\n divisors.append(i)\n if i != n // i:\n divisors.append(n//i)\n\n # divisors.sort()\n return divisors\n\n#a = list(map(int, input().split()))\n\n#######... | import math
def make_divisors(n):
divisors = []
for i in range(1, int(n**0.5)+1):
if n % i == 0:
divisors.append(i)
if i != n // i:
divisors.append(n//i)
# divisors.sort()
return divisors
#a = list(map(int, input().split()))
###########################... |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,... | [
[
4,
3
],
[
3,
12
],
[
97,
14
],
[
97,
16
],
[
20,
19
],
[
19,
28
],
[
91,
30
],
[
100,
33
],
[
37,
36
],
[
95,
40
],
[
92,
46
],
[
36,
47
],
[
92,
49
],
[
... | [
"N,L=[int(i) for i in input().split()]\nA=[int(i) for i in input().split()]\n\nres=-1\nfor i in range(N-1):\n\tif A[i]+A[i+1]>=L:\n\t\tres=i\n\t\tbreak\nif res!=-1:\n\tprint(\"Possible\")\n\tfor i in range(res):\n\t\tprint(i+1)\n\tfor i in range(N-1,res,-1):\n\t\tprint(i)\nelse:\n\tprint(\"Impossible\")",
"int(i)... | N,L=[int(i) for i in input().split()]
A=[int(i) for i in input().split()]
res=-1
for i in range(N-1):
if A[i]+A[i+1]>=L:
res=i
break
if res!=-1:
print("Possible")
for i in range(res):
print(i+1)
for i in range(N-1,res,-1):
print(i)
else:
print("Impossible")
|
[
7,
15,
13,
13,
15,
15,
15,
15,
15,
15,
15,
15,
15,
12,
13,
12,
13,
12,
13,
12,
13,
12,
13,
41,
28,
13,
4,
13,
13,
4,
4,
13,
12,
13,
23,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
4,
13,
17,
0,
13,
2,
2,
17,
17,
17,... | [
[
26,
25
],
[
140,
31
],
[
35,
35
],
[
151,
44
],
[
127,
49
],
[
148,
59
],
[
140,
61
],
[
148,
62
],
[
130,
64
],
[
155,
66
],
[
69,
68
],
[
137,
72
],
[
149,
75
... | [
"import sys, re\nfrom collections import deque, defaultdict, Counter\nfrom math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd\nfrom itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby\nfrom operator import i... | import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter... |
[
7,
15,
13,
0,
13,
18,
18,
13,
13,
13,
12,
13,
12,
13,
12,
13,
17,
12,
13,
0,
13,
2,
2,
17,
17,
17,
0,
13,
4,
13,
13,
0,
13,
4,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
0,
13,
2,
18,
13,
13,
18,
13,
2,
13,
1... | [
[
123,
4
],
[
21,
20
],
[
28,
27
],
[
130,
29
],
[
28,
30
],
[
33,
32
],
[
118,
34
],
[
37,
36
],
[
40,
39
],
[
27,
43
],
[
47,
46
],
[
32,
49
],
[
39,
50
],
[
... | [
"import sys\ninput = sys.stdin.readline\n\ndef I(): return int(input())\ndef MI(): return map(int, input().split())\ndef LI(): return list(map(int, input().split()))\n\n\"\"\"\n逆順に見る,2つで長さL以上のものが作れればOKそうでなければ不可\n\n最初dequeで解こうとしたけど,純粋に間違ってた\n\"\"\"\ndef main():\n mod=10**9+7\n N,L=MI()\n A=LI()\n t=-1 #最... | import sys
input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
"""
逆順に見る,2つで長さL以上のものが作れればOKそうでなければ不可
最初dequeで解こうとしたけど,純粋に間違ってた
"""
def main():
mod=10**9+7
N,L=MI()
A=LI()
t=-1 #最後に外すとこ
for i in range(N... |
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
39,
28,
13,
4,
13,
2,
13,
17,
4,
18,
13,
13,
39,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
4,
13,
13,
... | [
[
131,
2
],
[
131,
13
],
[
122,
15
],
[
134,
27
],
[
31,
30
],
[
132,
34
],
[
135,
38
],
[
123,
43
],
[
30,
44
],
[
123,
46
],
[
30,
48
],
[
125,
52
],
[
135,
55
... | [
"N,L = list(map(int,input().split()))\n\na = list(map(int,input().split()))\n\na_list = []\nfor i in range(N-1):\n a_list.append([a[i]+a[i+1],i])\n \na_list=sorted(a_list,key=lambda x:x[0],reverse=True)\n\nif a_list[0][0]>=L:\n n=a_list[0][1] \n print(\"Possible\")\n for i in range(n):\n print... | N,L = list(map(int,input().split()))
a = list(map(int,input().split()))
a_list = []
for i in range(N-1):
a_list.append([a[i]+a[i+1],i])
a_list=sorted(a_list,key=lambda x:x[0],reverse=True)
if a_list[0][0]>=L:
n=a_list[0][1]
print("Possible")
for i in range(n):
print(i+1)
for i in ra... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
2,
13,
2,
18,
13,
13,
18,
13,
2,
13,
17,
0,
13,
2,
18,
13,
13,
18,
13,
2,
13,
... | [
[
108,
2
],
[
108,
11
],
[
102,
13
],
[
111,
25
],
[
29,
28
],
[
106,
32
],
[
112,
36
],
[
118,
36
],
[
103,
39
],
[
28,
40
],
[
103,
42
],
[
28,
44
],
[
117,
47
... | [
"n,l = map(int, input().split())\na = list(map(int, input().split()))\n\nsumax=0\nfor i in range(n-1):\n if sumax < a[i]+a[i+1]:\n sumax=a[i]+a[i+1]\n ind=i\n\nif sumax < l:\n print(\"Impossible\")\n exit()\n\nprint(\"Possible\")\n\nfor i in range(1,n):\n if i>ind:\n break\n prin... | n,l = map(int, input().split())
a = list(map(int, input().split()))
sumax=0
for i in range(n-1):
if sumax < a[i]+a[i+1]:
sumax=a[i]+a[i+1]
ind=i
if sumax < l:
print("Impossible")
exit()
print("Possible")
for i in range(1,n):
if i>ind:
break
print(i)
for i in reversed(ran... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
39,
13,
13,
4,
13,
4,
13,
13,
18,
13,
39,
17,
14,
40,
2,
13,
13,
13,
0,
13,
2,
13,
17,
3,
4,
13,
17,
... | [
[
97,
2
],
[
97,
11
],
[
100,
13
],
[
103,
25
],
[
101,
36
],
[
101,
38
],
[
98,
46
],
[
91,
48
],
[
64,
63
],
[
92,
67
],
[
104,
67
],
[
63,
69
],
[
94,
71
],
... | [
"N,L = map(int,input().split())\nA = list(map(int,input().split()))\n\nlast = -1\nfor i,(a,b) in enumerate(zip(A,A[1:])):\n if a+b >= L:\n last = i+1\n break\nelse:\n print('Impossible')\n exit()\n\nprint('Possible')\nans = [n for n in range(1,last)] + [n for n in range(N-1,last,-1)]\nans.app... | N,L = map(int,input().split())
A = list(map(int,input().split()))
last = -1
for i,(a,b) in enumerate(zip(A,A[1:])):
if a+b >= L:
last = i+1
break
else:
print('Impossible')
exit()
print('Possible')
ans = [n for n in range(1,last)] + [n for n in range(N-1,last,-1)]
ans.append(last)
print(*an... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
39,
0,
13,
39,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
14,
40,
13,
4,... | [
[
100,
2
],
[
100,
11
],
[
15,
14
],
[
14,
23
],
[
91,
25
],
[
94,
28
],
[
97,
31
],
[
35,
34
],
[
101,
38
],
[
92,
44
],
[
34,
45
],
[
92,
47
],
[
34,
49
],
[
... | [
"N, L = map(int, input().split())\nA = [int(a) for a in input().split()]\n\nCanRemain = []\nCutFirst = []\nfor i in range(N-1):\n if A[i] + A[i+1] >= L: CanRemain.append(i+1)\n else: CutFirst.append(i+1)\n\nif not CanRemain: print(\"Impossible\")\nelse:\n print(\"Possible\")\n for num in CutFirst:\n ... | N, L = map(int, input().split())
A = [int(a) for a in input().split()]
CanRemain = []
CutFirst = []
for i in range(N-1):
if A[i] + A[i+1] >= L: CanRemain.append(i+1)
else: CutFirst.append(i+1)
if not CanRemain: print("Impossible")
else:
print("Possible")
for num in CutFirst:
if num < CanRemain... |
[
7,
15,
12,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
39,
28,
13,
13,
4,
13,
18,
13,
39,
17,
18,
13,
39,
17,
4,
18,
13,
13,
2,
13,
13,
0,
13,
4,
13,... | [
[
6,
5
],
[
6,
16
],
[
19,
18
],
[
31,
30
],
[
18,
38
],
[
18,
42
],
[
30,
47
],
[
54,
53
],
[
30,
56
],
[
53,
59
],
[
16,
60
],
[
69,
68
],
[
30,
72
],
[
5... | [
"#!/usr/bin/env python\n# -*- coding:utf-8 -*-\n\nfrom __future__ import division, print_function, absolute_import, unicode_literals\n\ndef main():\n N, L = list(map(int, input().split()))\n a = list(map(int, input().split()))\n pair_L = []\n for car, cdr in zip(a[:-1], a[1:]):\n pair_L.append(ca... | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import division, print_function, absolute_import, unicode_literals
def main():
N, L = list(map(int, input().split()))
a = list(map(int, input().split()))
pair_L = []
for car, cdr in zip(a[:-1], a[1:]):
pair_L.append(car + cdr)
ma... |
[
7,
15,
13,
15,
13,
15,
13,
14,
4,
18,
13,
13,
17,
0,
18,
13,
13,
4,
13,
17,
17,
4,
18,
13,
13,
2,
17,
17,
0,
13,
4,
13,
17,
0,
13,
2,
17,
17,
0,
13,
2,
2,
17,
17,
17,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
18,
... | [
[
17,
14
],
[
164,
29
],
[
179,
34
],
[
176,
39
],
[
191,
46
],
[
14,
57
],
[
191,
63
],
[
173,
65
],
[
14,
76
],
[
188,
83
],
[
174,
88
],
[
91,
90
],
[
167,
93
... | [
"import os\nimport sys\n\nimport numpy as np\n\nif os.getenv(\"LOCAL\"):\n sys.stdin = open(\"_in.txt\", \"r\")\n\nsys.setrecursionlimit(10 ** 9)\nINF = float(\"inf\")\nIINF = 10 ** 18\nMOD = 10 ** 9 + 7\n# MOD = 998244353\n\n\nN, L = list(map(int, sys.stdin.buffer.readline().split()))\nA = list(map(int, sys.std... | import os
import sys
import numpy as np
if os.getenv("LOCAL"):
sys.stdin = open("_in.txt", "r")
sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353
N, L = list(map(int, sys.stdin.buffer.readline().split()))
A = list(map(int, sys.stdin.buffer.readline().split())... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
2,
39,
17,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
17,
13,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
13,
3,
14,
40,
13,
4,
... | [
[
98,
2
],
[
98,
11
],
[
92,
13
],
[
89,
28
],
[
32,
31
],
[
96,
35
],
[
93,
40
],
[
31,
41
],
[
93,
43
],
[
31,
45
],
[
99,
47
],
[
86,
49
],
[
31,
50
],
[
... | [
"n,l = map(int,input().split())\na = [0]+list(map(int,input().split()))\nll = None\nfor i in range(1,n):\n if a[i]+a[i+1] >= l:\n ll = i\n break\n\nif not ll:\n print('Impossible')\nelse:\n print('Possible')\n for i in range(1,ll):\n print(i)\n for i in range(n-1,ll,-1):\n ... | n,l = map(int,input().split())
a = [0]+list(map(int,input().split()))
ll = None
for i in range(1,n):
if a[i]+a[i+1] >= l:
ll = i
break
if not ll:
print('Impossible')
else:
print('Possible')
for i in range(1,ll):
print(i)
for i in range(n-1,ll,-1):
print(i)
print(... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
13,
0,
13,
17,
3,
14,
2,
13,
... | [
[
110,
2
],
[
110,
11
],
[
116,
13
],
[
119,
25
],
[
29,
28
],
[
111,
32
],
[
117,
38
],
[
28,
39
],
[
117,
41
],
[
28,
43
],
[
108,
45
],
[
113,
47
],
[
28,
48
]... | [
"N,L = map(int,input().split())\nA = list(map(int,input().split()))\n\nflg = 0\nfor i in range(N-1):\n if A[i] + A[i+1] >= L:\n last = i\n flg = 1\n break\n\nif flg == 0:\n print('Impossible')\nelse:\n print('Possible')\n last += 1\n # x = list(range(last+1,N))\n x = list(rang... | N,L = map(int,input().split())
A = list(map(int,input().split()))
flg = 0
for i in range(N-1):
if A[i] + A[i+1] >= L:
last = i
flg = 1
break
if flg == 0:
print('Impossible')
else:
print('Possible')
last += 1
# x = list(range(last+1,N))
x = list(range(N-1,last,-1))
y... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
2,
13,
17,
0,
18,
13,
13,
2,
18,
13,
13,
18,
13,
2,
13,
17,
14,
40,
4,
13,
13,
13,
4,
13,
17,
0,
13,
2,
... | [
[
103,
2
],
[
103,
11
],
[
100,
13
],
[
26,
25
],
[
104,
29
],
[
35,
32
],
[
101,
33
],
[
25,
34
],
[
32,
36
],
[
101,
37
],
[
25,
38
],
[
101,
40
],
[
25,
42
],
... | [
"n,l = map(int,input().split())\na = list(map(int,input().split()))\nfor N in range(n - 1):\n a[N] = a[N] + a[N + 1]\nif max(a) >= l:\n print('Possible')\n ind = a.index(max(a)) + 1\n for i in range(ind - 1):\n print(i + 1)\n for i in range(n - ind):\n print(n - i - 1)\nelse:\n prin... | n,l = map(int,input().split())
a = list(map(int,input().split()))
for N in range(n - 1):
a[N] = a[N] + a[N + 1]
if max(a) >= l:
print('Possible')
ind = a.index(max(a)) + 1
for i in range(ind - 1):
print(i + 1)
for i in range(n - ind):
print(n - i - 1)
else:
print('Impossible') |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,... | [
[
4,
3
],
[
3,
12
],
[
103,
14
],
[
103,
16
],
[
20,
19
],
[
19,
28
],
[
109,
30
],
[
106,
33
],
[
37,
36
],
[
104,
40
],
[
110,
46
],
[
36,
47
],
[
110,
49
],
... | [
"N,L=[int(x) for x in input().split()]\na=[int(x) for x in input().split()]\npossible=0\nfor i in range(N-1):\n if(a[i]+a[i+1] >= L):\n print(\"Possible\")\n possible=i+1\n break\nif(possible):\n for i in range(1,possible):\n print(i)\n for i in range(N-possible-1):\n pri... | N,L=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]
possible=0
for i in range(N-1):
if(a[i]+a[i+1] >= L):
print("Possible")
possible=i+1
break
if(possible):
for i in range(1,possible):
print(i)
for i in range(N-possible-1):
print(N-i-1)
print... |
[
7,
12,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
2,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
13,
0,
... | [
[
5,
4
],
[
5,
15
],
[
18,
17
],
[
30,
29
],
[
32,
31
],
[
35,
34
],
[
4,
38
],
[
17,
44
],
[
34,
45
],
[
17,
47
],
[
34,
49
],
[
31,
51
],
[
56,
51
],
[
54... | [
"def main():\n N, L = list(map(int, input().split()))\n A = list(map(int, input().split()))\n max_len_knot, max_len = - 1, 0\n for i in range(N - 1):\n if A[i] + A[i + 1] > max_len:\n max_len_knot = i\n max_len = A[i] + A[i + 1]\n if max_len < L:\n print('Impossibl... | def main():
N, L = list(map(int, input().split()))
A = list(map(int, input().split()))
max_len_knot, max_len = - 1, 0
for i in range(N - 1):
if A[i] + A[i + 1] > max_len:
max_len_knot = i
max_len = A[i] + A[i + 1]
if max_len < L:
print('Impossible')
else:
... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
17,
3,
14,
40,
13,
4,
13,
17,
... | [
[
143,
2
],
[
143,
11
],
[
140,
13
],
[
155,
25
],
[
29,
28
],
[
138,
32
],
[
141,
38
],
[
28,
39
],
[
141,
41
],
[
28,
43
],
[
144,
45
],
[
158,
47
],
[
159,
52
... | [
"n, s = map(int, raw_input().split())\nvalues = list(map(int, raw_input().split()))\nfound = False\nfor pos in range(n - 1):\n if values[pos] + values[pos + 1] >= s:\n found = True\n break\nif not found:\n print('Impossible')\n import sys\n sys.exit()\n \nresult = (n - 1) * [ None ]\nre... | n, s = map(int, raw_input().split())
values = list(map(int, raw_input().split()))
found = False
for pos in range(n - 1):
if values[pos] + values[pos + 1] >= s:
found = True
break
if not found:
print('Impossible')
import sys
sys.exit()
result = (n - 1) * [ None ]
result[n - 2] = pos ... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
41,
28,
13,
4,
13,
17,
13,
4,
2,
18,
13,
2,
13,
17,
18,
13,
13,
0,
13,
13,
14,
2,
4,
13,
13,
13,
4,
13,
17,
4,
13,
17,
... | [
[
94,
2
],
[
94,
11
],
[
97,
13
],
[
27,
26
],
[
95,
30
],
[
98,
34
],
[
26,
36
],
[
98,
39
],
[
26,
40
],
[
100,
42
],
[
101,
48
],
[
89,
49
],
[
91,
57
],
[
... | [
"N,L = map(int,input().split())\nA = list(map(int,input().split()))\n\nB = [A[i-1] + A[i] for i in range(1,N)]\n\nif max(B) < L :\n print(\"Impossible\")\nelse :\n print(\"Possible\")\n\n ind = B.index(max(B))\n for i in range(ind) :\n print(i+1)\n for i in range(N-1,ind,-1) :\n print(i... | N,L = map(int,input().split())
A = list(map(int,input().split()))
B = [A[i-1] + A[i] for i in range(1,N)]
if max(B) < L :
print("Impossible")
else :
print("Possible")
ind = B.index(max(B))
for i in range(ind) :
print(i+1)
for i in range(N-1,ind,-1) :
print(i)
|
[
7,
15,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
18,
18,
13,
13,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,... | [
[
153,
11
],
[
144,
18
],
[
154,
25
],
[
144,
27
],
[
147,
29
],
[
154,
38
],
[
138,
41
],
[
45,
44
],
[
145,
48
],
[
148,
54
],
[
44,
55
],
[
148,
57
],
[
44,
59
... | [
"import sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nN, L = map(int, input().split())\nA = list(map(int, input().split()))\n\nlarge_pair = -1\n# 一つでもA[i]+A[i+1]>=Lとなるところが存在すれば、そこを最後まで残して、他を全部解けばいい\nfor i in range(N-1):\n if A[i]+A[i+1] >= L:\n large_pair = i\n break\n\nif large_... | import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
N, L = map(int, input().split())
A = list(map(int, input().split()))
large_pair = -1
# 一つでもA[i]+A[i+1]>=Lとなるところが存在すれば、そこを最後まで残して、他を全部解けばいい
for i in range(N-1):
if A[i]+A[i+1] >= L:
large_pair = i
break
if large_pair == -1:
ans... |
[
7,
15,
13,
15,
13,
15,
13,
15,
13,
15,
13,
15,
15,
15,
12,
13,
29,
18,
4,
18,
18,
13,
13,
13,
39,
17,
12,
13,
29,
2,
39,
17,
4,
13,
4,
13,
13,
23,
13,
4,
18,
13,
13,
17,
0,
13,
2,
4,
13,
17,
17,
17,
41,
28,
1... | [
[
38,
36
],
[
38,
38
],
[
184,
45
],
[
55,
54
],
[
54,
65
],
[
190,
67
],
[
175,
70
],
[
187,
85
],
[
164,
92
],
[
187,
94
],
[
181,
96
],
[
164,
105
],
[
178,
108
... | [
"import bisect\nimport copy\nimport heapq\nimport math\nimport sys\nfrom collections import *\nfrom functools import lru_cache\nfrom itertools import accumulate, combinations, permutations, product\ndef input():\n return sys.stdin.readline()[:-1]\ndef ruiseki(lst):\n return [0]+list(accumulate(lst))\nsys.setr... | import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
return sys.stdin.readline()[:-1]
def ruiseki(lst):
return [0]+list(accumulate(lst))
sys.setrecursionlimit(500... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
2,
13,
17,
3,
14,
2,
13,
17,
... | [
[
87,
2
],
[
87,
11
],
[
75,
13
],
[
81,
25
],
[
29,
28
],
[
88,
32
],
[
76,
38
],
[
28,
39
],
[
76,
41
],
[
28,
43
],
[
79,
45
],
[
84,
47
],
[
28,
49
],
[
... | [
"n,l=map(int, input().split())\na=list(map(int, input().split()))\nans=-1\nfor i in range(n-1):\n if a[i]+a[i+1]>=l:\n ans=i+1\n break\nif ans==-1:print('Impossible')\nelse:\n print('Possible')\n for i in range(1,ans):print(i)\n for i in range(n-1,i,-1):print(i)",
"n,l=map(int, input().s... | n,l=map(int, input().split())
a=list(map(int, input().split()))
ans=-1
for i in range(n-1):
if a[i]+a[i+1]>=l:
ans=i+1
break
if ans==-1:print('Impossible')
else:
print('Possible')
for i in range(1,ans):print(i)
for i in range(n-1,i,-1):print(i) |
[
7,
15,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
2,
17,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
13,... | [
[
125,
4
],
[
125,
13
],
[
17,
16
],
[
16,
25
],
[
131,
27
],
[
128,
30
],
[
36,
35
],
[
126,
39
],
[
132,
45
],
[
35,
46
],
[
132,
48
],
[
35,
50
],
[
123,
52
],... | [
"import sys\nN,L=map(int,input().split())\nA=[int(i) for i in input().split()]\ns=10**23\nfor i in range(N-1):\n if A[i]+A[i+1]>=L:\n s=i\n break\nif s==10**23:\n print('Impossible')\n sys.exit()\nprint('Possible')\nL=[]\nfor i in range(s):\n L.append(i+1)\nfor i in range(N-2,s,-1):\n L... | import sys
N,L=map(int,input().split())
A=[int(i) for i in input().split()]
s=10**23
for i in range(N-1):
if A[i]+A[i+1]>=L:
s=i
break
if s==10**23:
print('Impossible')
sys.exit()
print('Possible')
L=[]
for i in range(s):
L.append(i+1)
for i in range(N-2,s,-1):
L.append(i+1)
L.append... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
17,
13,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,
17,
28,
13,
4,
13,
17,
13,
4,
13,
13,
28,
13... | [
[
77,
2
],
[
77,
11
],
[
80,
13
],
[
26,
25
],
[
75,
29
],
[
81,
34
],
[
25,
35
],
[
81,
37
],
[
25,
39
],
[
78,
41
],
[
47,
46
],
[
25,
50
],
[
46,
53
],
[
... | [
"n,l=map(int,input().split())\na=list(map(int,input().split()))\nfor i in range(1,n):\n if a[i]+a[i-1]>=l:\n print(\"Possible\")\n for j in range(1,i):\n print(j)\n for j in range(n-1,i,-1):\n print(j)\n print(i)\n break\nelse:\n print(\"Impossible\")",... | n,l=map(int,input().split())
a=list(map(int,input().split()))
for i in range(1,n):
if a[i]+a[i-1]>=l:
print("Possible")
for j in range(1,i):
print(j)
for j in range(n-1,i,-1):
print(j)
print(i)
break
else:
print("Impossible") |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
17,
13,
14,
40,
2,
18,
13,
2,
13,
17,
18,
13,
13,
13,
0,
13,
13,
3,
4,
13,
17,
4,
13,
4,
13,
17,
28,
13,
... | [
[
87,
2
],
[
87,
11
],
[
81,
13
],
[
26,
25
],
[
79,
29
],
[
82,
34
],
[
25,
36
],
[
82,
39
],
[
25,
40
],
[
88,
41
],
[
84,
43
],
[
25,
44
],
[
56,
55
],
[
... | [
"N, L = map(int, input().split())\nA = list(map(int, input().split()))\n\nfor i in range(1, N):\n if A[i-1] + A[i] >= L:\n X = i\n break\nelse:\n print(\"Impossible\")\n exit()\n\nprint(\"Possible\")\nfor i in range(1, X):\n print(i)\nfor i in range(N-1, X-1, -1):\n print(i)",
"N, L =... | N, L = map(int, input().split())
A = list(map(int, input().split()))
for i in range(1, N):
if A[i-1] + A[i] >= L:
X = i
break
else:
print("Impossible")
exit()
print("Possible")
for i in range(1, X):
print(i)
for i in range(N-1, X-1, -1):
print(i)
|
[
7,
15,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
18,
18,
13,
13,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
... | [
[
144,
11
],
[
159,
18
],
[
145,
25
],
[
159,
27
],
[
174,
29
],
[
145,
38
],
[
171,
41
],
[
153,
44
],
[
48,
47
],
[
160,
51
],
[
175,
57
],
[
47,
58
],
[
175,
60
... | [
"import sys\nsys.setrecursionlimit(10**9)\ninput = sys.stdin.readline\n\nN, L = map(int, input().split())\nA = list(map(int, input().split()))\n\nans = \"Possible\"\nlarge_pair = -1\nfor i in range(N-1):\n if A[i]+A[i+1] >= L:\n large_pair = i\n break\nif large_pair == -1:\n ans = \"Impossible\"... | import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
N, L = map(int, input().split())
A = list(map(int, input().split()))
ans = "Possible"
large_pair = -1
for i in range(N-1):
if A[i]+A[i+1] >= L:
large_pair = i
break
if large_pair == -1:
ans = "Impossible"
print(ans)
else:
... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
17,
42,
2,
13,
2,
4,
13,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
17,
3,
0,
13,
17,
14,
... | [
[
97,
2
],
[
97,
11
],
[
100,
13
],
[
103,
23
],
[
91,
26
],
[
104,
30
],
[
89,
30
],
[
101,
34
],
[
101,
40
],
[
104,
41
],
[
89,
41
],
[
101,
43
],
[
104,
45
],... | [
"n, l = map(int, raw_input().split())\na = map(int, raw_input().split())\n# print a\ni = 0\nuntied = False\nwhile i < (len(a)-1):\n if a[i] + a[i+1] >= l:\n # print i, a[i]\n untied = True\n break\n i += 1\nif untied == False:\n print \"Impossible\"\n exit()\nprint \"Possible\"\nfo... | n, l = map(int, raw_input().split())
a = map(int, raw_input().split())
# print a
i = 0
untied = False
while i < (len(a)-1):
if a[i] + a[i+1] >= l:
# print i, a[i]
untied = True
break
i += 1
if untied == False:
print "Impossible"
exit()
print "Possible"
for k in xrange(n-1, i+1, ... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
0,
13,
2,
18,
13,
13,
18,
13,
2,
13,
17,
14,
40,
13,
13,
0,
13,
17,
0,
13,
2,
13,
... | [
[
112,
2
],
[
112,
11
],
[
94,
13
],
[
103,
25
],
[
29,
28
],
[
113,
32
],
[
106,
35
],
[
95,
38
],
[
28,
39
],
[
95,
41
],
[
28,
43
],
[
107,
47
],
[
98,
48
],
... | [
"N,L=map(int, input().split())\nA=list(map(int, input().split()))\nx=0\nfor i in range(N-1):\n d=A[i]+A[i+1]\n if d>=L:\n x=1\n knot=i+1\n break\n \nif x==0:\n print('Impossible')\n exit()\n\nprint('Possible')\nfor i in range(1,knot):\n print(i)\nfor i in range(N-1,knot-1,-1):\n print(i)",
"N,L=... | N,L=map(int, input().split())
A=list(map(int, input().split()))
x=0
for i in range(N-1):
d=A[i]+A[i+1]
if d>=L:
x=1
knot=i+1
break
if x==0:
print('Impossible')
exit()
print('Possible')
for i in range(1,knot):
print(i)
for i in range(N-1,knot-1,-1):
print(i) |
[
7,
12,
13,
0,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
17,
13,
13,
13,
31,
13,
28,
13,
39,
13,
13,
4,
13,
4,
13,
13,
18,
13,
39,
17,
14,
40,
2,
13,
13,
13,
4,
13,
17,
0,
13,
4,
13,
4,
13,
13,
4,
13,
4,
18,
17,
1... | [
[
5,
4
],
[
5,
17
],
[
5,
18
],
[
17,
39
],
[
45,
44
],
[
4,
49
],
[
44,
61
],
[
44,
68
],
[
85,
82
]
] | [
"def s():\n\tn, l, *a = map(int, open(0).read().split())\n\tfor i, (x, y) in enumerate(zip(a, a[1:])):\n\t\tif x + y >= l:\n\t\t\tprint(\"Possible\")\n\t\t\tr = list(range(n))\n\t\t\tprint(\"\\n\".join(map(str, r[1:i + 1] + r[n:i:-1])))\n\t\t\tbreak\n\telse:\n\t\tprint(\"Impossible\")\nif __name__==\"__main__\":\n\... | def s():
n, l, *a = map(int, open(0).read().split())
for i, (x, y) in enumerate(zip(a, a[1:])):
if x + y >= l:
print("Possible")
r = list(range(n))
print("\n".join(map(str, r[1:i + 1] + r[n:i:-1])))
break
else:
print("Impossible")
if __name__=="__main__":
s() |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,
17,
0,
13,
2,
13,
17,
3,
4,
13,
17,
4,
... | [
[
88,
2
],
[
88,
11
],
[
91,
13
],
[
26,
25
],
[
86,
29
],
[
92,
35
],
[
25,
36
],
[
92,
38
],
[
25,
40
],
[
89,
42
],
[
82,
47
],
[
25,
49
],
[
59,
58
],
[
... | [
"n,l=map(int,input().split())\nA=list(map(int,input().split()))\nfor i in range(n-1):\n if A[i]+A[i+1]>=l:\n print('Possible')\n t=i+1\n break\nelse:\n print('Impossible')\n exit()\nfor i in range(1,t):\n print(i)\nfor i in range(n-1,t,-1):\n print(i)\nprint(t)",
"n,l=map(int,i... | n,l=map(int,input().split())
A=list(map(int,input().split()))
for i in range(n-1):
if A[i]+A[i+1]>=l:
print('Possible')
t=i+1
break
else:
print('Impossible')
exit()
for i in range(1,t):
print(i)
for i in range(n-1,t,-1):
print(i)
print(t) |
[
7,
15,
15,
15,
13,
15,
13,
15,
13,
15,
15,
13,
15,
15,
15,
13,
15,
15,
15,
15,
15,
4,
18,
13,
13,
17,
0,
13,
2,
17,
17,
12,
13,
12,
13,
12,
13,
12,
13,
41,
28,
13,
4,
13,
13,
4,
4,
13,
12,
13,
23,
13,
41,
28,
... | [
[
209,
27
],
[
42,
41
],
[
222,
47
],
[
51,
51
],
[
55,
54
],
[
264,
60
],
[
64,
64
],
[
68,
67
],
[
252,
73
],
[
77,
77
],
[
81,
80
],
[
219,
86
],
[
90,
90
],
... | [
"from collections import defaultdict, deque, Counter\nfrom heapq import heappush, heappop, heapify\nimport math\nimport bisect\nimport random\nfrom itertools import permutations, accumulate, combinations, product\nimport sys\nfrom pprint import pprint\nfrom copy import deepcopy\nimport string\nfrom bisect import bi... | from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
from pprint import pprint
from copy import deepcopy
import string
from bisect import bisect_left, bise... |
[
7,
15,
15,
13,
15,
15,
15,
13,
15,
13,
15,
13,
15,
15,
13,
15,
0,
13,
12,
4,
13,
4,
13,
0,
13,
12,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
12,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
17,
12,
13,
0... | [
[
229,
17
],
[
232,
24
],
[
238,
35
],
[
226,
48
],
[
247,
51
],
[
57,
56
],
[
233,
58
],
[
57,
59
],
[
57,
60
],
[
60,
65
],
[
56,
66
],
[
59,
67
],
[
248,
71
],... | [
"#gcdは3.4.3だとfractionsにある\nfrom fractions import gcd\nimport math\n\nfrom math import factorial as f\n\nfrom math import ceil,floor,sqrt\n\n\nimport bisect\nimport re\nimport heapq\n\n\nfrom copy import deepcopy\nimport itertools\n\nfrom sys import exit\n\nii = lambda : int(input())\nmi = lambda : map(int,input().s... | #gcdは3.4.3だとfractionsにある
from fractions import gcd
import math
from math import factorial as f
from math import ceil,floor,sqrt
import bisect
import re
import heapq
from copy import deepcopy
import itertools
from sys import exit
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : lis... |
[
7,
0,
13,
4,
13,
17,
12,
13,
0,
13,
4,
13,
13,
0,
13,
4,
13,
0,
13,
17,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
13,
14,
40,
18,
13,
13,
13,
0,
13,
13,
3,
14,
2,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
4,
13,... | [
[
125,
2
],
[
155,
9
],
[
129,
11
],
[
155,
12
],
[
131,
14
],
[
129,
16
],
[
140,
18
],
[
149,
21
],
[
134,
24
],
[
28,
27
],
[
147,
30
],
[
132,
34
],
[
27,
35
... | [
"# coding:utf-8\n\nINF = float('inf')\n\n\ndef inpl(): return list(map(int, input().split()))\n\n\nN, L = inpl()\nA = inpl()\n\ntmp = 0\nconnect = False\nknot = None\nfor i in range(N):\n if A[i] >= L:\n knots = i\n break\n\nif knot is None:\n for i in range(N - 1):\n if sum(A[i:i + 2]) >... | # coding:utf-8
INF = float('inf')
def inpl(): return list(map(int, input().split()))
N, L = inpl()
A = inpl()
tmp = 0
connect = False
knot = None
for i in range(N):
if A[i] >= L:
knots = i
break
if knot is None:
for i in range(N - 1):
if sum(A[i:i + 2]) >= L:
knot = i
... |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,... | [
[
4,
3
],
[
3,
12
],
[
102,
14
],
[
102,
16
],
[
20,
19
],
[
19,
28
],
[
105,
30
],
[
93,
33
],
[
37,
36
],
[
97,
40
],
[
106,
46
],
[
36,
47
],
[
106,
49
],
[
... | [
"n,l = [int(x) for x in input().split()]\nx = [int(x) for x in input().split()]\nc = -1\nfor i in range(n-1):\n if x[i] + x[i+1] >= l:\n c = i\n break\n\nif c == -1:\n print(\"Impossible\")\nelse:\n print(\"Possible\")\n for i in range(1,c+1):\n print(i)\n for i in range(1,n - c):\n print(n - i)",
... | n,l = [int(x) for x in input().split()]
x = [int(x) for x in input().split()]
c = -1
for i in range(n-1):
if x[i] + x[i+1] >= l:
c = i
break
if c == -1:
print("Impossible")
else:
print("Possible")
for i in range(1,c+1):
print(i)
for i in range(1,n - c):
print(n - i) |
[
7,
15,
13,
15,
13,
15,
15,
4,
18,
13,
13,
17,
15,
15,
15,
15,
15,
15,
15,
0,
13,
2,
2,
17,
17,
17,
0,
13,
4,
13,
17,
12,
13,
12,
13,
0,
13,
4,
13,
13,
0,
13,
4,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
17,
... | [
[
124,
20
],
[
139,
27
],
[
142,
36
],
[
137,
38
],
[
142,
39
],
[
127,
41
],
[
137,
43
],
[
148,
45
],
[
151,
48
],
[
52,
51
],
[
143,
55
],
[
149,
58
],
[
131,
58... | [
"#!/usr/bin/env python3\n#AGC2 C\n\nimport sys\nimport math\nfrom bisect import bisect_right as br\nfrom bisect import bisect_left as bl\nsys.setrecursionlimit(1000000000)\nfrom heapq import heappush, heappop,heappushpop\nfrom collections import defaultdict\nfrom itertools import accumulate\nfrom collections import... | #!/usr/bin/env python3
#AGC2 C
import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from co... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
2,
13,
17,
14,
2,
13,
17,
4,
... | [
[
99,
2
],
[
99,
11
],
[
96,
13
],
[
93,
25
],
[
29,
28
],
[
100,
32
],
[
97,
38
],
[
28,
39
],
[
97,
41
],
[
28,
43
],
[
88,
45
],
[
90,
47
],
[
28,
49
],
[
... | [
"n,l=map(int,input().split())\na=list(map(int,input().split()))\nlast=-1\nfor i in range(n-1):\n if a[i]+a[i+1]>=l:\n last=i+1\nif last==-1:\n print(\"Impossible\")\nelse:\n print(\"Possible\")\n for i in range(1,last):\n print(i)\n for i in range(len(a)-1,last-1,-1):\n print(i)",
"n,l=map(int,input... | n,l=map(int,input().split())
a=list(map(int,input().split()))
last=-1
for i in range(n-1):
if a[i]+a[i+1]>=l:
last=i+1
if last==-1:
print("Impossible")
else:
print("Possible")
for i in range(1,last):
print(i)
for i in range(len(a)-1,last-1,-1):
print(i)
|
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,
17,
0,
13,
39,
28,
13,
4,
13,
17,
2,
13,
... | [
[
105,
2
],
[
105,
11
],
[
102,
13
],
[
26,
25
],
[
100,
29
],
[
103,
35
],
[
25,
36
],
[
103,
38
],
[
25,
40
],
[
106,
42
],
[
96,
47
],
[
51,
50
],
[
25,
55
],
... | [
"N, L = map(int, input().split())\na = list(map(int, input().split()))\n\nfor i in range(N-1):\n if a[i]+a[i+1]>=L:\n print('Possible')\n \n ans = []\n \n for j in range(1, i+1):\n ans.append(j)\n \n for j in range(N-1, i+1, -1):\n ans.append... | N, L = map(int, input().split())
a = list(map(int, input().split()))
for i in range(N-1):
if a[i]+a[i+1]>=L:
print('Possible')
ans = []
for j in range(1, i+1):
ans.append(j)
for j in range(N-1, i+1, -1):
ans.append(j)
... |
[
7,
15,
13,
13,
13,
13,
13,
13,
13,
15,
15,
15,
0,
13,
18,
18,
13,
13,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
2,
2,
17,
17,
17,
12,
13,
12,
13,
12,
13,
12,
13,
12,
13,
23,
13,
41,
28,
13,
4,
13,
13,
4,
4,
13,
4,... | [
[
253,
13
],
[
229,
27
],
[
44,
44
],
[
48,
47
],
[
254,
55
],
[
59,
59
],
[
63,
62
],
[
254,
70
],
[
74,
74
],
[
78,
77
],
[
254,
90
],
[
95,
95
],
[
99,
98
],
... | [
"import sys, bisect, math, itertools, string, queue, copy\n# import numpy as np\n# import scipy\nfrom collections import Counter,defaultdict,deque\nfrom itertools import permutations, combinations\nfrom heapq import heappop, heappush\ninput = sys.stdin.readline\nsys.setrecursionlimit(10**8)\nmod = 10**9+7\ndef inp(... | import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
17,
42,
2,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
17,
3,
0,
13,
17,
14,
... | [
[
96,
2
],
[
96,
11
],
[
99,
13
],
[
105,
25
],
[
102,
28
],
[
106,
32
],
[
88,
32
],
[
97,
34
],
[
100,
40
],
[
106,
41
],
[
88,
41
],
[
100,
43
],
[
106,
45
],
... | [
"N, L = map(int, input().split())\na = list(map(int, input().split()))\n\n#最後に切るものを決める\ni = 0\nflag = False\nwhile i < N - 1:\n if a[i] + a[i + 1] >= L:\n flag = True\n break\n i += 1\n\nif not flag:\n print ('Impossible')\nelse:\n print ('Possible')\n for j in range(i):\n print (j... | N, L = map(int, input().split())
a = list(map(int, input().split()))
#最後に切るものを決める
i = 0
flag = False
while i < N - 1:
if a[i] + a[i + 1] >= L:
flag = True
break
i += 1
if not flag:
print ('Impossible')
else:
print ('Possible')
for j in range(i):
print (j + 1)
for j in ran... |
[
7,
15,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
13,
3,
4,
13,
17,
4,
18,
13,
13,
... | [
[
89,
4
],
[
89,
13
],
[
92,
15
],
[
28,
27
],
[
90,
31
],
[
93,
37
],
[
27,
38
],
[
93,
40
],
[
27,
42
],
[
84,
44
],
[
86,
46
],
[
27,
47
],
[
61,
60
],
[
... | [
"import sys\n\nN, L = map(int, input().split())\na = list(map(int, input().split()))\n\nfor i in range(N-1):\n if(a[i]+a[i+1] >= L):\n idx = i\n break\nelse:\n print(\"Impossible\")\n sys.exit()\n \nprint(\"Possible\")\n\nfor i in range(1, i+1):\n print(i)\n \nfor i in range(N-1, i, ... | import sys
N, L = map(int, input().split())
a = list(map(int, input().split()))
for i in range(N-1):
if(a[i]+a[i+1] >= L):
idx = i
break
else:
print("Impossible")
sys.exit()
print("Possible")
for i in range(1, i+1):
print(i)
for i in range(N-1, i, -1):
print(i) |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
17,
0,
13,
13,
14,
13,
4,
13,
... | [
[
105,
2
],
[
105,
11
],
[
93,
13
],
[
96,
25
],
[
29,
28
],
[
106,
32
],
[
94,
38
],
[
28,
39
],
[
94,
41
],
[
28,
43
],
[
100,
45
],
[
90,
47
],
[
102,
50
],
... | [
"n,l=map(int,input().split())\na=list(map(int,input().split()))\nok=False\nfor i in range(n-1):\n if a[i]+a[i+1]>=l:\n ok=True\n idx=i\nif ok:\n print(\"Possible\")\n for i in range(1,idx+1):\n print(i)\n for i in reversed(range(idx+2,n)):\n print(i)\n print(idx+1)\nelse:\... | n,l=map(int,input().split())
a=list(map(int,input().split()))
ok=False
for i in range(n-1):
if a[i]+a[i+1]>=l:
ok=True
idx=i
if ok:
print("Possible")
for i in range(1,idx+1):
print(i)
for i in reversed(range(idx+2,n)):
print(i)
print(idx+1)
else:
print("Impossible... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,
17,
28,
13,
4,
13,
13,
4,
13,... | [
[
89,
2
],
[
89,
11
],
[
15,
14
],
[
14,
23
],
[
86,
25
],
[
29,
28
],
[
84,
32
],
[
87,
38
],
[
28,
39
],
[
87,
41
],
[
28,
43
],
[
90,
45
],
[
51,
50
],
[
... | [
"N, L = map(int, input().split())\na = [int(i) for i in input().split()]\n\nfor i in range(N - 1) :\n if a[i] + a[i+1] >= L :\n print('Possible')\n for j in range(i) :\n print(j + 1)\n for j in range(N - 2, i, -1) :\n print(j + 1)\n print(i + 1)\n break\ne... | N, L = map(int, input().split())
a = [int(i) for i in input().split()]
for i in range(N - 1) :
if a[i] + a[i+1] >= L :
print('Possible')
for j in range(i) :
print(j + 1)
for j in range(N - 2, i, -1) :
print(j + 1)
print(i + 1)
break
else :
print('... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
4,
13,
17,
28,
13,
4,
13,
13,
28,
13,
4,
13,
2,
... | [
[
69,
2
],
[
69,
11
],
[
72,
13
],
[
26,
25
],
[
70,
29
],
[
73,
35
],
[
25,
36
],
[
73,
38
],
[
25,
40
],
[
67,
42
],
[
48,
47
],
[
25,
50
],
[
53,
52
],
[
... | [
"n,l=map(int,input().split())\na=list(map(int, input().split()))\nfor i in range(n-1):\n if a[i]+a[i+1]>=l:\n print(\"Possible\")\n for j in range(i):print(j+1)\n for j in range(n-1,i,-1):print(j)\n exit()\nprint(\"Impossible\")",
"n,l=map(int,input().split())",
"n",
"map(int,input().split())",
... | n,l=map(int,input().split())
a=list(map(int, input().split()))
for i in range(n-1):
if a[i]+a[i+1]>=l:
print("Possible")
for j in range(i):print(j+1)
for j in range(n-1,i,-1):print(j)
exit()
print("Impossible") |
[
7,
12,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
40,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
17,
0,
13,
... | [
[
5,
4
],
[
5,
13
],
[
16,
15
],
[
28,
27
],
[
31,
30
],
[
34,
33
],
[
4,
37
],
[
15,
43
],
[
33,
44
],
[
15,
46
],
[
33,
48
],
[
13,
50
],
[
53,
52
],
[
56... | [
"def main():\n n, l = map(int, input().split())\n a = list(map(int, input().split()))\n f = False\n idx = -1\n for i in range(n-1):\n if a[i] + a[i+1] >= l:\n f = True\n idx = i+1\n break\n if f:\n print(\"Possible\")\n for i in range(1, idx):\... | def main():
n, l = map(int, input().split())
a = list(map(int, input().split()))
f = False
idx = -1
for i in range(n-1):
if a[i] + a[i+1] >= l:
f = True
idx = i+1
break
if f:
print("Possible")
for i in range(1, idx):
print(i... |
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
0,
13,
2,
18,
13,
13,
18,
13,
2,
13,
17,
14,
40,
13,
13,
0,
13,
17,
0,
13,
... | [
[
108,
2
],
[
108,
13
],
[
114,
15
],
[
111,
27
],
[
31,
30
],
[
103,
34
],
[
117,
37
],
[
115,
40
],
[
30,
41
],
[
115,
43
],
[
30,
45
],
[
118,
49
],
[
109,
50
... | [
"N, L = list(map(int, input().split()))\na = list(map(int, input().split()))\n\njudge = \"Impossible\"\nfor i in range(N - 1):\n\tx = a[i] + a[i + 1]\n\tif x >= L:\n\t\tjudge = \"Possible\"\n\t\tc = i + 1\n\t\tbreak\n\n\nif judge == \"Impossible\":\n\tprint(judge)\nelse:\n\tprint(judge)\n\tfor i in range(1, c):\n\t... | N, L = list(map(int, input().split()))
a = list(map(int, input().split()))
judge = "Impossible"
for i in range(N - 1):
x = a[i] + a[i + 1]
if x >= L:
judge = "Possible"
c = i + 1
break
if judge == "Impossible":
print(judge)
else:
print(judge)
for i in range(1, c):
print(i)
for i in range(N - c - 1):
... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
4,
13,
2,
13,
17,
14,
2,
2,
18,
13,
13,
18,
13,
2,
13,
17,
13,
0,
13,
13,
0,
13,
2,
18,
... | [
[
145,
2
],
[
145,
11
],
[
136,
13
],
[
142,
25
],
[
133,
28
],
[
32,
31
],
[
131,
35
],
[
137,
41
],
[
31,
42
],
[
137,
44
],
[
31,
46
],
[
134,
48
],
[
125,
48
... | [
"n,l=map(int,input().split())\narr=list(map(int,input().split()))\npos=0\ntmp=0\nfor i in range(n-1):\n if (arr[i]+arr[i+1])>tmp:\n pos=i\n tmp=(arr[i]+arr[i+1])\nif tmp<l:\n print('Impossible')\nelse:\n print('Possible')\n ans=[]\n for i in range(pos):\n ans.append(i+1)\n for i in range(n-1,pos+1,-1... | n,l=map(int,input().split())
arr=list(map(int,input().split()))
pos=0
tmp=0
for i in range(n-1):
if (arr[i]+arr[i+1])>tmp:
pos=i
tmp=(arr[i]+arr[i+1])
if tmp<l:
print('Impossible')
else:
print('Possible')
ans=[]
for i in range(pos):
ans.append(i+1)
for i in range(n-1,pos+1,-1):
ans.append(i)... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
18,
4,
13,
17,
13,
13,
13,
31,
13,
28,
13,
39,
13,
13,
4,
13,
4,
13,
13,
18,
13,
39,
17,
17,
14,
40,
2,
13,
13,
13,
4,
13,
17,
4,
13,
4,
18,
17,
13,
13,
3,
4,
13,
17,
10,
4,
1... | [
[
57,
2
],
[
57,
15
],
[
57,
16
],
[
55,
38
],
[
57,
55
],
[
57,
58
]
] | [
"N, L, *a = map(int, open(0).read().split())\nfor i, (n, m) in enumerate(zip(a, a[1:]), 1):\n if n + m >= L:\n print('Possible')\n print('\\n'.join(c for it in (range(1,i), range(N-1,i,-1), [i]) for c in map(str, it)))\n break\nelse:\n print('Impossible')",
"N, L, *a = map(int, open(0).... | N, L, *a = map(int, open(0).read().split())
for i, (n, m) in enumerate(zip(a, a[1:]), 1):
if n + m >= L:
print('Possible')
print('\n'.join(c for it in (range(1,i), range(N-1,i,-1), [i]) for c in map(str, it)))
break
else:
print('Impossible') |
[
7,
15,
13,
0,
13,
18,
18,
13,
13,
13,
0,
13,
2,
2,
17,
17,
17,
0,
13,
4,
13,
17,
4,
18,
13,
13,
2,
17,
17,
12,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
41,
28,
... | [
[
134,
4
],
[
140,
11
],
[
143,
18
],
[
33,
32
],
[
135,
39
],
[
33,
41
],
[
44,
43
],
[
135,
52
],
[
57,
56
],
[
32,
60
],
[
43,
65
],
[
56,
66
],
[
43,
68
],
... | [
"import sys\n\nreadline = sys.stdin.readline\nMOD = 10 ** 9 + 7\nINF = float('INF')\nsys.setrecursionlimit(10 ** 5)\n\n\ndef main():\n n, l = map(int, readline().split())\n a = list(map(int, readline().split()))\n b = [a[i] + a[i + 1] for i in range(n - 1)]\n\n last = -1\n for i, x in enumerate(b, 1)... | import sys
readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)
def main():
n, l = map(int, readline().split())
a = list(map(int, readline().split()))
b = [a[i] + a[i + 1] for i in range(n - 1)]
last = -1
for i, x in enumerate(b, 1):
if x >= l... |
[
7,
12,
13,
0,
13,
4,
13,
17,
0,
13,
4,
18,
13,
13,
0,
13,
39,
28,
13,
4,
13,
17,
4,
18,
13,
13,
4,
13,
18,
13,
13,
0,
13,
4,
13,
17,
0,
13,
4,
18,
13,
13,
0,
13,
39,
28,
13,
4,
13,
18,
13,
17,
4,
18,
13,
13... | [
[
5,
4
],
[
10,
9
],
[
4,
12
],
[
16,
15
],
[
19,
18
],
[
15,
24
],
[
9,
29
],
[
18,
30
],
[
33,
32
],
[
38,
37
],
[
32,
40
],
[
4,
40
],
[
44,
43
],
[
47,
... | [
"def main22():\n strbuf = input(\"\");\n strbufs = strbuf.split();\n buf = [];\n for i in range(2):\n buf.append(int(strbufs[i]));\n strbuf = input(\"\");\n strbufs = strbuf.split();\n buf2 = [];\n for i in range(buf[0]):\n buf2.append(int(strbufs[i]));\n if buf[0] == 2:\n ... | def main22():
strbuf = input("");
strbufs = strbuf.split();
buf = [];
for i in range(2):
buf.append(int(strbufs[i]));
strbuf = input("");
strbufs = strbuf.split();
buf2 = [];
for i in range(buf[0]):
buf2.append(int(strbufs[i]));
if buf[0] == 2:
if buf2[0] + bu... |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
14,
2,
39,
17,
17,
17,
4,
13,
13,
4,
13,
17,
4,
13,
17,
10,
13,
13
] | [
[
4,
3
],
[
3,
12
],
[
32,
14
],
[
33,
24
],
[
32,
33
]
] | [
"lst = [int(a) for a in input().split()]\nif [5,5,7] == sorted(lst):\n print(\"YES\")\nelse:\n print(\"NO\")",
"int(a) for a in input().split()",
"for a in input().split()",
"a",
"input().split()",
"().split",
"()",
"input",
"split",
"for a in input().split()",
"int(a)",
"int",
"a",
"lst... | lst = [int(a) for a in input().split()]
if [5,5,7] == sorted(lst):
print("YES")
else:
print("NO") |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
14,
2,
2,
4,
18,
13,
13,
17,
17,
2,
4,
18,
13,
13,
17,
17,
4,
13,
17,
4,
13,
17,
10,
13,
13
] | [
[
4,
3
],
[
3,
12
],
[
39,
14
],
[
40,
21
],
[
40,
28
],
[
39,
40
]
] | [
"s_list=[int(i) for i in input().split()]\n\nif s_list.count(5)==2 and s_list.count(7)==1:\n print(\"YES\")\n \nelse:\n print(\"NO\")",
"int(i) for i in input().split()",
"for i in input().split()",
"i",
"input().split()",
"().split",
"()",
"input",
"split",
"for i in input().split()",
... | s_list=[int(i) for i in input().split()]
if s_list.count(5)==2 and s_list.count(7)==1:
print("YES")
else:
print("NO") |
[
7,
0,
13,
4,
13,
4,
18,
4,
13,
13,
14,
2,
2,
4,
18,
13,
13,
17,
17,
2,
4,
18,
13,
13,
17,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13
] | [
[
33,
2
],
[
34,
15
],
[
34,
22
],
[
33,
34
]
] | [
"s=list(input().split())\nif s.count(\"5\")==2 and s.count(\"7\")==1:\n print(\"YES\")\nelse:\n print(\"NO\")",
"s=list(input().split())",
"s",
"list(input().split())",
"list",
"input().split()",
"().split",
"()",
"input",
"split",
"if s.count(\"5\")==2 and s.count(\"7\")==1:\n print(\"... | s=list(input().split())
if s.count("5")==2 and s.count("7")==1:
print("YES")
else:
print("NO")
|
[
7,
0,
13,
4,
13,
0,
13,
4,
18,
13,
13,
4,
18,
13,
13,
14,
2,
13,
39,
17,
17,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13
] | [
[
29,
2
],
[
32,
6
],
[
30,
9
],
[
33,
13
],
[
30,
13
],
[
33,
17
],
[
30,
17
],
[
29,
30
],
[
32,
33
]
] | [
"form = input()\nform = form.split()\nform.sort()\n\nif form == [\"5\",\"5\",\"7\"]:\n print(\"YES\")\nelse:\n print(\"NO\")",
"form = input()",
"form",
"input()",
"input",
"form = form.split()",
"form",
"form.split()",
"form.split",
"form",
"split",
"form.sort()",
"form.sort",
"form",
... | form = input()
form = form.split()
form.sort()
if form == ["5","5","7"]:
print("YES")
else:
print("NO")
|
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
14,
2,
13,
39,
17,
17,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13
] | [
[
35,
2
],
[
32,
14
],
[
36,
17
],
[
33,
20
],
[
36,
20
],
[
32,
33
],
[
35,
36
]
] | [
"L=list(map(int,input().split()))\nL=sorted(L)\nif L==[5,5,7]:\n print(\"YES\")\nelse:\n print(\"NO\")",
"L=list(map(int,input().split()))",
"L",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"L=... | L=list(map(int,input().split()))
L=sorted(L)
if L==[5,5,7]:
print("YES")
else:
print("NO") |
[
7,
15,
13,
15,
13,
15,
13,
15,
13,
15,
15,
15,
12,
13,
12,
13,
12,
13,
12,
13,
12,
13,
12,
13,
12,
13,
23,
13,
23,
13,
4,
18,
13,
13,
2,
17,
17,
0,
13,
2,
2,
17,
17,
17,
0,
13,
4,
13,
4,
18,
13,
13,
14,
2,
13... | [
[
27,
27
],
[
29,
29
],
[
87,
38
],
[
66,
45
],
[
76,
47
],
[
67,
50
],
[
67,
54
],
[
66,
67
],
[
87,
88
]
] | [
"import sys\nimport math\nimport itertools\nimport bisect\nfrom copy import copy\nfrom collections import deque,Counter\nfrom decimal import Decimal\ndef s(): return input()\ndef i(): return int(input())\ndef S(): return input().split()\ndef I(): return map(int,input().split())\ndef L(): return list(input().split()... | import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): retur... |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
14,
2,
2,
2,
13,
13,
13,
17,
4,
13,
17,
14,
2,
2,
2,
13,
13,
13,
2,
2,
17,
17,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
49,
2
],
[
49,
11
],
[
49,
12
],
[
44,
17
],
[
50,
18
],
[
47,
19
],
[
44,
28
],
[
50,
29
],
[
47,
30
],
[
49,
44
],
[
49,
47
],
[
49,
50
]
] | [
"a,b,c=map(int,input().split())\nif a*b*c==256:\n print(\"YES\")\n\nif a*b*c==5*5*7:\n print(\"YES\")\nelse:\n print(\"NO\")",
"a,b,c=map(int,input().split())",
"a",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"b",
"c",
"if a*b*... | a,b,c=map(int,input().split())
if a*b*c==256:
print("YES")
if a*b*c==5*5*7:
print("YES")
else:
print("NO") |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
14,
2,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
4,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
4,
13,
17,
4,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
4,
13,
17,
4,
13,
17,
... | [
[
63,
2
],
[
63,
11
],
[
63,
12
],
[
58,
15
],
[
64,
20
],
[
61,
23
],
[
64,
31
],
[
61,
34
],
[
64,
45
],
[
61,
48
],
[
63,
58
],
[
63,
61
],
[
63,
64
]
] | [
"a, b, c = map(int, input().split())\nif a == 5:\n if b == 5 and c == 7:\n print('YES')\n elif b == 7 and c == 5:\n print('YES')\n else:\n print('NO')\nelse:\n if b == 5 and c == 5:\n print('YES')\n else:\n print('NO')",
"a, b, c = map(int, input().split())",
"a",
"map(int, input().split()... | a, b, c = map(int, input().split())
if a == 5:
if b == 5 and c == 7:
print('YES')
elif b == 7 and c == 5:
print('YES')
else:
print('NO')
else:
if b == 5 and c == 5:
print('YES')
else:
print('NO') |
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
13,
13,
14,
2,
2,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13
] | [
[
43,
2
],
[
46,
14
],
[
44,
17
],
[
47,
23
],
[
47,
28
],
[
47,
33
],
[
43,
44
],
[
46,
47
]
] | [
"ward = list(map(int, input().split()))\n\nward_sorted = sorted(ward)\n\nif (ward_sorted[0]==5) & (ward_sorted[1]==5) & (ward_sorted[2]==7):\n print('YES')\nelse:\n print('NO')",
"ward = list(map(int, input().split()))",
"ward",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",... | ward = list(map(int, input().split()))
ward_sorted = sorted(ward)
if (ward_sorted[0]==5) & (ward_sorted[1]==5) & (ward_sorted[2]==7):
print('YES')
else:
print('NO')
|
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
14,
2,
13,
39,
17,
17,
17,
4,
13,
17,
4,
13,
14,
2,
13,
39,
17,
17,
17,
4,
13,
17,
4,
13,
14,
2,
13,
39,
17,
17,
17,
4,
13,
17,
4,
13,
4,
13,
17,
10,
4,
13
] | [
[
53,
2
],
[
54,
15
],
[
54,
27
],
[
54,
39
],
[
53,
54
]
] | [
"abc = list(map(int,input().split()))\n\nif abc == [5,5,7]:\n print('YES')\n exit()\nif abc == [7,5,5]:\n print('YES')\n exit()\nif abc == [5,7,5]:\n print('YES')\n exit()\nprint('NO')",
"abc = list(map(int,input().split()))",
"abc",
"list(map(int,input().split()))",
"list",
"map(int,inp... | abc = list(map(int,input().split()))
if abc == [5,5,7]:
print('YES')
exit()
if abc == [7,5,5]:
print('YES')
exit()
if abc == [5,7,5]:
print('YES')
exit()
print('NO')
|
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
... | [
[
106,
2
],
[
106,
11
],
[
106,
12
],
[
79,
14
],
[
91,
17
],
[
107,
21
],
[
97,
24
],
[
107,
28
],
[
103,
31
],
[
77,
35
],
[
85,
38
],
[
77,
42
],
[
82,
45
],
... | [
"A,B,C = map(int,input().split())\nsev = 0\nfiv = 0\n\nif A == 7 :\n sev += 1\nelif A == 5:\n fiv += 1\nif B == 7:\n sev += 1\nelif B == 5:\n fiv += 1\nif C == 7:\n sev += 1\nelif C == 5:\n fiv += 1\nif sev == 1 and fiv == 2:\n print(\"YES\")\nelse:\n print(\"NO\")\n\n",
"A,B,C = map(int,input().split())"... | A,B,C = map(int,input().split())
sev = 0
fiv = 0
if A == 7 :
sev += 1
elif A == 5:
fiv += 1
if B == 7:
sev += 1
elif B == 5:
fiv += 1
if C == 7:
sev += 1
elif C == 5:
fiv += 1
if sev == 1 and fiv == 2:
print("YES")
else:
print("NO")
|
[
7,
0,
13,
4,
13,
0,
13,
4,
18,
13,
13,
14,
2,
2,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
4,
13,
17,
14,
2,
2,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
4,
13,
17,
14,
2,
2,
... | [
[
81,
2
],
[
78,
6
],
[
82,
9
],
[
79,
16
],
[
79,
21
],
[
79,
26
],
[
79,
37
],
[
79,
42
],
[
79,
47
],
[
79,
58
],
[
79,
63
],
[
79,
68
],
[
78,
79
],
[
8... | [
"a = input()\nb = a.split()\n\nif b[0]==\"5\" and b[1]==\"5\" and b[2]==\"7\":\n print(\"YES\")\nelif b[0]==\"5\" and b[1]==\"7\" and b[2]==\"5\":\n print(\"YES\")\nelif b[0]==\"7\" and b[1]==\"5\" and b[2]==\"5\":\n print(\"YES\")\nelse:\n print(\"NO\")",
"a = input()",
"a",
"input()",
"input",
"b = ... | a = input()
b = a.split()
if b[0]=="5" and b[1]=="5" and b[2]=="7":
print("YES")
elif b[0]=="5" and b[1]=="7" and b[2]=="5":
print("YES")
elif b[0]=="7" and b[1]=="5" and b[2]=="5":
print("YES")
else:
print("NO") |
[
7,
0,
13,
4,
18,
4,
13,
13,
0,
13,
4,
18,
13,
13,
17,
0,
13,
4,
18,
13,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
37,
2
],
[
40,
9
],
[
38,
12
],
[
43,
16
],
[
38,
19
],
[
41,
25
],
[
44,
28
],
[
37,
38
],
[
40,
41
],
[
43,
44
]
] | [
"MM = input().split()\na = MM.count('5')\nb = MM.count('7')\nif a ==2 and b ==1:\n print('YES')\nelse:\n print('NO')",
"MM = input().split()",
"MM",
"input().split()",
"().split",
"()",
"input",
"split",
"a = MM.count('5')",
"a",
"MM.count('5')",
"MM.count",
"MM",
"count",
"'5'",
"b ... | MM = input().split()
a = MM.count('5')
b = MM.count('7')
if a ==2 and b ==1:
print('YES')
else:
print('NO') |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
14,
2,
2,
2,
13,
13,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
34,
2
],
[
34,
11
],
[
34,
12
],
[
32,
17
],
[
29,
18
],
[
35,
19
],
[
34,
29
],
[
34,
32
],
[
34,
35
]
] | [
"A,B,C=map(int,input().split())\n\nif A+B+C==17:\n print('YES')\nelse:\n print('NO')",
"A,B,C=map(int,input().split())",
"A",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"B",
"C",
"if A+B+C==17:\n print('YES')\nelse:\n print(... | A,B,C=map(int,input().split())
if A+B+C==17:
print('YES')
else:
print('NO') |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
... | [
[
103,
2
],
[
103,
11
],
[
103,
12
],
[
76,
14
],
[
85,
17
],
[
89,
21
],
[
79,
24
],
[
89,
28
],
[
97,
31
],
[
104,
35
],
[
82,
38
],
[
104,
42
],
[
100,
45
],
... | [
"a, b, c = map(int, input().split())\n\nn_5 = 0\nn_7 = 0\n\nif a == 5:\n n_5 +=1\nelif a == 7:\n n_7 +=1\n\nif b == 5:\n n_5 +=1\nelif b == 7:\n n_7 +=1\n\nif c == 5:\n n_5 +=1\nelif c == 7:\n n_7 +=1\n\nif n_5 == 2 and n_7 == 1:\n print(\"YES\")\nelse:\n print(\"NO\")",
"a, b, c = map(int... | a, b, c = map(int, input().split())
n_5 = 0
n_7 = 0
if a == 5:
n_5 +=1
elif a == 7:
n_7 +=1
if b == 5:
n_5 +=1
elif b == 7:
n_7 +=1
if c == 5:
n_5 +=1
elif c == 7:
n_7 +=1
if n_5 == 2 and n_7 == 1:
print("YES")
else:
print("NO") |
[
7,
12,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
39,
13,
13,
13,
14,
2,
4,
13,
13,
39,
17,
17,
17,
4,
13,
17,
4,
13,
17,
14,
2,
13,
17,
4,
13,
10,
12,
13
] | [
[
5,
4
],
[
5,
13
],
[
5,
14
],
[
17,
16
],
[
16,
25
],
[
44,
41
]
] | [
"def main():\n a,b,c=map(int,input().split())\n li=[a,b,c]\n if sorted(li)==[5,5,7]:\n print('YES')\n else:\n print('NO')\n \nif __name__==\"__main__\":\n main()",
"def main():\n a,b,c=map(int,input().split())\n li=[a,b,c]\n if sorted(li)==[5,5,7]:\n print('YES')\n else:\n print('NO')\n ",
... | def main():
a,b,c=map(int,input().split())
li=[a,b,c]
if sorted(li)==[5,5,7]:
print('YES')
else:
print('NO')
if __name__=="__main__":
main() |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
14,
2,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13,
10,
2,
13,
10,
4,
13
] | [
[
40,
2
],
[
40,
11
],
[
40,
12
],
[
37,
14
],
[
41,
17
],
[
32,
18
],
[
35,
19
],
[
38,
22
],
[
40,
32
],
[
40,
35
],
[
37,
38
],
[
40,
41
]
] | [
"a, b, c = map(int, input().split())\n\nd = a + b + c\n\nif d == 17:\n print('YES')\nelse:\n print('NO')",
"a, b, c = map(int, input().split())",
"a",
"map(int, input().split())",
"map",
"int",
"input().split()",
"().split",
"()",
"input",
"split",
"b",
"c",
"d = a + b + c",
"d",
"a ... | a, b, c = map(int, input().split())
d = a + b + c
if d == 17:
print('YES')
else:
print('NO') |
[
7,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
13,
14,
2,
2,
13,
17,
17,
0,
13,
13,
14,
2,
2,
13,
17,
17,
0,
13,
13,
14,
2,
13,
17,
4,
13,
17,
4,
13,
17,
10,
... | [
[
62,
2
],
[
62,
11
],
[
62,
12
],
[
68,
14
],
[
63,
19
],
[
63,
22
],
[
74,
25
],
[
63,
26
],
[
57,
30
],
[
71,
34
],
[
57,
35
],
[
60,
39
],
[
65,
43
],
[
... | [
"A,B,C=map(int,input().split())\nsum = 0\nif A == 5 or A ==7:\n sum += A\n if B ==5 or 7:\n sum += B\n if C ==5 or 7:\n sum += C\n if sum == 17:\n print(\"YES\")\n else:\n print(\"NO\")",
"A,B,C=map(int,input().split())",
"A",
"map(int,input().split())",
"map",
"int",
... | A,B,C=map(int,input().split())
sum = 0
if A == 5 or A ==7:
sum += A
if B ==5 or 7:
sum += B
if C ==5 or 7:
sum += C
if sum == 17:
print("YES")
else:
print("NO") |
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
4,
18,
13,
13,
17,
0,
13,
4,
18,
13,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13,
10,
4,
13,
10,
4,
13
] | [
[
42,
2
],
[
48,
14
],
[
43,
17
],
[
45,
21
],
[
43,
24
],
[
49,
30
],
[
46,
33
],
[
42,
43
],
[
45,
46
],
[
48,
49
]
] | [
"ABC=list(map(int,input().split()))\nfive=ABC.count(5)\nseven=ABC.count(7)\nif (five==2)&(seven==1):\n print(\"YES\")\nelse:\n print(\"NO\")",
"ABC=list(map(int,input().split()))",
"ABC",
"list(map(int,input().split()))",
"list",
"map(int,input().split())",
"map",
"int",
"input().split()",
"().s... | ABC=list(map(int,input().split()))
five=ABC.count(5)
seven=ABC.count(7)
if (five==2)&(seven==1):
print("YES")
else:
print("NO") |
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
28,
13,
13,
4,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
13,
3,
28,
13,
13,
4,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
13,
3,
28,
13,
13,
4,
13,
13,
14,
2,
13,
17,
4,... | [
[
72,
2
],
[
73,
18
],
[
73,
25
],
[
73,
34
],
[
73,
41
],
[
73,
50
],
[
73,
57
],
[
73,
67
],
[
72,
73
]
] | [
"clause_list = list(map(int, input().split()))\n\nfor index, clause in enumerate(clause_list):\n if clause == 5:\n clause_list.pop(index)\n break\n\nfor index, clause in enumerate(clause_list):\n if clause == 7:\n clause_list.pop(index)\n break\n\nfor index, clause in enumerate(clause_list):\n if cla... | clause_list = list(map(int, input().split()))
for index, clause in enumerate(clause_list):
if clause == 5:
clause_list.pop(index)
break
for index, clause in enumerate(clause_list):
if clause == 7:
clause_list.pop(index)
break
for index, clause in enumerate(clause_list):
if clause == 5:
clau... |
[
7,
0,
13,
4,
13,
14,
2,
2,
4,
18,
13,
13,
17,
17,
2,
4,
18,
13,
13,
17,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13
] | [
[
28,
2
],
[
29,
10
],
[
29,
17
],
[
28,
29
]
] | [
"# coding: utf-8\n# Your code here!\n\nl = input()\nif l.count(\"5\") == 2 and l.count(\"7\") == 1:\n print(\"YES\")\nelse:\n print(\"NO\")",
"l = input()",
"l",
"input()",
"input",
"if l.count(\"5\") == 2 and l.count(\"7\") == 1:\n print(\"YES\")\nelse:\n print(\"NO\")",
"l.count(\"5\") == ... | # coding: utf-8
# Your code here!
l = input()
if l.count("5") == 2 and l.count("7") == 1:
print("YES")
else:
print("NO") |
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
4,
18,
13,
13,
14,
2,
2,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
2,
18,
13,
17,
17,
4,
13,
17,
4,
13,
17,
10,
4,
13
] | [
[
42,
2
],
[
43,
15
],
[
43,
22
],
[
43,
27
],
[
43,
32
],
[
42,
43
]
] | [
"arr = list(map(int, input().split()))\narr.sort()\nif (arr[0] == 5) and (arr[1] == 5) and (arr[2] == 7):\n print(\"YES\")\nelse:\n print(\"NO\")",
"arr = list(map(int, input().split()))",
"arr",
"list(map(int, input().split()))",
"list",
"map(int, input().split())",
"map",
"int",
"input().spl... | arr = list(map(int, input().split()))
arr.sort()
if (arr[0] == 5) and (arr[1] == 5) and (arr[2] == 7):
print("YES")
else:
print("NO") |
[
7,
0,
13,
4,
13,
4,
13,
0,
13,
4,
13,
13,
0,
13,
17,
0,
13,
17,
28,
13,
13,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
4,
13,
17,
4,
13,
17,
10,
17,
13,
10,
17,
13,
10,... | [
[
59,
2
],
[
62,
8
],
[
60,
11
],
[
65,
13
],
[
56,
16
],
[
20,
19
],
[
63,
19
],
[
19,
23
],
[
50,
26
],
[
19,
30
],
[
53,
33
],
[
51,
38
],
[
66,
38
],
[
... | [
"a=str(input())\nalist=list(a)\ncount7=0\ncount5=0\nfor x in alist:\n if x==\"7\":\n count7+=1\n if x==\"5\":\n count5+=1\n else:\n pass\nif count7==1 and count5==2:\n print(\"YES\")\nelse:\n print(\"NO\")",
"a=str(input())",
"a",
"str(input())",
"str",
"input()",
"in... | a=str(input())
alist=list(a)
count7=0
count5=0
for x in alist:
if x=="7":
count7+=1
if x=="5":
count5+=1
else:
pass
if count7==1 and count5==2:
print("YES")
else:
print("NO") |
[
7,
12,
13,
0,
13,
4,
13,
13,
4,
18,
4,
13,
13,
13,
13,
0,
13,
39,
4,
18,
13,
13,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
13,
14,
2,
2,
4,
18,
13,
13,
17,
17,
2,
4,
18,
13,
13,
17,
17,
4,
13,
17,
4,
13,
17,
14... | [
[
5,
4
],
[
5,
13
],
[
5,
14
],
[
17,
16
],
[
16,
20
],
[
4,
22
],
[
16,
25
],
[
13,
27
],
[
16,
30
],
[
14,
32
],
[
16,
38
],
[
16,
45
],
[
63,
60
]
] | [
"def main():\n a, b, c = map(int, input().split())\n list = []\n list.append(a)\n list.append(b)\n list.append(c)\n\n if list.count(5) == 2 and list.count(7) == 1 :\n print(\"YES\")\n else :\n print(\"NO\")\n\nif __name__ == '__main__':\n main()",
"def main():\n a, b, c = ... | def main():
a, b, c = map(int, input().split())
list = []
list.append(a)
list.append(b)
list.append(c)
if list.count(5) == 2 and list.count(7) == 1 :
print("YES")
else :
print("NO")
if __name__ == '__main__':
main()
|
[
7,
0,
13,
4,
13,
4,
13,
13,
4,
18,
4,
13,
13,
0,
13,
39,
17,
17,
28,
13,
4,
13,
17,
14,
2,
18,
13,
13,
17,
0,
18,
13,
17,
17,
14,
2,
18,
13,
13,
17,
0,
18,
13,
17,
17,
14,
2,
2,
18,
13,
17,
17,
2,
18,
13,
1... | [
[
64,
2
],
[
67,
14
],
[
20,
19
],
[
65,
26
],
[
19,
27
],
[
33,
30
],
[
68,
31
],
[
65,
37
],
[
19,
38
],
[
44,
41
],
[
68,
42
],
[
68,
49
],
[
68,
54
],
[
... | [
"a=list(map(int,input().split()))\nlst=[0,0]\nfor i in range(3):\n if a[i]==5:\n lst[0]+=1\n elif a[i]==7:\n lst[1]+=1\nif lst[0]==2 and lst[1]==1:\n print(\"YES\")\nelse:\n print(\"NO\")",
"a=list(map(int,input().split()))",
"a",
"list(map(int,input().split()))",
"list",
"map(in... | a=list(map(int,input().split()))
lst=[0,0]
for i in range(3):
if a[i]==5:
lst[0]+=1
elif a[i]==7:
lst[1]+=1
if lst[0]==2 and lst[1]==1:
print("YES")
else:
print("NO") |
[
7,
41,
28,
13,
4,
18,
4,
13,
13,
4,
4,
13,
13,
0,
13,
13,
0,
13,
17,
0,
13,
17,
14,
2,
18,
13,
17,
17,
0,
13,
17,
14,
2,
18,
13,
17,
17,
0,
13,
17,
14,
2,
18,
13,
17,
17,
0,
13,
17,
14,
2,
18,
13,
17,
17,
0... | [
[
4,
3
],
[
3,
12
],
[
115,
14
],
[
103,
17
],
[
97,
20
],
[
116,
25
],
[
109,
29
],
[
116,
34
],
[
100,
38
],
[
116,
43
],
[
91,
47
],
[
116,
52
],
[
106,
56
],
... | [
"n = [int(i) for i in input().split()]\nseven = 0\nfive = 0\nif n[0] == 5:\n five += 1\nif n[0] == 7:\n seven += 1\nif n[1] == 5:\n five += 1\nif n[1] == 7:\n seven += 1\nif n[2] == 5:\n five += 1\nif n[2] == 7:\n seven += 1\nif five == 2 and seven == 1:\n print(\"YES\")\nelse:\n print(\"NO\... | n = [int(i) for i in input().split()]
seven = 0
five = 0
if n[0] == 5:
five += 1
if n[0] == 7:
seven += 1
if n[1] == 5:
five += 1
if n[1] == 7:
seven += 1
if n[2] == 5:
five += 1
if n[2] == 7:
seven += 1
if five == 2 and seven == 1:
print("YES")
else:
print("NO") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.