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>
#define For(i, l, r) for (ll i = (l), _end_ = (int)(r); i <= _end_; ++i)
#define Fordown(i, r, l) for (ll i = (r), _end_ = (int)(l); i >= _end_; --i)
#define Set(a, v) memset(a, v, sizeof(a))
using namespace std;
bool chkmin(int &a, int b) { return b < a ? a = b, 1 : 0; }
bool chkmax(int &a, i... | #include <bits/stdc++.h>
#define For(i, l, r) for (ll i = (l), _end_ = (int)(r); i <= _end_; ++i)
#define Fordown(i, r, l) for (ll i = (r), _end_ = (int)(l); i >= _end_; --i)
#define Set(a, v) memset(a, v, sizeof(a))
using namespace std;
bool chkmin(int &a, int b) { return b < a ? a = b, 1 : 0; }
bool chkmax(int &a, i... | [["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 13], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 73], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 1, 0, 11, 31, 69, 28, 22], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 70]] | 1 | 555 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxn = 100000 + 5;
const ll mo = (ll)1e9 + 7;
ll dp[maxn];
ll h, w, a, b;
ll fac[maxn], inv[maxn];
ll extgcd(ll a, ll b, ll &x, ll &y) {
if (b == 0) {
x = 1, y = 0;
return a;
} else {
ll tmp = extgcd(b, a % b, y, x);
y -= (... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll maxn = 1000000 + 5;
const ll mo = (ll)1e9 + 7;
ll dp[maxn];
ll h, w, a, b;
ll fac[maxn], inv[maxn];
ll extgcd(ll a, ll b, ll &x, ll &y) {
if (b == 0) {
x = 1, y = 0;
return a;
} else {
ll tmp = extgcd(b, a % b, y, x);
y -= ... | [["-", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 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, ... | 1 | 493 |
// Copyright 2017 wu_qing
#include <cstdio>
#include <stdint.h>
const int N = 2e5 + 10, mod = 1e9 + 7;
int h, w, a, b;
int64_t jie[N], inv[N], ans;
int main() {
scanf("%d%d%d%d", &h, &w, &a, &b);
jie[0] = inv[0] = inv[1] = 1;
for (int i = 1; i < N; i++)
jie[i] = jie[i - 1] * i % mod;
for (int i = 2; i < N; ... | // Copyright 2017 wu_qing
#include <cstdio>
#include <stdint.h>
const int N = 2e5 + 10, mod = 1e9 + 7;
int h, w, a, b;
int64_t jie[N], inv[N], ans;
int main() {
scanf("%d%d%d%d", &h, &w, &a, &b);
jie[0] = inv[0] = inv[1] = 1;
for (int i = 1; i < N; i++)
jie[i] = jie[i - 1] * i % mod;
for (int i = 2; 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], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0... | 1 | 342 |
import scipy.misc as scm
H, W, A, B = [int(input()) for _ in range(4)]
MOD = 10**9 + 7
f = [1]
a = [1]
for i in range(1, H+W-1):
f.append((f[i-1] * i) % MOD)
a.append(pow(f[i], MOD-2, MOD))
ans = 0
for i in range(B, W, 1):
ans += (((f[(H-A-1)+i] * a[H-A-1] * a[i]) % MOD) * ((f[(A-1)+(W-1-i)] * a[A-1] * a[W... | import scipy.misc as scm
H, W, A, B = [int(i) for i in input().split()]
MOD = 10**9 + 7
f = [1]
a = [1]
for i in range(1, H+W-1):
f.append((f[i-1] * i) % MOD)
a.append(pow(f[i], MOD-2, MOD))
ans = 0
for i in range(B, W, 1):
ans += (((f[(H-A-1)+i] * a[H-A-1] * a[i]) % MOD) * ((f[(A-1)+(W-1-i)] * a[A-1] * a[... | [["-", 12, 658, 8, 652, 3, 4, 0, 652, 63, 22], ["-", 8, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["-", 8, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 0, 662, 12, 658, 8, 652, 3, 4, 0, 22], ["-", 0, 1, 0, 662, 12, 658, 0, 659, 31, 22], ["+", 0, 1, 0, 662, 12, 658, 0, 659, 31, 22], ["-", 0, 662, 12, 658, 0, 659, 12, 652, 63, 22], ["+... | 5 | 192 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) begin(v), end(v)
#define FOR(i, a, b) for (int i = (a); i < (int)(b); i++)
#define rep(i, b) FOR(i, 0, b)
const int mod = 1e9 + 7;
int h, w, a, b, ans;
int d[100010];
int fact[500010], inv_fact[500010];
int mod_fact(int n, int mod) {
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) begin(v), end(v)
#define FOR(i, a, b) for (int i = (a); i < (int)(b); i++)
#define rep(i, b) FOR(i, 0, b)
const int mod = 1e9 + 7;
int h, w, a, b, ans;
int d[100010];
int fact[500010], inv_fact[500010];
int mod_fact(int n, int mod) {
... | [["+", 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, 37, 0, 38], ["+", 0, 14, 8... | 1 | 471 |
#include <algorithm>
#include <iostream>
#include <string>
using namespace std;
using ll = long long;
constexpr ll mod = 1e9 + 7;
ll C[200001];
ll C2[200001];
ll pow(ll x, ll y, ll m) {
ll s = 1;
while (y != 0) {
if (y & 1) {
s = s * x % m;
}
x = x * x % m;
y >>= 1;
}
return s;
}
void... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
using ll = long long;
constexpr ll mod = 1e9 + 7;
ll C[200001];
ll C2[200001];
ll pow(ll x, ll y, ll m) {
ll s = 1;
while (y != 0) {
if (y & 1) {
s = s * x % m;
}
x = x * x % m;
y >>= 1;
}
return s;
}
void... | [["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 7, 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], ["+", 12, 16, 31, 23, 0, 16, 12, 23, 0, 24], ["+", 31, 23, 0, 16, 12, 23, 0, 16, 17, 109], ["+", 31, 23, ... | 1 | 313 |
#include "math.h"
#include <algorithm>
#include <complex>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define ifor(i, a, b) for (int i = (a); i < (b); i++)
#define rfor(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (n)... | #include "math.h"
#include <algorithm>
#include <complex>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define ifor(i, a, b) for (int i = (a); i < (b); i++)
#define rfor(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define rep(i, n) for (int i = 0; i < (n)... | [["+", 0, 1, 0, 11, 12, 11, 31, 69, 28, 22], ["+", 0, 11, 12, 11, 31, 69, 341, 342, 0, 70], ["+", 0, 11, 12, 11, 31, 69, 341, 342, 0, 13], ["+", 0, 11, 12, 11, 31, 69, 341, 342, 0, 73], ["+", 8, 9, 0, 1, 0, 11, 12, 11, 17, 32], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13]... | 1 | 388 |
//負数の合同も考慮に入れるmod関数
inline long long imod(long long a, long long b) {
return (a >= 0) ? (a % b) : (a % b + b);
}
// mintが引数の繰り返し2乗法
class mint;
mint pow(mint x, long long n);
// modの整数クラス
class mint {
public:
static void set_mod(long long m_) {
//無効な値は無視
if (m_ < 2)
return;
// modの値を更新
mod ... |
//負数の合同も考慮に入れるmod関数
inline long long imod(long long a, long long b) {
return (a >= 0) ? (a % b) : (a % b + b);
}
// mintが引数の繰り返し2乗法
class mint;
mint pow(mint x, long long n);
// modの整数クラス
class mint {
public:
static void set_mod(long long m_) {
//無効な値は無視
if (m_ < 2)
return;
// modの値を更新
mod ... | [["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 0, 1, 0, 11, 12, 16, 12, 2, 63, 22], ["+", 0, 11, 12, 16, 12, 2, 3, 4, 0, 24], ["+", 0, 16, 31, 16, 31, 16, 31, 91, 17, 33], ["+", 0, 16, 31, 16, 31, 16, 31, 91, 28, 22], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 17, 72], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 12, 22], ["+", 12, 2,... | 1 | 929 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
// x^n % MOD
ll pow_MOD(ll x, ll n) {
if (n == 0)
return 1;
if (n == 1)
return x;
if (n % 2 == 0) {
ll ret = pow_MOD(x, n / 2);
return (ret * ret) % MOD;
} else {
return (x * pow_MOD(x, n - 1)) % M... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
// x^n % MOD
ll pow_MOD(ll x, ll n) {
if (n == 0)
return 1;
if (n == 1)
return x;
ll ret = pow_MOD(x, n / 2);
if (n % 2 == 0) {
return (ret * ret) % MOD;
} else {
return (x * ((ret * ret) % MOD)) % M... | [["-", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["... | 1 | 359 |
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cstring>
#include <string>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <numeric>
#include <cl... | #include <cstdio>
#include <iostream>
#include <sstream>
#include <cstring>
#include <string>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <numeric>
#include <cl... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 25], ["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["+", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 0, 7, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339,... | 1 | 500 |
#ifdef LOCAL111
#else
#define NDEBUG
#endif
#include <bits/stdc++.h>
const int INF = 1e8;
using namespace std;
#define endl '\n'
#define ALL(a) (a).begin(), (a).end()
#define SZ(a) int((a).size())
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(... | #ifdef LOCAL111
#else
#define NDEBUG
#endif
#include <bits/stdc++.h>
const int INF = 1e8;
using namespace std;
#define endl '\n'
#define ALL(a) (a).begin(), (a).end()
#define SZ(a) int((a).size())
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(... | [["+", 36, 36, 0, 30, 0, 43, 0, 153, 0, 154], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 49, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["+", 0, 14, 49, 53, 54, 55, 0, 356, 49, 22], ["+",... | 1 | 707 |
/*
* Created by KeigoOgawa
*/
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#define INF (int)1e8
#define EPS 1e-10
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); ... | /*
* Created by KeigoOgawa
*/
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#define INF (int)1e8
#define EPS 1e-10
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); ... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 31, 2, 3, 4, 0, 16, 31, 16, 17, 33], ["+", 31, 2, 3, 4, 0, 16, 31, 16, 12, 13], ["+", 0, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 0, 9, 0, 43, 49, 50, 51, 16, 12, 22], ["-", 3, 4, 0, 16, 12, 23, 0, 16, 12, 13], ["+", 3, 4,... | 1 | 627 |
#include <algorithm>
#include <iostream>
#include <vector>
enum { MOD = 1000000007 };
template <class T> static T inv(T a) {
T b = MOD;
T u = 0, v = 1;
while (a) {
const auto t = b / a;
std::swap(b -= t * a, a);
std::swap(u -= t * v, v);
}
return (u + MOD) % MOD;
}
int main() {
std::cin.tie(0)... | #include <algorithm>
#include <iostream>
#include <vector>
enum { MOD = 1000000007 };
template <class T> static T inv(T a) {
T b = MOD;
T u = 0, v = 1;
while (a) {
const auto t = b / a;
std::swap(b -= t * a, a);
std::swap(u -= t * v, v);
}
return (u + MOD) % MOD;
}
int main() {
std::cin.tie(0)... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 0, 35], ["-", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["-", 0, 7, 8, 9, 0, 57, 15, 339, 0, 24], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339... | 1 | 364 |
#include <algorithm>
#include <iostream>
#include <limits>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
const int MOD = 1000 * 1000 * 1000 + 7;
int power(int x, int n) {
if (n == 0) {
return 1;
} else if (n % 2 == 0) {
int t = power(x, n / 2);
return 1L... | #include <algorithm>
#include <iostream>
#include <limits>
#include <numeric>
#include <queue>
#include <string>
#include <vector>
using namespace std;
const int MOD = 1000 * 1000 * 1000 + 7;
int power(int x, int n) {
if (n == 0) {
return 1;
} else if (n % 2 == 0) {
int t = power(x, n / 2);
return 1L... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 31, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["-", 31, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["-", 12, 16, 31, 16, 31, 16, 12, 69, 28, 22], ["-", 31, 16, 31, 16, 12, 69, 341, 342, 0, 70], ["-", 31, 16, 31, 16, 12, 69, 341, 342, 0, 13... | 1 | 369 |
#include <bits/stdc++.h>
using namespace std;
template <typename T> T power(const T &a, long long n, const T &e) {
T ret = e;
T beki = a;
for (long long i = 1LL; i <= n; i <<= 1) {
if ((n & i) > 0)
ret *= beki;
beki = beki * beki;
}
return ret;
}
const int MOD = 1e9 + 7;
class Z_nZ {
public:
... | #include <bits/stdc++.h>
using namespace std;
template <typename T> T power(const T &a, long long n, const T &e) {
T ret = e;
T beki = a;
for (long long i = 1LL; i <= n; i <<= 1) {
if ((n & i) > 0)
ret *= beki;
beki = beki * beki;
}
return ret;
}
const int MOD = 1e9 + 7;
class Z_nZ {
public:
... | [["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["+", 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, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 0, 73], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 30... | 1 | 747 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include... | [["+", 0, 30, 0, 14, 8, 9, 0, 57, 0, 121], ["+", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+... | 1 | 704 |
#include <bits/stdc++.h>
using namespace std;
#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb ... | #include <bits/stdc++.h>
using namespace std;
#define INF 1001000100010001000
#define MOD 1000000007
#define EPS 1e-10
#define int long long
#define rep(i, N) for (int i = 0; i < N; i++)
#define Rep(i, N) for (int i = 1; i < N; i++)
#define For(i, a, b) for (int i = (a); i < (b); i++)
#define pb push_back
#define eb ... | [["-", 51, 4, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 51, 4, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 51, 4, 0, 2, 3, 4, 0, 16, 17, 151], ["+", 51, 4, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 3, 4, 0, 2, 63, 118, 28, 69, 28, 22], ["-", 0, 2, 63, 118, 28, 69, 341, 342, 0, 70], ["-", 0, 2, 63, 118, 28, 69, 341, 342, 0, 22], ["-", 0, 2, 63, ... | 1 | 508 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | [["-", 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], ["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 49, 50, 51, 2, 3, 4, 0, 2, 63, 22], ["-", 51, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 51, 2, 3, 4, 0, 2, 3... | 1 | 2,256 |
#include <bits/stdc++.h>
using namespace std;
const int md = 1000000007;
int n, x, y, z, sum;
long long t;
long long dp[45][1 << 17];
long long sol(long long a, long long b) {
if (dp[a][b] != -1)
return dp[a][b];
if ((b >> (x + y + z - 1)) & 1 && (b >> (y + z - 1)) & 1 &&
(b >> (z - 1)) & 1)
return 0;... | #include <bits/stdc++.h>
using namespace std;
int n, x, y, z, md = 1e9 + 7;
long long t, dp[45][1 << 17];
long long sol(long long a, long long b) {
if (dp[a][b] != -1)
return dp[a][b];
if ((b >> (x + y + z - 1)) & 1 && (b >> (y + z - 1)) & 1 &&
(b >> (z - 1)) & 1)
return 0;
if (a == n)
return 1;... | [["-", 36, 36, 0, 30, 0, 43, 0, 153, 0, 154], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 49, 22], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["+", ... | 1 | 309 |
#include <cstdio>
#include <iostream>
using namespace std;
int n, x, y, z;
long long dp[41][1 << 17];
long long ans;
int s;
const long long md = 1e9 + 7;
bool ok(int k) {
if (!(k & (1 << (z - 1))) || !(k & (1 << (s - x - 1))) ||
!(k & (1 << (s - 1))))
return true;
return false;
}
int main() {
scanf("%d%... | #include <cstdio>
#include <iostream>
using namespace std;
int n, x, y, z;
long long dp[41][1 << 17];
long long ans;
int s;
const long long md = 1e9 + 7;
bool ok(int k) {
if (!(k & (1 << (z - 1))) || !(k & (1 << (s - x - 1))) ||
!(k & (1 << (s - 1))))
return true;
return false;
}
int main() {
scanf("%d%... | [["-", 8, 9, 0, 7, 8, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 7, 8, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 7, 8, 1, 0, 27, 17, 29], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 110], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 31, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 31,... | 1 | 407 |
#include <algorithm>
#include <bitset>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define int long long
#define MOD 1000000007LL
int N, X, Y, Z;
int dp[41][1 << 18];
signed main() {
cin >> N >> X >> Y >> Z;
const int MASK = (1 << (X + Y + Z)) - 1;
const int NG = (1 << (Z - 1)... | #include <algorithm>
#include <bitset>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
int N, X, Y, Z;
int dp[41][1 << 18];
int main() {
cin >> N >> X >> Y >> Z;
const int MASK = (1 << (X + Y + Z)) - 1;
const int NG = (1 << (Z - 1)) | (1 << (Y + Z - 1)) | (1... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 141, 22], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 36, 36, 36, 36, 0, 30, 0, 58, 0, 148], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 36, 36, 0, 30, 0, 14, 39, 86, 0, 156], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["-", 8, 9, 0, 7, 8, 1, 0, 11, 17, 32], ["+", 8,... | 1 | 368 |
#include <algorithm>
#include <bitset>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define int long long
#define MOD 1000000007LL
int N, X, Y, Z;
int dp[41][1 << 18];
signed main() {
cin >> N >> X >> Y >> Z;
const int MASK = (1 << (X + Y + Z)) - 1;
const int NG = (1 << (Z - 1)... | #include <algorithm>
#include <bitset>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define int long long
#define MOD 1000000007LL
int N, X, Y, Z;
int dp[41][1 << 18];
signed main() {
cin >> N >> X >> Y >> Z;
const int MASK = (1 << 17) - 1;
const int NG = (1 << (Z - 1)) | (1 <<... | [["-", 51, 16, 31, 23, 0, 16, 12, 23, 0, 24], ["-", 0, 16, 12, 23, 0, 16, 31, 16, 31, 22], ["-", 0, 16, 12, 23, 0, 16, 31, 16, 17, 72], ["-", 0, 16, 12, 23, 0, 16, 31, 16, 12, 22], ["-", 31, 23, 0, 16, 12, 23, 0, 16, 17, 72], ["-", 31, 23, 0, 16, 12, 23, 0, 16, 12, 22], ["-", 51, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["+"... | 1 | 368 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#define enter putchar('\n')
#define space putchar(' ')
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define pii pair<int, int>
#define eps 1e-7
#define MAXN 1000005
//#define i... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#define enter putchar('\n')
#define space putchar(' ')
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define pii pair<int, int>
#define eps 1e-7
#define MAXN 1000005
//#define i... | [["+", 0, 7, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 31, 22], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 17, 72], ... | 1 | 925 |
// Copyright 2020 Nikita Golikov
#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using ui64 = uint64_t;
#ifdef GOLIKOV
mt19937_64 rng(566);
#else
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
#endif
template <typename T> T rnd_helper(T from, T to, true_type) {
return... | // Copyright 2020 Nikita Golikov
#include <bits/stdc++.h>
using namespace std;
using i64 = int64_t;
using ui64 = uint64_t;
#ifdef GOLIKOV
mt19937_64 rng(566);
#else
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
#endif
template <typename T> T rnd_helper(T from, T to, true_type) {
return... | [["+", 0, 7, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 0, 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], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 17, 32], ["+", 75, 76, 0, 9... | 1 | 1,726 |
// pragma
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define YOU using
#define DONT namespace
#define SAY std
YOU DONT SAY;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
type... | // pragma
//#pragma GCC optimize("Ofast")
//#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define YOU using
#define DONT namespace
#define SAY std
YOU DONT SAY;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
type... | [["-", 64, 9, 0, 57, 75, 76, 0, 57, 0, 121], ["-", 0, 57, 75, 76, 0, 57, 15, 339, 0, 24], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 31, 22], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["-", 0, 57, 75, 76, 0, 57, 15, 339, 0, 25]] | 1 | 1,174 |
#include <bits/stdc++.h>
using namespace std;
int n, k;
string s[2005], ans;
bitset<10001> ok[2005];
bitset<10001> dp[2005];
int z[10005];
void do_z(string s) {
memset(z, 0, sizeof(z));
int L = s.size();
z[0] = L;
for (int i = 1, last = 0, right = 0; i < L; ++i) {
if (i <= right)
z[i] = min(right -... | #include <bits/stdc++.h>
using namespace std;
int n, k;
string s[2005], ans;
bitset<10001> ok[2005];
bitset<10001> dp[2005];
int z[10005];
void do_z(string s) {
memset(z, 0, sizeof(z));
int L = s.size();
for (int i = 1, last = 0, right = 0; i < L; ++i) {
if (i <= right)
z[i] = min(right - i + 1, z[i ... | [["-", 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, 13], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 73], ["-", 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], ["+", 15, 339, 51, 1... | 1 | 545 |
#include <bits/stdc++.h>
using namespace std;
typedef double db;
typedef long long ll;
// typedef pair<int, int> pii;
//#define fi first
//#define se second
#define lbd(a, x) lower_bound(all(a), x)
const int mod = 1e9 + 7;
const int M = 10100;
const int N = 2100;
struct pii {
int fi, se;
pii(int x = 0, int y = 0) :... | #include <bits/stdc++.h>
using namespace std;
typedef double db;
typedef long long ll;
// typedef pair<int, int> pii;
//#define fi first
//#define se second
#define lbd(a, x) lower_bound(all(a), x)
const int mod = 1e9 + 7;
const int M = 10100;
const int N = 2100;
struct pii {
int fi, se;
pii(int x = 0, int y = 0) :... | [["+", 36, 36, 0, 30, 0, 43, 0, 153, 0, 154], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 49, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-", 0, 30, 0, 43, 49, 80, 81, 16, 31, 22], ["-", ... | 1 | 640 |
#include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef bitset<20010> B;
string S;
int sa[1000010][14];
void sa_init() {
if (true) {
vector<P> vec;
for (int i = 0; i < S.size(); i++) {
vec.push_back(P(S[i], 0));
}
sort(vec.begin(), vec.end());
for (int i = 0; i < S.... | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef bitset<20010> B;
string S;
int sa[1000010][15];
void sa_init() {
if (true) {
vector<P> vec;
for (int i = 0; i < S.size(); i++) {
vec.push_back(P(S[i], 0));
}
sort(vec.begin(), vec.end());
for (int i = 0; i < S.... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 8, 9, 0, 7, 8, 9, 0, 57, 0, 121], ["+", 0, 7, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 0, 57, 15, 339, 51, 69, 28, 69, 28, 22], ["+", 15, 339, 51, 69, 28, 69, 341, 342, 0, 70], ["+", 15, 339, 51, 69, 28, 69, 341, 342, 0, 22], ["... | 1 | 1,372 |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 7;
// z[i] = len of lcp of s, s[i..]; lcp(longest common prefix)
int z[20007];
void z_fn(const string &s) {
int n = s.size();
for (int i = 1, l = 0, r = 0; i < n; i++) {
if (i <= r)
z[i] = min(r - i + 1, z[i - l]);
while (i + z[i] < ... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 7;
// z[i] = len of lcp of s, s[i..]; lcp(longest common prefix)
int z[20007];
void z_fn(const string &s) {
int n = s.size();
for (int i = 0; i < n; i++)
z[i] = 0;
for (int i = 1, l = 0, r = 0; i < n; i++) {
if (i <= r)
z[i] = min(... | [["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 26... | 1 | 643 |
#include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 100;
const int K = 1e4 + 100;
typedef pair<int, int> pii;
#define fr(i, low, up, st) for (int i = low; i <= (int)up; i += st)
#define nfr(i, low, up, st) for (int i = low; i >= (int)up; i -= st)
#define SZ(a) (int)a.size()
#define fill(a, b) memset(a, b,... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e3 + 100;
const int K = 1e4 + 100;
typedef pair<int, int> pii;
#define fr(i, low, up, st) for (int i = low; i <= (int)up; i += st)
#define nfr(i, low, up, st) for (int i = low; i >= (int)up; i -= st)
#define SZ(a) (int)a.size()
#define fill(a, b) memset(a, b,... | [["-", 0, 1, 0, 2, 3, 4, 0, 2, 63, 22], ["-", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 64, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35], ["+", 0, 9, 0, 57, 64, 9, 0, 9, 0, 45], ["+", 0, 57, 64, 9, 0, 9, 0, 57, 0, 121], ["+", 64, 9, 0, 9, 0, 57, 15, 339, 0, 24], ... | 1 | 1,021 |
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
const int MAXK = 10005;
int n, k, br;
string s[MAXN], curr;
int z[MAXK * 2];
bool dp[MAXN][MAXK], ok[MAXK];
void precompute() {
dp[n][0] = 1;
for (int i = n - 1; i >= 0; i--) {
int len = s[i].size();
for (int j = 0; j <= k; j++) {
... | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
const int MAXK = 10005;
int n, k, br;
string s[MAXN], curr;
int z[MAXK * 2];
bool dp[MAXN][MAXK], ok[MAXK];
void precompute() {
dp[n][0] = 1;
for (int i = n - 1; i >= 0; i--) {
int len = s[i].size();
for (int j = 0; j <= k; j++) {
... | [["+", 51, 16, 31, 16, 12, 16, 31, 69, 28, 22], ["+", 31, 16, 12, 16, 31, 69, 341, 342, 0, 70], ["+", 31, 16, 12, 16, 31, 69, 341, 342, 0, 22], ["+", 31, 16, 12, 16, 31, 69, 341, 342, 0, 73], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 18], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, ... | 1 | 736 |
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
const int MAXK = 10005;
int n, k, br;
string s[MAXN], curr;
int z[MAXK * 2];
bool dp[MAXN][MAXK], ok[MAXK];
void precompute() {
dp[n][0] = 1;
for (int i = n - 1; i >= 0; i--) {
int len = s[i].size();
for (int j = 0; j <= k; j++) {
... | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 2005;
const int MAXK = 10005;
int n, k, br;
string s[MAXN], curr;
int z[MAXK * 2];
bool dp[MAXN][MAXK], ok[MAXK];
void precompute() {
dp[n][0] = 1;
for (int i = n - 1; i >= 0; i--) {
int len = s[i].size();
for (int j = 0; j <= k; j++) {
... | [["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 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, 13], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 73], ["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32]] | 1 | 741 |
#include <algorithm>
#include <bitset>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
#define Maxn 2000
#define Maxk 10000
int n, k;
string s[Maxn + 5];
string ans;
bitset<Maxk + 5> can[Maxn + 5];
pair<int, int> vis[2][Maxn + 5];
int main() {
ios::sync_with_stdio(false);
scanf("%d%d", ... | #include <algorithm>
#include <bitset>
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
#define Maxn 2000
#define Maxk 10000
int n, k;
string s[Maxn + 5];
string ans;
bitset<Maxk + 5> can[Maxn + 5];
pair<int, int> vis[2][Maxn + 5];
int main() {
ios::sync_with_stdio(false);
cin >> n >> k;... | [["-", 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], ["-", 0, 1, 0, 2, 3, 4, 0, 66, 17, 67], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 152], ["+... | 1 | 550 |
//#pragma optimize("Ofast")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
i... | //#pragma optimize("Ofast")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
i... | [["-", 0, 7, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["-", 0, 57... | 1 | 600 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int len[2005];
char s[2005][1... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int len[2005];
char s[2005][1... | [["-", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["+", 0, 30, 0, 43, 49, 80, 49, 80, 81, 13], ["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 0, 11, 31, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 11, 31, 69, 28, 69, 341, 342, 0, 13], ["+", 28, 69, 28, 69, 341, 342, 0, 16, 17, 33... | 1 | 514 |
#include <bits/stdc++.h>
#define MN 2000
#define MM 10000
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = x * 10 + ch - '0';
ch = getchar();
}
... | #include <bits/stdc++.h>
#define MN 2000
#define MM 10000
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
f = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9') {
x = x * 10 + ch - '0';
ch = getchar();
}
... | [["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 106], ["+", 31, 23, 0, 16, 12, 16, 31, 69, 28, 22], ["+", 0, 16, 12, 16, 31, 69, 341, 342, 0, 70], ["+", 341, 342, 0, 16, 31, 16, 31, 69, 28, 22], ["+", 0, 16, 31, 16, 31, 69, 341, 342,... | 1 | 1,042 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <immintrin.h>
#include <iomanip>
#include <iostream>
#include <list>... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <immintrin.h>
#include <iomanip>
#include <iostream>
#include <list>... | [["+", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["+", 10, 43, 49, 50, 51, 16, 12, 23, 0, 24], ["+", 51, 16, 12, 23, 0, 41, 15, 16, 31, 22], ["+", 51, 16, 12, 23, 0, 41, 15, 16, 17, 20], ["+", 51, 16, 12, 23, 0, 41, 15, 16, 12, 22], ["+", 49, 50, 51, 16, 12, 23, 0, 41, 0, 101], ["+", 49, 50, 51, 16, 12, 23, 0, 41, 64, 13]... | 1 | 787 |
#include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb emplace_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
constexpr int mod = 1e9 + 7;
constexpr int32_t inf = 1001001001;
constexpr int64_t infll = 1001001001001001001ll;
constex... | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb emplace_back
#define mp make_pair
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
constexpr int mod = 1e9 + 7;
constexpr int32_t inf = 1001001001;
constexpr int64_t infll = 1001001001001001001ll;
constex... | [["-", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 13], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 147], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 146], ["+", 8, 9, 0, 43, 49, 50, 51, 23, 0, 24], ["+", 49, 50, 51, 23, ... | 1 | 1,103 |
#include <bits/stdc++.h>
using namespace std;
const int maxN = 2005, maxK = 10003;
pair<int, int> a[2][1000005];
string str[maxN];
char ans[maxK];
bitset<maxK> can[maxN];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, K;
cin >> N >> K;
for (int i = 1; i <= N; ++i)
cin >> str[i];
can[N + ... | #include <bits/stdc++.h>
using namespace std;
const int maxN = 2005, maxK = 10003;
pair<int, int> a[2][1000005];
string str[maxN];
char ans[maxK];
bitset<maxK> can[maxN];
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, K;
cin >> N >> K;
for (int i = 1; i <= N; ++i)
cin >> str[i];
can[N + ... | [["+", 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], ["+", 0, 7, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 1, 0, 11, 12, 2, 3, 4, 0, 24], ["+", 0, 11, 12, 2, 3... | 1 | 548 |
#include <bits/stdc++.h>
#define rep(i, x, y) for (int i = (x); i <= (y); i++)
#define per(i, x, y) for (int i = (x); i >= (y); i--)
#define N 2005
#define M 10005
#define ll long long
using namespace std;
int n, m, len, tp, tot, a[N], q[M], f[M << 1];
char s[N][M], s1[M << 1], ch[M];
bool fl[N][M], ok[M], vis[M];
stru... | #include <bits/stdc++.h>
#define rep(i, x, y) for (int i = (x); i <= (y); i++)
#define per(i, x, y) for (int i = (x); i >= (y); i--)
#define N 2005
#define M 10005
#define ll long long
using namespace std;
int n, m, len, tp, tot, a[N], q[M], f[M << 1];
char s[N][M], s1[M << 1], ch[M];
bool fl[N][M], ok[M], vis[M];
stru... | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 57, 64, 9, 0, 45], ["-", 64, 9, 0, 57, 64, 1, 0, 34, 0, 21], ["+", 64, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 57, 64, 9, 0, 57, 64, 9, 0, 46], ["+", 64, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 64, 57, 75, 76, 0, 1, ... | 1 | 1,194 |
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int valid[2000][10001];
int Z[20000];
void makeValid(const vector<string> &vs, int K) {
memset(valid, 0, sizeof(valid));
int N = vs.size();
valid[N - 1][K] = 1;
for (int i = N - 2; i >= 0; i--) {
for (int j = ... | #include <cstring>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int valid[2000][10001];
int Z[20000];
void makeValid(const vector<string> &vs, int K) {
memset(valid, 0, sizeof(valid));
int N = vs.size();
valid[N - 1][K] = 1;
for (int i = N - 2; i >= 0; i--) {
for (int j = ... | [["+", 15, 339, 51, 16, 12, 16, 12, 16, 17, 72], ["+", 51, 16, 12, 16, 12, 16, 12, 69, 28, 22], ["+", 12, 16, 12, 16, 12, 69, 341, 342, 0, 70], ["+", 0, 16, 31, 2, 63, 118, 28, 69, 28, 22], ["+", 31, 2, 63, 118, 28, 69, 341, 342, 0, 70], ["+", 31, 2, 63, 118, 28, 69, 341, 342, 0, 22], ["+", 31, 2, 63, 118, 28, 69, 341,... | 1 | 1,011 |
#include <bits/stdc++.h>
#define REP(i, m) for (int i = 0; i < (m); ++i)
#define REPN(i, m, in) for (int i = (in); i < (m); ++i)
#define ALL(t) (t).begin(), (t).end()
#define CLR(a) memset((a), 0, sizeof(a))
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
using namespace std;
#ifdef DEB
... | #include <bits/stdc++.h>
#define REP(i, m) for (int i = 0; i < (m); ++i)
#define REPN(i, m, in) for (int i = (in); i < (m); ++i)
#define ALL(t) (t).begin(), (t).end()
#define CLR(a) memset((a), 0, sizeof(a))
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
using namespace std;
#ifdef DEB
#... | [["-", 31, 16, 31, 16, 31, 16, 12, 16, 17, 19], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 18], ["+", 12, 69, 341, 342, 0, 69, 341, 342, 0, 73], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 31, 16, 12, 16, 31, 16, 31, 69, 28, 22], ["+", 12, 16, 31, 16, 31, 69, 341, 342, 0, 70], ["+", 12, 16, 31, 16, 31, 69, 341,... | 1 | 2,721 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
const int MAX = 510000;
const int MOD = 1000000007;
typedef long long ll;
long long fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
const int MAX = 510000;
const int MOD = 1000000007;
typedef long long ll;
ll fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {... | [["-", 36, 36, 0, 30, 0, 43, 39, 86, 0, 96], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 36, 36, 0, 30, 0, 14, 39, 86, 0, 96], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 78], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 12, 22], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 17, 33], ["+", 3, 4,... | 1 | 311 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define inf 0x7f7f7f7f
#define maxn 100006
#define mod 1000000007
#define N 1
#define P 2
typedef long... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define inf 0x7f7f7f7f
#define maxn 100006
#define mod 1000000007
#define N 1
#define P 2
typedef long... | [["-", 0, 7, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 7, 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, 1, 0, 11, 12, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0... | 1 | 668 |
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
#define LL long long
#define G 1100000
#define mod 1000000007
LL pri[G];
LL ni[G], ans;
LL pow(LL a, int b) {
LL ans = 1, base = a;
while (b > 0) {
if (b % 2 == 1)
ans = (base * ans) % mod;
base = (base * base) % mod;
b... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <cstring>
using namespace std;
#define LL long long
#define G 1100000
#define mod 1000000007
LL pri[G];
LL ni[G], ans;
LL pow(LL a, int b) {
LL ans = 1, base = a;
while (b > 0) {
if (b % 2 == 1)
ans = (base * ans) % mod;
base = (... | [["+", 36, 36, 36, 36, 0, 30, 0, 135, 136, 137], ["+", 36, 36, 36, 36, 0, 30, 0, 135, 0, 138], ["+", 0, 11, 12, 16, 31, 2, 63, 23, 0, 22], ["+", 0, 11, 12, 16, 31, 2, 63, 23, 0, 25], ["+", 0, 11, 12, 16, 31, 2, 3, 4, 0, 24], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 1... | 1 | 323 |
#include <bits/stdc++.h>
#define ll long long
#define inf 0x3f3f3f3f
#define rep(i, a, b) for (register int i = (a); i <= (b); i++)
#define dep(i, a, b) for (register int i = (a); i >= (b); i--)
using namespace std;
#define maxn 100005
#define mod 1000000007
///(a/b)%mod=(a*pow(b,(mod-2)))%mod;
ll inv[maxn], fac[maxn];... | #include <bits/stdc++.h>
#define ll long long
#define inf 0x3f3f3f3f
#define rep(i, a, b) for (register int i = (a); i <= (b); i++)
#define dep(i, a, b) for (register int i = (a); i >= (b); i--)
using namespace std;
#define maxn 200005
#define mod 1000000007
///(a/b)%mod=(a*pow(b,(mod-2)))%mod;
ll fac[maxn];
ll pow_mod... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 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], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["-", 0... | 1 | 354 |
#include <bits/stdc++.h>
using namespace std;
using lint = long long;
#define int long long
vector<int> inv, fact, ifact;
const int vmax = 2e5 + 5;
const int mod = 1e9 + 7;
int nCm(int n, int m) { return fact[n] * ifact[m] % mod * ifact[n - m] % mod; }
signed main() {
int h, w, a, b;
cin >> h >> w >> a >> b;
i... | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
#define int long long
vector<int> inv, fact, ifact;
const int vmax = 2e5 + 5;
const int mod = 1e9 + 7;
int nCm(int n, int m) { return fact[n] * ifact[m] % mod * ifact[n - m] % mod; }
signed main() {
int h, w, a, b;
cin >> h >> w >> a >> b;
i... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 31, 2, 3, 4, 0, 16, 31, 16, 31, 22], ["-", 31, 2, 3, 4,... | 1 | 277 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define FOR(i, a, b) for (int(i) = (a); (i) < (b); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define ... | [["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 17, 33], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["-", 3, 4, 0, 16, 31, 16, 31, 16, 17, 33], ["-", 0, 16, 31, 16, 31... | 1 | 792 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fw(p) for (int w = 0; w < (p); w++)
#define fx(p) for (int x = 0; x < (p); x++)
#define fy(p) for (int y = 0; y < (p); y++)
#define fz(p) for (int z = 0; z < (p); z++)
#define fyg(p, g) for (int y = (g); y < (p); y++)
#define fzg(p, g) for (int ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fw(p) for (int w = 0; w < (p); w++)
#define fx(p) for (int x = 0; x < (p); x++)
#define fy(p) for (int y = 0; y < (p); y++)
#define fz(p) for (int z = 0; z < (p); z++)
#define fyg(p, g) for (int y = (g); y < (p); y++)
#define fzg(p, g) for (int ... | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 0, 2, 3, 4, 0, 16, 31, 2, 63, 22], ["-", 3, 4, 0, 16, 31, 2, 3, 4, 0, 21], ["+", 0, 2, 3, 4, 0, 16, 31, 16, 17, 72], ["-", 3, 4, 0, 16, 31, 2, 3, 4, 0, 25], ["-", 31, 69, 341, 342, 0, 16, 3... | 1 | 565 |
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int MOD = 1e9 + 7;
const int MAX = 510000;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] ... | #include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int MOD = 1e9 + 7;
const int MAX = 510000;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] ... | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 0, 11, 12, 16, 31, 16, 31, 16, 17, 109], ["+", 0, 11, 12, 16, 31, 16, 31, 16, 12, 22], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 17, 33], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 12, 13], ["-", 3, 4, 0, 16, 31, 16, 31, 16, 12, 22], ... | 1 | 310 |
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const int MAX = 510000;
const int MOD = (int)1e9 + 7;
ll fac[MAX], finv[MAX],
inv[MAX]; // a!(fac[a]), (a!)^{-1}(finv[a]), a^{-1}(inv[a])
// テーブルを作る前処理
void comb_init() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int ... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
const ll MAX = 510000;
const ll MOD = (ll)1e9 + 7;
ll fac[MAX], finv[MAX],
inv[MAX]; // a!(fac[a]), (a!)^{-1}(finv[a]), a^{-1}(inv[a])
// テーブルを作る前処理
void comb_init() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (ll i = ... | [["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 49, 50, 51, 16, 31, 74, 39, 77, 39, 40], ["+", 49, 50, 51, 16, 31, 74, 39, 77, 39, 78], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["+", ... | 1 | 320 |
#include <bits/stdc++.h>
#define int long long
#define moder 1000000007
#define inf 1000000000000000000
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
#define all(v) v.begin(), v.end()
#define prique(T) priority_queue<T, vector<T>, greater<T>>
#define vecunique(vec) ... | #include <bits/stdc++.h>
#define int long long
#define moder 1000000007
#define inf 1000000000000000000
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
#define all(v) v.begin(), v.end()
#define prique(T) priority_queue<T, vector<T>, greater<T>>
#define vecunique(vec) ... | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 85], ["+", 0, 11, 12, 16, 31, 16, 31, 16, 17, 109], ["+", 0, 11, 12, 16, 31, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 48], ["+", 0, 11, 12, 16, 31, 16, 12, 2, 63, 22], ["+", 12, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["+", 31, 16, 12, 2, 3, 4, 0, 23, 0, 25], ["+", 12... | 1 | 473 |
ai = lambda: list(map(int,input().split()))
mod = 10**9+7
def nCb(n, b):
if b > n - b:
b = n - b
r = 1
for k in range(n, n-b, -1):
r = r * k % mod
d = 1
for k in range(1, b+1):
d = d * k % mod
return r * inv(d) % mod
def inv(x):
return pow(x, mod - 2, mod)
h,w,... | ai = lambda: list(map(int,input().split()))
mod = 10**9+7
def nCb(n, b):
if b > n - b:
b = n - b
r = 1
for k in range(n, n-b, -1):
r = r * k % mod
d = 1
for k in range(1, b+1):
d = d * k % mod
return r * inv(d) % mod
def inv(x):
return pow(x, mod - 2, mod)
h,w,... | [["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 48], ["+", 0, 662, 12, 657, 31, 657, 12, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 17, 109], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22]] | 5 | 234 |
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int H, W, A, B;
cin >> H >> W >> A >> B;
const int INF = 1e9 + 7;
int N = max(B + 1 + H - A, A + 1 + W - B);
std::vector<int> v(N);
v[0] = 1;
for (int i = 1; i < N; i++) {
v[i] = v[i - 1] * (i + 1);
v[i] %= INF;
... | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int H, W, A, B;
cin >> H >> W >> A >> B;
const int INF = 1e9 + 7;
int N = 1e7;
std::vector<int> v(N);
v[0] = 1;
for (int i = 1; i < N + 1; i++) {
v[i] = v[i - 1] * (i);
v[i] %= INF;
}
int ans = 0;
int a, b, ... | [["-", 8, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["-", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 3, 4, 0, 16, 31, 16, 31, 16, 31, 22], ["-", 3, 4, 0, 16, 31, 16, 31, 16, 17, 72], ["-", 3, 4, 0, 16, 31, 16, 31, 16, 12, 13], ["-", 51, 2, 3, 4, 0, 16, 31, 16, 17, 72], ["-", 51, 2, 3, 4, 0, 16, 31, 16, 12, 22], ["-", 49, 50, 51... | 1 | 513 |
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i, s, e) for (int(i) = (s); (i) <= (e); (i)++)
#define all(x) x.begin(), x.end()
typedef long long i64;
i64 MOD = 1e9 + 7;
// Eucli
i64 inv_mod(i64 a, i64 m = MOD) {
i64 b, x, u, q, abs_m, tmp;
abs_m = (m < 0) ? -m : m;
b = m;
... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
#define rep(i, s, e) for (int(i) = (s); (i) <= (e); (i)++)
#define all(x) x.begin(), x.end()
typedef long long i64;
i64 MOD = 1e9 + 7;
// Eucli
i64 inv_mod(i64 a, i64 m = MOD) {
i64 b, x, u, q, abs_m, tmp;
abs_m = (m < 0) ? -m : m;
b = m;
... | [["-", 12, 16, 31, 16, 31, 2, 3, 4, 0, 21], ["-", 31, 2, 3, 4, 0, 16, 31, 16, 31, 22], ["+", 12, 16, 31, 16, 31, 2, 3, 4, 0, 21], ["+", 12, 16, 31, 16, 31, 2, 3, 4, 0, 22], ["-", 12, 16, 31, 16, 12, 2, 3, 4, 0, 21], ["-", 0, 16, 31, 16, 31, 16, 31, 16, 31, 22], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 17, 72], ["+", 3, 4, 0,... | 1 | 359 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
cin.sync_with_stdio(0);
int n, m, a, b;
cin >> n >> m >> a >> b;
int const M = 1000'000'007;
vector<int> f((n + m) + 1, 1);
for (int i = 2; i < f.size(); ++i)
f[i] = 1ll * i * f[i - 1] % M;
auto bp = [M](... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
cin.tie(0);
cin.sync_with_stdio(0);
int n, m, a, b;
cin >> n >> m >> a >> b;
int const M = 1000'000'007;
vector<int> f((n + m) + 1, 1);
for (int i = 2; i < f.size(); ++i)
f[i] = 1ll * i * f[i - 1] % M;
auto bp = [M](... | [["+", 0, 37, 0, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 37, 0, 16, 31, 16, 31, 16, 17, 48], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 31, 13], ["+", 3, 4, 0, 16, 31, 16, 31, 16, 17, 48], ["-", 3, 4, 0, 23, 0, 16, 31, 16, 31, 22], ["-", 3, 4, 0, 23, 0, 16, 31, 16, 17, 33], ["-", 3, 4, 0, 23, 0, 16, 31, 16, 12, 22], ["+", 12, 2,... | 1 | 302 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define PPF pop_front
#define PPB pop_back
#define MA make_pair
#define ll long long
#define PA pair<int, int>
#defi... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define FI first
#define SE second
#define PF push_front
#define PB push_back
#define PPF pop_front
#define PPB pop_back
#define MA make_pair
#define ll long long
#define PA pair<int, int>
#defi... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 11, 31, 23, 0, 2, 3, 4, 0, 24], ["+", 31, 23, 0, 2, 3, 4, 0, 16, 17, 109], ["+", 31, 23, 0, 2, 3, 4, 0, 16, 12, 22], ["+", 0, 11, 31, 23... | 1 | 602 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
long long fact[1000000];
long long fact_in[1000000];
//出力
void Yes() { cout << "Yes" << endl; }
void yes() { cout << "yes" << endl; }
void No() { cout << "No" << endl; }
void no() { cout << "no" << endl; }
void Possible() { cout << "Possible" << endl... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
long long fact[1000000];
long long fact_in[1000000];
//出力
void Yes() { cout << "Yes" << endl; }
void yes() { cout << "yes" << endl; }
void No() { cout << "No" << endl; }
void no() { cout << "no" << endl; }
void Possible() { cout << "Possible" << endl... | [["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 23, 0, 25], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 17, 109], ["+", 31, 23, 0, 16, 31, 23, 0, 16, 12, 22], ["+", 51, ... | 1 | 557 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MAX 100002
ll MOD = 1000000007;
ll Inv[MAX], fact[MAX], factInv[MAX];
void calc_modinv() {
Inv[1] = 1;
for (int i = 2; i <= MAX; i++) {
Inv[i] = MOD - (MOD / i) * Inv[MOD % i] % MOD;
}
}
void calc_factinv() {
fact[0] = factInv[0... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MAX 1000002
ll MOD = 1e9 + 7;
ll Inv[MAX], fact[MAX], factInv[MAX];
void calc_modinv() {
Inv[1] = 1;
for (int i = 2; i <= MAX; i++) {
Inv[i] = (MOD - MOD / i) * Inv[MOD % i] % MOD;
}
}
void calc_factinv() {
fact[0] = factInv[0] ... | [["-", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 58, 51, 59], ["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 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], ["+", 0, 11, 12, 16, 31, 16, 31, 23, 0, 24], ["-"... | 1 | 318 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, n) for (int i = a; i < n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define whole(f, x, ...) \
([&](decltype((x)) whole) { \
return (f)(begin(whole), en... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, n) for (int i = a; i < n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define whole(f, x, ...) \
([&](decltype((x)) whole) { \
return (f)(begin(whole), en... | [["-", 36, 36, 0, 30, 0, 43, 0, 153, 0, 154], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 39, 40], ["+", 36, 36, 0, 30, 0, 43, 0, 153, 0, 379], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 39, 78], ["-", 0, 43, 49, 50, 51, 74, 39, 77, 39, 40], ["-", 0, 30, 0, 43, 49, 50, 51, 74, 0, 25], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 35], ["-",... | 1 | 396 |
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef pair<ll, ll> pll;
typedef pair<double, int> pdi;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
#ifdef VC
#define scanf scanf_s
#endif
#define iINF (1 << 30)
#define INF (1LL << 59)
... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef pair<ll, ll> pll;
typedef pair<double, int> pdi;
typedef pair<ll, int> pli;
typedef pair<int, ll> pil;
#ifdef VC
#define scanf scanf_s
#endif
#define iINF (1 << 30)
#define INF (1LL << 59)
... | [["-", 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], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 13], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 13], ["-", 12, 2, 3, 4, 0, 69, 341, 342, 0, 13], ["+", 12, 2... | 1 | 413 |
#include <bits/stdc++.h>
using namespace std;
struct P {
// string r;
int x, y, z;
bool operator<(const P &a) const {
// if(y!=a.y)
// return y>a.y;
return x < a.x;
// return z>a.z;
}
};
vector<int> v[100055];
// bitset<4001000> b;
int a, c, i, b, k, d, n, m,
e; // dy[15]={0,1,0,-1,... | #include <bits/stdc++.h>
using namespace std;
struct P {
// string r;
int x, y, z;
bool operator<(const P &a) const {
// if(y!=a.y)
// return y>a.y;
return x < a.x;
// return z>a.z;
}
};
vector<int> v[100055];
// bitset<4001000> b;
int a, c, i, b, k, d, n, m,
e; // dy[15]={0,1,0,-1,... | [["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 37, 0, 38], ["-", 0, 14, 8, 9, 0, 37, 0, 23, 0, 24], ["-", 8, 9, 0, 37, 0, 23, 0, 16, 17, 109], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 132], ["-", 0, 14, 8, 9, 0, 37, 0, 23, 0, 25], ["+", 0, 30, 0, 14, 8... | 1 | 494 |
#include <bits/stdc++.h>
//#include <math.h>
using namespace std;
#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) (v).begin(), (v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x, ... | #include <bits/stdc++.h>
//#include <math.h>
using namespace std;
#define INF 1.1e9
#define LINF 1.1e18
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) (v).begin(), (v).end()
#define pb push_back
#define pf push_front
#define fi first
#define se second
#define BIT(x, ... | [["+", 31, 11, 12, 16, 31, 16, 12, 74, 0, 24], ["+", 12, 16, 31, 16, 12, 74, 39, 77, 39, 78], ["+", 31, 11, 12, 16, 31, 16, 12, 74, 0, 25], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 8, 9, 0, 9, 0, 1, 0, 11, 17, 132]] | 1 | 387 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define DBG cerr << '!' << ... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define DBG cerr << '!' << ... | [["-", 0, 43, 49, 50, 51, 4, 0, 16, 17, 48], ["+", 8, 9, 0, 43, 49, 53, 54, 55, 0, 25], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 14, 8, 9, 0, 43, 49, 53, 49, 22], ["+", 8, 9, 0, 43, 49, 53, 54, 55, 0, 24], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, ... | 1 | 572 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define inf (long long int)(1e19)
#define pb push_back
#define mod 1000000007
#define all(x) x.begin(), x.end()
using namespace std;
typedef pair<int, int> pii;
typedef long ... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define inf (long long int)(1e19)
#define pb push_back
#define mod 1000000007
#define all(x) x.begin(), x.end()
using namespace std;
typedef pair<int, int> pii;
typedef long ... | [["-", 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], ["-", 15, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["-", 15, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["-", 15, 16, 12, 2, 3, 4, 0, 16, 12, 22], ["-", 0, 7, 15, 16, 12, 2, 3, 4, 0, 25]] | 1 | 392 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
ll fact[maxn], inv[maxn];
ll ksm(ll a, ll b) {
ll ans = 1, base = a;
while (b) {
if (b & 1)
ans = ans * base % mod;
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mp make_pair
#define pb push_back
#define pii pair<int, int>
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
ll fact[maxn], inv[maxn];
ll ksm(ll a, ll b) {
ll ans = 1, base = a;
while (b) {
if (b & 1)
ans = ans * base % mod;
... | [["+", 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], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 31, 22], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 17, 33], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 22], ["+", 15, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 15, 16, 12, 2, 3,... | 1 | 315 |
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define REP(i, e, s) for (register int i = e; i <= s; i++)
#define DREP(i, e, s) for (register int i = e; i >= s; i--)
#define ll long long
#define DE(...) fprintf(stderr, __VA_ARGS__)
#define DEBUG(a) DE("DEBUG: %d\n", a)
... | #include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
#define REP(i, e, s) for (register int i = e; i <= s; i++)
#define DREP(i, e, s) for (register int i = e; i >= s; i--)
#define ll long long
#define DE(...) fprintf(stderr, __VA_ARGS__)
#define DEBUG(a) DE("DEBUG: %d\n", a)
... | [["-", 8, 9, 0, 9, 0, 1, 0, 11, 17, 107], ["+", 8, 9, 0, 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], ["-", 12, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["-", 12, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["+", 12, 16, 12, 2... | 1 | 472 |
#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
int h, w, a, b, ret;
int fac[maxn];
void exgcd(int a, int b, int &g, int &x, int &y) {
if (b == 0)
g = a, x = 1, y = 0;
else
exgcd(b, a % b, g, y, x), y -= a / b * x;
}
int inv(int a) {
int g, x, y;
exgcd... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 200000 + 5;
const int mod = 1000000007;
int h, w, a, b;
int fac[maxn];
void exgcd(int a, int b, int &g, int &x, int &y) {
if (b == 0)
g = a, x = 1, y = 0;
else
exgcd(b, a % b, g, y, x), y -= a / b * x;
}
int inv(int a) {
int g, x, y;
ex... | [["-", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["-", 0, 30, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 0, 30, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["-", 36, 36, 36, 36, 0, 30, 0, 43, 49, 22], ["-",... | 1 | 338 |
class Factorial:
def __init__(self, max_fact, mod):
#mod should be prime number
#using homogeneous_product(n,r), max_fact ≧ max(n+r-1)
f = [1] * (max_fact + 1)
for idx in range(2, max_fact + 1):
f[idx] = f[idx - 1] * idx
f[idx] %= mod
if mod > max_fact... | class Factorial:
def __init__(self, max_fact, mod):
#mod should be prime number
#using homogeneous_product(n,r), max_fact ≧ max(n+r-1)
f = [1] * (max_fact + 1)
for idx in range(2, max_fact + 1):
f[idx] = f[idx - 1] * idx
f[idx] %= mod
if mod > max_fact... | [["+", 0, 1, 0, 677, 12, 657, 12, 652, 63, 22], ["-", 0, 657, 31, 657, 31, 657, 31, 657, 12, 612], ["+", 0, 657, 31, 657, 31, 657, 31, 657, 12, 612], ["+", 12, 657, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 12, 657, 12, 652, 3, 4, 0, 657, 12, 612], ["+", 0, 7, 8, 196, 0, 1, 0, 677, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 677... | 5 | 417 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mod 1000000007
ll h, w, a, b, fakt[100005], rez;
ll step(ll a, ll b) {
if (b == 0)
return 1;
else {
ll p = step(a, b / 2) % mod;
if (b % 2 == 0)
return (p * p) % mod;
else
return (((p * p) % mod) * a) % mod;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll h, w, a, b, fakt[1000000], rez, mod = 1000000007;
ll step(ll a, ll b) {
if (b == 0)
return 1;
else {
ll p = step(a, b / 2) % mod;
if (b % 2 == 0)
return (p * p) % mod;
else
return (((p * p) % mod) * a) % mod;
}
}
... | [["-", 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], ["-", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 80, 81, 13], ["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 49, 22], ["+"... | 1 | 313 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define mod 1000000007
#define maxn 200005
int m, n, x, y, ans, f[maxn], ni[maxn];
int f1(int a, int b) { return (a += b) >= mod ? a - mod : a; }
int f2(int a, int b) { return (a -= b) < 0 ? a + mod : a; }
int f3(int a, int b) { return a * b % mod; }
i... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define mod 1000000007
#define maxn 200005
int m, n, x, y, ans, f[maxn], ni[maxn];
int f1(int a, int b) { return (a += b) >= mod ? a - mod : a; }
int f2(int a, int b) { return (a -= b) < 0 ? a + mod : a; }
int f3(int a, int b) { return a * b % mod; }
i... | [["+", 0, 37, 0, 2, 3, 4, 0, 2, 63, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 24], ["-", 0, 37, 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, 25], ["-", 8, 9, 0, 37, 0, 2, 3, 4, 0, 25], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]... | 1 | 432 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define fastInp \
cin.tie(0); \
cout.tie(0); ... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define fastInp \
cin.tie(0); \
cout.tie(0); ... | [["+", 36, 36, 36, 36, 0, 30, 0, 43, 0, 21], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 49, 22], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 0, 32], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 31, 22], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13], ["+", 0, 14,... | 1 | 336 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 7;
const int mod = 1e9 + 7;
void add(int &a, int b) {
a += b;
if (a >= mod)
a -= mod;
if (a < 0)
a += mod;
}
int mul(int a, int b) { return (a * (ll)b) % mod; }
int pw(int x, int n) {
int res = 1;
while (n > ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define int long long
const int N = 3e5 + 7;
const int mod = 1e9 + 7;
void add(int &a, int b) {
a += b;
if (a >= mod)
a -= mod;
if (a < 0)
a += mod;
}
int mul(int a, int b) { return (a * (ll)b) % mod; }
int pw(int x, int n) {
int... | [["+", 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], ["-", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["+", 0, 30, 0, 43, 49, 50, 51, 16, 31, 13], ["-", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+", 36, 36, 36, 36, 0, 30, 0, 14, 39, 40], ["+... | 1 | 422 |
/*input
100000 100000 44444 55555
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pa... | /*input
100000 100000 44444 55555
*/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
typedef long long ll;
typedef long double ld;
typedef complex<ld> cd;
typedef pa... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 558 |
#include <bits/stdc++.h>
using namespace std;
#define LL long long
const int mod = 1e9 + 7;
const int N = 2e5 + 11;
int n, m, nn, mm;
LL fac[N], inv[N], a[N];
inline LL A(LL x, LL y) { return x + y - (x + y >= mod ? mod : 0); }
LL C(int n, int m) {
if (n < m)
return 0;
return fac[n] * inv[m] % mod * inv[n - m] ... | #include <bits/stdc++.h>
using namespace std;
#define LL long long
const int mod = 1e9 + 7;
const int N = 2e5 + 11;
int n, m, nn, mm;
LL fac[N], inv[N], a[N];
inline LL A(LL x, LL y) { return x + y - (x + y >= mod ? mod : 0); }
LL C(int n, int m) {
if (n < m)
return 0;
return fac[n] * inv[m] % mod * inv[n - m] ... | [["-", 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], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["-... | 1 | 446 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string j, t, g;
cin >> j >> t >> g;
int f = 0, s = 0;
if (j.size() == 5) {
f++;
} else if (j.size() == 7) {
s++;
}
if (t.size() == 5) {
f++;
} else if (t.size() == 7) {
s++;
}
if (g.size() == 5) {
f++;
} else if (g.size... | #include <bits/stdc++.h>
using namespace std;
int main() {
int j, t, g;
cin >> j >> t >> g;
int f = 0, s = 0;
if (j == 5) {
f++;
} else if (j == 7) {
s++;
}
if (t == 5) {
f++;
} else if (t == 7) {
s++;
}
if (g == 5) {
f++;
} else if (g == 7) {
s++;
}
if (s == 1 && f == ... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 15, 339, 51, 16, 31, 2, 63, 118, 17, 131], ["-", 15, 339, 51, 16, 31, 2, 63, 118, 119, 120], ["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 24], ["-", 15, 339, 51, 16, 31, 2, 3, 4, 0, 25]] | 1 | 160 |
#include <stdio.h>
int main(void) {
int x, y, z;
scanf("%d %d %d", &x, &y, &z);
if ((x + y + z) == 17) {
if (x == 7 || y == 7 || z == 7) {
if (x == y || y == z || z == x) {
printf("Yes\n");
} else {
printf("No\n");
}
} else {
printf("No\n");
}
} else {
... | #include <stdio.h>
int main(void) {
int x, y, z;
scanf("%d %d %d", &x, &y, &z);
if ((x + y + z) == 17) {
if (x == 7 || y == 7 || z == 7) {
if (x == y || y == z || z == x) {
printf("YES\n");
} else {
printf("NO\n");
}
} else {
printf("NO\n");
}
} else {
... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 122 |
/*
* Created By: 'Present_Sir'
* Created On: Wednesday 05 August 2020 11:17:55 AM IST
*/
#include <bits/stdc++.h>
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define int long long
u... |
/*
* Created By: 'Present_Sir'
* Created On: Wednesday 05 August 2020 11:17:55 AM IST
*/
#include <bits/stdc++.h>
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define int long long
u... | [["+", 8, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 106 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, j, n) for (int i = (int)(j); i < (int)(n); i++)
#define REP(i, j, n) for (int i = (int)(j); i <= (int)(n); i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(), (a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<i... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, j, n) for (int i = (int)(j); i < (int)(n); i++)
#define REP(i, j, n) for (int i = (int)(j); i <= (int)(n); i++)
#define MOD 1000000007
#define int long long
#define ALL(a) (a).begin(), (a).end()
#define vi vector<int>
#define vii vector<vi>
#define pii pair<i... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 49, 50, 51, 83, 0, 2, 63, 118, 17, 131], ["-", 49, 50, 51, 83, 0, 2, 63, 118, 119, 120], ["-", 49, 50, 51, 83, 0, 2, 3, 4, 0, 24], ["-", 49, 50, 51, 83, 0, 2, 3, 4, 0, 25]] | 1 | 165 |
a = input().split()
countF = 0
countS = 0
for i in range(3):
countF += a[i] == 5
countS += a[i] == 7
if countF == 2 and countS == 1:
print('YES')
else:
print('NO') | a = [int(x) for x in input().split()]
countF = 0
countS = 0
for i in range(3):
countF += a[i] == 5
countS += a[i] == 7
if countF == 2 and countS == 1:
print('YES')
else:
print('NO') | [["+", 0, 656, 0, 1, 0, 662, 12, 658, 0, 70], ["+", 0, 1, 0, 662, 12, 658, 8, 652, 63, 22], ["+", 0, 662, 12, 658, 8, 652, 3, 4, 0, 24], ["+", 0, 662, 12, 658, 8, 652, 3, 4, 0, 22], ["+", 0, 662, 12, 658, 8, 652, 3, 4, 0, 25], ["+", 0, 1, 0, 662, 12, 658, 0, 659, 0, 88], ["+", 0, 1, 0, 662, 12, 658, 0, 659, 31, 22], ["... | 5 | 62 |
A,B,C = int(input())
res = "NO"
if A == 5 or A == 7:
if B == 5 or B == 7:
if C == 5 or C == 7:
if A+B+C == 17:
res = "YES"
print(res) | A,B,C = map(int,input().split())
res = "NO"
if A == 5 or A == 7:
if B == 5 or B == 7:
if C == 5 or C == 7:
if A+B+C == 17:
res = "YES"
print(res) | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131], ... | 5 | 62 |
clause_list = list(map(int, input()))
for index, clause in enumerate(clause_list):
if clause = 5:
clause_list.pop(index)
break
for index, clause in enumerate(clause_list):
if clause = 7:
clause_list.pop(index)
break
for index, clause in enumerate(clause_list):
if clause = 5:
clause_... | clause_list = list(map(int, input().split()))
for index, clause in enumerate(clause_list):
if clause == 5:
clause_list.pop(index)
break
for index, clause in enumerate(clause_list):
if clause == 7:
clause_list.pop(index)
break
for index, clause in enumerate(clause_list):
if clause == 5:
clau... | [["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 0, 7, 8, 196, 0, 57, 0, 42, 0, 32], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 60]] | 5 | 96 |
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int n, a, b;
for (int i = 0; i < 3; i++) {
cin >> n;
if (n == 7) {
a += 1;
} else if (n == 5) {
b += 1;
}
if (a == 1 && b == 2) {
cout << "YES";
} else {
cout << "NO";
}
}
}
| #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int n, a(0), b(0);
for (int i = 0; i < 3; i++) {
cin >> n;
if (n == 7) {
a++;
} else if (n == 5) {
b++;
}
}
if (a == 1 && b == 2) {
cout << "YES";
} else {
cout << "NO";
}
}
| [["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 24], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 25], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107], ["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 17, 29], ["+", 0, 57, 75, 76, 0, 57, 64, 9, 0, 46], ["-", 8, 9, 0, 57, 75, ... | 1 | 93 |
A = input()
B = input()
B = input()
b_5 =0
b_7=0
if A == 5:
b_5 += 1
elif A == 7:
b_7 += 1
if B == 5:
b_5 +=1
elif B==7:
b_7 += 1
if C==5:
b_5 +=1
elif C==7:
b_7 += 1
if b_5 == 2 and b_7 == 1:
print("YES")
else:
print("NO")
| A,B,C = map(int,input().split())
b_5 = 0
b_7 = 0
if A == 5:
b_5 += 1
elif A == 7:
b_7 += 1
if B == 5:
b_5 +=1
elif B==7:
b_7 += 1
if C==5:
b_5 +=1
elif C==7:
b_7 += 1
if b_5 == 2 and b_7 == 1:
print("YES")
else:
print("NO") | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0... | 5 | 92 |
class A042
def call(a, b, c)
(a == 5 || a== 7) &&
(b == 5 || b== 7) &&
(c == 5 || c== 7) &&
a + b + c == 17
end
def main
inputs = gets.split(' ')
puts call(inputs[0].to_i, inputs[1].to_i, inputs[2].to_i)
end
end
A042.new.main | class A042
def call(a, b, c)
(a == 5 || a== 7) &&
(b == 5 || b== 7) &&
(c == 5 || c== 7) &&
a + b + c == 17
end
def main
inputs = gets.split(' ')
if call(inputs[0].to_i, inputs[1].to_i, inputs[2].to_i)
puts 'YES'
else
puts 'NO'
end
end
end
A042.new.main | [["-", 8, 736, 0, 735, 8, 736, 0, 652, 735, 22], ["+", 8, 736, 0, 735, 8, 736, 0, 121, 0, 121], ["+", 8, 736, 0, 121, 64, 749, 0, 652, 735, 22], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 62], ["+", 64, 749, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 735, 8, 736, 0, 121, 75, 95, 0, 95], ["+", 8, 736, 0, 121, 75, 95, 0, 652, 73... | 4 | 92 |
#include <bits/stdc++.h>
using namespace std;
#define vll vector<long long>
#define ll long long
#define ld long double
#define pb push_back
#define vi vector<int>
#define vb vector<bool>
#define vd vector<double>
#define vld vector<long double>
#define vs vector<string>
#define MOD 1000000007
#define endl "\n"
#defi... | #include <bits/stdc++.h>
using namespace std;
#define vll vector<long long>
#define ll long long
#define ld long double
#define pb push_back
#define vi vector<int>
#define vb vector<bool>
#define vd vector<double>
#define vld vector<long double>
#define vs vector<string>
#define MOD 1000000007
#define endl "\n"
#defi... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 223 |
input1 = list(map(int,input().split()))
A = input1[0]
B = input1[1]
C = input1[2]
if A == 5:
if B == 5 and C == 7:
print("Yes")
elif B == 7 and C == 5:
print("Yes")
else:
print("No")
elif A == 7:
if B == 5 and C == 5:
print("Yes")
else:
print("No")
else:
print("No") | input1 = list(map(int,input().split()))
A = input1[0]
B = input1[1]
C = input1[2]
if A == 5:
if B == 5 and C == 7:
print("YES")
elif B == 7 and C == 5:
print("YES")
else:
print("NO")
elif A == 7:
if B == 5 and C == 5:
print("YES")
else:
print("NO")
else:
print("NO") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 114 |
#include <iostream>
#include <map>
using namespace std;
int main() {
int a;
map<int, int> freq;
for (int i = 0; i < 3; i++) {
cin >> a;
freq[a]++;
}
if ((freq[5] != 2 && freq[7] != 2)) {
cout << "NO" << endl;
} else {
cout << "YES" << endl;
}
return 0;
} | #include <iostream>
#include <map>
using namespace std;
int main() {
int a;
map<int, int> freq;
for (int i = 0; i < 3; i++) {
cin >> a;
freq[a]++;
}
if (freq[5] != 2 || freq[7] != 1)
cout << "NO" << endl;
else
cout << "YES" << endl;
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 23, 0, 24], ["-", 0, 57, 15, 339, 51, 23, 0, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["-", 15, 339, 51, 23, 0, 16, 12, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 23, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["-", 0, 14, 8, 9, 0, 57, 64, 9, 0, 45], ["-"... | 1 | 93 |
a,b,c =input().split()
a = int(a)
b = int(b)
c = int(c)
if a == 5:
if (b== 7 and c==5) or (b== 5 and c==7):
print("YES")
elif a == 7:
if b==5 and c == 5:
print("YES")
else:
print("NO") | a,b,c =input().split()
a = int(a)
b = int(b)
c = int(c)
if a == 5:
if (b== 7 and c==5) or (b== 5 and c==7):
print("YES")
else:
print("NO")
elif a == 7:
if b==5 and c == 5:
print("YES")
else:
print("NO")
else:
print("NO") | [["+", 0, 57, 64, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 64, 196, 0, 57, 75, 76, 0, 102], ["+", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["+", 8, 196, ... | 5 | 91 |
package main
import (
"fmt"
)
func main() {
var a, b, c string
fmt.Scanf("%s %s %s", &a, &b, &c)
if len(a)+len(b)+len(c) != 17 {
fmt.Println("NO")
return
}
var f, s int
for _, t := range []string{a, b, c} {
if len(t) == 5 {
f++
}
if len(t) == 7 {
s++
}
}
if f == 2 && s == 1 {
fmt.Print... | package main
import (
"fmt"
)
func main() {
var a, b, c int
fmt.Scanf("%d %d %d", &a, &b, &c)
if a+b+c != 17 {
fmt.Println("NO")
return
}
var f, s int
for _, t := range []int{a, b, c} {
if t == 5 {
f++
}
if t == 7 {
s++
}
}
if f == 2 && s == 1 {
fmt.Println("YES")
} else {
fmt.Print... | [["-", 0, 435, 8, 196, 0, 440, 0, 441, 39, 78], ["+", 0, 435, 8, 196, 0, 440, 0, 441, 39, 78], ["-", 15, 16, 31, 16, 31, 16, 31, 2, 63, 22], ["-", 31, 16, 31, 16, 31, 2, 3, 4, 0, 24], ["-", 31, 16, 31, 16, 31, 2, 3, 4, 0, 25], ["-", 15, 16, 31, 16, 31, 16, 12, 2, 63, 22], ["-", 31, 16, 31, 16, 12, 2, 3, 4, 0, 24], ["-"... | 7 | 157 |
a,b,c=map(int,input().split())
if a==5 or 7 and b==5 or 7 and c==5 or 7:
if a+b+c==17:
print('YES')
else:
print('NO') | a,b,c=map(int,input().split())
if a==5 or 7 and b==5 or 7 and c==5 or 7:
if a+b+c==17:
print('YES')
else:
print('NO')
else:
print('NO')
| [["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102], ["+", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["+", 8, 196, ... | 5 | 60 |
iroha = list(int(input()))
ans = [[5, 5, 7], [5, 7, 5], [7, 5, 5]]
if iroha in ans:
print("YES")
else:
print("NO") | iroha = list(map(int, input().split()))
ans = [[5, 5, 7], [5, 7, 5], [7, 5, 5]]
if iroha in ans:
print("YES")
else:
print("NO") | [["-", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25], ["+", 0, 652, 3, 4, 0, 652, 63, 319, 0, 131], [... | 5 | 57 |
a=list(map(int,input().split()))
if sum(a) == 17:
a.sort()
if a[0]==5 and a[1]==5:
print('Yes')
else:
print('No')
else:
print('No') | a=list(map(int,input().split()))
if sum(a) == 17:
a.sort()
if a[0]==5 and a[1]==5:
print('YES')
else:
print('NO')
else:
print('NO') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 67 |
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#in... | #include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <algorithm>
#include <bitset>
#in... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 146], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 147], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 24], ["+", 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, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["... | 1 | 240 |
words = list(input().split())
flag = False
if('5' in words):
words.remove('5')
if('7' in words):
words.remove('7')
if('5' in words):
words.remove('5')
flag =True
if(flag==True):
print("YES") | words = list(input().split())
flag = False
if('5' in words):
words.remove('5')
if('7' in words):
words.remove('7')
if('5' in words):
words.remove('5')
flag =True
if(flag==True):
print("YES")
else:
print("NO") | [["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102], ["+", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["+", 8, 196, ... | 5 | 82 |
/*
Just Another Source code by - shahincsejnu
*/
#include <bits/stdc++.h>
#define ulli unsigned long long int
#define lli long long int
#define MOD 1000000007
#define PI acos(-1.0)
#define UNIQUE(V) (V).erase(unique(ALL(V), (V).end()) //vector/string etc must need to be sorted
#define timesave ... | /*
Just Another Source code by - shahincsejnu
*/
#include <bits/stdc++.h>
#define ulli unsigned long long int
#define lli long long int
#define MOD 1000000007
#define PI acos(-1.0)
#define UNIQUE(V) (V).erase(unique(ALL(V), (V).end()) //vector/string etc must need to be sorted
#define timesave ... | [["-", 31, 16, 31, 16, 31, 69, 341, 342, 0, 13], ["+", 31, 16, 31, 16, 31, 69, 341, 342, 0, 13], ["-", 31, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 31, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["-", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13], ["+", 51, 16, 12, 16, 31, 69, 341, 342, 0, 13]] | 1 | 149 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (A == 5 && B == 5 && C == 7) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
if (A == 5 && B == 7 && C == 5) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
if (A == 7 &... | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, C;
cin >> A >> B >> C;
if (A == 5 && B == 5 && C == 7) {
cout << "YES" << endl;
} else if (A == 5 && B == 7 && C == 5) {
cout << "YES" << endl;
} else if (A == 7 && B == 5 && C == 5) {
cout << "YES" << endl;
} else {
cout... | [["-", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["-", 0, 9, 0, 1, 0, 16, 31, 16, 31, 22], ["-", 0, 9, 0, 1, 0, 16, 31, 16, 17, 151], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 62], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 9, 0, 1, 0, 16, 17, 151], ["-", 75, 76, 0, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 57, 75, 76, 0, 9... | 1 | 132 |
#include <iostream>
using namespace std;
int main() {
int a[3], s = 0, f = 0;
for (int i = 0; i < 3; i++) {
cin >> a[i];
if (a[i] == 7) {
s++;
} else if (a[i] == 5) {
f++;
}
}
if (s == 1 && f == 2) {
cout << "yes";
} else {
cout << "no";
}
}
| #include <iostream>
using namespace std;
int main() {
int a, s = 0, f = 0;
for (int i = 0; i < 3; i++) {
cin >> a;
if (a == 7) {
s++;
}
if (a == 5) {
f++;
}
}
if (s == 1 && f == 2) {
cout << "YES";
} else {
cout << "NO";
}
} | [["-", 0, 14, 8, 9, 0, 43, 49, 80, 0, 70], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 43, 49, 80, 0, 73], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 70], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 16, 12, 69, 341, 342, 0, 73], ["-", 15, 339, 51, 16, 31, 69, 341, 342, 0, 70], ["-", 15... | 1 | 105 |
#include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if (a == 7 && b == 5 && c == 5 || a == 5 && b == 7 && c == 5 ||
a == 5 && b == 5 && c == 7) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
if ((a == 7 && b == 5 && c == 5) || (a == 5 && b == 7 && c == 5) ||
(a == 5 && b == 5 && c == 7)) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
} | [["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25], ["+", 15, 339, 51, 16, 31, 16, 12, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 16, 12, 23, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 25], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]... | 1 | 89 |
user_input = int(input().split())
five = 0
seven = 0
for i in len(user_input):
if user_input[i] == 5:
five += 1
elif user_input[i] == 7:
seven += 1
if five == 2 and seven == 1:
print('YES')
else:
print('NO') | user_input = list(map(int, input().split()))
five = 0
seven = 0
for i in range(3):
if user_input[i] == 5:
five += 1
elif user_input[i] == 7:
seven += 1
if five == 2 and seven == 1:
print('YES')
else:
print('NO') | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 662, 12, 652, 3, 4, 0, 652, 63, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 22], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 21], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25], ["-", 36,... | 5 | 71 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.