buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, l;
cin >> n >> l;
long long a[n], sum = 0, t;
for (int i = 0; i < n; i++) {
cin >> a[i];
if (i) {
if (sum < a[i] + a[i - 1]) {
sum = a[i] + a[i - 1];
t = i;
}
}
}
if (sum < l) {
cout << "Impo... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, l;
cin >> n >> l;
long long a[n], sum = 0, t;
for (int i = 0; i < n; i++) {
cin >> a[i];
if (i) {
if (sum < a[i] + a[i - 1]) {
sum = a[i] + a[i - 1];
t = i;
}
}
}
if (sum < l) {
cout << "Impo... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 7, 8, 9, 0, 1, 0, ... | 1 | 165 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define ggr \
getchar(); \
getchar(); ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define ggr \
getchar(); \
getchar(); ... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20], ["+", 8, 9, 0... | 1 | 189 |
#include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
int main() {
long N, L;
cin >> N >> L;
long *a = new long[N];
long maxL = 0, maxI = 0;
long l = 0;
cin >> a[0];
for (int i = 1; i < N; i++) {
cin >> a[i];
l += a[i];
l -= ... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <stdlib.h>
#include <string.h>
using namespace std;
int main() {
long N, L;
cin >> N >> L;
long *a = new long[N];
cin >> a[0];
long maxL = 0, maxI = 0;
long l = a[0];
for (int i = 1; i < N; i++) {
cin >> a[i];
l += a[i];
... | [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 8, 9, 0, 1, 0, 16, 12, 69, 28, 22], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 70], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 13], ["+", 0, 1, 0, 16, 12, 69, 341, 342, 0, 73], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, ... | 1 | 193 |
#pragma once
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ... | #pragma once
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ... | [["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 415 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, L;
cin >> N >> L;
vector<int> a(N + 1);
for (int i = 1; i <= N; i++)
cin >> a[i];
for (int i = 1; i <= N - 1; i++) {
if (a[i] + a[i + 1] >= L) {
for (int j = 1; j < i; j++)
cout << j << ... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, L;
cin >> N >> L;
vector<int> a(N + 1);
for (int i = 1; i <= N; i++)
cin >> a[i];
for (int i = 1; i <= N - 1; i++) {
if (a[i] + a[i + 1] >= L) {
puts("Possible");
for (int j = 1; j < i; j+... | [["+", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ... | 1 | 151 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, L;
cin >> N >> L;
vector<int> a(N + 1);
for (int i = 1; i <= N; i++)
cin >> a[i];
for (int i = 1; i <= N - 1; i++) {
if (a[i] + a[i + 1] >= L) {
for (int j = 1; j < i; j++)
cout << j << ... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, L;
cin >> N >> L;
vector<int> a(N + 1);
for (int i = 1; i <= N; i++)
cin >> a[i];
for (int i = 1; i <= N - 1; i++) {
if (a[i] + a[i + 1] >= L) {
cout << "Possible" << endl;
for (int j = 1;... | [["+", 64, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 1 | 151 |
import sys
input = sys.stdin.readline
inf = float("inf")
n,L = map(int,input().split())
a = tuple(map(int,input().split()))
for i in range(1,n):
if a[i]+a[i-1]>=L:
print('Possible')
for j in range(i):
print(j)
for j in range(i+1,n):
print(j)
print(i)
... | import sys
input = sys.stdin.readline
inf = float("inf")
n,L = map(int,input().split())
a = tuple(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)
... | [["+", 64, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 64, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 64, ... | 5 | 122 |
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(s+1,N-1):
L.append(i+1)
L.append(... | 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... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22]] | 5 | 161 |
/*
_,add8ba,
,d888888888b,
d8888888888888b _,ad8ba,_
d888888888888888) ,d888888888b,
I8888888888888888 _________ ,8888888888888b
... | /*
_,add8ba,
,d888888888b,
d8888888888888b _,ad8ba,_
d888888888888888) ,d888888888b,
I8888888888888888 _________ ,8888888888888b
... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 47], ["-", 0, 57, 64, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 57, 64... | 1 | 549 |
#include <bits/stdc++.h>
using namespace std;
/*
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
using cint = cpp_int;
*/
// Define
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const ll dx[4] = {1, 0, -1, 0};
const ll dy[4] = {0, 1, 0, -1};
const ll ... | #include <bits/stdc++.h>
using namespace std;
/*
#include <boost/multiprecision/cpp_int.hpp>
using namespace boost::multiprecision;
using cint = cpp_int;
*/
// Define
using ll = long long;
using ull = unsigned long long;
using ld = long double;
const ll dx[4] = {1, 0, -1, 0};
const ll dy[4] = {0, 1, 0, -1};
const ll ... | [["-", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 16, 31, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 31, 2, 63, 22], ["+", 0, 1, 0, 16, 31, 16, 31, 2, 63, 22], ["-", 0, 16, 31, 16, 31, 2, 3, 4, 0, 21], ["-", 31, 16, 31, 2, 3, 4, 0, 1... | 1 | 1,278 |
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define P pair<int, int>
const LL inf = 0x3f3f3f3f;
const LL mod = 1e9 + 7;
const LL N = 1e5 + 10;
template <typename tp> inline void read(tp &x) {
x = 0;
char c = getchar();
int f = 0;
for (; c > '9' || c < '0'; f |= (c == '-'), c = getchar())
... | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define P pair<int, int>
const LL inf = 0x3f3f3f3f;
const LL mod = 1e9 + 7;
const LL N = 1e5 + 10;
template <typename tp> inline void read(tp &x) {
x = 0;
char c = getchar();
int f = 0;
for (; c > '9' || c < '0'; f |= (c == '-'), c = getchar())
... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22]... | 1 | 326 |
/* ---------- STL Libraries ---------- */
// IO library
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iostream>
// algorithm library
#include <algorithm>
#include <cmath>
#include <numeric>
#include <random>
// container library
#include <array>
#include <bitset>
#include <deque>
#i... | /* ---------- STL Libraries ---------- */
// IO library
#include <cstdio>
#include <fstream>
#include <iomanip>
#include <ios>
#include <iostream>
// algorithm library
#include <algorithm>
#include <cmath>
#include <numeric>
#include <random>
// container library
#include <array>
#include <bitset>
#include <deque>
#i... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 57, 64, 9, 0, 7, 10, 43, 0, 35], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["-", 64, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 0, 7, ... | 1 | 272 |
/**
SXR0aXAkI0JwbXptI3FhI3Z3I293bCNqY2IjUG0jMCNicG0jVHFkcXZvLyNCcG0jQW10bjBhY2phcWFicXZvLyNNYm16dml0MSNWdyNhdGN1am16I2tpdiNhbXF9bSNQcXUjVnd6I0F0bW14MSNQcWEjaXptI2l0dCNicHF2b2EjUXYjYnBtI3BtaWRtdmEjaXZsI3d2I21pemJwMSNFcHcjcWEjYnBtem0ja2l2I3F2Ym16a21sbSNRdiNQcWEjeHptYW12a20jbXtrbXhiI0lhI3BtI3htenVxYmJtYnBHI1BtI3N2d2VtYnAj... | /**
SXR0aXAkI0JwbXptI3FhI3Z3I293bCNqY2IjUG0jMCNicG0jVHFkcXZvLyNCcG0jQW10bjBhY2phcWFicXZvLyNNYm16dml0MSNWdyNhdGN1am16I2tpdiNhbXF9bSNQcXUjVnd6I0F0bW14MSNQcWEjaXptI2l0dCNicHF2b2EjUXYjYnBtI3BtaWRtdmEjaXZsI3d2I21pemJwMSNFcHcjcWEjYnBtem0ja2l2I3F2Ym16a21sbSNRdiNQcWEjeHptYW12a20jbXtrbXhiI0lhI3BtI3htenVxYmJtYnBHI1BtI3N2d2VtYnAj... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 20], ["+", 64, ... | 1 | 434 |
#include <iostream>
using namespace std;
int main() {
int n, l, p, k = -1;
scanf("%d%d%d", &n, &l, &p);
for (int i = 1; i < n; i++) {
int a;
scanf("%d", &a);
if (p + a >= l)
k = i;
p = a;
}
if (k == -1)
printf("Impossible");
else {
printf("Possible\n");
for (int i = 1; i < ... | #include <iostream>
using namespace std;
int main() {
int n, l, p, k = -1;
scanf("%d%d%d", &n, &l, &p);
for (int i = 1; i < n; i++) {
int a;
scanf("%d", &a);
if (p + a >= l)
k = i;
p = a;
}
if (k == -1)
printf("Impossible");
else {
printf("Possible\n");
for (int i = 1; i < ... | [["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 57, 75, 76, 0, 9, 0, 7, 0, 25], ["-", 75, 76, 0, 9, 0, 7, 8, 9, 0, 45], ["-", 0, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["-", 0, 7, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 33... | 1 | 150 |
#include <bits/stdc++.h>
#include <unordered_set>
using namespace std;
#define ll long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repeat(i, s, n) for (int(i) = s; (i) < (n); (i)++)
#define revrep(i, n) for (int(i) = (n)-1; i >= 0; i--)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
... | #include <bits/stdc++.h>
#include <unordered_set>
using namespace std;
#define ll long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repeat(i, s, n) for (int(i) = s; (i) < (n); (i)++)
#define revrep(i, n) for (int(i) = (n)-1; i >= 0; i--)
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 9, 0, ... | 1 | 205 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repp(i, s, e) for (int i = (s); i < (e); i++)
#define all(x) x.begin(), x.end()
#define endl "\n"
void use_cio() {
ios_base::sync_with_stdio(0);
cin.tie(0);
}
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repp(i, s, e) for (int i = (s); i < (e); i++)
#define all(x) x.begin(), x.end()
#define endl "\n"
void use_cio() {
ios_base::sync_with_stdio(0);
cin.tie(0);
}
... | [["-", 0, 1, 0, 16, 31, 16, 31, 2, 63, 22], ["+", 8, 9, 0, 57, 64, 9, 0, 7, 0, 88], ["+", 0, 57, 64, 9, 0, 7, 10, 43, 39, 40], ["-", 0, 16, 31, 16, 31, 2, 3, 4, 0, 21], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 31, 22], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["+", 64, 9, 0, 7, 10,... | 1 | 293 |
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define llong long long
using namespace std;
const int N = 1e5;
llong a[N + 3];
int n;
llong m;
int main() {
scanf("%d%lld", &n, &m);
for (int i = 1; i <= n; i++)
scanf("%lld", &a[i]);
llong mx = 0ll;
int t = 0;
for (int i = 1; i < n; i++) {
if... | #include <cstdio>
#include <cstdlib>
#include <cstring>
#define llong long long
using namespace std;
const int N = 1e5;
llong a[N + 3];
int n;
llong m;
int main() {
scanf("%d%lld", &n, &m);
for (int i = 1; i <= n; i++)
scanf("%lld", &a[i]);
llong mx = a[1] + a[2];
int t = 1;
for (int i = 1; i < n; i++) ... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 43, 49, 50, 51, 16, 31, 69, 28, 22], ["+", 49, 50, 51, 16, 31, 69, 341, 342, 0, 70], ["+", 49, 50, 51, 16, 31, 69, 341, 342, 0, 13], ["+", 49, 50, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 16, 12, 69, 28, 2... | 1 | 231 |
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
using lint = long long;
lint a[N];
int main() {
int n;
lint l;
scanf("%d%lld", &n, &l);
for (int i = 1; i <= n; i++) {
scanf("%lld\n", a + i);
}
lint t = 0;
int idx = 0;
for (int i = 1; i < n; i... | #include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
const int N = 1e5 + 5;
using lint = long long;
lint a[N];
int main() {
int n;
lint l;
scanf("%d%lld", &n, &l);
for (int i = 1; i <= n; i++) {
scanf("%lld\n", a + i);
}
lint t = 0;
int idx = 0;
for (int i = 1; i < n; i... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 20], ["+", 64, ... | 1 | 222 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <iostream>
#include <math.h>
#include <numeric>
#include <regex>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using dbl = double;
using pii = pair<int, int>;
using pl4 = pair<ll, ll>;
using vi ... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstring>
#include <iostream>
#include <math.h>
#include <numeric>
#include <regex>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
using dbl = double;
using pii = pair<int, int>;
using pl4 = pair<ll, ll>;
using vi ... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33]] | 1 | 2,474 |
#include "bits/stdc++.h"
using namespace std;
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
constexpr int MOD = 1000000007;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
constexpr int dx[4] = {1, 0, -1, 0};
constexpr int dy[4] = {0, 1, 0, -1};
in... | #include "bits/stdc++.h"
using namespace std;
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
constexpr int MOD = 1000000007;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
constexpr int dx[4] = {1, 0, -1, 0};
constexpr int dy[4] = {0, 1, 0, -1};
in... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 14, 8... | 1 | 264 |
#include <bits/stdc++.h>
#define INF 2147483647
#define INF_LL 9223372036854775807
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
int main() {
ll N, L;
cin >> N >> L;
vector<ll> a(N);
deque<ll> ans;
for (int i = 0; i < N; i++)
cin >> a[i];
ll core;
for (int i = 0;... | #include <bits/stdc++.h>
#define INF 2147483647
#define INF_LL 9223372036854775807
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
int main() {
ll N, L;
cin >> N >> L;
vector<ll> a(N);
deque<ll> ans;
for (int i = 0; i < N; i++)
cin >> a[i];
ll core;
for (int i = 0;... | [["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, ... | 1 | 241 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define FOR(i, a, b) for (int i... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define FOR(i, a, b) for (int i... | [["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["-", 0, 14, 8, 9,... | 1 | 308 |
#include <bits/stdc++.h>
#define rep(i, m, n) for (int i = m; i < (n); i++)
#define print(x) cout << (x) << endl;
#define printa(x, n) \
for (int i = 0; i < n; i++) { \
cout << (x[i]) << " "; ... | #include <bits/stdc++.h>
#define rep(i, m, n) for (int i = m; i < (n); i++)
#define print(x) cout << (x) << endl;
#define printa(x, n) \
for (int i = 0; i < n; i++) { \
cout << (x[i]) << " "; ... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 88], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32... | 1 | 370 |
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, x, y) for (ll i = x; i <= y; i++)
#define SIZE(a) ll(a.size())
#define vll ... | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cstdio>
#include <fstream>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define REP(i, x, y) for (ll i = x; i <= y; i++)
#define SIZE(a) ll(a.size())
#define vll ... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 57, 75, 76, 0, 9, 0, 9, 0, 45], ["-", 75, 76, 0, 9, 0, 9, 0, 57, 0, 121], ["-", 0, 9, 0, 9, 0, 57, 15, 339, 0, 24], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["-", 0, 9, 0, 57, 15, 3... | 1 | 289 |
#include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
// definition {{{ 1
// scaning {{{ 2
#define Scd(x) scanf("%d", &x)
#define Scd2(x, y) scanf("%d%d", &x, &y)
#define Scd3(x, y, z) scanf("%d%d%d", &x, &y, &z)
#define Scll(x) scanf("%llu", &x)
#define Scll2(x, y) scanf("%llu%llu", &x, &... | #include <bits/stdc++.h>
using namespace std;
typedef long long unsigned int ll;
// definition {{{ 1
// scaning {{{ 2
#define Scd(x) scanf("%d", &x)
#define Scd2(x, y) scanf("%d%d", &x, &y)
#define Scd3(x, y, z) scanf("%d%d%d", &x, &y, &z)
#define Scll(x) scanf("%llu", &x)
#define Scll2(x, y) scanf("%llu%llu", &x, &... | [["-", 64, 9, 0, 9, 0, 57, 64, 116, 0, 117], ["+", 64, 9, 0, 9, 0, 57, 64, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 7, 0, 88], ["+", 8, 9, 0, 57, 64, 9, 0, 7, 0, 24], ["+", 0, 57, 64, 9, 0, 7, 10, 43, 39, 40], ["+", 64, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["+", 64, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 0, 7, 10, 43, 49,... | 1 | 294 |
#include <bits/stdc++.h>
using namespace std;
const int N = 5e5;
int n, m, k;
int a[N];
int main() {
cin >> n >> m;
for (int i = 0; ++i <= n;)
scanf("%d", a + i);
for (int i = 0; ++i < n;)
if (a[i] + a[i + 1] >= m)
k = i;
if (!k)
puts("Impossible"), exit(0);
else
puts("Possible");
for... | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5;
int n, m, k;
int a[N];
int main() {
cin >> n >> m;
for (int i = 0; ++i <= n;)
scanf("%d", a + i);
for (int i = 0; ++i < n;)
if (a[i] + a[i + 1] >= m)
k = i;
if (!k)
puts("Impossible"), exit(0);
else
puts("Possible");
for... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 7, 8, 57, 0, 121], ["+", 8, 9, 0, 7, 8, 1, 0, 2, 63, 22], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 7, 8, 1, 0, 2, 3, 4, 0, 21], ["-"... | 1 | 157 |
// warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬╬╬██╬╬╬╬╬╬███
// ... | // warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬╬╬██╬╬╬╬╬╬███
// ... | [["-", 8, 9, 0, 9, 0, 57, 64, 116, 0, 117], ["+", 8, 9, 0, 9, 0, 57, 64, 93, 0, 94], ["+", 8, 9, 0, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 9, 0, 1, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 9, 0, 46], ["+", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 8, 9, 0, 14, 49, 53, 54, 5... | 1 | 337 |
#include <bits/stdc++.h>
using namespace std;
#define REP(var, n) for (decltype(n) var = 0; var < (n); var++)
#define RREP(var, n) \
for (auto var = n - 1; var != static_cast<decltype(var)>(-1); var--)
#define FOR(var, a, b) for (auto var = (a); var < (b); v... | #include <bits/stdc++.h>
using namespace std;
#define REP(var, n) for (decltype(n) var = 0; var < (n); var++)
#define RREP(var, n) \
for (auto var = n - 1; var != static_cast<decltype(var)>(-1); var--)
#define FOR(var, a, b) for (auto var = (a); var < (b); v... | [["-", 8, 9, 0, 57, 64, 9, 0, 43, 39, 40], ["-", 0, 57, 64, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 57, 64, 9, 0, 43, 49, 50, 0, 32], ["-", 64, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 64, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["-", 64, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 8, 9, 0, 57, 64, 9, 0, 43, 0, 35], ["-", 0, 57, 6... | 1 | 337 |
/* In the name of Allah */
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, L, a[N];
void readInput() {
cin >> n >> L;
for (int i = 0; i < n; i++)
cin >> a[i];
}
void solve() {
for (int i = 0; i < n - 1; i++)
if (a[i] + a[i + 1] >= L) {
cout << "Possible\n";
for (... | /* In the name of Allah */
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, L, a[N];
void readInput() {
cin >> n >> L;
for (int i = 0; i < n; i++)
cin >> a[i];
}
void solve() {
for (int i = 0; i < n - 1; i++)
if (a[i] + a[i + 1] >= L) {
cout << "Possible\n";
for (... | [["-", 64, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["-", 64, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 64, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 57, 64, 9, 0, 7, 8, 57, 0, 121], ["+", 0, 7, 8, 1, 0, 16, 31, 16, 31, 22], ["+", 0, 7, 8, 1, 0, 16, 31, 16, 17, 151], ["+", 8, 1, 0, 16... | 1 | 190 |
#include <stdio.h>
int main(void) {
int i, j, n, l, be = 0, a;
scanf("%d%d", &n, &l);
for (i = 0; i < n; ++i) {
scanf("%d", &a);
if (i) {
if (a + be >= l) {
printf("Possible\n");
for (j = 1; j < n; ++j)
if (i != j)
printf("%d\n", j);
printf("%d\n", i);
... | #include <stdio.h>
int main(void) {
int i, j, n, l, be = 0, a;
scanf("%d%d", &n, &l);
for (i = 0; i < n; ++i) {
scanf("%d", &a);
if (i) {
if (a + be >= l) {
printf("Possible\n");
for (j = 1; j < i; ++j)
printf("%d\n", j);
for (j = n - 1; j > i; --j)
print... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 57, 64, 9, 0, 7, 8, 57, 0, 121], ["+", 64, 9, 0, 7, 8, 1, 0, 2, 63, 22], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 7, 8, 1, 0, 2, 3, 4, 0, 21], ... | 1 | 143 |
#include <bits/stdc++.h>
#define For(i, j, k) for (int i = j; i <= k; ++i)
#define Forr(i, j, k) for (int i = j; i >= k; --i)
using namespace std;
typedef long long ll;
inline int read() {
int x = 0, p = 1;
char c = getchar();
for (; !isdigit(c); c = getchar())
if (c == '-')
p = -1;
for (; isdigit... | #include <bits/stdc++.h>
#define For(i, j, k) for (int i = j; i <= k; ++i)
#define Forr(i, j, k) for (int i = j; i >= k; --i)
using namespace std;
typedef long long ll;
inline int read() {
int x = 0, p = 1;
char c = getchar();
for (; !isdigit(c); c = getchar())
if (c == '-')
p = -1;
for (; isdigit... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+... | 1 | 327 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
#define rep(i, s, n) for (int i = s; i < n; i++)
#define repe(i, s, n) for (int i = s; i <= n; i++)
#define rrep(i, s, n) for (int i = (n)-1; i >= (s); i--)
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define fi first
#define se second... | #include <bits/stdc++.h>
#define int long long
using namespace std;
#define rep(i, s, n) for (int i = s; i < n; i++)
#define repe(i, s, n) for (int i = s; i <= n; i++)
#define rrep(i, s, n) for (int i = (n)-1; i >= (s); i--)
#define all(v) (v).begin(), (v).end()
#define pb push_back
#define fi first
#define se second... | [["+", 31, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 31, 69, 341, 342, 0, 73], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 15, 339, 51, 16, 31, 16, 12, 69, 28, 22], ["+", 51, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["+", 51, 16, 31, 16, 12, 69, 34... | 1 | 355 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <math.h>
using namespace std;
const int MAXN = 1e5 + 10;
int N, L;
int A[MAXN];
int main() {
register int i, j;
scanf("%d%d", &N, &L);
for (i = 1; i <= N; ++i)
scanf("%d", A + i);
for (i = 1; i < N; ++i)
if (A[i] + A... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <math.h>
using namespace std;
const int MAXN = 1e5 + 10;
int N, L;
int A[MAXN];
int main() {
register int i, j;
scanf("%d%d", &N, &L);
for (i = 0; i < N; ++i)
scanf("%d", A + i);
for (i = 0; i < N - 1; ++i)
if (A[i] ... | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 8, 57, 64, 9, 0, 7, 10, 11, 12, 13], ["+", 8, 57, 64, 9, 0,... | 1 | 193 |
#include <bits/stdc++.h>
#define maxn 500005
#define int long long
using namespace std;
inline int read() {
char x = getchar();
int lin = 0, f = 1;
while (x < '0' || x > '9') {
if (x == '-')
f = -1;
x = getchar();
}
while (x >= '0' && x <= '9') {
lin = lin * 10 + x - '0';
x = getchar();
... | #include <bits/stdc++.h>
#define maxn 500005
#define int long long
using namespace std;
inline int read() {
char x = getchar();
int lin = 0, f = 1;
while (x < '0' || x > '9') {
if (x == '-')
f = -1;
x = getchar();
}
while (x >= '0' && x <= '9') {
lin = lin * 10 + x - '0';
x = getchar();
... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 7, 8, 57, 0, 121], ["-", 8, 9, 0, 7, 8, 57, 15, 339, 0, 24], ["-", 0, 7, 8, 57, 15, 339, 51, 16, 31, 22], ["-", 0, 7, 8, 57, 15, 339, 51, 16, 17, 79], ["-", 0, 7, 8, 57, 15, 339, 51, 16, 12, 22], ["-", 8, 9, 0, 7,... | 1 | 280 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
#define all(x) x.begin(), x.end()
const ll mod = 1e9 + 7;
const ll INF = 1e9;
const ll MAXN... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long int ll;
#define all(x) x.begin(), x.end()
const ll mod = 1e9 + 7;
const ll INF = 1e9;
const ll MAXN... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 8, 9, 0, 57, 64, 9, 0, 7, 0, 88], ["+", 8, 9, 0, 57, 64, 9, 0, 7, 0, 24], ["+", 0, 57, 64, 9, 0, 7, 10, 43, 39, 40], ["+", 64, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["+", 64, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 0, 7, 10, 43, 49,... | 1 | 213 |
// waz
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)((x).size()))
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long int64;
typedef unsigned int uint;
typedef uns... | // waz
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)((x).size()))
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef long long int64;
typedef unsigned int uint;
typedef uns... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20], ["-"... | 1 | 392 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define P pair<ll, ll>
#define FOR(I, A, B) for (ll I = (A); I < (B); ++I)
const ll INF = 1e18 + 7;
const ll MOD = 1e9 + 7;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
vector<ll> ans;
ll n, l;
cin >> n >> l;
vector<ll> a(n);
FO... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define P pair<ll, ll>
#define FOR(I, A, B) for (ll I = (A); I < (B); ++I)
#define FORR(I, A, B) for (ll I = (B - 1); I >= (A); --I)
const ll INF = 1e18 + 7;
const ll MOD = 1e9 + 7;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
vector<ll... | [["+", 36, 36, 36, 36, 0, 30, 0, 112, 0, 148], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 141, 22], ["+", 36, 36, 0, 30, 0, 112, 54, 158, 0, 24], ["+", 36, 36, 0, 30, 0, 112, 54, 158, 0, 22], ["+", 36, 36, 0, 30, 0, 112, 54, 158, 0, 21], ["+", 36, 36, 0, 30, 0, 112, 54, 158, 0, 25], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 5... | 1 | 252 |
#include <algorithm>
#include <bitset> //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip> //do setprecision
#include <ios... | #include <algorithm>
#include <bitset> //UWAGA - w czasie kompilacji musi byc znany rozmiar wektora - nie mozna go zmienic
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iomanip> //do setprecision
#include <ios... | [["-", 0, 9, 0, 9, 0, 57, 64, 116, 0, 117], ["+", 0, 9, 0, 9, 0, 57, 64, 93, 0, 94], ["+", 0, 9, 0, 9, 0, 57, 64, 93, 0, 35], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 9, 0, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 9, 0, 9, 0, 1, 0,... | 1 | 254 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <typeinfo>
#include <unordered_map>
#include <vector>
... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <typeinfo>
#include <unordered_map>
#include <vector>
... | [["+", 8, 9, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 14, 8, 9, 0, 9, 0, 1, 0, 35], ["+", 64, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 64, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 217 |
#include <bits/stdc++.h>
using namespace std;
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
typedef long long LL;
int main() {
LL n, l;
cin >> n >> l;
LL now;
LL pre;
cin >> now;
for (int i = 0; i < n - 1; i++) {
pre = now;
cin >> now;
if (now + pre >= l)... | #include <bits/stdc++.h>
using namespace std;
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ? (a) : (b))
typedef long long LL;
int main() {
LL n, l;
cin >> n >> l;
LL now;
LL pre;
cin >> now;
for (int i = 0; i < n - 1; i++) {
pre = now;
cin >> now;
if (now + pre >= l)... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 57, 64, 9, 0, 7, 10, 43, 0, 35], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 57... | 1 | 172 |
/// {{{ Author: Wang, Yen-Jen
// include
#include <bits/stdc++.h>
// using
using namespace std;
// types
typedef long long ll;
typedef pair<int, int> pii;
// macro
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(), (x).end()
#define REP(i, n) for (int i = 0; i < int(n); i++)
#define REP1(i, a, b) for (int i =... | /// {{{ Author: Wang, Yen-Jen
// include
#include <bits/stdc++.h>
// using
using namespace std;
// types
typedef long long ll;
typedef pair<int, int> pii;
// macro
#define SZ(x) ((int)x.size())
#define ALL(x) (x).begin(), (x).end()
#define REP(i, n) for (int i = 0; i < int(n); i++)
#define REP1(i, a, b) for (int i =... | [["-", 31, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["-", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 31, 16, 12, 69, 341, 342, 0, 16, 17, 72], ["+", 31, 16, 12, 69, 341, 342, 0, 16, 12, 13], ["-", 75, 76, 0, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 57, 75, 76, 0, 9, 0, 7, 0, 88], ["+", 75, 76, 0, 9, 0, 7, 10, 43, 39, 40], ["... | 1 | 735 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
#define IOS \
ios_base::sync_with_stdio(0); \
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
#define IOS \
ios_base::sync_with_stdio(0); \
... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 57, 64, 9, 0, 7, 8, 57, 0, 121], ["+", 0, 7, 8, 1, 0, 16, 31, 16, 31, 22], ["+", 0, 7, 8, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 7, 8, 1, 0,... | 1 | 445 |
/*
Author: isaf27 (Ivan Safonov)
*/
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
// defines
typedef long long ll;
typedef long double ld;
#define TIME clock() * 1.0 / CLOCKS_PER_SEC
#define fastIO ios_base::sync_with_stdio(0)
#define nul point(0, 0)
#define str_to_int(stroka) atoi(str... | /*
Author: isaf27 (Ivan Safonov)
*/
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
// defines
typedef long long ll;
typedef long double ld;
#define TIME clock() * 1.0 / CLOCKS_PER_SEC
#define fastIO ios_base::sync_with_stdio(0)
#define nul point(0, 0)
#define str_to_int(stroka) atoi(str... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 8, 57, 64, 9, 0, 7, 10, 43, 0, 35], ["-", 8, 57, 64, 9, 0, 7, 15, 16, 31, 22], ["-", 8, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 57... | 1 | 766 |
#include <bits/stdc++.h>
using namespace std;
int n, l, pos, a, b;
int main() {
scanf("%d%d%d", &n, &l, &a);
for (int i = 2; i <= n; i++) {
b = a;
scanf("%d", &a);
if (a + b >= l)
pos = i - 1;
}
if (!pos)
return puts("Impossible");
puts("Possible");
for (int i = 1; i <= pos - 1; i++)... | #include <bits/stdc++.h>
using namespace std;
int n, l, pos, a, b;
int main() {
scanf("%d%d%d", &n, &l, &a);
for (int i = 2; i <= n; i++) {
b = a;
scanf("%d", &a);
if (a + b >= l)
pos = i - 1;
}
if (!pos)
return puts("Impossible"), 0;
puts("Possible");
for (int i = 1; i <= pos - 1; i... | [["+", 8, 9, 0, 57, 64, 37, 0, 34, 0, 21], ["+", 8, 9, 0, 57, 64, 37, 0, 34, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20], ["-", 0, 7, 8, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 14, 8, 9, 0, 7, 8, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, ... | 1 | 167 |
#include <algorithm>
#include <cstdio>
#define Abs(A) A > 0 ? A : -A
const int MaxN = 1e6 + 10;
int N, L, Ans, A[MaxN];
int Now;
int main() {
scanf("%d%d", &N, &L);
for (int i = 1; i <= N; i++)
scanf("%d", &A[i]);
for (int i = 1; i <= N; i++)
if (A[i] + A[i + 1] >= L) {
Now = i;
break;
}
... | #include <algorithm>
#include <cstdio>
#define Abs(A) A > 0 ? A : -A
const int MaxN = 1e6 + 10;
int N, L, Ans, A[MaxN];
int Now;
int main() {
scanf("%d%d", &N, &L);
for (int i = 1; i <= N; i++)
scanf("%d", &A[i]);
for (int i = 1; i <= N; i++)
if (A[i] + A[i + 1] >= L) {
Now = i;
break;
}
... | [["+", 0, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 0, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 0, 2, 3, 4, 0, 41, 15, 16, 17, 60], ["-", 0, 2, 3, 4, 0, 41, 15, 16, 12, 13], ["-", 64, 1, 0, 2, 3, 4, 0, 41, 0, 101], ["-", 64, 1, 0, 2, 3, 4, 0, 41, 64, 22], ["-", 64, 1, 0, 2, 3, 4, 0, 41, 0, 102], ["-", 0, 2, 3, 4, 0, 41, 7... | 1 | 226 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define F0R(i, a) FOR(i, 0, a)
#define ROF(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define R0F(i, a) ROF(i, 0, a)
using ll = long long;
using ld = long double;
ll INF = LLONG_MAX;
using vi = vector<int>;
using vll ... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define F0R(i, a) FOR(i, 0, a)
#define ROF(i, a, b) for (int i = (b)-1; i >= (a); --i)
#define R0F(i, a) ROF(i, 0, a)
using ll = long long;
using ld = long double;
ll INF = LLONG_MAX;
using vi = vector<int>;
using vll ... | [["+", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 0, 57, 64, 9, 0, 42, 0, 2, 63, 22]] | 1 | 674 |
def main():
N, L, *A = map(int, open(0).read().split())
L = [i for i,(x,y) in enumerate(zip(A, A[1:]), 1) if x+y >= L]
if L:
print("Possible")
B = [L[0]]+[i for i in range(1, N) if i != L[0]]
print(*B[::-1], sep="\n")
else:
print("Impossible")
if __name__ == "__main__":... | def main():
N, L, *A = map(int, open(0).read().split())
L = [i for i,(x,y) in enumerate(zip(A, A[1:]), 1) if x+y >= L]
if L:
print("Possible")
B = [i for i in range(L[0], N)]+[i for i in range(1,L[0])][::-1]
print(*B[::-1], sep="\n")
else:
print("Impossible")
if __name_... | [["+", 0, 1, 0, 662, 12, 657, 31, 658, 8, 22], ["+", 0, 662, 12, 657, 31, 658, 0, 659, 0, 88], ["+", 0, 662, 12, 657, 31, 658, 0, 659, 31, 22], ["+", 0, 662, 12, 657, 31, 658, 0, 659, 0, 267], ["+", 12, 657, 31, 658, 0, 659, 12, 652, 63, 22], ["+", 31, 658, 0, 659, 12, 652, 3, 4, 0, 24], ["+", 31, 658, 0, 659, 12, 652,... | 5 | 136 |
#include <bits/stdc++.h>
#define ft first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define pb(t) push_back(t)
#define pt(num) cout << num << "\n"
#define chmax(a, b) (a < b ? a = b : 0)
#define chmin(a, b) (a > b ? a = b : 0)
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ... | #include <bits/stdc++.h>
#define ft first
#define sc second
#define lb lower_bound
#define ub upper_bound
#define pb(t) push_back(t)
#define pt(num) cout << num << "\n"
#define chmax(a, b) (a < b ? a = b : 0)
#define chmin(a, b) (a > b ? a = b : 0)
#define max(a, b) ((a) > (b) ? (a) : (b))
#define min(a, b) ((a) < (b) ... | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 10, 11, 12, 16, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 15... | 1 | 318 |
//#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("fast-math")
/*#pragma GCC optimize("section-anchors")
#prag... | //#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loops")
//#pragma GCC optimize("fast-math")
/*#pragma GCC optimize("section-anchors")
#prag... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 57, 64, 9, 0, 7, 10, 43, 0, 35], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 57... | 1 | 465 |
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
int n, l, r = 0;
cin >> n >> l;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i < n; i++) {
if (a[i] + a[i - 1] >= l) {
r = i;
break;
}
}
if (r >= 1) {
puts("Possible");
... | #include <iostream>
#include <vector>
using namespace std;
int main(void) {
int n, l, r = 0;
cin >> n >> l;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
for (int i = 1; i < n; i++) {
if (a[i] + a[i - 1] >= l) {
r = i;
break;
}
}
if (r >= 1) {
puts("Possible");
... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 20], ["+", 0, 5... | 1 | 173 |
#include <bits/stdc++.h>
using namespace std;
#define N 100001
int a[N], n, m;
int main() {
scanf("%d%d", &n, &m);
int add = 0;
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
for (int i = 1; i < n; i++)
if (a[i] + a[i + 1] >= m)
add = i;
if (add) {
puts("Possible");
for (int i = 1; i <... | #include <bits/stdc++.h>
using namespace std;
#define N 100001
int a[N], n, m;
int main() {
scanf("%d%d", &n, &m);
int add = 0;
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
for (int i = 1; i < n; i++)
if (a[i] + a[i + 1] >= m)
add = i;
if (add) {
puts("Possible");
for (int i = 1; i <... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 57, 64, 9, 0, 7, 8, 57, 0, 121], ["+", 64, 9, 0, 7, 8, 1, 0, 2, 63, 22], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 7, 8, 1, 0, 2, 3, 4, 0, 21], ... | 1 | 168 |
#include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#ifdef LOCAL
#define eprintf(...) fprintf(stderr, __VA_ARGS__... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+... | 1 | 1,210 |
#include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define FOR(i, k, n) for (int i = (k); i < (n); ++i)
typedef long long ll;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
inline ll add(ll x, ll y) { return (x + y) % MOD; }
inline ... | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define FOR(i, k, n) for (int i = (k); i < (n); ++i)
typedef long long ll;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
inline ll add(ll x, ll y) { return (x + y) % MOD; }
inline ... | [["-", 0, 14, 8, 9, 0, 43, 39, 344, 141, 78], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 18], ["-", 8, 9, 0, 43, 39, 344, 3, 347, 0, 47], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 64, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["-", 64, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["-", 64, 9, 0,... | 1 | 303 |
#include <bits/stdc++.h>
using namespace std;
#define finish(x) return cout << x << endl, 0
#define ll long long
int n, L;
vector<int> a;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> L;
a.resize(n);
ll sum = 0;
for (auto &i : a) {
cin >> i;
sum += i;
}
int idx = -1;
for... | #include <bits/stdc++.h>
using namespace std;
#define finish(x) return cout << x << endl, 0
#define ll long long
int n, L;
vector<int> a;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cin >> n >> L;
a.resize(n);
ll sum = 0;
for (auto &i : a) {
cin >> i;
sum += i;
}
int idx = -1;
for... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 12... | 1 | 187 |
#include <bits/stdc++.h>
#include <bitset>
#include <iomanip>
using namespace std;
#define reps(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) reps(i, 0, n)
#define Rreps(i, n, e) for (int i = n - 1; i >= e; --i)
#define Rrep(i, n) Rreps(i, n, 0)
#define ALL(a) a.begin(), a.end()
#define fi first
#define se sec... | #include <bits/stdc++.h>
#include <bitset>
#include <iomanip>
using namespace std;
#define reps(i, s, n) for (int i = s; i < n; i++)
#define rep(i, n) reps(i, 0, n)
#define Rreps(i, n, e) for (int i = n - 1; i >= e; --i)
#define Rrep(i, n) Rreps(i, n, 0)
#define ALL(a) a.begin(), a.end()
#define fi first
#define se sec... | [["-", 31, 16, 31, 2, 3, 4, 0, 16, 31, 22], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 9, 0, 57, ... | 1 | 244 |
#include <bits/stdc++.h>
#define IO_OP \
std::ios::sync_with_stdio(0); \
std::cin.tie(0);
#define F first
#define S second
#define V vector
#define PB push_back
#define MP make_pair
#define EB emplace_bac... | #include <bits/stdc++.h>
#define IO_OP \
std::ios::sync_with_stdio(0); \
std::cin.tie(0);
#define F first
#define S second
#define V vector
#define PB push_back
#define MP make_pair
#define EB emplace_bac... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 8, 9, 0, 7, 15, 16,... | 1 | 236 |
#include <iostream>
using namespace std;
int main() {
int N, cut;
long long int L, prev, curr;
bool poss = false;
cin >> N >> L;
for (int i = 0; i < N; i++) {
cin >> curr;
if (i == 0)
prev = curr;
else {
if (prev + curr >= L) {
cut = i;
prev = curr;
poss = true... | #include <iostream>
using namespace std;
int main() {
int N, cut;
long long int L, prev, curr;
bool poss = false;
cin >> N >> L;
for (int i = 0; i < N; i++) {
cin >> curr;
if (i == 0)
prev = curr;
else {
if (prev + curr >= L) {
cut = i;
poss = true;
}
}
p... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22], ["-", 0, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, ... | 1 | 165 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int64_t i = 0; i < n; i++)
#define REPR(i, n) for (int64_t i = n; i >= 0; i--)
#define FOR(i, m, n) for (int64_t i = m; i < n; i++)
#define FORR(i, m, n) for (int64_t i = m; i >= n; i--)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
templat... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int64_t i = 0; i < n; i++)
#define REPR(i, n) for (int64_t i = n; i >= 0; i--)
#define FOR(i, m, n) for (int64_t i = m; i < n; i++)
#define FORR(i, m, n) for (int64_t i = m; i >= n; i--)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
templat... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 350 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
#define INF ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
typedef long long ll;
#define INF ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 7, 8, 9, 0, 1, 0, ... | 1 | 303 |
#include <algorithm>
#include <bitset>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <ve... | #include <algorithm>
#include <bitset>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <ve... | [["-", 64, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["-", 64, 9, 0, 7, 10, 11, 12, 16, 17, 72], ["+", 64, 9, 0, 7, 10, 11, 12, 16, 31, 22], ["+", 64, 9, 0, 7, 10, 11, 12, 16, 17, 33], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 20], ["+", 64, 9, 0... | 1 | 224 |
#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
//#define int ll
#define rand shittttty_shit
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().count());
typ... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
#define int ll
#define rand shittttty_shit
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
mt19937_64 rng_64(chrono::steady_clock::now().time_since_epoch().count());
typed... | [["+", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+... | 1 | 1,236 |
#include <cstdio>
using namespace std;
int n, L, a[100005], x;
inline int read() {
int ret = 0;
bool f = 0;
char ch = getchar();
while (ch > '9' || ch < '0')
f ^= ch == '-', ch = getchar();
while (ch <= '9' && ch >= '0')
ret = ret * 10 + ch - '0', ch = getchar();
return f ? -ret : ret;
}
int main() ... | #include <cstdio>
using namespace std;
int n, L, a[100005], x;
inline int read() {
int ret = 0;
bool f = 0;
char ch = getchar();
while (ch > '9' || ch < '0')
f ^= ch == '-', ch = getchar();
while (ch <= '9' && ch >= '0')
ret = ret * 10 + ch - '0', ch = getchar();
return f ? -ret : ret;
}
int main() ... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 57, 64, 9, 0, 7, 8, 57, 0, 121], ["+", 64, 9, 0, 7, 8, 1, 0, 2, 63, 22], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 8, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 7, 8, 1, 0, 2, 3, 4, 0, 21], ... | 1 | 247 |
n,l = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
index = 0
for i in range(n-1):
if a[i]+a[i+1] >= l:
index = i+1
if index==0:
print("Impossible")
else:
print("Possible")
for i in range(1,n):
if i==index:
continue
print(i)
print(index... | n,l = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]
index = 0
for i in range(n-1):
if a[i]+a[i+1] >= l:
index = i+1
if index==0:
print("Impossible")
else:
print("Possible")
for i in range(1,index):
print(i)
for i in range(n-1,index,-1):
print(i)
... | [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["+", 0, 57, 75, 76,... | 5 | 114 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, l;
bool f = false;
cin >> n >> l;
int k, j;
vector<int> a(n);
vector<int> co(n - 1);
cin >> a.at(0);
for (int i = 1; i < n; i++) {
cin >> a.at(i);
if (a.at(i - 1) + a.at(i) >= l) {
f = true;
k = i;
}
}
for (in... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, l;
bool f = false;
cin >> n >> l;
int k = 1, j = 0;
vector<int> a(n);
vector<int> co(n - 1);
cin >> a.at(0);
for (int i = 1; i < n; i++) {
cin >> a.at(i);
if (a.at(i - 1) + a.at(i) >= l) {
f = true;
k = i;
}
}
... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["+", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 0, 14, 8, 9, 0, 57, 15, 339, 51, 22], ["+", 0, 14, 8, 9, 0, 57, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 30, 0, 14, 8... | 1 | 232 |
#include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
//#define int ll
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef v... | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
//#define int ll
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<pii> vpi;
typedef vector<vi> vvi;
typedef vector<ll> vl;
typedef v... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["+", 0, 14, 8, 9, 0, ... | 1 | 590 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1010101010;
constex... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1010101010;
constex... | [["+", 8, 9, 0, 7, 8, 1, 0, 16, 31, 22], ["+", 8, 9, 0, 7, 8, 1, 0, 16, 17, 152], ["-", 8, 9, 0, 7, 8, 1, 0, 11, 17, 32], ["-", 0, 7, 8, 1, 0, 11, 12, 2, 63, 22], ["-", 8, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 8, 1, 0, 11, 12, 2, 3, 4, 0, 13], ["-", 8, 1, 0, 11, 12, 2, 3, 4, 0, 21], ["-", 8, 1, 0, 11, 12, 2, 3, 4, 0, 25... | 1 | 570 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i, n) for (long long i = 0; i < n; ++i)
#define REPP(i, m, n) for (long long i = m; i < n; ++i)
#define rep(i, n) for (long long i = n - 1; i >= 0; --i)
#define repp(i, n, m) for (long long i = n - 1; i >= m; --i)
#define ALL(N) (N.begin(), ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define REP(i, n) for (long long i = 0; i < n; ++i)
#define REPP(i, m, n) for (long long i = m; i < n; ++i)
#define rep(i, n) for (long long i = n - 1; i >= 0; --i)
#define repp(i, n, m) for (long long i = n - 1; i >= m; --i)
#define ALL(N) (N.begin(), ... | [["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 0, 57, 64, 9, 0, 9, 0, 57, 0, 121], ["-", 64, 9, 0, 9, 0, 57, 15, 339, 0, 24], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["-", 64, 9, 0, 9, 0,... | 1 | 237 |
/*
Author:zeke
pass System Test!
GET AC!!
*/
#include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include... | /*
Author:zeke
pass System Test!
GET AC!!
*/
#include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include... | [["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 57, 64, 9, 0, 7, 0, 88], ["+", 0, 57, 64, 9, 0, 7, 10, 43, 39, 40], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 64, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 7, 10, 43, 49, 50, 51, 16... | 1 | 432 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <vector>
//#include <boost/multiprecision/cpp_int.hpp>... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <vector>
//#include <boost/multiprecision/cpp_int.hpp>... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 64, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["-", 64, 9, 0, 7, ... | 1 | 219 |
#include <bits/stdc++.h>
#define rep(i, a, b) for (register int i = a; i <= b; ++i)
#define rpd(i, a, b) for (register int i = a; i >= b; --i)
#define rep1(i, x) for (register int i = head[x]; i; i = nxt[i])
typedef long long ll;
const int N = 1e5 + 5;
using namespace std;
inline int read() {
int x = 0, f = 1;
char... | #include <bits/stdc++.h>
#define rep(i, a, b) for (register int i = a; i <= b; ++i)
#define rpd(i, a, b) for (register int i = a; i >= b; --i)
#define rep1(i, x) for (register int i = head[x]; i; i = nxt[i])
typedef long long ll;
const int N = 1e5 + 5;
using namespace std;
inline int read() {
int x = 0, f = 1;
char... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+... | 1 | 280 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define rep(i, n) for... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define rep(i, n) for... | [["-", 0, 1, 0, 16, 31, 16, 31, 2, 63, 22], ["+", 0, 57, 75, 76, 0, 9, 0, 7, 0, 88], ["+", 75, 76, 0, 9, 0, 7, 10, 43, 39, 40], ["-", 0, 16, 31, 16, 31, 2, 3, 4, 0, 21], ["+", 0, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43... | 1 | 306 |
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
typedef long long... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <vector>
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
typedef long long... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 15, 339, 51, 16, 31, 16, 12, 69, 28, 22], ["+", 51, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["+", 51, 16, 31, 16, 12, 69, 341, 342, 0, 22], ["+", 51, 16, 31, 16, 12, 69, 341, 342, 0, 73], ["+", 15, 339, 51, 16, 12, 16, 31, 69, 28, 22], ["+", 51, 16, 12, 16, 31, 69, 34... | 1 | 241 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i <= (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x, m, n) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i <= (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define printa(x, m, n) ... | [["-", 75, 76, 0, 9, 0, 1, 0, 2, 63, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 21], [... | 1 | 252 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <vector>
// #define int long long
#define inf 1000000007
#define pa pair<int, int>
#define ll long long
#define pal... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <string>
#include <vector>
// #define int long long
#define inf 1000000007
#define pa pair<int, int>
#define ll long long
#define pal... | [["+", 0, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 0, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 9, 0, 1, 0, 16, 17, 151], ["+", 75, 76, 0, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]] | 1 | 725 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (n); i++)
#define rep(i, n) REP(i, 0, n)
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define double long double
typedef long long ll;
typedef pair<int, in... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, m, n) for (int i = (m); i < (n); i++)
#define rep(i, n) REP(i, 0, n)
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define double long double
typedef long long ll;
typedef pair<int, in... | [["-", 64, 9, 0, 14, 49, 53, 54, 55, 0, 25], ["-", 0, 57, 64, 9, 0, 14, 8, 9, 0, 45], ["-", 64, 9, 0, 14, 8, 9, 0, 57, 0, 121], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 8, 9, 0, ... | 1 | 244 |
#include <iostream>
using namespace std;
int main() {
int n, l;
cin >> n >> l;
int ans = -1;
int a[100002];
cin >> a[0];
for (int i = 1; i < n; i++) {
cin >> a[i];
if (a[i - 1] + a[i] >= l)
ans = i;
}
if (ans == -1)
cout << "Impossible" << endl;
else {
cout << "Possible" << endl... | #include <iostream>
using namespace std;
int main() {
int n, l;
cin >> n >> l;
int ans = -1;
int a[100002];
cin >> a[0];
for (int i = 1; i < n; i++) {
cin >> a[i];
if (a[i - 1] + a[i] >= l)
ans = i;
}
if (ans == -1)
cout << "Impossible" << endl;
else {
cout << "Possible" << endl... | [["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["-", 75, 76, 0, 9, 0, 7, 8, 57, 0, 121], ["-", 0, 9, 0, 7, 8, 57, 15, 339, 0, 24], ["-", 0, 7, 8, 57, 15, 339, 51, 16, 31, 22], ["-", 0, 7, 8, 57, 15, 339, 51, 16, 17, 79], ["-", 0, 7, 8, 57, 15, 339, 51, 16, 12, 22], ["-", 0, 9, 0,... | 1 | 141 |
#include <bits/stdc++.h> //C++の標準ライブラリを一行で一括でインクルードする
#include <math.h> //数学関数と数学定数を利用する
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
template <class T> void chmax(T &a, T b) {
if (a < b)
a = b;
}
template <class T> void chmin(T &a, T b) {
if (a > b)
a = b;
}
in... | #include <bits/stdc++.h> //C++の標準ライブラリを一行で一括でインクルードする
#include <math.h> //数学関数と数学定数を利用する
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
template <class T> void chmax(T &a, T b) {
if (a < b)
a = b;
}
template <class T> void chmin(T &a, T b) {
if (a > b)
a = b;
}
in... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["-", 64, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 7, 8, 9, 0, 1, ... | 1 | 276 |
def resolve():
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 - 1):
print(j + 1)
print(i + 1)
for j in range(n - 1, i, -1):
... | def resolve():
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)
... | [["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 1, 0... | 5 | 130 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
typedef long long ll;
typedef long long unsigned int llu;
ll mod = 1000000007;
ll INF = 1000000009;
/*
左右のうち、短い方のロープを解く
ロープを解けなくなったらIMPOSSIBLE
3 2 1 1 2 3
*/
void solve() {
ll n, len;
cin >> n >> len;
ll a[n + 10];
rep... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
typedef long long ll;
typedef long long unsigned int llu;
ll mod = 1000000007;
ll INF = 1000000009;
/*
左右のうち、短い方のロープを解く
ロープを解けなくなったらIMPOSSIBLE
3 2 1 1 2 3
*/
void solve() {
ll n, len;
cin >> n >> len;
ll a[n + 10];
rep... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 15, 339, 51, 16, 31, 16, 12, 69, 28, 22], ["+", 51, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["+", 31, 16, 12, 69, 341, 342, 0, 16, 31, 22], ["+", 31, 16, 12, 69, 341, 342, 0, 16, 17, 72], ["+", 31, 16, 12, 69, 341, 342, 0, 16, 12, 13], ["+", 51, 16, 31, 16, 12, 69, 34... | 1 | 320 |
import sys
N, L = map(int, input().split())
A = [int(_) for _ in input().split()]
for n in range(N - 1):
if A[n] + A[n + 1] >= L:
print('Possible')
tmp_ind = n + 1
for m in range(1, N):
if m != tmp_ind:
print(m)
print(tmp_ind)
sys.exit()
print('I... | import sys
N, L = map(int, input().split())
A = [int(_) for _ in input().split()]
for n in range(N - 1):
if A[n] + A[n + 1] >= L:
print('Possible')
tmp_ind = n + 1
for m in range(1, tmp_ind):
print(m)
for m in range(N - 1, tmp_ind, -1):
print(m)
prin... | [["-", 64, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 64, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["+", 8, 196, 0, ... | 5 | 106 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <math.h>
#include <queue>
using namespace std;
template <class T> using V = vector<T>;
template <class S, class T> using P = pair<S, T>;
template <class... T> using TP = tuple<T...>;
using ll = long long;
using db = double;
using ldb = long db;
... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <math.h>
#include <queue>
using namespace std;
template <class T> using V = vector<T>;
template <class S, class T> using P = pair<S, T>;
template <class... T> using TP = tuple<T...>;
using ll = long long;
using db = double;
using ldb = long db;
... | [["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 75, 76, 0, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 57, 75, 76, 0, 9, 0, 7, 0, 88], ["+", 75, 76, 0, 9, 0, 7, 10, 43, 39, 78], ["+", 0, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["+", 0, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 0, 7, 10, 43, 49, 50, 51, 1... | 1 | 839 |
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(i+1, N-1)]+[i+1]), sep='\n')
break
else:
print('Impossible') | 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') | [["+", 0, 659, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 659, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 659, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 12, 658, 0, 659, 12, 652, 3, 4, 0, 21], ["-", 0, 659, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 659, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 659, 12, 652, 3, 4, 0, 657, 31, ... | 5 | 126 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n, l;
cin >> n >> l;
int a[n], t = -1;
cin >> a[0];
for (int i = 1; i < n; i++) {
cin >> a[i];
if (a[i - 1] + a[i] >= l) {
t = i;
}
}
if (t == -1)
cout << "Impossible";
else {
cout << "Poss... | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int n, l;
cin >> n >> l;
int a[n], t = -1;
cin >> a[0];
for (int i = 1; i < n; i++) {
cin >> a[i];
if (a[i - 1] + a[i] >= l) {
t = i;
}
}
if (t == -1)
cout << "Impossible";
else {
cout << "Poss... | [["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["-", 0, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 7, 8, 9, 0, 1, 0... | 1 | 148 |
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(1,i+1):
print(j)
for k in range(i,n-1):
print(k+1)
exit()
print("Impossible") | 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(1,i+1):
print(j)
for k in range(n-1,i,-1):
print(k)
exit()
print("Impossible") | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 64, 196, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 107 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, k, p = 0, j = 0;
cin >> n >> k;
ll a[n + 2];
a[n + 1] = 0;
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int i = 1; i <= n; i++) {
if (a[i] >= k) {
p = i - 1;
break;
}
if (a[i] + a[i + 1] >= k... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll n, k, p = 0, j = 0;
cin >> n >> k;
ll a[n + 2];
a[n + 1] = 0;
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int i = 1; i <= n; i++) {
if (a[i] >= k) {
p = max(i - 1LL, 1LL);
break;
}
if (a[i] + a... | [["+", 64, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 11, 12, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 25], ["-", 0, 57, 64, 9, 0, 7, 15, 16... | 1 | 266 |
#include <bits/stdc++.h>
using namespace std::literals::string_literals;
using i64 = long long;
using std::cin;
using std::cout;
using std::endl;
template <typename T> std::vector<T> make_v(size_t a) {
return std::vector<T>(a);
}
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return std::... | #include <bits/stdc++.h>
using namespace std::literals::string_literals;
using i64 = long long;
using std::cin;
using std::cout;
using std::endl;
template <typename T> std::vector<T> make_v(size_t a) {
return std::vector<T>(a);
}
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return std::... | [["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 20], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["-", 0, 14, 8, 9,... | 1 | 306 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define repr(i, a, b) for (int i = (int)(a); i < (i... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define repr(i, a, b) for (int i = (int)(a); i < (i... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 88], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43, 49, 50,... | 1 | 320 |
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(i, N))
ans += list(range(1, i))
ans = ans[::-1]
else:
ans += list(range(1... | 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))
... | [["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 664, 17, 33], ["+", 3, 4, 0, 652, 3, 4, 0, 664, 28, 612], ["+", 3, 4, 0, 6... | 5 | 156 |
N,L=map(int,input().split())
A=list(map(int,input().split()))
x=-1
for i in range(N-1):
if A[i]+A[i+1]>=L:
x=i
break
if x==-1:
print('Impossible')
else:
print('Possible')
r=list(range(1,x+1))+list(range(x+2,N))+[x+1,]
print(*r,sep='\n') | N,L=map(int,input().split())
A=list(map(int,input().split()))
x=-1
for i in range(N-1):
if A[i]+A[i+1]>=L:
x=i
break
if x==-1:
print('Impossible')
else:
print('Possible')
r=list(range(1,x+1))+list(range(N-1,x+1,-1))+[x+1,]
print(*r,sep='\n') | [["+", 3, 4, 0, 652, 3, 4, 0, 657, 31, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 17, 33], ["+", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612], ["-", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 3, 4, 0, 652, 3, 4, 0, 664, 17, 33], ["+", 3, 4, 0, 6... | 5 | 129 |
#include <bits/stdc++.h>
using namespace std;
long long n, l;
vector<long long> a, ans;
bool solve();
int main() {
cin >> n >> l;
a.resize(n);
for (int i = 0; i < n; ++i)
cin >> a[i];
if (solve()) {
cout << "Possible" << endl;
for (int i = 0; i < n - 1; ++i)
cout << ans[i] + 1 << endl;
} ... | #include <bits/stdc++.h>
using namespace std;
long long n, l;
vector<long long> a, ans;
bool solve();
int main() {
cin >> n >> l;
a.resize(n);
for (int i = 0; i < n; ++i)
cin >> a[i];
if (solve()) {
cout << "Possible" << endl;
for (int i = 0; i < n - 1; ++i)
cout << ans[i] + 1 << endl;
} ... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 8, 57, 64, 9, 0, 7, 10, 43, 0, 35], ["-", 8, 57, 64, 9, 0, 7, 15, 16, 31, 22], ["-", 8, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["-", 64, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 0, 7, ... | 1 | 220 |
n,l = map(int,input().split())
L = list(map(int,input().split()))
flag = False
cur = 0
for i in range(n-1):
if L[i]+L[i+1] >= l:
flag = True
cur = i+1
break
if flag:
print('Possible')
for i in range(1,n):
if cur != i:
print(i)
print(cur)
else:
print('Impos... | n,l = map(int,input().split())
L = list(map(int,input().split()))
flag = False
cur = 0
for i in range(n-1):
if L[i]+L[i+1] >= l:
flag = True
cur = i+1
break
if flag:
print('Possible')
for i in range(1,cur):
print(i)
for i in range(n-1,cur,-1):
print(i)
print(c... | [["-", 64, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["+", 64, 196, 0, 7, 12, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 7, 8, 196, 0, 57, 0, 121], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79], ["+", 0, 7, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 8, 19... | 5 | 113 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#includ... | [["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9... | 1 | 305 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<ll>;
using VV = vector<VI>;
using VS = vector<string>;
// tourist set
template <typename A, typename B> string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using VI = vector<ll>;
using VV = vector<VI>;
using VS = vector<string>;
// tourist set
template <typename A, typename B> string to_string(pair<A, B> p);
template <typename A, typename B, typename C>
string to_string(tuple<A, B, C> p);
template <typ... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 88], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 0, 32... | 1 | 1,097 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, begin, end) for (ll i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (ll i = (begin)-1; i >= (end); i--)
#define IREP(i, n) IFOR(i, n, 0)
#define SORT(a) sort(a.begin(), a.end())
#define ISORT(a) sort(a.begin(), a.en... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, begin, end) for (ll i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (ll i = (begin)-1; i >= (end); i--)
#define IREP(i, n) IFOR(i, n, 0)
#define SORT(a) sort(a.begin(), a.end())
#define ISORT(a) sort(a.begin(), a.en... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+... | 1 | 430 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define p(s) std::cout << s;
#define pl(s) std::cout << s << endl;
#define printIf(j, s1, s2) cout << (j ? s1 : s2) << endl;
#define YES(j) cout << (j ? "YES" : "NO") << endl... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 20], ["+", 0, 5... | 1 | 778 |
#include <bits/stdc++.h>
#define sz size
#define pb push_back
#define mper make_pair
#define PI 3.14159
#define F first
#define S second
#define ll int
//#define forik(i, a, b) for(ll i = a; i <= b; ++i)
#define vl vector<ll>
#define pll pair<ll, ll>
#define mal ... | #include <bits/stdc++.h>
#define sz size
#define pb push_back
#define mper make_pair
#define PI 3.14159
#define F first
#define S second
#define ll int
//#define forik(i, a, b) for(ll i = a; i <= b; ++i)
#define vl vector<ll>
#define pll pair<ll, ll>
#define mal ... | [["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 75, 76, 0, 9, 0, 7, 15, 16, 17, 47], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 17, 20], ["-", 75, 76, 0, 9, 0, 338, 8, 1, 0, 35], ["-", 75, 76, 0, 9, 0, 1, 0, 16, 31, 22], ["-", 75, 76, 0, 9, 0, 1, 0, 16, 17, 151], ["-", 75, 76, 0,... | 1 | 237 |
#include <cstdio>
#include <iostream>
using namespace std;
int a[1000006], tag[1000006];
int read() {
int cnt = 0;
char ch = getchar();
while (ch < '0' || '9' < ch)
ch = getchar();
while ('0' <= ch && ch <= '9') {
cnt = cnt * 10 + ch - '0';
ch = getchar();
}
return cnt;
}
int main() {
int n = ... | #include <cstdio>
#include <iostream>
using namespace std;
int a[1000006], tag[1000006];
int read() {
int cnt = 0;
char ch = getchar();
while (ch < '0' || '9' < ch)
ch = getchar();
while ('0' <= ch && ch <= '9') {
cnt = cnt * 10 + ch - '0';
ch = getchar();
}
return cnt;
}
int main() {
int n = ... | [["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 57, 64, 9, 0, 7, 15, 16, 17, 18], ["+", 8, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 57, 64, 9, 0, 7, 26, 27, 17, 68], ["+", 8, 57, 64, 9, 0, 7, 26, 27, 17, 29], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, ... | 1 | 238 |
N,L = map(int,input().split())
*A, = map(int,input().split())
S = [0]*(N+1)
for i,a in enumerate(A): S[i+1] = S[i] + a
ans = []
i=0
j=N-1
while i<j:
if S[j+1]-S[i] < L:
print("Impossible")
break
if A[i] <= A[j]:
ans.append(i+1)
i+=1
else:
ans.append(j)
j-=1
e... | N,L = map(int,input().split())
*A, = map(int,input().split())
S = [0]*(N+1)
for i,a in enumerate(A): S[i+1] = S[i] + a
ans = []
i=0
j=N-1
while i<j:
if S[j+1]-S[i] < L:
print("Impossible")
break
if A[i]+A[i+1] <= A[j]+A[j-1]:
ans.append(i+1)
i+=1
else:
ans.append(j)
... | [["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 72], ["+", 0, 57, 15, 666, 0, 657, 12, 206, 51, 22], ["+", 0, 57, 15, 666, 0, 657, 12, 206, 0, 70], ["+", 15, 666, 0, 657, 12, 206, 206, 657, 31, 22], ["+", 15, 666, 0, 657, 12, 206, 206, 657, 17, 72], ["+", 15, 666, 0, 657, 12, 206, 206, 657, 12, 612], ["+", 0, 57, 15, 666, 0... | 5 | 155 |
// include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include... | // include
//------------------------------------------
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["-", 8, 9, 0, 57, 64, 9, 0, 9, 0, 45], ["-", 0, 57, 64, 9, 0, 9, 0, 57, 0, 121], ["-", 64, 9, 0, 9, 0, 57, 15, 339, 0, 2... | 1 | 799 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const ll mod = 1e9 + 7;
int main() {
int a, b;
cin >> a >> b;
if ((a * b > 0 && a % 2 != b % 2) || (a > 0 && b > 0))
cout << "Positive" << endl;
else if (a * b > 0 && a % 2 == b % 2)
cout << "Negative" << endl;
else
cout << "... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const ll mod = 1e9 + 7;
int main() {
int a, b;
cin >> a >> b;
if ((a < 0 && b < 0 && a % 2 != b % 2) || (a > 0 && b > 0))
cout << "Positive" << endl;
else if (a < 0 && b < 0 && a % 2 == b % 2)
cout << "Negative" << endl;
else
... | [["-", 31, 23, 0, 16, 31, 16, 31, 16, 17, 48], ["+", 31, 23, 0, 16, 31, 16, 31, 16, 17, 18], ["+", 31, 23, 0, 16, 31, 16, 31, 16, 12, 13], ["+", 51, 16, 31, 23, 0, 16, 31, 16, 17, 98], ["-", 51, 16, 31, 23, 0, 16, 31, 16, 17, 47], ["+", 31, 23, 0, 16, 31, 16, 12, 16, 17, 18], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, ... | 1 | 110 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.