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 |
|---|---|---|---|---|
def examA():
a, b = LI()
if b<a:
a,b = b,a
if a<=0 and 0<=b:
print("Zero")
elif 0<a:
print("Positive")
else:
judge = b-a+1
if judge%2==0:
print("Positive")
else:
print("Negative")
return
def examB():
N, M = LI()
fla... | def examA():
a, b = LI()
if b<a:
a,b = b,a
if a<=0 and 0<=b:
print("Zero")
elif 0<a:
print("Positive")
else:
judge = b-a+1
if judge%2==0:
print("Positive")
else:
print("Negative")
return
def examB():
N, M = LI()
fla... | [["-", 36, 36, 0, 656, 0, 14, 8, 196, 0, 35], ["-", 0, 14, 8, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 14, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 8, 196, 0, 1, 0, 662, 12, 664, 17, 33], ["-", 8, 196, 0, 1, 0, 662, 12, 664, 28, 612], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["-",... | 5 | 609 |
#include <bits/stdc++.h>
using lint = long long;
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout.setf(std::ios_base::fixed);
std::cout.precision(15);
lint n, L;
std::cin >> n >> L;
std::vector<lint> a(n);
for (lint &x : a)
std::cin >> x;
for (lint i = 0; i < n ... | #include <bits/stdc++.h>
using lint = long long;
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout.setf(std::ios_base::fixed);
std::cout.precision(15);
lint n, L;
std::cin >> n >> L;
std::vector<lint> a(n);
for (lint &x : a)
std::cin >> x;
for (lint i = 0; i < n ... | [["-", 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, 19], ["-", 0, 57, 64, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 57, ... | 1 | 214 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++)
#define RFOR(i, a, n) for (ll i = (ll)n - 1; i >= (ll)a; i--)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) RFOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define bra(first, second) '(' << fi... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++)
#define RFOR(i, a, n) for (ll i = (ll)n - 1; i >= (ll)a; i--)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) RFOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define bra(first, second) '(' << fi... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 0, 57, 15, 339, 51, 16, 12, 91, 17, 111], ["-", 0, 57, 15, 339, 51, 16, 12, 91, 28, 22], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 91, 17, 111], ["+", 0, 57, 15, 339, 51, 16, 12, 91, 28, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22... | 1 | 298 |
#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
int a[N + 1], L, n;
inline void into() {
scanf("%d%d", &n, &L);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
}
inline void work() {}
inline void outo() {
for (int i = 1; i < n; i++)
if (a[i] + a[i + 1] > L) {
printf("Possible\n"... | #include <bits/stdc++.h>
using namespace std;
const int N = 100000;
int a[N + 1], L, n;
inline void into() {
scanf("%d%d", &n, &L);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
}
inline void work() {}
inline void outo() {
for (int i = 1; i < n; i++)
if (a[i] + a[i + 1] >= L) {
printf("Possible\n... | [["-", 0, 7, 8, 57, 15, 339, 51, 16, 17, 47], ["+", 0, 7, 8, 57, 15, 339, 51, 16, 17, 20], ["-", 8, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["+", 8, 57, 64, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 57, 64, 9, 0, 7, 8, 57, 0, 121], ["+", 64, 9, 0, 7, 8, 1, 0, 2, 63, 22], ["+", 0, 7, 8, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 1, 0, 2, 3, 4,... | 1 | 196 |
#include <bits/stdc++.h>
#define intt long long
using namespace std;
const int maxx = 100001;
intt a[maxx];
intt sum = 0;
int read() {
int k;
scanf("%d", &k);
return k;
}
int main() {
int n = read();
intt L = read();
for (int i = 1; i <= n; i++)
a[i] = read();
for (int i = 1; i <= n - 1; i++) {
if... | #include <bits/stdc++.h>
#define intt long long
using namespace std;
const int maxx = 100001;
intt a[maxx];
int read() {
int k;
scanf("%d", &k);
return k;
}
int main() {
int n = read();
intt L = read();
for (int i = 1; i <= n; i++)
a[i] = read();
for (int i = 1; i <= n - 1; i++) {
if (a[i] + a[i +... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 49, 22], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", ... | 1 | 198 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
ll N, L;
void solve() {
cin >> N >> L;
ll a[N];
rep(i, N) cin >> a[i];
int flag = 0;... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) REP(i, 0, n)
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<ll> vl;
ll N, L;
void solve() {
cin >> N >> L;
ll a[N];
rep(i, N) cin >> a[i];
int flag = 0;... | [["+", 64, 9, 0, 7, 10, 43, 49, 50, 51, 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, 19], ["-", 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, 20], ["-", 0, 57, 64, 9,... | 1 | 240 |
#include <bits/stdc++.h>
using namespace std;
long long N, L;
long long A[100005];
int main() {
cin >> N >> L;
for (long long i = 0; i < N; i++) {
cin >> A[i];
}
long long idx = -1;
long long maxi = -1;
for (long long i = 0; i < N - 1; i++) {
if (A[i] + A[i + 1] > maxi) {
idx = i;
max... | #include <bits/stdc++.h>
using namespace std;
long long N, L;
long long A[100005];
int main() {
cin >> N >> L;
for (long long i = 0; i < N; i++) {
cin >> A[i];
}
long long idx = -1;
long long maxi = -1;
for (long long i = 0; i < N - 1; i++) {
if (A[i] + A[i + 1] > maxi) {
idx = i;
max... | [["+", 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, 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, 20], ["-", 0, 57, 64, 9, 0, 7, 10, 43, 0, 35], ["-", 0, 57, 6... | 1 | 205 |
/*+lmake
* STD = c++14
* DEFINE += WAAUTOMATON
*/
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
#ifdef WAAUTOMATON
#define debug(args...) \
{ ... | /*+lmake
* STD = c++14
* DEFINE += WAAUTOMATON
*/
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
#ifdef WAAUTOMATON
#define debug(args...) \
{ ... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["+", 8, 9, 0, 171, 0, 1, 0, 2, 63, 22], ["+", 0, 171, 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], ["+", 0, 171, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 171, 0, 1, 0, 2, 3, 4, 0... | 1 | 648 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
int val[100010];
signed main() {
int N, M;
cin >> N >> M;
for (int i = 0; i < N; i++)
cin >> val[i];
map<int, int> seg;
for (int i = 0; i < N; i++)
seg[i] = i;
priority_queue<pair<int, pair<int, int>>> Q;
for (int i = 0; i + 1 ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
int val[100010];
signed main() {
int N, M;
cin >> N >> M;
for (int i = 0; i < N; i++)
cin >> val[i];
map<int, int> seg;
for (int i = 0; i < N; i++)
seg[i] = i;
priority_queue<pair<int, pair<int, int>>> Q;
for (int i = 0; i + 1 ... | [["-", 8, 9, 0, 52, 8, 9, 0, 57, 0, 121], ["-", 0, 52, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 0, 57, 15, 339, 51, 16, 31, 27, 28, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 27, 17, 29], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 52, 8, 9, 0, 57, 15, 339, 0, 25], ["-", 0,... | 1 | 479 |
#include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long unsigned int ... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long unsigned int ... | [["-", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 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 | 213 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
#define pb push_back
#define rep(i, a, n) for (int i = (a); i < (n); i++)
#define dep(i, a, n) for (int i = (a); i >= (n); i--)
#define mod (ll)(1e9 + 7)
__attribute__((constructor)) void initi... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> P;
#define pb push_back
#define rep(i, a, n) for (int i = (a); i < (n); i++)
#define dep(i, a, n) for (int i = (a); i >= (n); i--)
#define mod (ll)(1e9 + 7)
__attribute__((constructor)) void initi... | [["-", 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, 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, 21], ["-", 0, 16, 31, 16,... | 1 | 231 |
#include <cstdio>
int n, l, a[100005];
int main() {
int i, j;
scanf("%d%d", &n, &l);
for (i = 1; i <= n; i++) {
scanf("%d", a + i);
if (a[i] + a[i - 1] >= l)
break;
}
if (i <= n) {
puts("Possible");
for (j = 1, --i; j < i; j++)
printf("%d\n", j);
for (j = n - 1; j > i; j--)
... | #include <cstdio>
int n, l, a[100005];
int main() {
int i, j;
scanf("%d%d", &n, &l);
for (i = 1; i <= n; i++) {
scanf("%d", a + i);
if (a[i] + a[i - 1] >= l)
break;
}
if (i <= n) {
puts("Possible");
if (i > 1)
i--;
for (j = 1; j < i; j++)
printf("%d\n", j);
for (j = n... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 25], ["+", 64, 9, 0, 57, 64, 1, 0, 27, 28, 22], ["+", 64... | 1 | 168 |
#include "bits/stdc++.h"
using namespace std;
typedef long long LL;
LL MOD = 1000000007;
LL a[100000];
int main() {
int N;
LL L;
cin >> N >> L;
for (int i = 0; i < N; i++)
cin >> a[i];
int idx = -1;
for (int i = 0; i + 1 < N; i++) {
if (a[i] + a[i + 1] >= L) {
idx = i;
break;
}
}
... | #include "bits/stdc++.h"
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
LL a[100000];
int main() {
int N, L;
cin >> N >> L;
for (int i = 0; i < N; i++) {
cin >> a[i];
}
int idx = -1;
for (int i = 0; i + 1 < N; i++) {
if (a[i] + a[i + 1] >= L) {
idx = i;
break;
}... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 49, 22], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 36, 36, 0, 30, 0, 134, 0, 157], ["+", 36, 36, 0, 30, 0, 134, 39, 344, 141, 78], ["+", 0, 30, 0, 134, 39, 344, 3, 347, 0, 18], ... | 1 | 197 |
#include "bits/stdc++.h"
using namespace std;
typedef long long LL;
LL MOD = 1000000007;
LL a[100000];
int main() {
int N;
LL L;
cin >> N >> L;
for (int i = 0; i < N; i++)
cin >> a[i];
int idx = -1;
for (int i = 0; i + 1 < N; i++) {
if (a[i] + a[i + 1] >= L) {
idx = i;
break;
}
}
... | #include "bits/stdc++.h"
using namespace std;
typedef long long LL;
LL MOD = 1000000007;
LL a[100000];
int main() {
int N;
LL L;
cin >> N >> L;
for (int i = 0; i < N; i++)
cin >> a[i];
int idx = -1;
for (int i = 0; i + 1 < N; i++) {
if (a[i] + a[i + 1] >= L) {
idx = i;
break;
}
}
... | [["-", 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], ["+", 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, 20], ["+", 8... | 1 | 197 |
#include <iostream>
using namespace std;
int N, L;
int A[100010];
int main() {
cin >> N >> L;
for (int i = 1; i <= N; i++)
cin >> A[i];
bool judge = false;
int a;
for (int i = 1; i < N; i++) {
if (A[i] + A[i + 1] >= L) {
judge = true;
a = i;
break;
}
}
if (!judge)
cout ... |
#include <iostream>
using namespace std;
int N, L;
int A[100010];
int main() {
cin >> N >> L;
for (int i = 1; i <= N; i++)
cin >> A[i];
bool judge = false;
int a;
for (int i = 1; i < N; i++) {
if (A[i] + A[i + 1] >= L) {
judge = true;
a = i;
break;
}
}
if (!judge)
cout... | [["+", 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 | 172 |
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
int n;
ll l;
cin >> n >> l;
int ans = -1;
ll b;
cin >> b;
for (int i = 1; i < n; i++) {
ll a;
cin >> a;
if (b + a >= l)
ans = i;
b = a;
}
if (ans == -1)
cout << "Impossible\n";
else {
cout << "P... | #include <iostream>
using namespace std;
typedef long long ll;
int main() {
int n;
ll l;
cin >> n >> l;
int ans = -1;
ll b;
cin >> b;
for (int i = 1; i < n; i++) {
ll a;
cin >> a;
if (b + a >= l)
ans = i;
b = a;
}
if (ans == -1)
cout << "Impossible\n";
else {
cout << "P... | [["-", 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, 7, 8, 1, 0, 16, 31, 16, 31, 22], ["+", 0, 7, 8, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 7, 8, 1, 0, 16, 31, 16, 12, 22], ["+", 0, 9, 0, 7, 8, 1, 0, 16, 17, 151], ["+", 0, 9, 0, 7, 8, 1,... | 1 | 138 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define ALL(obj) (obj).begin(), (obj).end()
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define pb(e) pus... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define ALL(obj) (obj).begin(), (obj).end()
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define pb(e) pus... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 0, 43, 39, 344, 3, 347, 0, 77, 39, 78], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 31, 16, 12, 16, 31, 16, 31, 16, 31, 22], ["+", 31, 16, 12, 16, 31, 16, 31, 16, 12, 22], ["+",... | 1 | 218 |
// ------------------------------------
// Date:2018/ 2/24
// Problem:AGC 002 KnotPuzzle c.cpp
//
// ------------------------------------
#include <bits/stdc++.h>
using namespace std;
#define EACH(i, a) for (auto &&i : a)
#define FOR(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define RFOR(i, a, b) for (int i = (... | // ------------------------------------
// Date:2018/ 2/24
// Problem:AGC 002 KnotPuzzle c.cpp
//
// ------------------------------------
#include <bits/stdc++.h>
using namespace std;
#define EACH(i, a) for (auto &&i : a)
#define FOR(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define RFOR(i, a, b) for (int i = (... | [["+", 31, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["-", 31, 16, 31, 2, 3, 4, 0, 23, 0, 24], ["-", 3, 4, 0, 23, 0, 41, 15, 16, 17, 60], ["-", 3, 4, 0, 23, 0, 41, 15, 16, 12, 13], ["-", 31, 2, 3, 4, 0, 23, 0, 41, 0, 101], ["-", 31, 2, 3, 4, 0, 23, 0, 41, 0, 102], ["-", 31, 2, 3, 4, 0,... | 1 | 200 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const double EPS = 1e-10;
const ll INF = 100000000;
const ll MOD = 1000000007;
ll n, l;
ll a[100000];
vector<int> out;
int main() {
cin >> n >> l;
rep(i, n) cin >> a[i];
int... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const double EPS = 1e-10;
const ll INF = 100000000;
const ll MOD = 1000000007;
ll n, l;
ll a[100000];
int main() {
cin >> n >> l;
rep(i, n) cin >> a[i];
int pos;
bool ok =... | [["-", 36, 36, 0, 30, 0, 43, 39, 344, 141, 78], ["-", 0, 30, 0, 43, 39, 344, 3, 347, 0, 18], ["-", 0, 43, 39, 344, 3, 347, 0, 77, 39, 40], ["-", 0, 30, 0, 43, 39, 344, 3, 347, 0, 47], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["... | 1 | 212 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) \
for (register int i = (a), i##_end_ = (b); i <= i##_end_; ++i)
#define drep(i, a, b) \
for (register int i = (a), i##_end_ = (b); i ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) \
for (register int i = (a), i##_end_ = (b); i <= i##_end_; ++i)
#define drep(i, a, b) \
for (register int i = (a), i##_end_ = (b); i ... | [["-", 31, 69, 341, 342, 0, 16, 31, 16, 17, 48], ["-", 31, 69, 341, 342, 0, 16, 31, 16, 12, 13], ["-", 31, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["-", 31, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 31, 16, 12, 69, 341, 342, 0, 16, 17, 48], ["-", 31, 16, 12, 69, 341, 342, 0, 16, 12, 13], ["+", 31, 16, 12, 69, 341, 342,... | 1 | 354 |
#include <bits/stdc++.h>
#define LL long long
using namespace std;
const LL Maxn = 1000000 + 100;
LL N, M;
LL Ans[Maxn];
struct node {
LL id, val;
} A[Maxn];
int main() {
#ifdef hk_cnyali
freopen("C.in", "r", stdin);
freopen("C.out", "w", stdout);
#endif
scanf("%lld%lld", &N, &M);
LL k = 0ll;
for (LL i = 1l... | #include <bits/stdc++.h>
#define LL long long
using namespace std;
const LL Maxn = 1000000 + 100;
LL N, M;
LL Ans[Maxn];
struct node {
LL id, val;
} A[Maxn];
int main() {
#ifdef hk_cnyali
freopen("C.in", "r", stdin);
freopen("C.out", "w", stdout);
#endif
scanf("%lld%lld", &N, &M);
LL k = 0ll;
for (LL i = 1l... | [["+", 31, 118, 28, 69, 341, 342, 0, 16, 17, 72], ["+", 31, 118, 28, 69, 341, 342, 0, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["-", 12, 118, 28, 69, 341, 342, 0, 16, 12, 13], ["+", 12, 118, 28, 69, 341, 342, 0, 16, 12, 13], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 31,... | 1 | 517 |
#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORR(i, a, b) for (int i = (a); i >= (b); i--)
#define pb push_back
#define pcnt __builtin_popcount
#define show(x) cout << #x << " = " << x << endl;
#define maxs(x, y) x = max(x, y)
#define mins(x, y) x = min(x, y)
#define fi first
#... | #include <bits/stdc++.h>
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define FORR(i, a, b) for (int i = (a); i >= (b); i--)
#define pb push_back
#define pcnt __builtin_popcount
#define show(x) cout << #x << " = " << x << endl;
#define maxs(x, y) x = max(x, y)
#define mins(x, y) x = min(x, y)
#define fi first
#... | [["-", 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, 16, 31, 22], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 16, 31, 16... | 1 | 607 |
#include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
typedef struct pair<int, int> P;
typedef struct pair<int, P> P2;
vector<ll> v[28];
vector<ll> v2;
int d[100001] = {};
int num[100001] = {};
const ll INF = 1000000000000000001;
int main() {
int n,... |
#include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
typedef struct pair<int, int> P;
typedef struct pair<int, P> P2;
vector<ll> v[28];
vector<ll> v2;
int d[100001] = {};
int num[100001] = {};
const ll INF = 1000000000000000001;
int main() {
int n,... | [["-", 0, 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], ["-", 75, 76, 0, 9, 0, 7, 15, 16, 17, 18], ["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 9, ... | 1 | 232 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int a[100010];
inline int gi() {
int x = 0, o = 1;
char ch = getchar();
while (ch != '-' && (ch < '0' || ch > '9'))
ch = getchar();
if (ch == '-')
ch = getchar(), o = -1;
while (ch >= '0... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
int a[100010];
inline int gi() {
int x = 0, o = 1;
char ch = getchar();
while (ch != '-' && (ch < '0' || ch > '9'))
ch = getchar();
if (ch == '-')
ch = getchar(), o = -1;
while (ch >= '0... | [["-", 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 | 253 |
#include <bits/stdc++.h>
using namespace std;
int n, l, a[100001];
void out(int po) {
cout << "Possible\n";
for (int i = 1; i < n; ++i)
if (i != po)
cout << i << "\n";
cout << po;
exit(0);
}
int main() {
cin >> n >> l;
for (int i = 1; i <= n; ++i) {
cin >> a[i];
if (i == 1)
continue;... | #include <bits/stdc++.h>
using namespace std;
int n, l, a[100001];
void out(int po) {
cout << "Possible\n";
for (int i = 1; i < po; ++i)
cout << i << "\n";
for (int i = n - 1; i > po; --i)
cout << i << "\n";
cout << po;
exit(0);
}
int main() {
cin >> n >> l;
for (int i = 1; i <= n; ++i) {
cin ... | [["-", 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], ["+", 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, 16, 31, 16, 12, 22], ["+", 8, 9, 0, 7, 8, 1, 0, 16, 17, 151], ["+", 0, 7, 8, 1, 0, 16, 1... | 1 | 140 |
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define int long long
#define endl '\n'
#define pi acos(-1)
#define pque priority_queue
#define N 1000000
#define lmax LONG_LONG_MAX
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vecto... | #include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define int long long
#define endl '\n'
#define pi acos(-1)
#define pque priority_queue
#define N 1000000
#define lmax LONG_LONG_MAX
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vecto... | [["+", 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 | 285 |
#include <bits/stdc++.h>
const int N = 1e5 + 5;
using namespace std;
int n, a[N], L, p = -1;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n >> L;
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int i = 1; i < n; i++) {
if (a[i] + a[i + 1] >= L) {
p = i;
... | #include <bits/stdc++.h>
const int N = 1e5 + 5;
using namespace std;
int n, a[N], L, p = -1;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n >> L;
for (int i = 1; i <= n; i++)
cin >> a[i];
for (int i = 1; i < n; i++) {
if (a[i] + a[i + 1] >= L) {
p = 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, 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 | 196 |
/*huypheu
5 50
10 20 30 40 50
*/
#include <bits/stdc++.h>
#define int long long
using namespace std;
int a[1000007];
signed main() {
int n, len;
cin >> n >> len;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
int ma = 0, mi = 1;
for (int i = 1; i < n; i++) {
if (a[i] + a[i + 1] > ma)
ma = a[... | /*huypheu
5 50
50 40 30 20 10
*/
#include <bits/stdc++.h>
#define int long long
using namespace std;
int a[1000007];
signed main() {
int n, len;
cin >> n >> len;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
int ma = 0, mi = 1;
for (int i = 1; i < n; i++) {
if (a[i] + a[i + 1] > ma)
ma = a[... | [["-", 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], ["-", 75, 76, 0, 9, 0, 7, 15, 16, 17, 18], ["-", 75, 76, 0, 9, 0, 7, 15, 16, 12, 22], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 17, 20], ["+", 0, 9... | 1 | 205 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n, l;
cin >> n >> l;
vector<ll> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
vector<ll> s(n - 1);
bool flag = false;
ll idx = -1;
for (int i = 1; i < n; i++) {
if ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n, l;
cin >> n >> l;
vector<ll> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
vector<ll> s(n - 1);
bool flag = false;
ll idx = -1;
for (int i = 1; i < n; i++) {
if ... | [["-", 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], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 0, 7, 10, ... | 1 | 228 |
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 1e5 + 5;
typedef long long LL;
LL S[N], a[N], L;
int n;
int main(void) {
scanf("%d%lld", &n, &L);
for (int i = 1; i <= n; i++)
scanf("%lld", &a[i]);
bool flag = 0;
int no = -1;
for (int i = 1; i <= n - 1; i++) ... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 1e5 + 5;
typedef long long LL;
LL S[N], a[N], L;
int n;
int main(void) {
scanf("%d%lld", &n, &L);
for (int i = 1; i <= n; i++)
scanf("%lld", &a[i]);
bool flag = 0;
int no = -1;
for (int i = 1; i <= n - 1; 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, 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, 19], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9... | 1 | 218 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a[100100], L, s[100100], n;
int anses[100100], tp;
int main() {
scanf("%lld%lld", &n, &L);
for (int i = 1; i <= n; ++i)
scanf("%lld", &a[i]), s[i] = s[i - 1] + a[i];
int l = 1, r = n;
for (int i = 1; i <= n - 1; ++i) {
if (s[r] - s[l... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll a[100100], L, s[100100], n;
int anses[100100], tp;
int main() {
scanf("%lld%lld", &n, &L);
for (int i = 1; i <= n; ++i)
scanf("%lld", &a[i]), s[i] = s[i - 1] + a[i];
int l = 1, r = n;
for (int i = 1; i <= n - 1; ++i) {
if (s[r] - s[l... | [["+", 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 | 224 |
#include <bits/stdc++.h>
using namespace std;
using ll = long;
const ll N = 200010;
ll a[N], n, k, pos;
int main() {
scanf("%lld%lld", &n, &k);
for (ll i = 1; i <= n; i++)
scanf("%lld", a + i);
for (ll i = 1; i < n; i++)
if (a[i] + a[i + 1] >= k) {
pos = i;
break;
}
if (pos == 0)
ret... | #include <bits/stdc++.h>
using namespace std;
using ll = long;
const ll N = 200010;
ll a[N], n, k, pos;
int main() {
scanf("%lld%lld", &n, &k);
for (ll i = 1; i <= n; i++)
scanf("%lld", a + i);
for (ll i = 1; i < n; i++)
if (a[i] + a[i + 1] >= k) {
pos = i;
break;
}
if (pos == 0)
ret... | [["+", 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, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47]] | 1 | 186 |
#include <cstdio>
int N, L, a[100001];
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) {
puts("Possible");
for (int j = 1; j < i; j++)
printf("%d\n", j);
for (int j = i + 1; j < N; j++)
... | #include <cstdio>
int N, L, a[100001];
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) {
puts("Possible");
for (int j = 1; j < i; j++)
printf("%d\n", j);
for (int j = N - 1; j > i; j--)
... | [["-", 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], ["-", 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, 15, 16, 17, 47], ["+", 8, 5... | 1 | 165 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
inline ll read() {
ll x = 0;
char ch = getchar();
while (ch < '0' || '9' < ch)
ch = getchar();
while ('0' <= ch && ch <= '9')
x = x * 10 + (ch ^ 48), ch = getcha... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
inline ll read() {
ll x = 0;
char ch = getchar();
while (ch < '0' || '9' < ch)
ch = getchar();
while ('0' <= ch && ch <= '9')
x = x * 10 + (ch ^ 48), ch = getcha... | [["-", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["-", 0, 30, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 30, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 36, 36, 0, 30, 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, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+"... | 1 | 269 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, l, a[N];
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) {
puts("Possible");
for (int j = 1; j < n; j++)
if (j != i)... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, l, a[N];
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) {
puts("Possible");
for (int j = 1; j < i; j++)
printf("%d\... | [["-", 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 | 164 |
#include <bits/stdc++.h>
using namespace std;
int n, mx;
int a[111111];
int main() {
// freopen("input.inp", "r", stdin);
scanf("%d%d", &n, &mx);
long long s = 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] >= mx) {
printf("Possible\n... | #include <bits/stdc++.h>
using namespace std;
int n, mx;
int a[111111];
int main() {
// freopen("input.inp", "r", stdin);
scanf("%d%d", &n, &mx);
for (int i = 1; i <= n; ++i) {
scanf("%d", &a[i]);
}
for (int i = 1; i < n; ++i)
if (a[i] + a[i + 1] >= mx) {
printf("Possible\n");
for (int ... | [["-", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 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, 43, 0, 35], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43... | 1 | 183 |
#include <bits/stdc++.h>
using namespace std;
#define for_(i, a, b) for (int i = (a); i < (b); ++i)
typedef long long lint;
int N;
lint L, a[100005];
int main() {
cin >> N >> L;
for_(i, 0, N) cin >> a[i];
int s = -1;
for_(i, 0, N - 1) if (a[i] + a[i + 1] >= L) {
s = i;
break;
}
if (s == -1)
... | #include <bits/stdc++.h>
using namespace std;
#define for_(i, a, b) for (int i = (a); i < (b); ++i)
#define for_rev(i, a, b) for (int i = (a); i >= (b); --i)
typedef long long lint;
int N;
lint L, a[100005];
int main() {
cin >> N >> L;
for_(i, 0, N) cin >> a[i];
int s = -1;
for_(i, 0, N - 1) if (a[i] + a[i ... | [["+", 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 | 157 |
N,L = list(map(int,input().split()))
a = list(map(int,input().split()))
a.append(0)
b = []
res = "Impossible"
for i in range(N):
if L <= (a[i]+a[i+1]):
count = i
res = "Possible"
break
if res =="Possible":
for j in range(count):
b.append(a[j])
for k in range(count,N)[::-1]:... | N,L = list(map(int,input().split()))
a = list(map(int,input().split()))
a.append(0)
b = []
res = "Impossible"
for i in range(N):
if L <= (a[i]+a[i+1]):
count = i
res = "Possible"
break
if res =="Possible":
for j in range(count):
b.append(j+1)
for k in range(count+1,N)[::-1]... | [["-", 0, 1, 0, 652, 3, 4, 0, 206, 51, 22], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 0, 70], ["-", 0, 1, 0, 652, 3, 4, 0, 206, 0, 73], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612], ["+", 12, 206, 51, 652, 3, 4, 0, 657, 17, 72], ["+", 12, 206, 51, 652, 3, 4, 0, 657, 12, 612]] | 5 | 162 |
#include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
//#define int long long
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define all(c) begin(c), end(c)
const int INF =
sizeof(int) == sizeof(... | #include "bits/stdc++.h"
using namespace std;
#ifdef _DEBUG
#include "dump.hpp"
#else
#define dump(...)
#endif
//#define int long long
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define all(c) begin(c), end(c)
const int INF =
sizeof(int) == sizeof(... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 0, 9, 0, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 9, 0, 9, 0, 57, 64, 93, 0, 94], ["+", 0, 9, 0, 9, 0, 57, 64, 93, 0, 35], ["-", 0, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["-", 0, 9, 0, 57, 64, 9, 0, 93, 0, 35], ["-", 0, 9, 0, 9, 0, 57, ... | 1 | 361 |
#include <bits/stdc++.h>
#define FI(i, a, b) for (int i = (a); i <= (b); i++)
#define FD(i, a, b) for (int i = (a); i >= (b); i--)
#define LL long long
#define Ldouble long double
#define PI 3.14159265358979323846264338327950288419
#define PII pair<int, int>
#define PLL pair<LL, LL>
#define mp make_pair
#define fi f... | #include <bits/stdc++.h>
#define FI(i, a, b) for (int i = (a); i <= (b); i++)
#define FD(i, a, b) for (int i = (a); i >= (b); i--)
#define LL long long
#define Ldouble long double
#define PI 3.14159265358979323846264338327950288419
#define PII pair<int, int>
#define PLL pair<LL, LL>
#define mp make_pair
#define fi f... | [["+", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 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], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]... | 1 | 215 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define FOR(i, k, n) for (int i = (k); i < (int... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define FOR(i, k, n) for (int i = (k); i < (int... | [["-", 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 | 246 |
#include <bits/stdc++.h>
#define ll long long
#define pll pair<ll, ll>
#define pil pair<int, ll>
#define pli pair<ll, int>
#define pii pair<int, int>
#define mk make_pair
#define pb push_back
#define eps 1e-12
#define MAXN 200009
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout... | #include <bits/stdc++.h>
#define ll long long
#define pll pair<ll, ll>
#define pil pair<int, ll>
#define pli pair<ll, int>
#define pii pair<int, int>
#define mk make_pair
#define pb push_back
#define eps 1e-12
#define MAXN 200009
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout... | [["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 35], ["+", 75, 76, 0, 9, 0, 1, 0, 16, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 44], ["+", 0, 57, 75, 76, 0, 9, 0, 1, ... | 1 | 237 |
#include <bits/stdc++.h>
#define MAXN 100000
using namespace std;
int st[MAXN + 1];
int r[MAXN + 1];
int sol[MAXN + 1];
int main() {
// ifstream cin("A.in");
// ofstream cout("A.out");
int i, n, len, l;
ios::sync_with_stdio(false);
cin >> n >> l;
int sz = -1;
int cnt = 0;
for (i = 1; i <= n; i++) {... | #include <bits/stdc++.h>
#define MAXN 100000
using namespace std;
long long st[MAXN + 1];
int r[MAXN + 1];
int sol[MAXN + 1];
int main() {
// ifstream cin("A.in");
// ofstream cout("A.out");
int i, n, l;
long long len;
ios::sync_with_stdio(false);
cin >> n >> l;
int sz = -1;
int cnt = 0;
for (i =... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22]] | 1 | 199 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
ll l;
cin >> l;
std::vector<ll> v(n);
ll idx;
bool flag = false;
for (int i = 0; i < n; i++) {
cin >> v[i];
}
for (int i = 0; i < n - 1; i++) {
i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n;
cin >> n;
ll l;
cin >> l;
std::vector<ll> v(n);
ll idx;
bool flag = false;
for (int i = 0; i < n; i++) {
cin >> v[i];
}
for (int i = 0; i < n - 1; i++) {
i... | [["-", 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], ["-", 8, 9, 0, ... | 1 | 217 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define rep(n) for (int i = 0; i < n; i++)
#define repp(j, n) for (int j = 0; j < n; j++)
#define reppp(i, ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
#define rep(n) for (int i = 0; i < n; i++)
#define repp(j, n) for (int j = 0; j < n; j++)
#define reppp(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 | 264 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = x * 10 + ch - '0';
ch = getchar();
}
return x *... | #include <bits/stdc++.h>
#define int long long
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = x * 10 + ch - '0';
ch = getchar();
}
return x *... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 4... | 1 | 300 |
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
using namespace std;
int main(void) {
int a[100000];
int n;
int l;
int s;
int max;
int mid;
int x;
scanf("%d %d", &n, &l);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
if (i > 0) {
x = a[i - 1] + a[i];
... | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
using namespace std;
int main(void) {
int a[100000];
int n;
int l;
int max;
int mid;
int x;
max = 0;
scanf("%d %d", &n, &l);
for (int i = 0; i < n; i++) {
scanf("%d", &a[i]);
if (i > 0) {
x = a[i - 1] + a[i];
... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]] | 1 | 211 |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
const int INF = 1e9;
int a[100010];
int main(void) {
int n, l;
cin >> n >> l;
rep(i, n) cin >> a[i];
int idx;
rep(i, n - 1... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
const int INF = 1e9;
int a[100010];
int main(void) {
int n, l;
cin >> n >> l;
rep(i, n) cin >> a[i];
int idx;
rep(i, n - 1... | [["+", 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], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 207 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll p = 1e9 + 7;
const int MAXN = 2e5 + 5;
int n, l, a[MAXN];
int main() {
cin >> n >> l;
for (int i = 0; i < n; ++i)
cin >> a[i];
int y = -1;
for (int i = 0; i < n - 1; ++i)
if (a[i] + a[i + 1] >= l)
y = i;
if (y == -1)... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll p = 1e9 + 7;
const int MAXN = 2e5 + 5;
int n, l, a[MAXN];
int main() {
cin >> n >> l;
for (int i = 0; i < n; ++i)
cin >> a[i];
int y = -1;
for (int i = 0; i < n - 1; ++i)
if (a[i] + a[i + 1] >= l)
y = i;
if (y == -1)... | [["-", 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, 19], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 0, 14... | 1 | 193 |
#include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repp(i, n) rep(i, 0, n)
#define repb(i, a, b) for (int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;
typedef pair<int, int> P;
signed main() {
int n, l;
cin >> n >> l;
vector<int> ... | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repp(i, n) rep(i, 0, n)
#define repb(i, a, b) for (int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;
typedef pair<int, int> P;
signed main() {
int n, l;
cin >> n >> l;
vector<int> ... | [["-", 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 | 213 |
// C.
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
int N, L, prev;
cin >> N >> L >> prev;
for (int i = 1; i < N; ++i) {
int a;
cin >> a;
if (prev + a >= L) {
cout << "... | // C.
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <sstream>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
int N, L, prev;
cin >> N >> L >> prev;
for (int i = 1; i < N; ++i) {
int a;
cin >> a;
if (prev + a >= L) {
cout << "... | [["+", 64, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 64, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 20], ["-", 0, 1, 0, 16, 31, 16, 12, 23, 0, 24], ["-", 0, 16, 31, 16, 12, 23, 0, 16, 17, 72], ["-", 0, 16, 31, 16, 12, 23, 0, 16, 12, 13], ["-", 0, 1, ... | 1 | 169 |
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include ... | #include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <map>
#include <memory>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include ... | [["-", 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 | 3,229 |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N, L;
cin >> N >> L;
vector<int> a(N);
for (int i = 0; i < N; i++)
cin >> a[i];
in... | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N, L;
cin >> N >> L;
vector<int> a(N);
for (int i = 0; i < N; i++)
cin >> a[i];
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, 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, 20], ["+", 8... | 1 | 203 |
#include <bits/stdc++.h>
using namespace std;
namespace {
typedef double real;
typedef long long ll;
template <class T> ostream &operator<<(ostream &os, const vector<T> &vs) {
for (int i = 0; i < vs.size(); i++)
os << vs[i] << endl;
return os;
}
template <class T> istream &operator>>(istream &is, vector<T> ... | #include <bits/stdc++.h>
using namespace std;
namespace {
typedef double real;
typedef long long ll;
template <class T> ostream &operator<<(ostream &os, const vector<T> &vs) {
for (int i = 0; i < vs.size(); i++)
os << vs[i] << endl;
return os;
}
template <class T> istream &operator>>(istream &is, vector<T> ... | [["-", 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 | 285 |
#include <bits/stdc++.h>
#define mp make_pair
#define mt make_tuple
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
const int INF = 1 << 29;
const double EPS = 1e-9;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1,... | #include <bits/stdc++.h>
#define mp make_pair
#define mt make_tuple
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
const int INF = 1 << 29;
const double EPS = 1e-9;
const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1,... | [["-", 64, 9, 0, 7, 10, 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, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 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, 57... | 1 | 300 |
#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 <numeric>
#include <queue>
#include <set>
#include <sst... | #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 <numeric>
#include <queue>
#include <set>
#include <sst... | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["-", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 373 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = (int)(s); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
typedef long long i64;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, L;
cin >> N >> L;
vector<i64> a(N);
rep(i, N) cin >> a[i];
int aim = -1;
i64 le... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = (int)(s); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
typedef long long i64;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, L;
cin >> N >> L;
vector<i64> a(N);
rep(i, N) cin >> a[i];
int aim = -1;
i64 le... | [["-", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["+", 64, 9, 0, 1, 0, 16, 12, 103, 0, 104], ["+", 64, 9, 0, 1, 0, 16, 12, 103, 0, 44], ["+", 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 | 203 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = (int)(s); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
typedef long long i64;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, L;
cin >> N >> L;
vector<i64> a(N);
rep(i, N) cin >> a[i];
int aim = -1;
i64 le... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, s, n) for (int i = (int)(s); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
typedef long long i64;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, L;
cin >> N >> L;
vector<i64> a(N);
rep(i, N) cin >> a[i];
int aim = -1;
i64 le... | [["+", 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 | 203 |
import java.util.Scanner;
public class Main {
void run() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int L = sc.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
}
int j = -1;
for (int i = 0; i < n - 1; i++) {
int sum... |
import java.util.Scanner;
public class Main {
void run() {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
long L = sc.nextInt();
long[] a = new long[n];
for (int i = 0; i < n; i++) {
a[i] = Long.parseLong(sc.next());
}
int j = -1;
for (int i = 0; i < n - 1; i++)... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 39, 224, 468, 506, 0, 507], ["+", 8, 196, 0, 503, 39, 224, 468, 506, 0, 96], ["-", 0, 503, 49, 200, 51, 227, 39, 506, 0, 507], ["+", 0, 503, 49, 200, 51, 227, 39, 506, 0, 96], ["+", 8, 196, 0, 1, 0, 11,... | 3 | 260 |
#! /usr/bin/env python3
def main():
N, L = map(int, input().split())
A = list(map(int, input().split()))
a, b = 1, N-1
l = []
la = N
for i in range(N-1):
if A[i] + A[i+1] >= L:
la = i
break
if la == N:
print('Impossible')
return
l+=[la+1]
... | #! /usr/bin/env python3
def main():
N, L = map(int, input().split())
A = list(map(int, input().split()))
la = N
for i in range(N-1):
if A[i] + A[i+1] >= L:
la = i
break
if la == N:
print('Impossible')
return
print('Possible')
for i in range(la... | [["-", 8, 196, 0, 1, 0, 662, 31, 684, 0, 22], ["-", 8, 196, 0, 1, 0, 662, 31, 684, 0, 21], ["-", 0, 14, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 8, 196, 0, 1, 0, 662, 12, 432, 0, 612], ["-", 8, 196, 0, 1, 0, 662, 12, 432, 0, 21], ["-", 0, 1, 0, 662, 12, 432, 0, 657, 31, 22], ["-", 0, 1, 0, 662, 12, 432, 0, 657, 17, 33], ["-... | 5 | 153 |
# Try AtCoder
# author: Leonardone @ NEETSDKASU
############################################################
def gs() gets.chomp end
def gi() gets.to_i end
def gf() gets.to_f end
def gss() gs.split end
def gis() gss.map(&:to_i) end
def nmapf(n,f) n.times.map{ __send__ f } end
def ngs(n) nmapf n,:gs end
def ngi(n) nmapf... | # Try AtCoder
# author: Leonardone @ NEETSDKASU
############################################################
def gs() gets.chomp end
def gi() gets.to_i end
def gf() gets.to_f end
def gss() gs.split end
def gis() gss.map(&:to_i) end
def nmapf(n,f) n.times.map{ __send__ f } end
def ngs(n) nmapf n,:gs end
def ngi(n) nmapf... | [["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["-", 0, 652, 3, 4, 0, 738, 31, 739, 0, 24], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 0, 32], ["+", 36, 36, 0, 493, 0, 662, 12, 516, 0, 70], ["+", 36, 36, 0, 493, 0, 662, 12, 516, 0, 73], ["+", 36, 36, 0, 493, 0, 751, 8, 755, 3... | 4 | 369 |
n,l=gets.split.map &:to_i
a=gets.split.map &:to_i
j=false
c=nil
(n-1).times do |i|
if a[i]+a[i+1]>=l
j=true
c=i
break
end
end
if j
puts :Possible
c.times do |i|
p i+1
end
(n-c-1).downto(c) do |i|
p i+1
end
else
puts :Impossible
end | n,l=gets.split.map &:to_i
a=gets.split.map &:to_i
j=false
c=nil
(n-2).downto(0) do |i|
if a[i]+a[i+1]>=l
j=true
c=i
break
end
end
if j
puts :Possible
c.times do |i|
p i+1
end
(n-2).downto(c) do |i|
p i+1
end
else
puts :Impossible
end | [["-", 0, 493, 0, 652, 486, 739, 0, 738, 12, 612], ["+", 0, 493, 0, 652, 486, 739, 0, 738, 12, 612], ["-", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 24], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 612], ["+", 36, 36, 0, 493, 0, 652, 3, 4... | 4 | 101 |
n=int(input())
a=sorted(map(int,input().split()))[::-1]
j=i=x=0
while x<n:i+=a[i]>i;j+=a[j]>=i,x+=1
print('SFeicrosntd'[(a[i-1]^i|j^i)&1::2])
| n=int(input())
a=sorted(map(int,input().split()))[::-1]
j=i=0
while n:i+=a[i]>i;j+=a[j]>=i;n-=1
print('SFeicrosntd'[(a[i-1]^i|j^i)&1::2])
| [["-", 0, 1, 0, 662, 12, 662, 12, 662, 31, 22], ["-", 0, 1, 0, 662, 12, 662, 12, 662, 0, 32], ["-", 36, 36, 0, 656, 0, 52, 15, 666, 0, 22], ["-", 36, 36, 0, 656, 0, 52, 15, 666, 667, 18], ["-", 8, 196, 0, 1, 0, 677, 12, 432, 0, 21], ["-", 0, 1, 0, 677, 12, 432, 0, 657, 31, 22], ["-", 0, 1, 0, 677, 12, 432, 0, 657, 17, ... | 5 | 92 |
#include <bits/stdc++.h>
using namespace std;
template <typename T> void fin(T a) {
cout << a << endl;
exit(0);
}
signed main() {
int n;
cin >> n;
vector<int> v(n);
for (int i = 0; i < n; i++)
cin >> v[i];
sort(v.begin(), v.end());
int migi = 0;
bool mfw = !(n & 1);
for (int i = 0; i < n; i++)... | #include <bits/stdc++.h>
using namespace std;
template <typename T> void fin(T a) {
cout << a << endl;
exit(0);
}
signed main() {
int n;
cin >> n;
vector<int> v(n);
for (int i = 0; i < n; i++)
cin >> v[i];
sort(v.begin(), v.end());
int migi = 0;
bool mfw = !(n & 1);
for (int i = 0; i < n; i++)... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 57, 0, 121], ["+", 0, 57, 75, 76, 0, 57, 15, 339, 0, 24], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 0, 57, 75, 76, 0, 57, 15, 339, 0, 25], ["+"... | 1 | 245 |
#include <bits/stdc++.h>
using namespace std;
template <typename T> void fin(T a) {
cout << a << endl;
exit(0);
}
signed main() {
int N;
cin >> N;
vector<int> v(N);
for (int i = 0; i < N; i++)
cin >> v[i];
sort(v.rbegin(), v.rend());
int now = 0;
while (now + 1 < v[now + 1])
now++;
int tmp... | #include <bits/stdc++.h>
using namespace std;
template <typename T> void fin(T a) {
cout << a << endl;
exit(0);
}
signed main() {
int N;
cin >> N;
vector<int> v(N);
for (int i = 0; i < N; i++)
cin >> v[i];
v.push_back(-1);
sort(v.rbegin(), v.rend());
int now = 0;
while (now + 1 < v[now + 1])
... | [["+", 8, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 8, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 1... | 1 | 179 |
#include <bits/stdc++.h>
using namespace std;
int n, a[100010], ans;
void f(int p) {
int dx = 0, dy = a[p] - p;
for (int i = p + 1; i <= n; ++i) {
if (a[i] >= p)
++dx;
}
if (dx & 1 || dy & 1)
puts("First");
else
puts("Second");
}
int main() {
// freopen("in.txt","r",stdin);
cin >> n;
f... | #include <bits/stdc++.h>
using namespace std;
int n, a[100010];
void f(int p) {
int dx = 0, dy = a[p] - p;
for (int i = p + 1; i <= n && a[i] == p; ++i) {
++dx;
}
if ((dx & 1) || (dy & 1))
puts("First");
else
puts("Second");
}
int main() {
// freopen("in.txt","r",stdin);
cin >> n;
for (int i... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 25], ["-", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["-", 8, 9, 0, 7, 8, 9, 0, ... | 1 | 236 |
#include <bits/stdc++.h>
using namespace std;
#define il inline
#define re register
#define debug printf("Now is Line : %d\n", __LINE__)
#define file(a) \
freopen(#a ".in", "r", stdin); \
freopen(#a ".out", ... | #include <bits/stdc++.h>
using namespace std;
#define il inline
#define re register
#define debug printf("Now is Line : %d\n", __LINE__)
#define file(a) \
freopen(#a ".in", "r", stdin); \
freopen(#a ".out", ... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 52, 8, 1, 0, 34, 31, 27, 17, 29], ["+", 0, 52, 8, 1, 0, 34, 31, 11, 17, 130], ["+", 0, 52, 8, 1, 0, 34, 31, 11, 12, 13], ["-... | 1 | 369 |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int n, a[maxn];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
sort(a + 1, a + n + 1, greater<int>());
int x = 0, y = 0;
while (y + 1 < a[x + 1])
++x, ++y;
int len_u = a[x] - y;
int len_r = 0... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
int n, a[maxn];
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d", &a[i]);
sort(a, a + n, greater<int>());
int x = 0, y = 0;
while (y + 1 < a[x + 1])
++x, ++y;
int len_u = a[x] - y;
int len_r = 0;
while... | [["-", 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, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 23, 0, 91, 17, 111], ["+", 51, 16, 31, 23,... | 1 | 172 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb emplace_back
const int maxn = 1e5 + 10;
#define int ll
int n, a[maxn];
#define yn(i) ((i) ? "First" : "Second")
signed main() {
ios_base::sync_with_stdio(0), cin.tie(0);
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> a[i];
sort(a ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define pb emplace_back
const int maxn = 1e5 + 10;
#define int ll
int n, a[maxn];
#define yn(i) ((i) ? "First" : "Second")
signed main() {
ios_base::sync_with_stdio(0), cin.tie(0);
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> a[i];
sort(a ... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 52, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 12, 16, ... | 1 | 198 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int MN = 101234, S = 30000;
int a[MN], n;
bool val(int x, int y) {
// cout << x << ' ' << y << ' ' << (x < n) << (a[x] > y) << endl;
return x < n && a[x] > y;
}
bool get(int x, int y) {
// cerr << x << ' ' << y << endl;
if (val(x + S, ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MN = 101234, S = 30000;
int a[MN], n;
bool val(int x, int y) {
// cout << x << ' ' << y << ' ' << (x < n) << (a[x] > y) << endl;
return x < n && a[x] > y;
}
bool get(int x, int y) {
// cerr << x << '|' << y << endl;
if (val(x + S, ... | [["-", 0, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["+", 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, 91, 17, 111], ["+", 0, 43, 49, 50, 51, 91, 28, 2, 63, 22], ["+", ... | 1 | 328 |
/// In The Name Of God
#include <bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define pp pop_back
#define mp make_pair
#define sz(x) (int)x.size()
#define sqr(x) ((x)*1ll * (x))
#define all(x) x.begin(), x.end()
#define rep(i, l, r) for (int i = (l); i <= (r); i++)
#define per(i, l, r) for ... | /// In The Name Of God
#include <bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define pp pop_back
#define mp make_pair
#define sz(x) (int)x.size()
#define sqr(x) ((x)*1ll * (x))
#define all(x) x.begin(), x.end()
#define rep(i, l, r) for (int i = (l); i <= (r); i++)
#define per(i, l, r) for ... | [["+", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["-", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0... | 1 | 335 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
const int maxn = 1e5 + 1000;
int h[maxn], n, lim[maxn];
bool cmp(int x, int y) { return x > y; }
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &h[i]);
sort(h + 1, h + 1 + n, cmp);
lim[0]... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
using namespace std;
const int maxn = 1e5 + 1000;
int h[maxn], n, lim[maxn];
bool cmp(int x, int y) { return x > y; }
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &h[i]);
sort(h + 1, h + 1 + n, cmp);
lim[0]... | [["-", 0, 52, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 91, 17, 111], ["-", 8, 9... | 1 | 271 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
const int N = 100010, M = 1000010, P = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const int INF = 0xcfcfcfcf;
const double eps = 1e-9, pi = asin(1) * 2;
inline ll read();
#define cmax(a, b) a = max(a, b)
#define cmin(a, b) a = min(a, b)
in... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef double db;
const int N = 100010, M = 1000010, P = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const int INF = 0xcfcfcfcf;
const double eps = 1e-9, pi = asin(1) * 2;
inline ll read();
#define cmax(a, b) a = max(a, b)
#define cmin(a, b) a = min(a, b)
in... | [["-", 0, 1, 0, 34, 31, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 1, 0, 34, 12, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 63, 346, 141, 22], ["+", 3, 4, 0, 2, 63, 346, 3, 347, 0, 18], ["+", 0, 2, 63, 346, 3, 347, 0, 77, 39, 40], ["+", 3, 4, 0, 2, 63, 346, 3, 347, 0, 47], ["-", 0, 34, 12, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 34, 12, 2, 3,... | 1 | 531 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
using... | #include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
using... | [["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 15, 339, 51, 16, 12, 16, 31, 69, 28, 22], ["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 70], ["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 73], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, ... | 1 | 2,334 |
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep3(i, a, b) for (ll i = a; i >= b; i--)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pq priority_queue
#define pb push_back
#de... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
#define ll long long
#define rep2(i, a, b) for (ll i = a; i <= b; ++i)
#define rep(i, n) for (ll i = 0; i < n; i++)
#define rep3(i, a, b) for (ll i = a; i >= b; i--)
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pq priority_queue
#define pb push_back
#de... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 75, 76, 0, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 3, 4, 0, 16, 31, 16, 31, 69, 28, 22], ["+", 0,... | 1 | 664 |
/* be name khoda */
// #define stream_enable
#define long_enable
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
#ifdef stream_enable
#define cin sss
#endif
#ifdef... | /* be name khoda */
// #define stream_enable
#define long_enable
#include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
#ifdef stream_enable
#define cin sss
#endif
#ifdef... | [["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 2, 3, 4, 0, 2, 63, 346, 141, 22], ["+", 3, 4, 0, 2, 63, 346, 3, 347, 0, 18], ["+", 0, 2, 63, 346, 3, 347, 0, 77, 39, 78], ["+", 3, 4, 0, 2, 63, 346, 3, 347, 0, 47], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 52, 15, 339, 51, 16, 3... | 1 | 480 |
#include <bits/stdc++.h>
using namespace std;
#define N 100001
int t, a[N], n;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i)
scanf("%d", &a[i]);
sort(a + 1, a + n + 1, greater<int>());
int add = 1, adds = 1;
while (add <= n && a[add] >= add)
add++;
while (adds <= n && a[adds] > add)
... | #include <bits/stdc++.h>
using namespace std;
#define N 100001
int t, a[N], n;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i)
scanf("%d", &a[i]);
sort(a + 1, a + n + 1, greater<int>());
int add = 1, adds = 1;
while (add < n && a[add + 1] >= add + 1)
add++;
while (adds < n && a[adds + 1] ... | [["-", 0, 52, 15, 339, 51, 16, 31, 16, 17, 19], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 12, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 12, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 17, 72], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 12, 13], ["-", 0, 52, 15, 339, 51, 16, 12,... | 1 | 165 |
#include <algorithm>
#include <cstdio>
const int MAXN = 1e5 + 5;
template <typename _T> void read(_T &x) {
x = 0;
char s = getchar();
int f = 1;
while (s < '0' || '9' < s) {
f = 1;
if (s == '-')
f = -1;
s = getchar();
}
while ('0' <= s && s <= '9') {
x = (x << 1) + (x << 3) + s - '0'... | #include <algorithm>
#include <cstdio>
const int MAXN = 1e5 + 5;
template <typename _T> void read(_T &x) {
x = 0;
char s = getchar();
int f = 1;
while (s < '0' || '9' < s) {
f = 1;
if (s == '-')
f = -1;
s = getchar();
}
while ('0' <= s && s <= '9') {
x = (x << 1) + (x << 3) + s - '0'... | [["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 72], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 147], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 146], ["-", 0, 2, 3, 4, 0, 41, 15, 16, 17, 140], ["-", 3, 4, 0, 41, 15, 16, 12, 23, 0, 24], ["-", 15, 16, 12, 23, 0, 16, 31, 23, 0, 24], ["-", 12... | 1 | 371 |
// IOI 2021
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ff first
#define ss second
typedef long long ll;
typedef pair<int, int> pii;
const int MAXN = 100 * 1000 + 17;
int n, a[MAXN], nx, ny, x, y;
int main() {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
cin >> n;
... | // IOI 2021
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define ff first
#define ss second
typedef long long ll;
typedef pair<int, int> pii;
const int MAXN = 100 * 1000 + 17;
int n, a[MAXN], nx, ny, x = 1, y;
int main() {
ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
cin >> ... | [["+", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, ... | 1 | 237 |
#include <bits/stdc++.h>
const int N = 1e5 + 10;
int n, a[N];
inline int read() {
int x = 0, k = 1;
char c = getchar();
for (; c < 48 || c > 57; c = getchar())
k ^= (c == '-');
for (; c >= 48 && c <= 57; c = getchar())
x = x * 10 + (c ^ 48);
return k ? x : -x;
}
inline bool cmp(int x, int y) { ret... | #include <bits/stdc++.h>
const int N = 1e5 + 10;
int n, a[N];
inline int read() {
int x = 0, k = 1;
char c = getchar();
for (; c < 48 || c > 57; c = getchar())
k ^= (c == '-');
for (; c >= 48 && c <= 57; c = getchar())
x = x * 10 + (c ^ 48);
return k ? x : -x;
}
inline bool cmp(int x, int y) { ret... | [["-", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 25], ["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 0, 57, 64... | 1 | 293 |
#include <bits/stdc++.h>
#define N 1000005
#define ll long long int
#define MP make_pair
#define pb push_back
#define ppb pop_back
#define sp " "
#define endl "\n"
#define fi first
#define se second
#define ii pair<int, int>
#define lli pair<ll, ll>
#define fast ... | #include <bits/stdc++.h>
#define N 1000005
#define ll long long int
#define MP make_pair
#define pb push_back
#define ppb pop_back
#define sp " "
#define endl "\n"
#define fi first
#define se second
#define ii pair<int, int>
#define lli pair<ll, ll>
#define fast ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 1, 0, 11, 12, 16, 12, 69, 28, 22], ["-", 0, 11, 12, 16, 12, 69, 341, 342, 0, 70], ["-", 12, 16, 12, 69, 341, 342, 0, 16, 17, 72], ["-", 12, ... | 1 | 259 |
#include "bits/stdc++.h"
#include <cassert>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
const int mod = 1000000007;
const int inf = 1ll << 61;
typedef pair<int, int> P;
typedef pair<int, P> PP;
int a[100006];
signed main() {
int n;
cin >> n;
rep(i, n) cin >> a[i];
s... | #include "bits/stdc++.h"
#include <cassert>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
const int mod = 1000000007;
const int inf = 1ll << 61;
typedef pair<int, int> P;
typedef pair<int, P> PP;
int a[100006];
signed main() {
int n;
cin >> n;
rep(i, n) cin >> a[i];
s... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 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, 13], ["+", 0, 14, 8, 9, 0, 14, 8, 9, 0, 46], ["+", 0, 30, 0, 14, 8, 9, 0... | 1 | 202 |
#include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
bool cmp(int a, int b) { return a > b; }
int a[100005];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
sort(a + 1, a + 1 + n, cmp);
int ans = 0;
bool b = 0;
for (int i = 1; i <= n + 1; i++) {
... | #include <algorithm>
#include <iostream>
using namespace std;
bool cmp(int a, int b) { return a > b; }
int a[100005];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
sort(a + 1, a + 1 + n, cmp);
int ans = 0;
bool b = 0;
for (int i = 1; i <= n + 1; i++) {
if (a[i] == i... | [["-", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["-", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 284 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#define maxn 100010
using namespace std;
int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch - '0' < 0 || ch - '0' > 9) {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch - '0' >= 0 && ch -... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#define maxn 100010
using namespace std;
int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch - '0' < 0 || ch - '0' > 9) {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch - '0' >= 0 && ch -... | [["-", 0, 14, 8, 9, 0, 1, 0, 27, 28, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 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, 30, 0, 14, 8, 9,... | 1 | 296 |
#include <bits/stdc++.h>
using namespace std;
int n, a[233333], maxx[233333];
int main() {
ios_base::sync_with_stdio(false);
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
sort(a + 1, a + n + 1);
for (int i = 1; i <= n; i++)
maxx[i] = max(maxx[i - 1], a[i]);
int l = 0, ans = 0;
for (int... | #include <bits/stdc++.h>
using namespace std;
int n, a[233333], maxx[233333];
int main() {
ios_base::sync_with_stdio(false);
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
}
sort(a + 1, a + n + 1);
for (int i = 1; i <= n; i++)
maxx[i] = max(maxx[i - 1], a[i]);
int l = 0, ans = 0;
for (int... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["+", 31, 16, 31, 23, 0, 16, 12, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 23, 0, 16, 31, 22], ["+", 31, 23, 0, 16, 12, 23, 0, 16, 17, 33], ["... | 1 | 217 |
#include <algorithm>
#include <bitset>
#include <cassert>
#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 <numeric>
#include <queue>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#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 <numeric>
#include <queue>
#include ... | [["+", 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, 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, 2, 3, 4, 0, 16, 31, 16, 31, 22], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 17, 72],... | 1 | 477 |
#include <bits/stdc++.h>
using namespace std;
#define taskname "A"
#define pb push_back
#define mp make_pair
#ifndef LOCAL
#define cerr \
if (0) \
cout
#endif
typedef long double... | #include <bits/stdc++.h>
using namespace std;
#define taskname "A"
#define pb push_back
#define mp make_pair
#ifndef LOCAL
#define cerr \
if (0) \
cout
#endif
typedef long double... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 67], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 15, 339, 51, 16, 12, 16, 31, 23, 0, 25], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 67], ["+", 51, 16, 12, 16, 31, 23, 0, 16,... | 1 | 268 |
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
const int N = 1e5 + 1;
int read() {
int s = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
s = s * 10 + ch - '0', ch = getcha... | #include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
const int N = 1e5 + 1;
int read() {
int s = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
s = s * 10 + ch - '0', ch = getcha... | [["-", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 25], ["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-", 8, 9, 0, ... | 1 | 401 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
struct cmp {
inline bool operator()(const int &i1, const int &i2) const { return i1 > i2; }
};
int a[1000005];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i];
sort(a + 1, a + 1 + n);
for (int i = 1;... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int a[1000005];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++)
cin >> a[i];
sort(a + 1, a + 1 + n, greater<int>());
for (int i = 1; i <= n; i++)
if (i + 1 > a[i + 1]) {
int j = 0;
for (; a[j + i + ... | [["-", 36, 36, 36, 36, 0, 30, 0, 122, 0, 149], ["-", 36, 36, 36, 36, 0, 30, 0, 122, 141, 78], ["-", 36, 36, 0, 30, 0, 122, 8, 123, 0, 45], ["-", 0, 122, 8, 123, 0, 14, 0, 114, 0, 174], ["-", 0, 30, 0, 122, 8, 123, 0, 14, 39, 40], ["-", 8, 123, 0, 14, 49, 53, 49, 366, 0, 17], ["-", 8, 123, 0, 14, 49, 53, 49, 366, 0, 419... | 1 | 182 |
#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, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 33], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["+", 15, 339, 51,... | 1 | 504 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
int n, pos, a[N];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i)
scanf("%d", a + i);
sort(a + 1, a + 1 + n, greater<int>());
for (int i = 1; i <= n; ++i) {
if (a[i] < i) {
pos = i;
break;
}
}
assert(... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
int n, pos, a[N];
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i)
scanf("%d", a + i);
sort(a + 1, a + 1 + n, greater<int>());
for (pos = 1; pos <= n; ++pos) {
if (a[pos] < pos)
break;
}
--pos;
cerr << "pos = ... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["-", 15, 339, 51, 16, 3... | 1 | 220 |
#include <bits/stdc++.h>
#define pb push_back
#define int long long
#define mp make_pair
#define inf 1000000007
#define ll long long
using namespace std;
signed main() {
int n;
cin >> n;
vector<int> a;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
a.pb(x);
}
sort(a.begin(), a.end(), greater<ll>... | #include <bits/stdc++.h>
#define pb push_back
#define int long long
#define mp make_pair
#define inf 1000000007
#define ll long long
using namespace std;
signed main() {
int n;
cin >> n;
vector<int> a;
for (int i = 0; i < n; i++) {
int x;
cin >> x;
a.pb(x);
}
sort(a.begin(), a.end(), greater<ll>... | [["+", 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], ["+", 0, 57, 64, 9, 0, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 43, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 64, 9, 0, 1,... | 1 | 240 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace s... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace s... | [["+", 0, 57, 15, 339, 51, 16, 31, 69, 28, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 70], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 22], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 0, 57, 64, 9, 0, 57, 15, 33... | 1 | 4,121 |
#include <bits/stdc++.h>
bool solve();
int main() {
if (solve())
puts("First");
else
puts("Second");
return 0;
}
bool solve() {
int N;
scanf("%d", &N);
std::vector<int> a(N);
for (auto &e : a)
scanf("%d", &e);
std::sort(a.rbegin(), a.rend());
a.push_back(0);
for (auto &e : a)
e--... | #include <bits/stdc++.h>
bool solve();
int main() {
if (solve())
puts("First");
else
puts("Second");
return 0;
}
bool solve() {
int N;
scanf("%d", &N);
std::vector<int> a(N);
for (auto &e : a)
scanf("%d", &e);
std::sort(a.rbegin(), a.rend());
a.push_back(0);
for (auto &e : a)
e--... | [["-", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 8, 9, 0, 57, 64, 9, 0, 43, 39, 40], ["+", 0, 57, 64, 9, 0, 43, 49, 50, 49, 22], ["+", 64, 9, 0, 43, 49, 50, 51, 83, 0, 45], ["+", 64, 9, 0, 43, 49, 50, 51, 83, 0, 46], ["+", 8, 9, 0, 57, 64, 9, 0, 43, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 7, 0, 88], ["+", 0, 57, 64, 9, 0,... | 1 | 240 |
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
using namespace std;
const int N = 4e5;
int a[N + 3];
int d[N + 3];
int dp[N + 3][10];
vector<int> b;
int n;
bool cmp(int x, int y) { return x > y; }
int main() {
scanf("%d", &n);
for (int i = 1; i <... | #include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
using namespace std;
const int N = 4e5;
int a[N + 3];
int d[N + 3];
int dp[N + 3][10];
vector<int> b;
int n;
bool cmp(int x, int y) { return x > y; }
int main() {
scanf("%d", &n);
for (int i = 1; i <... | [["-", 0, 30, 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, 60], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["-", 15, 339, 51, 16, 12, 16, 31, 69, 28, 22],... | 1 | 291 |
#include <bits/stdc++.h>
using namespace std;
#define sz(x) ((int)((x).size()))
typedef long long ll;
typedef long double ld;
int n, a[200000];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(10);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
sort(a, a +... | #include <bits/stdc++.h>
using namespace std;
#define sz(x) ((int)((x).size()))
typedef long long ll;
typedef long double ld;
int n, a[200000];
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout << fixed << setprecision(10);
cin >> n;
for (int i = 0; i < n; i++)
cin >> a[i];
sort(a, a +... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["-", 0, ... | 1 | 207 |
#include <bits/stdc++.h>
#define ll long long
#define inf(x) (ll)(1e##x)
using namespace std;
template <typename tn> void read(tn &a) {
tn x = 0, f = 1;
char c = ' ';
for (; !isdigit(c); c = getchar())
if (c == '-')
f = -1;
for (; isdigit(c); c = getchar())
x = x * 10 + c - '0';
a = x * f;
}
int... | #include <bits/stdc++.h>
#define ll long long
#define inf(x) (ll)(1e##x)
using namespace std;
template <typename tn> void read(tn &a) {
tn x = 0, f = 1;
char c = ' ';
for (; !isdigit(c); c = getchar())
if (c == '-')
f = -1;
for (; isdigit(c); c = getchar())
x = x * 10 + c - '0';
a = x * f;
}
int... | [["-", 51, 16, 31, 16, 31, 16, 12, 16, 17, 33], ["-", 51, 16, 31, 16, 31, 16, 12, 16, 12, 13], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 47], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 20], ["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["-", 15, 339, 51, 16, 12, 16, 31, 69, 28, 22], ["-", 51, 16, 12, 16, 31, 69, 341, 34... | 1 | 306 |
#include <bits/stdc++.h>
#define fi first
#define se second
#define pii pair<int, int>
#define mp make_pair
#define pb push_back
#define space putchar(' ')
#define enter putchar('\n')
#define eps 1e-10
#define MAXN 100005
//#define ivorysi
using namespace std;
typedef long long int64;
typedef unsigned int u32;
typedef ... | #include <bits/stdc++.h>
#define fi first
#define se second
#define pii pair<int, int>
#define mp make_pair
#define pb push_back
#define space putchar(' ')
#define enter putchar('\n')
#define eps 1e-10
#define MAXN 100005
//#define ivorysi
using namespace std;
typedef long long int64;
typedef unsigned int u32;
typedef ... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 0, 9, 0, 57, 64, 1, 0, 11, 17, 160], ["-", 64, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["-", 0, 11, 12, 16, 31, 23, 0, 16, 31, 22], ["-", 0, 11, 12, 16, 31, 23, 0, 16, 17, 67], ["-", 0, 11, 12, 16, 31, 23, 0, 16, 12, 13], ["-", 6... | 1 | 661 |
#include <bits/stdc++.h>
using namespace std;
const int Nmax = 1e6 + 5;
int n;
int a[Nmax];
bool bad(int l, int c) { return a[l] <= c; }
int main() {
freopen("input", "r", stdin);
cin.sync_with_stdio(false);
cin.tie(0);
int i, j;
cin >> n;
for (i = 1; i <= n; ++i)
cin >> a[i];
sort(a + 1, a + n... | #include <bits/stdc++.h>
using namespace std;
const int Nmax = 1e6 + 5;
int n;
int a[Nmax];
bool bad(int l, int c) { return a[l] <= c; }
int main() {
// freopen("input", "r", stdin);
cin.sync_with_stdio(false);
cin.tie(0);
int i, j;
cin >> n;
for (i = 1; i <= n; ++i)
cin >> a[i];
sort(a + 1, ... | [["-", 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, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 224 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
using pint = pair<int, int>;
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
template <class T1, class T2> ostream &operator<<(ostream &s, pair<T1, T2> P) {
return s << '<' << P.first << ", " << P.second <<... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
using pll = pair<long long, long long>;
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
template <class T1, class T2> ostream &operator<<(ostream &s, pair<T1, T2> P) {
return s << '<' << P.first << ", " << ... | [["-", 36, 36, 36, 36, 0, 30, 0, 360, 141, 78], ["+", 36, 36, 36, 36, 0, 30, 0, 360, 141, 78], ["-", 39, 77, 39, 344, 3, 347, 0, 77, 39, 40], ["+", 39, 344, 3, 347, 0, 77, 39, 86, 0, 96], ["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["-", 0, 56, 39, 344, 3, 347, 0, 77, 39, 4... | 1 | 582 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.