buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define mp make_pair
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define all(v) v.begin(), v.end()
const int maxn = 1e5 + 100;
const ll inf = 2e1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define mp make_pair
#define ff first
#define ss second
#define pb push_back
#define pf push_front
#define popb pop_back
#define popf pop_front
#define all(v) v.begin(), v.end()
const int maxn = 1e5 + 100;
const ll inf = 2e1... | [["+", 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, 57, 64, 1, 0, 11, 31, 69, 28, 22], ["+", 64, 1, 0, 11, 31, 69, 341, 342, 0, 70], ["+", 0, 11, 31, 69, 341, 342, 0, 27, 28, 22], ["+"... | 1 | 433 |
#include <algorithm>
#include <bitset>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <vector>
using namespace std;
int n, m;
int a[105];
... | #include <algorithm>
#include <bitset>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <vector>
using namespace std;
int n, m;
int a[105];
... | [["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 57, 64, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["... | 1 | 351 |
#include <bits/stdc++.h>
#define ll long long
#define maxn 100005 /*rem*/
#define mod 998244353
#define db double
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define pi pair<int, int>
#define fi first
#define se second
using namespace std;
int a[maxn];
int n, m;
int f[maxn], cnt = 0;
bool cmp(int a... | #include <bits/stdc++.h>
#define ll long long
#define maxn 100005 /*rem*/
#define mod 998244353
#define db double
#define vi vector<int>
#define pb push_back
#define mp make_pair
#define pi pair<int, int>
#define fi first
#define se second
using namespace std;
int a[maxn];
int n, m;
int f[maxn], cnt = 0;
bool cmp(int a... | [["-", 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, 19], ["-", 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, 37, 0, 38], ["-", 0, 14, 8... | 1 | 451 |
#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n, m, a[N], num;
int cmp(int x, int y) { return (x & 1) > (y & 1); }
int main() {
scanf("%d%d", &n, &m);
for (int i = 0; i < m; i++)
scanf("%d", &a[i]), num += a[i] & 1;
if (num > 2) {
puts("Impossible");
return 0;
}
if (m == 1) ... | #include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n, m, a[N], num;
int cmp(int x, int y) { return (x & 1) > (y & 1); }
int main() {
scanf("%d%d", &n, &m);
for (int i = 0; i < m; i++)
scanf("%d", &a[i]), num += a[i] & 1;
if (num > 2) {
puts("Impossible");
return 0;
}
if (m == 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, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0... | 1 | 334 |
#include <bits/stdc++.h>
using namespace std;
int A[103], B[103], cnt;
int main() {
int n, m;
freopen("array.in", "r", stdin);
freopen("array.out", "w", stdout);
scanf("%d%d", &n, &m);
for (int i = 1; i <= m; i++) {
scanf("%d", &A[i]);
cnt += (A[i] & 1);
}
if (cnt > 2)
return puts("Impossibl... | #include <bits/stdc++.h>
using namespace std;
int A[103], B[103], cnt;
int main() {
int n, m;
scanf("%d%d", &n, &m);
for (int i = 1; i <= m; i++) {
scanf("%d", &A[i]);
cnt += (A[i] & 1);
}
if (cnt > 2)
return puts("Impossible"), 0;
if (m == 1 && A[1] == 1)
return printf("1\n1\n1\n"), 0;
... | [["-", 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 | 355 |
#include <bits/stdc++.h>
using namespace std;
const int N = 105;
int a[N], n, cnt, m;
int main() {
scanf("%d %d", &n, &m);
for (int i = 1; i <= m; i++)
scanf("%d", &a[i]);
for (int i = 1; i <= m; i++)
if (a[i] & 1)
cnt++;
if (cnt > 2) {
puts("Impossible");
return 0;
}
for (int i = 1; i... | #include <bits/stdc++.h>
using namespace std;
const int N = 105;
int a[N], n, cnt, m;
int main() {
scanf("%d %d", &n, &m);
for (int i = 1; i <= m; i++)
scanf("%d", &a[i]);
for (int i = 1; i <= m; i++)
if (a[i] & 1)
cnt++;
if (cnt > 2) {
puts("Impossible");
return 0;
}
for (int i = 1; i... | [["+", 8, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 8, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["+", 8, 57, 15, 339, 51, 16, 12, 23, 0, 24], ["+", 51, 16, 12, 23, 0, 91, 28, 23, 0, 25], ["-", 0, 2, 3, 4, 0, 69, 341, 342, 0, 22], ["+", 0, 2, 3, 4, 0, 69, 341, 342, 0, 22], ["-", 64, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-",... | 1 | 485 |
#include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <cstring>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
... | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <cstring>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 541 |
#include <bits/stdc++.h>
using namespace std;
int n, m, a[1010], cnt = 0;
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= m; i++)
scanf("%d", &a[i]), cnt += (a[i] & 1);
if (cnt >= 3)
return puts("Impossible"), 0;
if (m == 1) {
if (a[1] == 1)
puts("1");
else
cout << a[1] << e... | #include <bits/stdc++.h>
using namespace std;
int n, m, a[1010], cnt = 0;
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= m; i++)
scanf("%d", &a[i]), cnt += (a[i] & 1);
if (cnt >= 3)
return puts("Impossible"), 0;
if (m == 1) {
if (a[1] == 1)
cout << 1 << endl << 1 << endl << 1;
el... | [["-", 64, 9, 0, 57, 64, 1, 0, 2, 63, 22], ["-", 0, 57, 64, 1, 0, 2, 3, 4, 0, 24], ["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 57, 64, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["+", 0, 16, 31,... | 1 | 420 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
const int N = 1e5 + 5;
int n, m, nowx, nowy, a[N], ans[N], tmp[N], tl;
int main() {
int i;
scanf("%d%d", &n, &m);
for (i = 1; i <= m; ++i)
scanf("%d", &a[... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <math.h>
#include <string>
using namespace std;
const int N = 1e5 + 5;
int n, m, nowx, nowy, a[N], ans[N], tmp[N], tl;
int main() {
int i;
scanf("%d%d", &n, &m);
for (i = 1; i <= m; ++i)
scanf("%d", &a[... | [["+", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 1, 0, 2, 3, 4, 0, 69, 28, 22], ["+", 0, 2, 3, 4, 0, 69, 341, 342, 0, 70], ["+"... | 1 | 616 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> a(m);
int odd = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
odd += a[i] & 1;
}
if (odd > 2) {
cout << "Impossible\n";
return 0;
}
for (i... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, m;
cin >> n >> m;
vector<int> a(m);
int odd = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
odd += a[i] & 1;
}
if (odd > 2) {
cout << "Impossible\n";
return 0;
}
for (i... | [["+", 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], ["+", 64, 9, 0,... | 1 | 362 |
#include <algorithm>
#include <bitset>
#include <cstdlib>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7, INF = 1e18 + 1;
using namespace... | #include <algorithm>
#include <bitset>
#include <cstdlib>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <vector>
typedef long long ll;
typedef long double ld;
const ll MOD = 1e9 + 7, INF = 1e18 + 1;
using namespace... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 57, 64, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 2, 3, 4, 0, 69, 28, 69, 28, 22], ["+", 3, 4, 0, 69, 28, 69, 341, 342, 0, 70], ["+", 3, 4, 0, 69, 28, 69, 341, 342, 0, 13], ["+", 3, 4, 0, 69, 28, 69, 341, ... | 1 | 765 |
#include <iostream>
using namespace std;
int a[1000006], b[1000006];
int main() {
int n, m, c = 0, l;
cin >> n >> m;
for (int i = 1; i <= m; ++i) {
cin >> a[i];
if (a[i] % 2) {
l = i;
++c;
}
}
if (n == 1) {
cout << 1 << endl << 1 << endl << 1 << endl;
return 0;
}
if (n % 2 ... | #include <iostream>
using namespace std;
int a[1000006], b[1000006];
int main() {
int n, m, c = 0, l;
cin >> n >> m;
for (int i = 1; i <= m; ++i) {
cin >> a[i];
if (a[i] % 2) {
l = i;
++c;
}
}
if (n == 1) {
cout << 1 << endl << 1 << endl << 1 << endl;
return 0;
}
if (n % 2 ... | [["+", 0, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["+", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["+", 0, 16, 31, 16, 12, 69, 341, 342, 0, 73], ["+", 75, 76, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 64, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 70], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 13], ["+", ... | 1 | 613 |
// by Balloons
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define mpr make_pair
#define debug() puts("okkkkkkkk")
#define rep(i, a, b) for (int(i) = (a); (i) <= (b); (i)++)
using namespace std;
typedef long long LL;
const int inf = 1 << 30;
int n, m;
int a[100005];
int b[200005], ... | // by Balloons
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#define mpr make_pair
#define debug() puts("okkkkkkkk")
#define rep(i, a, b) for (int(i) = (a); (i) <= (b); (i)++)
using namespace std;
typedef long long LL;
const int inf = 1 << 30;
int n, m;
int a[100005];
int b[200005], ... | [["+", 0, 14, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 10, 43, 49, 50, 51, 16, 31, 16, 31, 22], ["+", 10, 43, 49, 50, 51, 16, 31, 16, 17, 85], ["+", 10, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7,... | 1 | 601 |
#include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 13;
int n, m, a[maxN], cnt;
int main() {
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> a[i];
if (a[i] % 2 == 1)
cnt++;
}
if (cnt > 2)
return cout << "Impossible" << endl, 0;
if (m == 1) {
cout << a[0] << '\n';
... | #include <bits/stdc++.h>
using namespace std;
const int maxN = 1e5 + 13;
int n, m, a[maxN], cnt;
int main() {
cin >> n >> m;
for (int i = 0; i < m; i++) {
cin >> a[i];
if (a[i] % 2 == 1)
cnt++;
}
if (cnt > 2)
return cout << "Impossible" << endl, 0;
if (m == 1) {
cout << a[0] << '\n';
... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 487 |
#include <bits/stdc++.h>
using namespace std;
#define TRACE(x) x
#define WATCH(x) TRACE(cout << #x " = " << x << endl)
#define WATCHR(a, b) \
TRACE(for (auto it = a; it != b;) cout << *(it++) << " "; cout << endl)
#define WATCHC(V) ... | #include <bits/stdc++.h>
using namespace std;
#define TRACE(x) x
#define WATCH(x) TRACE(cout << #x " = " << x << endl)
#define WATCHR(a, b) \
TRACE(for (auto it = a; it != b;) cout << *(it++) << " "; cout << endl)
#define WATCHC(V) ... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 44], ["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 1... | 1 | 485 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int MAX_N = 1e5 + 5;
int n, m, num;
int Arr[MAX_N];
bool cmp1(int a, int b) {
if (a & 1)
return true;
return false;
}
bool cmp2(int a, int b) {
if (b & 1)
return true;
retur... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
const int MAX_N = 1e5 + 5;
int n, m, num;
int Arr[MAX_N];
bool cmp1(int a, int b) {
if (a & 1)
return true;
return false;
}
bool cmp2(int a, int b) {
if (b & 1)
return true;
retur... | [["+", 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, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 64, 9, 0,... | 1 | 344 |
#include <bits/stdc++.h>
using namespace std;
int n, m, num, cnt;
vector<int> a, b;
void kill() {
cout << "Impossible";
exit(0);
}
void add(int l) {
if (l)
b.push_back(l);
}
void print() {
for (int num : a)
cout << num << ' ';
cout << '\n' << b.size() << '\n';
for (int num : b)
cout << num <... | #include <bits/stdc++.h>
using namespace std;
int n, m, num, cnt;
vector<int> a, b;
void kill() {
cout << "Impossible";
exit(0);
}
void add(int l) {
if (l)
b.push_back(l);
}
void print() {
for (int num : a)
cout << num << ' ';
cout << '\n' << b.size() << '\n';
for (int num : b)
cout << num <... | [["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["-", 15, 339, 51, 16, 12, 16, 31, 16, 17, 109], ["-", 15, 339, 5... | 1 | 526 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 1e5;
const int MAXM = 100;
int N, M;
vector<int> V1, V2, A, B;
int main() {
int i, j;
scanf("%d%d", &N, &M);
int cnt = 0;
for (i = 1; i <= M; i++) {
int X;
scan... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int MAXN = 1e5;
const int MAXM = 100;
int N, M;
vector<int> V1, V2, A, B;
int main() {
int i, j;
scanf("%d%d", &N, &M);
int cnt = 0;
for (i = 1; i <= M; i++) {
int X;
scan... | [["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73]... | 1 | 382 |
#include <bits/stdc++.h>
#define ll int
#define pb push_back
#define mp make_pair
#define ld long double
#define F first
#define S second
#define pii pair<ll, ll>
using namespace ::std;
const ll maxn = 1e5 + 500;
const ll mod = 1e9 + 7;
const ll inf = 1e9 + 500;
ll a[maxn];
ll ans[maxn];
ll b[maxn];
int main() {
... | #include <bits/stdc++.h>
#define ll int
#define pb push_back
#define mp make_pair
#define ld long double
#define F first
#define S second
#define pii pair<ll, ll>
using namespace ::std;
const ll maxn = 1e5 + 500;
const ll mod = 1e9 + 7;
const ll inf = 1e9 + 500;
ll a[maxn];
ll ans[maxn];
ll b[maxn];
int main() {
... | [["-", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 85], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13], ["+", 64, 9, 0, 7, 15, 16, 31, 16, 17, 72], ["+", 64, 9... | 1 | 832 |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int N = 2e3 + 5;
int a[N], b[N], n, m;
vector<int> evens, arr;
int odd1, odd2;
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= m; i++) {
scanf("%d", &a[i]);
if (a[i] % 2 == 0) {
evens.pb(a[i]);
} else {
if (odd... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
const int N = 2e3 + 5;
int a[N], b[N], n, m;
vector<int> evens, arr;
int odd1, odd2;
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= m; i++) {
scanf("%d", &a[i]);
if (a[i] % 2 == 0) {
evens.pb(a[i]);
} else {
if (odd... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 365 |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <utility>
#include <vector>
using namespace std;
vector<int> ant;
int main() {
#ifdef HOME
freopen("agc01d.in", "r", stdin);
freopen("agc01d.out", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <numeric>
#include <utility>
#include <vector>
using namespace std;
vector<int> ant;
int main() {
#ifdef HOME
freopen("agc01d.in", "r", stdin);
freopen("agc01d.out", "w", stdout);
#endif
ios::sync_with_stdio(false);
cin.tie(0), cout.tie(0);
... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 51, 16, 31, 16, 31, 2, 63, 118, 28, 22], ["+", 51, 16, 31, 16, 31, 2, 63, 118, 17, 131], ["+", 51, 16, 31, 16, 31, 2, 63, 118, 119, 120], ["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["+", 51, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["+... | 1 | 368 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ff first
#define ss second
#define pb emplace_back
const int MAXN = 100009;
int a[MAXN];
int n, m;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> m >> n;
pair<int, int> x(-1, -1);
for (int i = 0; i... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ff first
#define ss second
#define pb emplace_back
const int MAXN = 100009;
int a[MAXN];
int n, m;
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> m >> n;
pair<int, int> x(-1, -1);
for (int i = 0; i... | [["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95], ["+", 75, 76, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 75, 76, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 75, 76, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 75, 76, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 75, 76, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 75, 76, 0, 57, 75, 76, 0, 1, 0, 35], ["-", 75, 76, 0, ... | 1 | 484 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M);
for (int i = 0; i < M; ++i)
cin >> A[i];
// 1 ๅใฎๅ ดๅ
if (A.size() == 1) {
cout << A[0] << endl;
cout << 2 << endl;
cout << A[0] - 1 << " " << 1 << endl;
return 0;
}
// ... | #include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M);
for (int i = 0; i < M; ++i)
cin >> A[i];
// 1 ๅใฎๅ ดๅ
if (A.size() == 1) {
cout << A[0] << endl;
if (A[0] > 1) {
cout << 2 << endl;
cout << A[0] - 1 << " " << 1 << endl;
... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 427 |
// fold
#ifndef KHALIL
#include <bits/stdc++.h>
#else
#include "header.h"
#endif
#define endl '\n'
#define mp make_pair
#define tostr(x) \
static_cast<ostringstream &>((ostringstream() << dec << x)).str()
#define rep(i, begin, end) for (auto i = begin; i <... | // fold
#ifndef KHALIL
#include <bits/stdc++.h>
#else
#include "header.h"
#endif
#define endl '\n'
#define mp make_pair
#define tostr(x) \
static_cast<ostringstream &>((ostringstream() << dec << x)).str()
#define rep(i, begin, end) for (auto i = begin; i <... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 0, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 0, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["-", 0, 57, 64, 9, 0, 9, 0, 57, 0, 121], ["-", 64, 9, 0, 9, 0, 57, 15, 339, 0, 24], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, ... | 1 | 1,172 |
#include <bits/stdc++.h>
#define pb push_back
#define ppb pop_back
#define fi first
#define se second
#define mid ((x + y) / 2)
#define left (ind * 2)
#define right (ind * 2 + 1)
#define mp make_pair
#define timer ((double)clock() / CLOCKS_PER_SEC)
#define endl "\n"
#define spc " "
#define d1(x) cerr << #x << ":" << x ... | #include <bits/stdc++.h>
#define pb push_back
#define ppb pop_back
#define fi first
#define se second
#define mid ((x + y) / 2)
#define left (ind * 2)
#define right (ind * 2 + 1)
#define mp make_pair
#define timer ((double)clock() / CLOCKS_PER_SEC)
#define endl "\n"
#define spc " "
#define d1(x) cerr << #x << ":" << x ... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 69, 28, 22], ["+", 0, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["+", 0, 16, 31, 16, 12, 69, 341, 342, 0, 13], ["+", 0, 16, 31, 16, 12, 69, 341, 342, 0, 73], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 5... | 1 | 562 |
#include <bits/stdc++.h>
using namespace std;
#define oo 1000000
#define mod 1000000007
const int N = 200010;
int n, m, a;
vector<int> v1, v2, v3, v4;
void answer() {
for (int i = 0; i < (int)v3.size(); i++) {
if (i)
putchar(' ');
printf("%d", v3[i]);
}
printf("\n%d\n", (int)v4.size());
for (int ... | #include <bits/stdc++.h>
using namespace std;
#define oo 1000000
#define mod 1000000007
const int N = 200010;
int n, m, a;
vector<int> v1, v2, v3, v4;
void answer() {
for (int i = 0; i < (int)v3.size(); i++) {
if (i)
putchar(' ');
printf("%d", v3[i]);
}
printf("\n%d\n", (int)v4.size());
for (int ... | [["-", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["-", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["-", 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... | 1 | 648 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 1005;
int a[N];
int main() {
int n, m, t1, t2;
scanf("%d%d", &n, &m);
for (int i = 1; i <= m; i++)
scanf("%d", &a[i]);
int cnt = 0;
for (int i = 1; i <= m; i++)
if (a[i] & 1) {
cnt++;... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 1005;
int a[N];
int main() {
int n, m;
scanf("%d%d", &n, &m);
int t1 = m, t2 = 1;
for (int i = 1; i <= m; i++)
scanf("%d", &a[i]);
int cnt = 0;
for (int i = 1; i <= m; i++)
if (a[i] & 1) ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 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, ... | 1 | 343 |
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#inclu... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#inclu... | [["+", 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, 60], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 25], ["+", 0, 57, 64, 9, 0, 57, 64, 9, 0, 45], ["+", 0, ... | 1 | 477 |
// set many funcs template
// Ver.20181228
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a, int b) {
if (a > b) {
return a;
}
return... | // set many funcs template
// Ver.20181228
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define inf 1072114514
#define llinf 4154118101919364364
#define mod 1000000007
#define pi 3.1415926535897932384
int max(int a, int b) {
if (a > b) {
return a;
}
return... | [["+", 75, 76, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 23, 0, 24], ["+", 15, 23, 0, 16, 31, 69, 28, 69, 28, 22], ["+", 15, 23, 0, 16, 31, 69, 28, 69, 0, 70], ["+", 15, 23, 0, 16, 31, 69, 28, 69, 71, 13], ["+", 15, 23, 0, 16, 31, 69, 28, 69, 0, 73], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 0, 70], ["+", ... | 0 | 2,537 |
#include "algorithm"
#include "climits"
#include "cmath"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "queue"
#include "set"
#include "stack"
#include "string"
using namespace std;
const long long int MOD = 1000000007;
long long int N, M, K, H, W, L, R;
int ma... | #include "algorithm"
#include "climits"
#include "cmath"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "queue"
#include "set"
#include "stack"
#include "string"
using namespace std;
const long long int MOD = 1000000007;
long long int N, M, K, H, W, L, R;
int ma... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 392 |
#include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#in... | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#in... | [["+", 0, 9, 0, 1, 0, 2, 63, 118, 28, 22], ["+", 0, 9, 0, 1, 0, 2, 63, 118, 17, 131], ["+", 0, 9, 0, 1, 0, 2, 63, 118, 119, 120], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]] | 1 | 738 |
#include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 677 |
#include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | #include <bits/stdc++.h>
using namespace std;
#define li long long int
#define rep(i, to) for (li i = 0; i < ((li)(to)); i++)
#define repp(i, start, to) for (li i = (li)(start); i < ((li)(to)); i++)
#define pb push_back
#define sz(v) ((li)(v).size())
#define bgn(v) ((v).begin())
#define eend(v) ((v).end())
#define all... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 744 |
#pragma GCC optimize("-O3")
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#define LL long long
#define ui unsigned int
#define ull unsigned long long
using namespace std;
inline int read(... | #pragma GCC optimize("-O3")
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#define LL long long
#define ui unsigned int
#define ull unsigned long long
using namespace std;
inline int read(... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 615 |
#include <bits/stdc++.h>
#define IL __inline__ __attribute__((always_inline))
#define For(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define FOR(i, a, b) for (int i = (a), i##end = (b); i < i##end; ++i)
#define Rep(i, a, b) for (int i = (a), i##end = (b); i >= i##end; --i)
#define REP(i, a, b) for (in... | #include <bits/stdc++.h>
#define IL __inline__ __attribute__((always_inline))
#define For(i, a, b) for (int i = (a), i##end = (b); i <= i##end; ++i)
#define FOR(i, a, b) for (int i = (a), i##end = (b); i < i##end; ++i)
#define Rep(i, a, b) for (int i = (a), i##end = (b); i >= i##end; --i)
#define REP(i, a, b) for (in... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["+", 51, 16, 12, 23, 0, 16, 31, 69, 28, 22], ["+", 12, 23, 0, 16, 31, 69, 341, 342, 0, 70], ["+", 12, 23, 0, 16, 31, 69, 341, 342, 0, 22], ... | 1 | 735 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[110] = {};
int odd = 0;
int L = 123;
int R = 456;
for (int i = 0; i < M; i++) {
cin >> A[i];
if (A[i] % 2)
odd++;
if ((A[i] % 2) && odd == 1)
L = i;
if ((A[i] % 2) && odd == 2)
R = i... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int A[110] = {};
int odd = 0;
int L = 123;
int R = 456;
for (int i = 0; i < M; i++) {
cin >> A[i];
if (A[i] % 2)
odd++;
if ((A[i] % 2) && odd == 1)
L = i;
if ((A[i] % 2) && odd == 2)
R = i... | [["+", 0, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 75, 76, 0, 9, 0, 57, 15, 339, 0, 25], ["+", 75, 76, 0, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 17, 151], ["+",... | 1 | 454 |
/*input
5 1
5
*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
#define IOS ... | /*input
5 1
5
*/
#include <bits/stdc++.h>
#pragma GCC optimize("unroll-loops,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
#define IOS ... | [["+", 75, 76, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, ... | 1 | 713 |
#include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
#define lol(i, n) for (ll i = 0; i < n; i++)
#define mod 1000000007
typedef long long ll;
using namespace std;
int NOEL() {
cout << "Impossible" << endl;
return 0;
}
#define N 100010
ll n, m, a[N];
vector<ll> ans;
void Outs(... | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
#define lol(i, n) for (ll i = 0; i < n; i++)
#define mod 1000000007
typedef long long ll;
using namespace std;
int NOEL() {
cout << "Impossible" << endl;
return 0;
}
#define N 100010
ll n, m, a[N];
vector<ll> ans;
void Outs(... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 13], ["+", 15, 339, 51, 16, 31, 69, 341, 342, 0, 73], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17... | 1 | 560 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
#define N 150
int n, m, a[N], b[N];
int main() {
scanf("%d%d", &n, &m);
int i, flg = 0;
for (i = 1; i <= m; i++)
scanf("%d", &a[i]), flg += (a[i] & 1);
if (m == 1 && a[1] == 1) {
puts("1\n1\n1\n");
retu... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
#define N 150
int n, m, a[N], b[N];
int main() {
scanf("%d%d", &n, &m);
int i, flg = 0;
for (i = 1; i <= m; i++)
scanf("%d", &a[i]), flg += (a[i] & 1);
if (m == 1 && a[1] == 1) {
puts("1\n1\n1\n");
retu... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 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, 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]... | 1 | 324 |
#include <bits/stdc++.h>
#define fo(i, a, b) for (int i = (a); i <= (b); ++i)
#define fd(i, a, b) for (int i = (a); i >= (b); --i)
#define edge(i, u) \
for (int i = head[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define mod 1000000007
#define ll long long... | #include <bits/stdc++.h>
#define fo(i, a, b) for (int i = (a); i <= (b); ++i)
#define fd(i, a, b) for (int i = (a); i >= (b); --i)
#define edge(i, u) \
for (int i = head[u], v = e[i].v; i; i = e[i].nxt, v = e[i].v)
#define mod 1000000007
#define ll long long... | [["-", 0, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["-", 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], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 31, 22],... | 1 | 362 |
//ในใใใณใผใใฃใณใฐ
#include <algorithm>
#include <iostream>
#include <vector>;
using namespace std;
int n, m;
int a[100];
int main() {
cin >> n >> m;
int odds[2];
int oddcnt = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
if (a[i] & 1) {
oddcnt++;
if (oddcnt == 3) {
cout << "Impossible" ... | //ในใใใณใผใใฃใณใฐ
#include <algorithm>
#include <iostream>
#include <vector>;
using namespace std;
int n, m;
int a[100];
int main() {
cin >> n >> m;
int odds[2];
int oddcnt = 0;
for (int i = 0; i < m; i++) {
cin >> a[i];
if (a[i] & 1) {
oddcnt++;
if (oddcnt == 3) {
cout << "Impossible" ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 28, 22], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 17, 131], ["+", 0, 7, 15, 16, 12, 2, 63, 118, 119, 120], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 25], ["+", 0, 14, 8, 9, 0, 7, 8, 1, 0, 35], ["+", 0, 14, 8, 9,... | 1 | 352 |
#if 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cstdint>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#inc... |
#if 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cstdint>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#inc... | [["-", 0, 1, 0, 16, 31, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 31, 16, 12, 13], ["-", 64, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 12, 103, 0, 104], ["-", 0, 1, 0, 16, 31, 16, 12, 103, 0, 44], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 12, 13], ["+", 0, 1, ... | 1 | 506 |
#include <stdio.h>
#include <stdlib.h>
void swap(int a, int b, int *A) {
int tmp = A[a];
A[a] = A[b];
A[b] = tmp;
}
int main() {
int N, M, i, odd_num = 0;
scanf("%d%d", &N, &M);
int *A = (int *)malloc(sizeof(int) * M);
for (i = 0; i < M; i++) {
scanf("%d", &A[i]);
odd_num += A[i] % 2;
}
if (... | #include <stdio.h>
#include <stdlib.h>
void swap(int a, int b, int *A) {
int tmp = A[a];
A[a] = A[b];
A[b] = tmp;
}
int main() {
int N, M, i, odd_num = 0;
scanf("%d%d", &N, &M);
int *A = (int *)malloc(sizeof(int) * M);
for (i = 0; i < M; i++) {
scanf("%d", &A[i]);
odd_num += A[i] % 2;
}
if (... | [["+", 8, 9, 0, 57, 64, 9, 0, 57, 0, 121], ["+", 0, 57, 64, 9, 0, 57, 15, 23, 0, 24], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 28, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 0, 70], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 71, 13], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 0, 73], ["+", 64, 9, 0, 57, 15, 23, 0, 16, 17, 60], ["+", 64, 9,... | 0 | 457 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using dbl = double;
using pii = pair<int, int>;
using pl4 = pair<ll, ll>;
using tl6 = tuple<ll, ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
using vvs = vector<vs>;
using vll = vector<ll>;
using vvll = vector<vl... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using dbl = double;
using pii = pair<int, int>;
using pl4 = pair<ll, ll>;
using tl6 = tuple<ll, ll, ll>;
using vi = vector<int>;
using vvi = vector<vi>;
using vs = vector<string>;
using vvs = vector<vs>;
using vll = vector<ll>;
using vvll = vector<vl... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 16, 31, 118, 28, 22], ["-", 0, 2, 3, 4, 0, 16, 31, 118, 17, 131], ["-", 0, 2, 3, 4, 0, 16, 31, 118, 119, 120], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 19], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4,... | 1 | 6,282 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define sqr(x) ((x) * (x))
#define fz1(i, n) for ((i) = 1; (i) <= (n); (i)++)
#define fd... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define sqr(x) ((x) * (x))
#define fz1(i, n) for ((i) = 1; (i) <= (n); (i)++)
#define fd... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 11, 31, 69, 341, 342, 0, 27, 17, 29], ["-", 0, 11, 31, 69, 341... | 1 | 896 |
#include <iostream>
#include <set>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> P;
struct BIT {
int size;
vector<int> bit;
BIT() { size = 0; }
BIT(int s) {
size = s;
bit.resize(size + 1);
init();
}
void init() {
for (int i = 1; i <= size; i++)
bit[... | #include <iostream>
#include <set>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> P;
struct BIT {
int size;
vector<int> bit;
BIT() { size = 0; }
BIT(int s) {
size = s;
bit.resize(size + 1);
init();
}
void init() {
for (int i = 1; i <= size; i++)
bit[... | [["-", 0, 7, 8, 1, 0, 16, 12, 5, 0, 62], ["-", 0, 7, 8, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 57, 64, 9, 0, 7, 8, 1, 0, 35], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 31, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["-", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 7,... | 1 | 884 |
// by Balloons
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
#define mpr make_pair
#define debug() puts("okkkkkkkk")
#define rep(i, a, b) for (int(i) = (a); (i) <= (b); (i)++)
using namespace std;
typedef long long LL;
const int inf = 1 << 30;
const ... | // by Balloons
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
#define mpr make_pair
#define debug() puts("okkkkkkkk")
#define rep(i, a, b) for (int(i) = (a); (i) <= (b); (i)++)
using namespace std;
typedef long long LL;
const int inf = 1 << 30;
const ... | [["-", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["-", 36, 36, 0, 30, 0, 43, 39, 344, 141, 78], ["-", 0, 30, 0, 43, 39, 344, 3, 347, 0, 18], ["-", 0, 30, 0, 43, 39, 344, 3, 347, 0, 47], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 0, 70], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 22], ["+... | 1 | 935 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <utility>
#define llong long long
using namespace std;
const int N = 5e5;
struct SegmentTree {
struct SgTNode {
int val;
} sgt[(N << 2) + 2];
void pushup(int pos) {
sgt[pos].val = max(sgt[pos << 1].val,... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <utility>
#define llong long long
using namespace std;
const int N = 5e5;
struct SegmentTree {
struct SgTNode {
int val;
} sgt[(N << 2) + 2];
void pushup(int pos) {
sgt[pos].val = max(sgt[pos << 1].val,... | [["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 15, 16, 12, 16, 31, 16, 31, 22], ["+", 0, 7, 15, 16, 12, 16, 31, 16, 17, 72], ["+", 0, 7, 15, 16, 12, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 33], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["+", 0, 14, 8, ... | 1 | 888 |
/*input
4 2
4 2 3 1
*/
// spoiled
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
... | /*input
4 2
4 2 3 1
*/
// spoiled
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
... | [["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 72], ["+", 51, 16, 31, 16, 31, 16, 12, 23, 0, 24], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 31, 13], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 17, 151], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["+", 51, 16, 31, 16, 31, 16, 12, 23, ... | 1 | 626 |
#include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define SZ(x) ((int)x.size())
#define L(i, u) for (register int i = head[u]; i; i = nxt[i])
#define rep(i, a, b) for (register int i = (a); i <= (b); i++)
#define per(i, a, b) for (register int i = (a); i >= (b); i--)
using namespace std;
... | #include <bits/stdc++.h>
#define fi first
#define se second
#define pb push_back
#define SZ(x) ((int)x.size())
#define L(i, u) for (register int i = head[u]; i; i = nxt[i])
#define rep(i, a, b) for (register int i = (a); i <= (b); i++)
#define per(i, a, b) for (register int i = (a); i >= (b); i--)
using namespace std;
... | [["+", 0, 1, 0, 27, 28, 69, 28, 2, 63, 22], ["+", 0, 27, 28, 69, 28, 2, 3, 4, 0, 24], ["+", 0, 27, 28, 69, 28, 2, 3, 4, 0, 22], ["+", 0, 27, 28, 69, 28, 2, 3, 4, 0, 21], ["+", 0, 27, 28, 69, 28, 2, 3, 4, 0, 13], ["+", 28, 2, 3, 4, 0, 16, 31, 69, 28, 22], ["+", 3, 4, 0, 16, 31, 69, 341, 342, 0, 70], ["+", 3, 4, 0, 16, 3... | 1 | 887 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <set>
using namespace std;
#define N 500050
int head[N], to[N << 1], nxt[N << 1], cnt, n, a[N], p[N], du[N], K, Q[N],
ans[N];
set<int> S, T;
priority_queue<int> q;
inline void add(int u, int v) {
to[++cnt] = v;
... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <set>
using namespace std;
#define N 500050
int head[N], to[N << 1], nxt[N << 1], cnt, n, a[N], p[N], du[N], K, Q[N],
ans[N];
set<int> S, T;
priority_queue<int> q;
inline void add(int u, int v) {
to[++cnt] = v;
... | [["+", 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, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 11, 31, 69, 341, 342, 0, 27, 17, 29], ["+", 0, 11, 31, 69, 341, 342, 0, 27, 17, 68], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 30, 0, 14, ... | 1 | 497 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <set>
using namespace std;
#define N 500050
int head[N], to[N << 1], nxt[N << 1], cnt, n, a[N], p[N], du[N], K, Q[N],
ans[N];
set<int> S, T;
priority_queue<int> q;
inline void add(int u, int v) {
to[++cnt] = v;
... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <queue>
#include <set>
using namespace std;
#define N 500050
int head[N], to[N << 1], nxt[N << 1], cnt, n, a[N], p[N], du[N], K, Q[N],
ans[N];
set<int> S, T;
priority_queue<int> q;
inline void add(int u, int v) {
swap(u, v);
t... | [["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 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, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 64, 1, 0, 2, 3, 4, 0, 91, 17, 33], ["+", 8, 9, 0, 1, 0, 11, 12, 91, 17, 33], ["+"... | 1 | 497 |
#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7, M = 1e9;
#define C getchar() - 48
int read() {
int s = 0, t = 1, k = C;
for (; k < 0 || 9 < k; k = C)
if (k == -3)
t = -1;
for (; 0 <= k && k <= 9; k = C)
s = (s << 1) + (s << 3) + k;
return s * t;
}
int n, k;
int a[N];
void in... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 7, M = 1e9;
#define C getchar() - 48
int read() {
int s = 0, t = 1, k = C;
for (; k < 0 || 9 < k; k = C)
if (k == -3)
t = -1;
for (; 0 <= k && k <= 9; k = C)
s = (s << 1) + (s << 3) + k;
return s * t;
}
int n, k;
int a[N];
void in... | [["-", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 70], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 73], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 0, 1, 0, 11,... | 1 | 830 |
#include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define mid ((l + r) >> 1)
#define lc k << 1, l, mid
#define rc k << 1 | 1, mid + 1, r
#define pb push_back
typedef double db;
typedef long long ll;
typedef pair<int, int> P;
const int MAXN = 5e5 + 10, INF = 1 << 28;
struct edge {
int nxt... | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define mid ((l + r) >> 1)
#define lc k << 1, l, mid
#define rc k << 1 | 1, mid + 1, r
#define pb push_back
typedef double db;
typedef long long ll;
typedef pair<int, int> P;
const int MAXN = 5e5 + 10, INF = 1 << 28;
struct edge {
int nxt... | [["-", 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, 22], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 25], ["-", 0, 14, 8, 9, 0, 57, 64, 37, 0, 38], ["-", 0, 14, 8... | 1 | 696 |
// 2018.9.21 by ljz
#include <bits/stdc++.h>
using namespace std;
#define res register int
#define LL long long
#define inf 0x3f3f3f3f
#define eps 1e-15
inline int read() {
res s = 0;
bool w = 0;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
w = 1;
ch = getchar();
}
while ... | // 2018.9.21 by ljz
#include <bits/stdc++.h>
using namespace std;
#define res register int
#define LL long long
#define inf 0x3f3f3f3f
#define eps 1e-15
inline int read() {
res s = 0;
bool w = 0;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
w = 1;
ch = getchar();
}
while ... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 1... | 1 | 1,084 |
#include <bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
const int N = (int)5e5 + 123, mod = (int)1e9 + 7, inf = (int)1e9;
int n, k, a[N], b[N], t[4 * N], cnt[N];... | #include <bits/stdc++.h>
#define f first
#define s second
#define pb push_back
#define mp make_pair
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
const int N = (int)5e5 + 123, mod = (int)1e9 + 7, inf = (int)1e9;
int n, k, a[N], b[N], t[4 * N], cnt[N],... | [["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 49, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 0, 70], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 0, 73], ["+", 0, 7, 8, 1, 0, 11, 31, 69, 28, 22], ["+", 8, 1, 0, 11, 31, 69, 341, 342, 0, 70], ["+", 0, 1... | 1 | 680 |
#include <bits/stdc++.h>
#define neko 500010
#define feko 2000010
#define pb push_back
#define f(i, a, b) for (register int i = (a); i <= (b); i = -(~(i)))
#define rf(i, a, b) for (register int i = (a); i >= (b); i = ~(-(i)))
#define travel(i, u, v) \
for (regist... | #include <bits/stdc++.h>
#define neko 500010
#define feko 2000010
#define pb push_back
#define f(i, a, b) for (register int i = (a); i <= (b); i = -(~(i)))
#define rf(i, a, b) for (register int i = (a); i >= (b); i = ~(-(i)))
#define travel(i, u, v) \
for (regist... | [["-", 0, 52, 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], ["-", 8, 9, 0, 52, 8, 9, 0, 1, 0, 35]] | 1 | 779 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define ll long long
#define MAX 500500
#define lson (now << 1)
#define rson (now << 1 | 1)
inline int read() {
int x = 0;
bool t = false;
char ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
#define ll long long
#define MAX 500500
#define lson (now << 1)
#define rson (now << 1 | 1)
inline int read() {
int x = 0;
bool t = false;
char ... | [["-", 0, 52, 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, 21], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 70], ["-... | 1 | 813 |
#include <bits/stdc++.h>
using namespace std;
#define SZ(v) ((int)(v).size())
#define ALL(v) (v).begin(), (v).end()
#define one first
#define two second
typedef long long ll;
typedef pair<int, int> pi;
const int INF = 0x3f2f1f0f;
const ll LINF = 1ll * INF * INF;
const int MAX_N = 5e5 + 100;
struct IDX {
int P;
... | #include <bits/stdc++.h>
using namespace std;
#define SZ(v) ((int)(v).size())
#define ALL(v) (v).begin(), (v).end()
#define one first
#define two second
typedef long long ll;
typedef pair<int, int> pi;
const int INF = 0x3f2f1f0f;
const ll LINF = 1ll * INF * INF;
const int MAX_N = 5e5 + 100;
struct IDX {
int P;
... | [["-", 8, 123, 0, 14, 8, 9, 0, 7, 0, 88], ["-", 8, 123, 0, 14, 8, 9, 0, 7, 0, 24], ["+", 8, 123, 0, 14, 8, 9, 0, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 52, 15, 339, 0, 24], ["-", 8, 123, 0, 14, 8, 9, 0, 7, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11... | 1 | 670 |
#include <bits/stdc++.h>
using namespace std;
const int MaxN = 5e5 + 5;
int N, K, M;
int P[MaxN], Pos[MaxN];
int Deg[MaxN], Q[MaxN];
set<int> S;
set<int>::iterator it;
vector<int> To[MaxN];
priority_queue<int, vector<int>, greater<int>> H;
void Add_Edge(int u, int v) {
To[u].push_back(v);
Deg[v]++;
}
int main(... | #include <bits/stdc++.h>
using namespace std;
const int MaxN = 5e5 + 5;
int N, K, M;
int P[MaxN], Pos[MaxN];
int Deg[MaxN], Q[MaxN];
set<int> S;
set<int>::iterator it;
vector<int> To[MaxN];
priority_queue<int, vector<int>, greater<int>> H;
void Add_Edge(int u, int v) {
To[u].push_back(v);
Deg[v]++;
}
int main(... | [["-", 8, 57, 64, 9, 0, 1, 0, 2, 63, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 62], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 7, 8, 57, 64, 9, 0, 1, 0, 35], ["-", 0... | 1 | 487 |
#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
template <class T, class T2> inline void chkmax(T &x, const T2 &y) {
if (x < y)
x = y;
}
template <class T, class T2> inline void chkmin(T &x, const T2 &y) {
if (x > y)
x = y;
}
const int MAXN = (1 << 20);
random_device rd;
mt19937 mt(rd());
... | #include <bits/stdc++.h>
#define endl '\n'
using namespace std;
template <class T, class T2> inline void chkmax(T &x, const T2 &y) {
if (x < y)
x = y;
}
template <class T, class T2> inline void chkmin(T &x, const T2 &y) {
if (x > y)
x = y;
}
const int MAXN = (1 << 20);
random_device rd;
mt19937 mt(rd());
... | [["+", 31, 69, 341, 342, 0, 16, 31, 118, 28, 22], ["+", 31, 69, 341, 342, 0, 16, 31, 118, 17, 143], ["+", 31, 69, 341, 342, 0, 16, 31, 118, 119, 120], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 73], ["+", 0, 14, 8, 9, 0, 1, 0, 11... | 1 | 1,073 |
#include <bits/stdc++.h>
const int max_N = 5e5 + 21;
#define ls(x) ((x) << 1)
#define rs(x) (ls(x) | 1)
#define mid ((l + r) >> 1)
#define lch ls(x), l, mid
#define rch rs(x), mid + 1, r
int n, K, p[max_N], q[max_N], seg[max_N << 2], pos[max_N], ans[max_N];
bool vis[max_N];
std::priority_queue<int> pq;
inline voi... | #include <bits/stdc++.h>
const int max_N = 5e5 + 21;
#define ls(x) ((x) << 1)
#define rs(x) (ls(x) | 1)
#define mid ((l + r) >> 1)
#define lch ls(x), l, mid
#define rch rs(x), mid + 1, r
int n, K, p[max_N], q[max_N], seg[max_N << 2], pos[max_N], ans[max_N];
bool vis[max_N];
std::priority_queue<int> pq;
inline voi... | [["-", 0, 34, 12, 11, 12, 2, 63, 343, 345, 348], ["-", 0, 34, 12, 11, 12, 2, 63, 343, 0, 349], ["-", 0, 34, 12, 11, 12, 2, 63, 343, 141, 22], ["-", 0, 34, 12, 11, 12, 2, 3, 4, 0, 24], ["-", 12, 2, 3, 4, 0, 16, 31, 23, 0, 24], ["-", 3, 4, 0, 16, 31, 23, 0, 16, 31, 22], ["+", 12, 34, 31, 11, 12, 16, 31, 16, 31, 22], ["-"... | 1 | 629 |
// +-- -- --++-- +-In the name of ALLAH-+ --++-- -- --+ \\
#include <bits/stdc++.h>
#define F first
#define S second
#define _sz(x) (int)x.size()
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
int const N = 5e5 + 20;
int n, k, a[N], res[N];
s... | // +-- -- --++-- +-In the name of ALLAH-+ --++-- -- --+ \\
#include <bits/stdc++.h>
#define F first
#define S second
#define _sz(x) (int)x.size()
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
int const N = 5e5 + 20;
int n, k, a[N], res[N];
s... | [["-", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 0, 35], ["+", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+... | 1 | 623 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
#define pb push_back
#define rep(i, a, b) for (i = a; i <= b; i++)
#define lid node << 1
#define rid node << 1 | 1
#define lch lid, l, mid
#define rch rid, mid + 1, r
using namespace std;
const int N = 500010;
const int INF = 1e9;
int seg[N << 2... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
#define pb push_back
#define rep(i, a, b) for (i = a; i <= b; i++)
#define lid node << 1
#define rid node << 1 | 1
#define lch lid, l, mid
#define rch rid, mid + 1, r
using namespace std;
const int N = 500010;
const int INF = 1e9;
int seg[N << 2... | [["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 0, 1, 0, 11, 31, 69, 28, 2, 63, 22], ["+", 0, 11, 31, 69, 28, 2, 3, 4, 0, 24], ["+", 0, 11, 31, 69, 28, 2, 3, 4, 0, 22], ["+", 0, 11, 31, 69, 28, ... | 1 | 744 |
#include <bits/stdc++.h>
#define l(x) (x << 1)
#define r(x) (x << 1) | 1
#define pb push_back
const int N = 500000 + 10;
using namespace std;
int n, m, e;
int mx[N << 2], t[N], s[N], b[N], bgn[N << 1], to[N << 2], nxt[N << 2];
int v[N], snt;
priority_queue<int, vector<int>, greater<int>> q;
namespace seg {
inline int... | #include <bits/stdc++.h>
#define l(x) (x << 1)
#define r(x) (x << 1) | 1
#define pb push_back
const int N = 500000 + 10;
using namespace std;
int n, m, e;
int mx[N << 2], t[N], s[N], b[N], bgn[N << 1], to[N << 2], nxt[N << 2];
int v[N], snt;
priority_queue<int, vector<int>, greater<int>> q;
namespace seg {
inline int... | [["-", 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], ["-", 8, 201, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 750 |
#include <bits/stdc++.h>
using namespace std;
#define e1 first
#define e2 second
#define pb push_back
#define mp make_pair
#define boost ios_base::sync_with_stdio(false)
#define eb emplace_back
#define OUT(x) \
{ ... | #include <bits/stdc++.h>
using namespace std;
#define e1 first
#define e2 second
#define pb push_back
#define mp make_pair
#define boost ios_base::sync_with_stdio(false)
#define eb emplace_back
#define OUT(x) \
{ ... | [["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["-", 8, 9, 0, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 33], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 9, 0, ... | 1 | 708 |
#include <bits/stdc++.h>
using namespace std;
const int DIM = 5e5 + 5;
vector<int> edg[DIM];
priority_queue<int> prq;
int sgt[DIM << 2], pos[DIM], deg[DIM];
void update(int n, int l, int r, int p, int x) {
if (l > r || l > p || p > r)
return;
if (l == p && p == r)
sgt[n] = x;
else {
int m = (l + ... | #include <bits/stdc++.h>
using namespace std;
const int DIM = 5e5 + 5;
vector<int> edg[DIM];
priority_queue<int> prq;
int sgt[DIM << 2], pos[DIM], deg[DIM];
void update(int n, int l, int r, int p, int x) {
if (l > r || l > p || p > r)
return;
if (l == p && p == r)
sgt[n] = x;
else {
int m = (l + ... | [["-", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 70], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 73], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 1, 0, 1... | 1 | 625 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(c) c.begin(), c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x, y) x = min(x, y)
#define chmax(... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(c) c.begin(), c.end()
#define pb push_back
#define fs first
#define sc second
#define show(x) cout << #x << " = " << x << endl
#define chmin(x, y) x = min(x, y)
#define chmax(... | [["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 73], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 73], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["-", 8, 9, 0, 1, ... | 1 | 546 |
#include <cstdio>
#include <set>
#define N 500007
#define IL inline
#define REP(a, b, c) for (a = b; a <= c; a++)
#define PER(a, b, c) for (a = b; a >= c; a--)
using namespace std;
set<int> S;
set<int>::iterator it;
int n, k, P[N], Q[N];
int head[N], lt[N << 1], nt[N << 1], ap = 1, d[N];
int a[N], len;
IL int rd() {
... | #include <cstdio>
#include <set>
#define N 500007
#define IL inline
#define REP(a, b, c) for (a = b; a <= c; a++)
#define PER(a, b, c) for (a = b; a >= c; a--)
using namespace std;
set<int> S;
set<int>::iterator it;
int n, k, P[N], Q[N];
int head[N], lt[N << 1], nt[N << 1], ap = 1, d[N];
int a[N], len;
IL int rd() {
... | [["+", 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, 52, 0, 89], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 0, 14, 8, 9, 0, 52, 15, 339, 51, 22], ["+", 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, 13... | 1 | 686 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
using namespace std;
const int MAX_N = 500005;
int P[MAX_N];
class Segment {
public:
Segment *ls, *rs;
int l, r, mx;
inline Segment() { ls = rs = NULL; }
inline int _max(int x, int y) { return P[x] > P[y] ? x : y; }
void maintain() ... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
using namespace std;
const int MAX_N = 500005;
int P[MAX_N];
class Segment {
public:
Segment *ls, *rs;
int l, r, mx;
inline Segment() { ls = rs = NULL; }
inline int _max(int x, int y) { return P[x] > P[y] ? x : y; }
void maintain() ... | [["-", 0, 30, 0, 14, 8, 9, 0, 171, 0, 184], ["-", 0, 30, 0, 14, 8, 9, 0, 171, 141, 22], ["-", 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, 2... | 1 | 818 |
//#pragma comment(linker, "/STACK:102400000,102400000")
#pragma warning(disable : 4996)
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>... | //#pragma comment(linker, "/STACK:102400000,102400000")
#pragma warning(disable : 4996)
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>... | [["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 49, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 0, 70], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 0, 73], ["-", 64, 9, 0, 43, 49, 50, 51, 91, 17, 33], ["+", 0, 27, 28, 69, 341, 342, 0, 69, 28, 22], ["+",... | 1 | 1,000 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
#define REP(i, x) for (int i = 0; i < (int)(x); i++)
#define REPS(i, x) for (int ... | [["-", 12, 83, 0, 2, 3, 4, 0, 16, 17, 72], ["-", 12, 83, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 12, 83, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 21], ["+", 0, 338, 12, 83, 0, 2, 3, 4, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 7... | 1 | 1,435 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#i... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cfloat>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#i... | [["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 14, 8, 9, 0, 57, 64, 9, 0, 46], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 15, 339, 51, 16, 12, 16, 31, 23, 0, 24], ["... | 1 | 738 |
// wtf ... forgot to participate >_<
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n ... | // wtf ... forgot to participate >_<
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n ... | [["-", 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, 21], ["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3... | 1 | 1,271 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
typedef long long LL;
const int Maxn = 200000, Maxm = 4000, Mod = (int)(1e9 + 7);
int A[Maxn + 10], B[Maxn + 10], Dp[Maxm * 2 + 10][Maxm * 2 + 10],
fac[Maxn + 10], inv[Maxn + 10];
int N;
inline int Pow(LL a, int b) {
LL ans = 1;
while (b) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int Maxn = 200000, Maxm = 4000, Mod = (int)(1e9 + 7);
int A[Maxn + 10], B[Maxn + 10], Dp[Maxm * 2 + 10][Maxm * 2 + 10],
fac[Maxn + 10], inv[Maxn + 10];
int N;
inline int Pow(LL a, int b) {
LL ans = 1;
while (b) {
if (b & 1)
... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 7,... | 1 | 513 |
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
struct P {
int x, y;
} a[200005];
int n, c[8005][4005], f[4005][4005];
ll ans = 0;
int add(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
int main() {
for (int i = 0; i <= 8002;... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
struct P {
int x, y;
} a[200005];
int n, c[8005][4005], f[4005][4005];
ll ans = 0;
int add(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
int main() {
for (int i = 0; i <= 8002;... | [["+", 8, 9, 0, 7, 15, 16, 12, 2, 63, 22], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 21], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 13], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 25], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["+", 0, 14, 8, 9, 0, 1, 0, 11... | 1 | 440 |
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const ll MOD = 1000 * 1000 * 1000LL + 7;
const int N = 2005;
ll d[10 * N], fact[N * 10], pfact[N * 10];
vector<pii> ar[2];
ll pw(ll a, ll b) {
... | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const ll MOD = 1000 * 1000 * 1000LL + 7;
const int N = 2005;
ll d[10 * N], fact[N * 10], pfact[N * 10];
vector<pii> ar[2];
ll pw(ll a, ll b) {
... | [["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["-", 0, 14, 8, 9, 0, 37, 0, 23, 0, 24], ["-", 0, 23, 0, 16, 31, 2, 63, 23, 0, 24], ["-", 0, 23, 0, 16, 31, 2, 63, 23, 0, 22], ["-", 0, 23, 0, 16, 31, 2, 63, 23, 0, 25], ["-", 0, 23, 0, 16, 31, 2, 3, 4, 0, 24], ["-", 31, 2, 3, 4, 0, 16, 31, 2, 63, 22], ["+", 0, 30, 0, 14, 8, 9,... | 1 | 536 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < ... | [["-", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 2, 63, 22], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 7, 15, 16, 12, 2, 3, 4, 0, 21], ["+", 0, 7, 15, 16, 1... | 1 | 494 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <vector>
#define Rep(i, n) for (int i = 1; i <= n; i++)
#define Rep0(i, n) for (int i = 0; i <= n; i++)
#define RepG(i, x) for (int i = head[x]; i; i = edge[i].next)
#define v edge[i].to
#define mp(a, b) make_pair(a, b)
using namespac... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <vector>
#define Rep(i, n) for (int i = 1; i <= n; i++)
#define Rep0(i, n) for (int i = 0; i <= n; i++)
#define RepG(i, x) for (int i = head[x]; i; i = edge[i].next)
#define v edge[i].to
#define mp(a, b) make_pair(a, b)
using namespac... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 0, 30, 0, 43, 49, 80, 81, 16, 31, 22], ["-", 0, 30, 0, 43, 49, 80, 81, 16, 17, 48], ["-", 0, 30, 0, 43, 49, 80, 81, 16, 12, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 31, 69, 28, 2, 3, 4, 0, 16, 31, 13], ["-", ... | 1 | 468 |
#include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <str... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <str... | [["+", 0, 43, 49, 80, 81, 16, 31, 16, 17, 48], ["+", 0, 43, 49, 80, 81, 16, 31, 16, 12, 13], ["-", 0, 14, 49, 53, 54, 55, 0, 356, 0, 32], ["-", 49, 53, 54, 55, 0, 356, 365, 16, 31, 22], ["-", 49, 53, 54, 55, 0, 356, 365, 16, 17, 72], ["-", 49, 53, 54, 55, 0, 356, 365, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22]... | 1 | 757 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int LL;
typedef LL ll;
typedef string str;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef stringstream strs;
#define X first
#define Y second
#define PB push_back
#define For(i, a, b) for (int i = a; i < b; i++)
#define Ford(i, a, b) for (int... | #include <bits/stdc++.h>
using namespace std;
typedef long long int LL;
typedef int ll;
typedef string str;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef stringstream strs;
#define X first
#define Y second
#define PB push_back
#define For(i, a, b) for (int i = a; i < b; i++)
#define Ford(i, a, b) for (in... | [["-", 36, 36, 36, 36, 0, 30, 0, 134, 39, 78], ["+", 36, 36, 36, 36, 0, 30, 0, 134, 39, 40], ["+", 0, 43, 49, 80, 49, 80, 81, 16, 31, 13], ["+", 0, 43, 49, 80, 49, 80, 81, 16, 17, 48], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 13], ["+", 0, 1,... | 1 | 486 |
#include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define rep(i, a, b) for (int i = (a), _ = (b); i <= _; ++i)
#define per(i, a, b) for (int i = (a), _ = (b); i >= _; --i)
#define For(i, a, b) for (int i = (a), _ = (b); i < _; ++i)
#define ri rd<int>
using n... | #include <algorithm>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define rep(i, a, b) for (int i = (a), _ = (b); i <= _; ++i)
#define per(i, a, b) for (int i = (a), _ = (b); i >= _; --i)
#define For(i, a, b) for (int i = (a), _ = (b); i < _; ++i)
#define ri rd<int>
using n... | [["+", 36, 36, 0, 30, 0, 43, 49, 50, 49, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["+", 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, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 36, 36, 0, 30, 0, 43, 0, 153, 0, 154], ["+", ... | 1 | 812 |
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
const int MAX_N = 200005, MOD = 1000000007;
typedef long long i64;
int A[MAX_N], B[MAX_N], N;
int f[4005][4005], fac[4005], ifac[4005], inv[4005];
i64 binom(int n, int m) {
if (n < m)
return 0;
return 1LL * fac[n] * ifac[m] % MOD... | #include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
const int MAX_N = 200005, MOD = 1000000007;
typedef long long i64;
int A[MAX_N], B[MAX_N], N;
int f[4005][4005];
i64 fac[8005], ifac[8005], inv[8005];
i64 binom(int n, int m) {
if (n < m)
return 0;
return 1LL * fac[n] * ifac[m] %... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 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, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 8, 9, ... | 1 | 489 |
// This amazing code is by Eric Sunli Chen.
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using ... | // This amazing code is by Eric Sunli Chen.
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using ... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 28, 69, 28, 69, 341, 342, 0, 16, 31, 13], ["+", 28, 69, 28, 69, 341, 342, 0, 16, 31, 13], ["-", 0, 27, 28, 69, 341, 342, 0, 16, 31, 13], ["+", 0, 27, 28, 69, 341, 342, 0, 16, 31, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13... | 1 | 832 |
#include <cstdio>
#include <iostream>
#define rs register short
#define ri register int
using namespace std;
typedef long long LL;
const int N = 2001;
const int K = N << 1;
const int M = 2e5 + 5;
const LL mod = 1e9 + 7;
template <typename T> inline void read(T &x) {
char ch;
x = 0;
while (!isdigit(ch = getchar(... | #include <cstdio>
#include <iostream>
#define rs register short
#define ri register int
using namespace std;
typedef long long LL;
const int N = 2001;
const int K = N << 2;
const int M = 2e5 + 5;
const LL mod = 1e9 + 7;
template <typename T> inline void read(T &x) {
char ch;
x = 0;
while (!isdigit(ch = getchar(... | [["-", 0, 30, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 30, 0, 43, 49, 80, 49, 80, 81, 22], ["+", 0, 43, 49, 80, 49, 80, 81, 16, 31, 22], ["+", 0, 43, 49, 80, 49, 80, 81, 16, 17, 151], ["+", 0, 43, 49, 80, 49, 80, 81, 16, 12, 13], ["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 22], ... | 1 | 700 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long s64;
inline int getint() {
static char c;
while ((c = getchar()) < '0' || c > '9')
;
int res = c - '0';
while ((c = getchar()) >= '0' && c <= '9')
res = res * 10 + c -... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
typedef long long s64;
inline int getint() {
static char c;
while ((c = getchar()) < '0' || c > '9')
;
int res = c - '0';
while ((c = getchar()) >= '0' && c <= '9')
res = res * 10 + c -... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 0, 43, 49, 80, 81, 16, 31, 16, 17, 48], ["+", 0, 43, 49, 80, 81, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 48], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 48], ["+"... | 1 | 669 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <s... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <s... | [["-", 0, 30, 0, 43, 49, 80, 81, 16, 12, 13], ["+", 0, 30, 0, 43, 49, 80, 81, 16, 12, 13], ["-", 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], ... | 1 | 816 |
#include <bits/stdc++.h>
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef double lf;
typedef long double llf;
typedef std::pair<int, int> pii;
#define xx first
#define yy second
template <typename T> inline T max(T a, T b) { return a > b ? a : b; }
template <typename T> inline... | #include <bits/stdc++.h>
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef double lf;
typedef long double llf;
typedef std::pair<int, int> pii;
#define xx first
#define yy second
template <typename T> inline T max(T a, T b) { return a > b ? a : b; }
template <typename T> inline... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 0, 34, 12, 34, 31, 16, 31, 23, 0, 24], ["-", 12, 34, 31, 16, 31, 23, 0, 16, 17, 72], ["-", 12, 34, 31, 16, 31, 23, 0, 16, 12, 22], ["-", 0, 34, 12, 34, 31, 16, 31, 23, 0, 25], ["-", 0, 1, 0, 34, 12, 34, 31, 16, 17, 109], ["... | 1 | 1,535 |
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define LL long long
using namespace std;
const LL Maxn = 200010;
const LL Maxm = 4010;
const LL N = 2000;
const LL Mod = 1e9 + 7;
LL f[Maxm][Maxm], res[Maxm][Maxm];
LL a[Maxn], b[Maxn];
LL jc[Maxm], inv[Maxm];
LL n;
void up(LL &x, LL y) { x =... | #include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#define LL long long
using namespace std;
const LL Maxn = 200010;
const LL Maxm = 4010;
const LL N = 2000;
const LL Mod = 1e9 + 7;
LL f[Maxm][Maxm], res[Maxm][Maxm];
LL a[Maxn], b[Maxn];
LL jc[Maxm << 1], inv[Maxm << 1];
LL n;
void up(LL &x, L... | [["+", 0, 30, 0, 43, 49, 80, 81, 16, 17, 151], ["+", 0, 30, 0, 43, 49, 80, 81, 16, 12, 13], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 542 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 4005;
const int mod = 1e9 + 7;
const int Base = N >> 1;
int f[N][N], n, m, a[(int)1e5 + 5], b[(int)1e5 + 5], P[(int)1e5 + 5],
inv[(int)1e5 + 5];
int getinv(int x, int y) {
if (y == ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 5005;
const int mod = 1e9 + 7;
const int Base = N >> 1;
int f[N][N], n, m, a[(int)2e5 + 5], b[(int)2e5 + 5], P[(int)2e5 + 5],
inv[(int)2e5 + 5];
int getinv(int x, int y) {
if (y == ... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 0, 43, 49, 80, 81, 16, 31, 74, 51, 13], ["+", 0, 43, 49, 80, 81, 16, 31, 74, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14... | 1 | 547 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define Rep(i, x) for (int i = head[x]; i + 1; i = nxt[i])
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
#define ff first
#define ss second
using ... | #include <algorithm>
#include <cstdio>
#include <cstring>
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define Rep(i, x) for (int i = head[x]; i + 1; i = nxt[i])
#define rep2(i, a, b) for (int i = (a); i < (b); i++)
#define ff first
#define ss second
using ... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 522 |
#include <bits/stdc++.h>
using namespace std;
#define LL long long
#define G(n, m) ((LL)fac[(n) + (m)] * ifac[n] % mo * ifac[m] % mo)
const int maxn = 8010;
const int base = 2010;
const int mo = 1e9 + 7;
int n, m, f[maxn], Ans, fac[maxn], ifac[maxn];
struct Point {
int x, y;
Point() {}
Point(int x, int y) : x(... | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define G(n, m) ((LL)fac[(n) + (m)] * ifac[n] % mo * ifac[m] % mo)
const int maxn = 8010;
const int base = 2010;
const int mo = 1e9 + 7;
int n, m, f[maxn], Ans, fac[maxn], ifac[maxn];
struct Point {
int x, y;
Point() {}
Point(int x, int y) : x(... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 8, 57, 64, 1, 0, 11, 31, 23, 0, 24], ["-", 0, 7, 8, 57, 64, 1, 0, 11, 17, 110], ["+", 0, 11, 31, 23, 0, 16, 0, 42, 0, 107], ["+", 0, 11, 31, 23, 0, 16, 0, 42, 0, 22], ["+", 64, 1, 0, 11, 31, 23, 0, 16, 17, 33], ["+", 31, 23... | 1 | 622 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 200005, M = 2005, L = 4010, P = 1e9 + 7, K = 8000;
const ll lim_mod = 1e13;
int n, cl[L][L], m, fac[K + 5], ifac[K + 5];
ll dp[L][L], ans;
inline int power(int a, int t) {
int r = 1;
while (t) {
if (t & 1)
r = (ll)r * a %... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 200005, M = 2005, L = 4010, P = 1e9 + 7, K = 8000;
const ll lim_mod = P;
int n, cl[L][L], m, fac[K + 5], ifac[K + 5];
ll dp[L][L], ans;
inline int power(int a, int t) {
int r = 1;
while (t) {
if (t & 1)
r = (ll)r * a % P;... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 22], ["-", 64, 9, 0, 57, 64, 1, 0, 11, 31, 22], ["-", 64, 9, 0, 57, 64, 1, 0, 11, 17, 107], ["-", 0, 57, 64, 1, 0, 11, 12, 16, 31, 22], ["-", 0, 57, 64, 1, 0, 11, 12, 16, 17, 48], ["+", 8, 57, 64, 9, 0, 57, 64, 9, 0, 45], ["+", 64, 9,... | 1 | 519 |
/*
ะ ะะะข! ะะะ ะะะะะะฏะฎะข!!!
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
*/
#include <algorithm>
#... |
/*
ะ ะะะข! ะะะ ะะะะะะฏะฎะข!!!
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
๐น๐น๐น๐น๐น๐น๐น๐น๐น๐น
*/
#include <algorithm>
#... | [["+", 0, 23, 0, 41, 75, 41, 15, 16, 17, 18], ["+", 0, 23, 0, 41, 75, 41, 15, 16, 12, 13], ["+", 0, 37, 0, 23, 0, 41, 75, 41, 0, 101], ["+", 0, 41, 75, 41, 64, 16, 31, 16, 31, 22], ["+", 0, 41, 75, 41, 64, 16, 31, 16, 17, 72], ["+", 0, 41, 75, 41, 64, 16, 31, 16, 12, 22], ["+", 0, 23, 0, 41, 75, 41, 64, 16, 17, 72], ["... | 1 | 745 |
#include <cstdio>
long long n, x, y, mod, ans, p[4001][4001], f[8001];
bool vis[4001][4001];
long long mi(long long k, long long p) {
if (!p)
return 1;
long long s = mi(k, p / 2);
s = s * s % mod;
if (p % 2)
s = s * k % mod;
return s;
}
long long c(long long n, long long m) {
return f[n] * mi(f[m], ... | #include <cstdio>
long long n, x, y, mod, ans, p[4001][4001], f[8001], vis[4001][4001];
long long mi(long long k, long long p) {
if (!p)
return 1;
long long s = mi(k, p / 2);
s = s * s % mod;
if (p % 2)
s = s * k % mod;
return s;
}
long long c(long long n, long long m) {
return f[n] * mi(f[m], mod -... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["-", 3, 4, 0, 16, 31, 16, 12, 16, 12, 22], ["-", 0, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["-", 3, 4, 0, 16, 12, 69, 28, 69, 28, 22], ["-", 0, 16, 12, 69, 28, 69, 341, 342, 0, 70], ["-", 12,... | 1 | 431 |
#include <bits/stdc++.h>
using namespace std;
#define MAX 200002
int n;
vector<pair<int, int>> v;
long long int dp[4002][4002];
vector<pair<int, int>> vv;
#define MOD 1000000007
class Combination {
long long int ppow(long long int i, long long int j) {
long long int res = 1LL;
while (j) {
if ((j &... | #include <bits/stdc++.h>
using namespace std;
#define MAX 200002
int n;
vector<pair<int, int>> v;
long long int dp[4002][4002];
vector<pair<int, int>> vv;
#define MOD 1000000007
class Combination {
long long int ppow(long long int i, long long int j) {
long long int res = 1LL;
while (j) {
if ((j &... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 338, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 338, 8, 9, 0, 57, 0, 121], ["+", 0, 338, 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, 20], ["+", 8, 9, 0, 57, 15, 339,... | 1 | 776 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> P;
typedef long long LL;
const int MOD = 1000000007;
int N;
vector<P> v;
int dp[4001][4001];
int main() {
cin >> N;
int a_max = 0;
int b_max = 0;
for (int i = 0; i < N; ++i) {
int a, b;
cin >> a >... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> P;
typedef long long LL;
const int MOD = 1000000007;
int N;
vector<P> v;
int dp[4001][4001];
int main() {
cin >> N;
int a_max = 0;
int b_max = 0;
for (int i = 0; i < N; ++i) {
int a, b;
cin >> a >... | [["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 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, 72], ["+", 0, 11, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1... | 1 | 588 |
#include <bits/stdc++.h>
using namespace std;
#define e1 first
#define e2 second
#define pb push_back
#define mp make_pair
#define boost ios_base::sync_with_stdio(false)
#define eb emplace_back
#define OUT(x) \
{ ... | #include <bits/stdc++.h>
using namespace std;
#define e1 first
#define e2 second
#define pb push_back
#define mp make_pair
#define boost ios_base::sync_with_stdio(false)
#define eb emplace_back
#define OUT(x) \
{ ... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 0, 30, 0, 43, 49, 80, 81, 16, 31, 13], ["-", 0, 30, 0, 43, 49, 80, 81, 16, 17, 48], ["-", 0, 30, 0, 43, 49, 80, 81, 16, 12, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 22], ["-"... | 1 | 709 |
// ** ALLAH **
// who is Hussain? -> whoishussain.org
#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 2e5 + 100, M = 2001;
int n, a[N], b[N], dpdpdp[2 * M][2 * M], fact[2 * M];
int powm(int x, int p) {
int ret = 1;
whil... | // ** ALLAH **
// who is Hussain? -> whoishussain.org
#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 2e5 + 100, M = 2002;
int n, a[N], b[N], dpdpdp[3 * M][3 * M], fact[4 * M + 1];
int powm(int x, int p) {
int ret = 1;
... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 0, 43, 49, 80, 49, 80, 81, 16, 31, 13], ["+", 0, 43, 49, 80, 49, 80, 81, 16, 31, 13], ["-", 0, 30, 0, 43, 49, 80, 81, 16, 31, 13], ["+", 0, 30, 0, 43, 49, 80, 81, 16, 31, 13], ["+", 0, 43, 49, 80, 81, 16, 31, 16, 31, 13], [... | 1 | 440 |
#include <cstdio>
const int N = 200100;
const int MOD = 1000000007;
int a[N], b[N];
int dp[4010][4010];
int val[4010][4010];
int val2[4010][4010];
long long fat[8010], inv[8010];
long long fpow(long long a, long long b) {
long long c = 1;
for (; b; b >>= 1, a = (a * a) % MOD)
if (b & 1)
c = (c * 1ll * ... | #include <cstdio>
const int N = 200100;
const int MOD = 1000000007;
int a[N], b[N];
int dp[4010][4010];
int val[4010][4010];
int val2[4010][4010];
long long fat[8010], inv[8010];
long long fpow(long long a, long long b) {
long long c = 1;
for (; b; b >>= 1, a = (a * a) % MOD)
if (b & 1)
c = (c * 1ll * ... | [["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 24], ["+", 0, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 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, 132], ["+", 0, 57, 64, 9, 0... | 1 | 560 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.