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 | change_count int64 0 100 |
|---|---|---|---|---|---|
#include <iostream>
#include <queue>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define pb push_back
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
const int inf = 1e8;
struct edge {
int to, cap, cost, rev;
};
t... | #include <iostream>
#include <queue>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#define pb push_back
using namespace std;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<vi> vvi;
const int inf = 1e8;
struct edge {
int to, cap, cost, rev;
};
t... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 926 | 2 |
#include <bits/stdc++.h>
#define loop for (;;)
#define rep(i, n) for (long i = 0; i < (long)(n); ++i)
typedef std::vector<long> LI;
struct Solver {
void solve() {
long t, d, l;
std::cin >> t >> d >> l;
if (t == 0 or d == 0 or l == 0)
exit(0);
long rem = 0;
LI xs(t);
rep(i, t) std::cin >... | #include <bits/stdc++.h>
#define loop for (;;)
#define rep(i, n) for (long i = 0; i < (long)(n); ++i)
typedef std::vector<long> LI;
struct Solver {
void solve() {
long t, d, l;
std::cin >> t >> d >> l;
if (t == 0 and d == 0 and l == 0)
exit(0);
long rem = 0;
LI xs(t);
rep(i, t) std::cin... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 354], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 355], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 354], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 355], ["-", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["-", 0, 11, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 7, 15, 16, 12, 16, 31, 16, 1... | 1 | 232 | 8 |
#include <bits/stdc++.h>
using namespace std;
#define MAX_N 100005
int N, M;
int s[MAX_N];
int check(int X) {
int res = 0;
int lv = 1;
int p = 0;
while (lv + X <= s[N - 1]) {
while (p + 1 < N && s[p + 1] < lv)
p++;
int f = p;
if (s[f] >= lv + X)
f--;
if (f > 0 && abs(s[f] - lv) > a... | #include <bits/stdc++.h>
using namespace std;
#define MAX_N 100005
int N, M;
int s[MAX_N];
int check(int X) {
int res = 0;
int lv = 1;
int p = 0;
while (lv + X <= s[N - 1]) {
while (p + 1 < N && s[p] <= lv)
p++;
int f = p;
if (s[f] >= lv + X)
f--;
if (f > 0 && abs(s[f] - lv) > abs(... | [["-", 12, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["-", 12, 16, 31, 69, 341, 342, 0, 16, 12, 13], ["-", 0, 52, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 19]] | 1 | 304 | 4 |
#include <bits/stdc++.h>
using namespace std;
int N, M;
vector<int> s;
bool enough(int X) {
int L = 1;
for (int i = 0; i < M - 1; ++i) {
if (s.back() < L + X)
return false;
auto itr = lower_bound(begin(s), end(s), L);
int diff = 1e9;
if (itr != begin(s) && *prev(itr) < L + X) {
diff = ... | #include <bits/stdc++.h>
using namespace std;
int N, M;
vector<int> s;
bool enough(int X) {
int L = 1;
for (int i = 0; i < M - 1; ++i) {
if (s.back() < L + X)
return false;
auto itr = lower_bound(begin(s), end(s), L);
int diff = 1e9;
if (itr != begin(s) && *prev(itr) < L + X) {
diff = ... | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 28, 22], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 17, 131], ["+", 0, 43, 49, 50, 51, 2, 63, 118, 119, 120], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25]] | 1 | 292 | 6 |
#include <bits/stdc++.h>
#define REP(x, y, z) for (int x = y; x <= z; x++)
#define FORD(x, y, z) for (int x = y; x >= z; x--)
#define MSET(x, y) memset(x, y, sizeof(x))
#define FOR(x, y) for (__typeof(y.begin()) x = y.begin(); x != y.end(); x++)
#define F first
#define S second
#define MP make_pair
#define PB push_back... | #include <bits/stdc++.h>
#define REP(x, y, z) for (int x = y; x <= z; x++)
#define FORD(x, y, z) for (int x = y; x >= z; x--)
#define MSET(x, y) memset(x, y, sizeof(x))
#define FOR(x, y) for (__typeof(y.begin()) x = y.begin(); x != y.end(); x++)
#define F first
#define S second
#define MP make_pair
#define PB push_back... | [["+", 0, 1, 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, 21], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 0, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 327 | 5 |
#include <bits/stdc++.h>
#define N 205
#define W 21
using namespace std;
int n, m;
int dp[N][N][W];
int main() {
cin >> n >> m;
int k, s, h;
vector<int> v[N];
for (int i = 0; i < n; i++) {
cin >> k;
for (int j = 0; j < k; j++) {
cin >> s >> h;
for (int l = 0; l < h; l++)
v[i].p... | #include <bits/stdc++.h>
#define N 205
#define W 21
using namespace std;
int n, m;
int dp[N][N][W];
int main() {
cin >> n >> m;
int k, s, h;
vector<int> v[N];
for (int i = 0; i < n; i++) {
cin >> k;
for (int j = 0; j < k; j++) {
cin >> s >> h;
for (int l = 0; l < h; l++)
v[i].p... | [["-", 15, 339, 51, 16, 12, 16, 12, 16, 17, 48], ["-", 15, 339, 51, 16, 12, 16, 12, 16, 12, 22]] | 1 | 534 | 2 |
#define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
typedef pair<long long int, long long int> P;
long long int INF = 1e18;
long long int MOD = 1e9 + 7;
lon... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
using namespace std;
typedef pair<long long int, long long int> P;
long long int INF = 1e18;
long long int MOD = 1e9 + 7;
lon... | [["-", 31, 16, 31, 16, 31, 16, 12, 16, 17, 33], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 72]] | 1 | 269 | 2 |
#include <algorithm>
#include <array>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
using namespace std;
int main(void) {
// boost::shared_ptr<vector<string>>
// log(boost::make_shared<vector<string>>()); log->push_back("dd");
// log->push_back("dde");
// boost::shared_ptr<vector<s... |
#include <algorithm>
#include <array>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
using namespace std;
int main(void) {
// boost::shared_ptr<vector<string>>
// log(boost::make_shared<vector<string>>()); log->push_back("dd");
// log->push_back("dde");
// boost::shared_ptr<vector<s... | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 268 | 4 |
#include "bits/stdc++.h"
using namespace std;
long long int gcd(long long int l, long long int r) {
assert(l > 0 && r > 0);
if (l > r)
return gcd(r, l);
else {
const long long int num = r % l;
if (num) {
return gcd(l, num);
} else {
return l;
}
}
}
int main() {
int T;
cin >... | #include "bits/stdc++.h"
using namespace std;
long long int gcd(long long int l, long long int r) {
assert(l > 0 && r > 0);
if (l > r)
return gcd(r, l);
else {
const long long int num = r % l;
if (num) {
return gcd(l, num);
} else {
return l;
}
}
}
int main() {
int T;
cin >... | [["+", 0, 52, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 33]] | 1 | 219 | 6 |
#include "bits/stdc++.h"
using namespace std;
#define int long long
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define all(a) (a).begin(), (a).end()
#define dump(o) \
if (DEBUG) { ... | #include "bits/stdc++.h"
using namespace std;
#define int long long
#define rep(i, a, b) for (int i = (a); i < (b); i++)
#define rrep(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define all(a) (a).begin(), (a).end()
#define dump(o) \
if (DEBUG) { ... | [["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 35]] | 1 | 278 | 2 |
#include <algorithm>
#include <array>
#include <iostream>
#include <memory>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int win = -1;
int a;
cin >> a;
int power[2];
power[0] = 0;
power[1] = 0;
vector<string> aaa;
vector<string> bbb;
for (int i = 0;... | #include <algorithm>
#include <array>
#include <iostream>
#include <memory>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main(void) {
int win = -1;
int a;
cin >> a;
int power[2];
power[0] = 0;
power[1] = 0;
vector<string> aaa;
vector<string> bbb;
for (int i = 0;... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 1 | 611 | 4 |
#include <iostream>
#include <string>
using namespace std;
int n;
int com1[100], com2[100]; // 0????????????, 1?????????, 2?????????
// k???????????????????????????-1???A????????????1???B????????????
int hantei(int a, int b, int k) {
if (a == 0 && com1[k] == 1 && b == 0 && com2[k] == 1)
return 0;
if (a == 0 &... | #include <iostream>
#include <string>
using namespace std;
int n;
int com1[100], com2[100]; // 0????????????, 1?????????, 2?????????
// k???????????????????????????-1???A????????????1???B????????????
int hantei(int a, int b, int k) {
if (a == 0 && com1[k] == 1 && b == 0 && com2[k] == 1)
return 0;
if (a == 0 &... | [["-", 12, 23, 0, 16, 12, 16, 31, 69, 28, 22], ["+", 12, 23, 0, 16, 12, 16, 31, 69, 28, 22]] | 1 | 510 | 2 |
#include <bits/stdc++.h>
using namespace std;
int K, a = 0, b = 0;
string A[100], B[100];
int solve() {
for (int i = 0; i < K; i++) {
if (A[i] == "kougekida" && B[i] == "kougekida") {
if (a > b)
return 1;
else if (a < b)
return 2;
else
a = b = 0;
} else if (A[i] == ... | #include <bits/stdc++.h>
using namespace std;
int K, a = 0, b = 0;
string A[100], B[100];
int solve() {
for (int i = 0; i < K; i++) {
if (A[i] == "kougekida" && B[i] == "kougekida") {
if (a > b)
return 1;
else if (a < b)
return 2;
else
a = b = 0;
} else if (A[i] == ... | [["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95], ["-", 0, 57, 64, 1, 0, 11, 12, 2, 63, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 2, 63, 22]] | 1 | 358 | 6 |
#!/usr/bin/ruby
N=gets.to_i
X=N.times{gets.chomp}
Y=N.times{gets.chomp}
attackX=attackY=0
N.times{|i|
foulX=foulY=false
if X[i]=='kougekida'
foulX=true if attackX==0
if Y[i]=='kougekida'
foulY=true if attackY==0
next if foulX&&foulY
if foulX
puts 'Nakajima-kun'
exit
elsif foulY
puts 'Isono... | #!/usr/bin/ruby
N=gets.to_i
X=N.times.map{gets.chomp}
Y=N.times.map{gets.chomp}
attackX=attackY=0
N.times{|i|
foulX=foulY=false
if X[i]=='kougekida'
foulX=true if attackX==0
if Y[i]=='kougekida'
foulY=true if attackY==0
next if foulX&&foulY
if foulX
puts 'Nakajima-kun'
exit
elsif foulY
put... | [["+", 36, 36, 0, 493, 0, 662, 12, 652, 17, 131], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 289 | 4 |
K = int(input())
nakaji = isono = 0
for I, N in zip([input() for i in range(K)], [input() for i in range(K)]):
lose1 = lose2 = False
if I == "kougekida" and isono == 0: lose1 = True
if N == "kougekida" and nakaji == 0: lose2 = True
if lose1 and lose2: continue
elif lose1:
print("Isono-kun")
... | K = int(input())
nakaji = isono = 0
for I, N in zip([input() for i in range(K)], [input() for i in range(K)]):
lose1 = lose2 = False
if I == "kougekida" and isono == 0: lose1 = True
if N == "kougekida" and nakaji == 0: lose2 = True
if lose1 and lose2: continue
elif lose1:
print("Nakajima-kun... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 275 | 4 |
K = int(input())
Is = [input() for i in range(K)]
Ns = [input() for i in range(K)]
atk_I = 0
atk_N = 0
#"mamoru", "tameru", "kougekida"
#"Isono-kun", "Nakajima-kun", "Hikiwake-kun"
for i, n in zip(Is, Ns):
i_n = [i, n]
if (i_n.count("mamoru") == 2):
pass
elif (i_n.count("mamoru") == 1):
if (i_n.count("tameru") =... | K = int(input())
Is = [input() for i in range(K)]
Ns = [input() for i in range(K)]
atk_I = 0
atk_N = 0
#"mamoru", "tameru", "kougekida"
#"Isono-kun", "Nakajima-kun", "Hikiwake-kun"
for i, n in zip(Is, Ns):
i_n = [i, n]
if (i_n.count("mamoru") == 2):
pass
elif (i_n.count("mamoru") == 1):
if (i_n.count("tameru") =... | [["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 654], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 655]] | 5 | 414 | 4 |
#include <bits/stdc++.h>
using namespace std;
bool dfs(pair<int, int> f, pair<int, int> s, int turn) {
if (f.first >= 5 && f.second >= 5)
return false;
if (s.first >= 5 && s.second >= 5)
return true;
// cout << turn << " " << f.first << " " << f.second << " " << s.first << " "
// << s.second << endl... | #include <bits/stdc++.h>
using namespace std;
bool dfs(pair<int, int> f, pair<int, int> s, int turn) {
// cout << turn << " " << f.first << " " << f.second << " " << s.first << " "
// << s.second << endl;
if (f.first >= 5 && f.second >= 5)
return false;
if (s.first >= 5 && s.second >= 5)
return true... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 603 | 2 |
#include <bits/stdc++.h>
using namespace std;
int memo[10][10][10][10][2];
int solve(int iL, int iR, int nL, int nR, int t) {
int &res = memo[iL][iR][nL][nR][t];
if (res != 0)
return res;
if (iL >= 5 && iR >= 5)
return 2;
if (nL >= 5 && nR >= 5)
return 1;
res = (t == 0 ? 1 : 2);
if (t == 0)... | #include <bits/stdc++.h>
using namespace std;
int memo[10][10][10][10][2];
int solve(int iL, int iR, int nL, int nR, int t) {
int &res = memo[iL][iR][nL][nR][t];
if (res != 0)
return res;
if (iL >= 5 && iR >= 5)
return 2;
if (nL >= 5 && nR >= 5)
return 1;
res = (t == 0 ? 2 : 1);
if (t == 0)... | [["-", 0, 1, 0, 11, 12, 23, 0, 41, 64, 13], ["-", 0, 1, 0, 11, 12, 23, 0, 41, 0, 102], ["+", 0, 1, 0, 11, 12, 23, 0, 41, 0, 102], ["+", 0, 1, 0, 11, 12, 23, 0, 41, 75, 13]] | 1 | 439 | 4 |
#include <bits/stdc++.h>
using namespace std;
#define dump(...) cout << "# " << #__VA_ARGS__ << '=' << (__VA_ARGS__) << endl
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define peri(i, a, b) for (int i = int(b); i-- > int(a);)
#define rep(i, n) repi(i, 0, n)
#define per(i, n) peri(i, 0, n)
#define all(... | #include <bits/stdc++.h>
using namespace std;
#define dump(...) cout << "# " << #__VA_ARGS__ << '=' << (__VA_ARGS__) << endl
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define peri(i, a, b) for (int i = int(b); i-- > int(a);)
#define rep(i, n) repi(i, 0, n)
#define per(i, n) peri(i, 0, n)
#define all(... | [["+", 31, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 31, 16, 31, 2, 3, 4, 0, 16, 12, 13], ["+", 12, 16, 31, 2, 3, 4, 0, 16, 17, 72], ["+", 12, 16, 31, 2, 3, 4, 0, 16, 12, 13]] | 1 | 2,153 | 6 |
#include <iostream>
using namespace std;
int main() {
int l, n, x, w, a = 0;
cin >> n >> l;
for (int i = 0; i < n; i++) {
cin >> x >> w;
a += x * w;
}
if (a > 0)
cout << 1 << endl, cout << -1 << ' ' << -a << endl;
if (a < 0)
cout << 1 << endl, cout << 1 << ' ' << -a << endl;
if (a == 0)
... | #include <iostream>
using namespace std;
int main() {
int l, n, x, w, a = 0;
cin >> l >> n;
for (int i = 0; i < n; i++) {
cin >> x >> w;
a += x * w;
}
if (a > 0)
cout << 1 << endl, cout << -1 << ' ' << a << endl;
if (a < 0)
cout << 1 << endl, cout << 1 << ' ' << -a << endl;
if (a == 0)
... | [["-", 8, 9, 0, 1, 0, 16, 31, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 34, 12, 16, 31, 16, 12, 91, 17, 33], ["+", 64, 1, 0, 16, 31, 16, 12, 103, 0, 104]] | 1 | 124 | 7 |
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
public static void main(String[] args) { new Main(); }
public Main() { new B().doIt(); }
class B {
void doIt() {
int n = sc.nextInt();
String str = sc.next();
char ctr[] = str.toCharArray();
int m = sc.n... |
import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
public static void main(String[] args) { new Main(); }
public Main() { new B().doIt(); }
class B {
void doIt() {
int n = sc.nextInt();
String str = sc.next();
char ctr[] = str.toCharArray();
int m = sc.n... | [["+", 0, 7, 8, 196, 0, 1, 0, 27, 0, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 27, 0, 68], ["+", 8, 196, 0, 7, 8, 196, 0, 1, 0, 35]] | 3 | 226 | 3 |
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
int n;
cin >> n;
char x[n];
int d;
cin >> x >> d;
int c0 = 0, c1 = 0;
for (int i = 0; i < n; ++i) {
if (x[i] == '0')
++c0;
else if (x[i] == '1')
++c1;
}
char ans[n] = {};
for (int i = 0; i < n... | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
int n;
cin >> n;
char x[n];
int d;
cin >> x >> d;
int c0 = 0, c1 = 0;
for (int i = 0; i < n; ++i) {
if (x[i] == '0')
++c0;
else if (x[i] == '1')
++c1;
}
char ans[n] = {};
for (int i = 0; i < n... | [["-", 0, 57, 64, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 57, 64, 9, 0, 7, 15, 16, 17, 20]] | 1 | 282 | 2 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int, int> pii;
#define REP(i, n) for (ll i = 0; i < n; ++i)
#define REPR(i, n) for (ll i = 1; i < n; ++i)
#define FOR(i, a, b) for (ll i = a; i < b; ++i)
#define ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef complex<double> P;
typedef pair<int, int> pii;
#define REP(i, n) for (ll i = 0; i < n; ++i)
#define REPR(i, n) for (ll i = 1; i < n; ++i)
#define FOR(i, a, b) for (ll i = a; i < b; ++i)
#define ... | [["+", 31, 69, 341, 342, 0, 16, 31, 16, 31, 22], ["+", 31, 69, 341, 342, 0, 16, 31, 16, 17, 33], ["+", 31, 69, 341, 342, 0, 16, 31, 16, 12, 13], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33]] | 1 | 216 | 4 |
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template <class S, class T>
ostream &operator<<(ostream &out, const pair<S, T> &o) {
out << "(" << o.first << "," << o.second << ")";
return out;
}
tem... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template <class S, class T>
ostream &operator<<(ostream &out, const pair<S, T> &o) {
out << "(" << o.first << "," << o.second << ")";
return out;
}
tem... | [["+", 8, 9, 0, 7, 8, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 7, 8, 9, 0, 93, 0, 35]] | 1 | 503 | 2 |
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define pb push_back
#define rng(x) x.begin(), x.end()
#define fi first
#define se second
#define sz(x) int(x.size())
using namespace std;
typed... | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define pb push_back
#define rng(x) x.begin(), x.end()
#define fi first
#define se second
#define sz(x) int(x.size())
using namespace std;
typed... | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["+", 0, 14, 49, 53, 54, 55, 0, 56, 39, 78], ["-", 0, 11, 31, 69, 28, 69, 341, 342, 0, 22], ["+", 0, 11, 31, 69, 28, 69, 341, 342, 0, 22], ["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22]] | 1 | 1,002 | 8 |
import static java.lang.Integer.parseInt;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Comparator;
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeSet;
/**
* Best Matched Pair
*/
public class Main {
public static ... | import static java.lang.Integer.parseInt;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Comparator;
import java.util.SortedSet;
import java.util.StringTokenizer;
import java.util.TreeSet;
/**
* Best Matched Pair
*/
public class Main {
public static ... | [["-", 8, 196, 0, 57, 15, 15, 0, 492, 141, 22], ["+", 8, 196, 0, 57, 15, 15, 0, 492, 141, 22], ["-", 0, 493, 0, 235, 8, 498, 0, 195, 141, 22], ["+", 0, 493, 0, 235, 8, 498, 0, 195, 141, 22], ["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 20], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 12,... | 3 | 364 | 8 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> pint;
typedef vector<int> vint;
typedef vector<pint> vpint;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#defi... | #include <bits/stdc++.h>
using namespace std;
#define int long long
typedef pair<int, int> pint;
typedef vector<int> vint;
typedef vector<pint> vpint;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
#define rep(i, n) for (int i = 0; i < (n); i++)
#defi... | [["-", 0, 9, 0, 1, 0, 11, 12, 16, 17, 18], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 72], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 13], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 17, 60]] | 1 | 280 | 4 |
#include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << o << endl; ... | #include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << o << endl; ... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 79]] | 1 | 250 | 4 |
#include <algorithm>
#include <assert.h>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++... | #include <algorithm>
#include <assert.h>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 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, 79]] | 1 | 340 | 4 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
int a[1000];
signed main() {
int b;
cin >> b;
for (int c = 0; c < b; c++) {
scan... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
int a[1000];
signed main() {
int b;
cin >> b;
for (int c = 0; c < b; c++) {
scan... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 203 | 2 |
#include <bits/stdc++.h>
#define REP(i, a, n) for (ll i = ((ll)a); i < ((ll)n); i++)
using namespace std;
typedef long long ll;
int main(void) {
ll N;
cin >> N;
vector<ll> X(N);
REP(i, 0, N) cin >> X[i];
ll ans = -1;
REP(i, 0, N) REP(j, i + 1, N) {
ll p = X[i] * X[j];
string s = to_string(p);
... | #include <bits/stdc++.h>
#define REP(i, a, n) for (ll i = ((ll)a); i < ((ll)n); i++)
using namespace std;
typedef long long ll;
int main(void) {
ll N;
cin >> N;
vector<ll> X(N);
REP(i, 0, N) cin >> X[i];
ll ans = -1;
REP(i, 0, N) REP(j, i + 1, N) {
ll p = X[i] * X[j];
string s = to_string(p);
... | [["-", 0, 1, 0, 11, 12, 16, 12, 16, 17, 18], ["+", 0, 11, 12, 16, 12, 16, 31, 16, 17, 72], ["+", 0, 11, 12, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 11, 12, 16, 12, 16, 17, 60]] | 1 | 162 | 4 |
#include <bits/stdc++.h>
#define N 201
using namespace std;
typedef pair<int, int> P;
int h, w;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
string mp[N];
int bfs(char s) {
queue<P> Q;
int D[N][N] = {};
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
if (mp[i][j] == s)
Q.push(P(i... | #include <bits/stdc++.h>
#define N 201
using namespace std;
typedef pair<int, int> P;
int h, w;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
string mp[N];
int bfs(char s) {
queue<P> Q;
int D[N][N] = {};
for (int i = 0; i < h; i++)
for (int j = 0; j < w; j++)
if (mp[i][j] == s)
Q.push(P(i... | [["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 79], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13]] | 1 | 385 | 2 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 302 | 2 |
#include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | #include <bits/stdc++.h>
using namespace std;
#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for (int64 i = 0; i < (n); i++)
#define FOR(i, a, b) for (int64 i = (a); i < (b); i++)
#define all(x) x.begin(), x.end()
#define fs first
#define sc second
using int32 = int_fast32_t;
using uint32 = uint_... | [["-", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 12, 13], ["-", 0, 11, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 11, 31, 69, 341, 342, 0, 16, 17, 72]] | 1 | 528 | 6 |
#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
int m = ceil(0.5 * sqrt(8.0 * n - 1)), q = m * (m + 1) / 2 - n;
string s = string(m - q, ')') + "(" + string(q, ')') + string(m - 1, '(');
cout << s << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
cin >> n;
int m = ceil(0.5 * sqrt(8.0 * n + 1) - 0.5), q = m * (m + 1) / 2 - n;
string s = string(m - q, ')') + "(" + string(q, ')') + string(m - 1, '(');
cout << s << endl;
return 0;
} | [["-", 0, 16, 12, 2, 3, 4, 0, 16, 17, 33], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 17, 33], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13]] | 1 | 97 | 4 |
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000001
using namespace std;
struct Hash {
Ha... | #include <algorithm>
#include <cfloat>
#include <cmath>
#include <queue>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <vector>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000001
using namespace std;
int D = 9901;
str... | [["+", 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], ["-", 12, 16, 31, 23, 0, 16, 12, 16, 12, 22], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 22]] | 1 | 596 | 7 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for (int i = 0; i < (n); i++)
#define sz(c) ((int)c.size())
#define ten(n) ((int)1e##n)
using ll = long long;
template <typename...> static inline int getchar_unlocked(void) {
return getchar();
}
template <typename...> static inline void putchar_unlock... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, n) for (int i = 0; i < (n); i++)
#define sz(c) ((int)c.size())
#define ten(n) ((int)1e##n)
using ll = long long;
template <typename...> static inline int getchar_unlocked(void) {
return getchar();
}
template <typename...> static inline void putchar_unlock... | [["-", 0, 57, 64, 9, 0, 52, 15, 339, 51, 146], ["+", 64, 9, 0, 52, 15, 339, 51, 2, 63, 22], ["+", 0, 52, 15, 339, 51, 2, 3, 4, 0, 24], ["+", 0, 52, 15, 339, 51, 2, 3, 4, 0, 22], ["+", 0, 52, 15, 339, 51, 2, 3, 4, 0, 25]] | 1 | 1,638 | 5 |
#include <bits/stdc++.h>
using namespace std;
#define for_(i, a, b) for (int i = (a); i < (b); ++i)
int N, M, A, B, D[1010];
void solve() {
int cur = 0;
while (D[cur] >= A)
++cur;
if (N - cur < M) {
while (cur >= 0 && D[cur - 1] <= B)
--cur;
}
cout << cur << endl;
}
int main() {
cin >> N... | #include <bits/stdc++.h>
using namespace std;
#define for_(i, a, b) for (int i = (a); i < (b); ++i)
int N, M, A, B, D[1010];
void solve() {
int cur = 0;
while (D[cur] >= A)
++cur;
if (N - cur < M) {
while (cur > 0 && D[cur - 1] <= B)
--cur;
}
cout << cur << endl;
}
int main() {
cin >> N ... | [["-", 0, 52, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 52, 15, 339, 51, 16, 31, 16, 17, 47]] | 1 | 123 | 2 |
#include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n, m, a, b, t;
cin >> n >> m >> a >> b;
vector<int> d;
r(i, n) {
cin >> t;
if (t < a)
break;
else
d.push_back(t);
}
if (n - (int)d.size() < m)
while (d[d.size() - 1] <= b)
... | #include <bits/stdc++.h>
#define r(i, n) for (int i = 0; i < n; i++)
using namespace std;
int main() {
int n, m, a, b, t;
cin >> n >> m >> a >> b;
vector<int> d;
r(i, n) {
cin >> t;
if (t < a)
break;
else
d.push_back(t);
}
if (n - (int)d.size() < m)
while (d.size() && d[d.size() ... | [["+", 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], ["+", 0, 57, 64, 52, 15, 339, 51, 16, 17, 98], ["+", 15, 339, 51, 16, 12, 16, 31, 69, 28, 22]] | 1 | 128 | 6 |
#!/usr/bin/ruby
a,b,n=gets.split.map(&:to_i)
r=Float::INFINITY
(1..n).each{|i|
if b%i==0
(1..n).each{|j|
r=[r,a-b/i*j].min
}
end
}
p r | a,b,n=gets.split.map(&:to_i)
r=Float::INFINITY
(1..n).each{|i|
if b%i==0
(1..n).each{|j|
r=[r,(a-b/i*j).abs].min
}
end
}
p r | [["+", 12, 652, 486, 516, 0, 652, 486, 739, 0, 24], ["+", 12, 652, 486, 516, 0, 652, 486, 739, 0, 25], ["+", 0, 662, 12, 652, 486, 516, 0, 652, 17, 131], ["+", 0, 662, 12, 652, 486, 516, 0, 652, 735, 22]] | 4 | 69 | 4 |
/* template.cpp [[[ */
#include <bits/stdc++.h>
using namespace std;
#define get_macro(a, b, c, d, name, ...) name
#define rep(...) get_macro(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep(...) \
get_macro(__VA_ARGS__, rrep4, rrep3, rrep2, r... | /* template.cpp [[[ */
#include <bits/stdc++.h>
using namespace std;
#define get_macro(a, b, c, d, name, ...) name
#define rep(...) get_macro(__VA_ARGS__, rep4, rep3, rep2, rep1)(__VA_ARGS__)
#define rrep(...) \
get_macro(__VA_ARGS__, rrep4, rrep3, rrep2, r... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18]] | 1 | 599 | 2 |
#include <algorithm>
#include <cfloat>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0... | #include <algorithm>
#include <cfloat>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0... | [["-", 51, 16, 31, 118, 28, 69, 341, 342, 0, 22], ["+", 51, 16, 31, 118, 28, 69, 341, 342, 0, 22]] | 1 | 1,649 | 6 |
#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
#define MAX 1e9
int INF = MAX * MAX;
typedef pair<int, int> pii;
typedef pair<pii, long long> piii;
vector<vector<long long>> d(501, vector<long long>(51, INF));
signed main() {
int n, m;
cin >> n >> m... | #include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
#define MAX 1e9
int INF = MAX * MAX;
typedef pair<int, int> pii;
typedef pair<pii, long long> piii;
vector<vector<long long>> d(501, vector<long long>(51, INF));
signed main() {
int n, m;
cin >> n >> m... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 723 | 4 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAX_N = 1 << 17;
struct LazySegTree {
int n;
struct S {
int flag;
int len;
int sum;
int l, r;
S() : flag(0), len(1), sum(0), l(0), r(0) {}
};
S node[2 * MAX_N - 1];
void init(int n_) {
n = 1;
while (n <... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAX_N = 1 << 17;
struct LazySegTree {
int n;
struct S {
int flag;
int len;
int sum;
int l, r;
S() : flag(0), len(1), sum(0), l(0), r(0) {}
};
S node[2 * MAX_N - 1];
void init(int n_) {
n = 1;
while (n <... | [["-", 0, 14, 49, 53, 54, 55, 0, 56, 39, 40], ["-", 0, 14, 49, 53, 54, 55, 0, 56, 49, 22], ["-", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 772 | 5 |
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var arr = input.trim().split("\n");
while (true) {
if (arr[0] == "0 0")
break;
var nm = arr.shift().split(" ").map(Number);
var n = nm[0];
var m = nm[1];
var max = [];
for (var i = 0; i < m; i++)
max[i] = 0;
for (var i = 0; i < n; i++) ... | var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var arr = input.trim().split("\n");
while (true) {
if (arr[0] == "0 0")
break;
var nm = arr.shift().split(" ").map(Number);
var n = nm[0];
var m = nm[1];
var max = [];
for (var i = 0; i < m; i++)
max[i] = 0;
for (var i = 0; i < n; i++) ... | [["-", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 31, 69, 71, 22], ["-", 0, 57, 64, 1, 0, 11, 31, 69, 71, 22], ["+", 0, 57, 64, 1, 0, 11, 31, 69, 71, 22]] | 2 | 224 | 4 |
#include <stdio.h>
typedef struct {
int d, v;
} num_t;
int main() {
int N, M;
while (1) {
scanf("%d %d", &N, &M);
if (N == 0 && M == 0)
break;
num_t a[N];
int max[100] = {};
for (int i = 0; i < N; i++) {
scanf("%d %d", &a[i].d, &a[i].v);
}
for (int i = 0; i < N; i++) {
... | #include <stdio.h>
typedef struct {
int d, v;
} num_t;
int main() {
int N, M;
while (1) {
scanf("%d %d", &N, &M);
if (N == 0 && M == 0)
break;
num_t a[N];
int max[100] = {};
for (int i = 0; i < N; i++) {
scanf("%d %d", &a[i].d, &a[i].v);
}
for (int i = 0; i < N; i++) {
... | [["+", 51, 16, 31, 69, 341, 342, 0, 16, 17, 33], ["+", 51, 16, 31, 69, 341, 342, 0, 16, 12, 13]] | 1 | 227 | 2 |
#include <iostream>
using namespace std;
int main(void) {
for (;;) {
int N, M;
cin >> N >> M;
if (N == 0 && M == 0) {
return 0;
}
int d[N], v[M];
for (int i = 0; i < N; i++) {
cin >> d[i] >> v[i];
}
int max[N];
for (int i = 0; i < N; i++) {
max[i] = -1;
}
... | #include <iostream>
using namespace std;
int main(void) {
for (;;) {
int N, M;
cin >> N >> M;
if (N == 0 && M == 0) {
return 0;
}
int d[N], v[N];
for (int i = 0; i < N; i++) {
cin >> d[i] >> v[i];
}
int max[M];
for (int i = 0; i < M; i++) {
max[i] = -1;
}
... | [["-", 0, 7, 8, 9, 0, 43, 49, 80, 81, 22], ["+", 0, 7, 8, 9, 0, 43, 49, 80, 81, 22], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 198 | 6 |
#include <cstdio>
#include <cstring>
int main() {
char s[111];
while (~scanf("%s", s)) {
int cnt = 1;
char p = 'A'; // p := previous
for (int i = 0, l = strlen(s); i < l; i++) {
if (p > s[i])
cnt++;
p = s[i];
}
printf("%d\n", cnt);
}
return 0;
} | #include <cstdio>
#include <cstring>
int main() {
char s[111];
while (~scanf("%s", s)) {
int cnt = 0;
char p = 'A'; // p := previous
for (int i = 0, l = strlen(s); i < l; i++) {
if (p >= s[i])
cnt++;
p = s[i];
}
printf("%d\n", cnt);
}
return 0;
} | [["-", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 52, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 98 | 4 |
#include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
vector<vector<int>> input(int N) {
vector<vector<int>> v(N, vector<int>(N));
for (int i = 0; i < N; ++i) {
string st;
cin >> st;
for (int j = 0; j < N; ++j) {
v[i][j] = ... | #include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
vector<vector<int>> input(int N) {
vector<vector<int>> v(N, vector<int>(N));
for (int i = 0; i < N; ++i) {
string st;
cin >> st;
for (int j = 0; j < N; ++j) {
v[i][j] = ... | [["-", 0, 43, 49, 50, 51, 4, 0, 103, 0, 125], ["+", 0, 43, 49, 50, 51, 4, 0, 103, 0, 125]] | 1 | 1,055 | 2 |
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define INF 1 << 30
#define LINF 1LL << 60
const ll Mod = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n, m;
cin >> n >> m;
if (n == 1) {
cout << ((m + 1) & Mod) <... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
#define INF 1 << 30
#define LINF 1LL << 60
const ll Mod = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ll n, m;
cin >> n >> m;
if (n == 1) {
cout << ((m + 1) % Mod) <... | [["-", 0, 16, 31, 16, 12, 23, 0, 16, 17, 67], ["+", 0, 16, 31, 16, 12, 23, 0, 16, 17, 109]] | 1 | 280 | 2 |
n,m=gets.split.map &:to_i
(p (m+1)%(10**9+7);exit)if n==1
r=(0..m).bsearch{|i|
m<(n-1)*i
}
r-=1
p ((m+1)*r*2-(n-1)*r*(r+1)+m+1)%(10**9+7) | n,m=gets.split.map &:to_i
(p (m+1)%(10**9+7);exit)if n==1
r=(0..m+1).bsearch{|i|
m<(n-1)*i
}
r-=1
p ((m+1)*r*2-(n-1)*r*(r+1)+m+1)%(10**9+7) | [["+", 12, 652, 486, 739, 0, 475, 444, 738, 17, 72], ["+", 12, 652, 486, 739, 0, 475, 444, 738, 12, 612]] | 4 | 97 | 2 |
#include <bits/stdc++.h>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
string str;
string str2;
int main(void) {
cin >> str;
cin >> str2;
int now = 0;
int cnt = 0;
int ng = 0;
bool flag = true;
for (int i = 0; i < str.size(); i++) {
if (now < str2.size... | #include <bits/stdc++.h>
#define MOD 1000000007LL
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
string str;
string str2;
int main(void) {
cin >> str;
cin >> str2;
int now = 0;
int cnt = 0;
int ng = 0;
bool flag = true;
for (int i = 0; i < str.size(); i++) {
if (now < str2.size... | [["-", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["-", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6]] | 1 | 202 | 4 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef int _loop_int;
#define REP(i, n) for (_loop_int i = 0; i < (_loop_int)(n); ++i)
#define FOR(i, a, b) for (_loop_int i = (_loop_int)(a); i < ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef int _loop_int;
#define REP(i, n) for (_loop_int i = 0; i < (_loop_int)(n); ++i)
#define FOR(i, a, b) for (_loop_int i = (_loop_int)(a); i < ... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 416 | 2 |
#include <bits/stdc++.h>
using namespace std;
int N, C;
int a[101], b[101], c[101];
int dp[2][101][10101];
int main() {
cin >> N >> C;
for (int i = 0; i < N; i++)
cin >> a[i] >> b[i] >> c[i];
memset(dp, -1, sizeof(dp));
int(*curr)[10101] = dp[0];
int(*next)[10101] = dp[1];
curr[0][0] = 0;
for (in... | #include <bits/stdc++.h>
using namespace std;
int N, C;
int a[101], b[101], c[101];
int dp[2][101][10101];
int main() {
cin >> N >> C;
for (int i = 0; i < N; i++)
cin >> a[i] >> b[i] >> c[i];
memset(dp, -1, sizeof(dp));
int(*curr)[10101] = dp[0];
int(*next)[10101] = dp[1];
curr[0][0] = 0;
for (in... | [["-", 0, 69, 341, 342, 0, 16, 12, 69, 28, 22], ["+", 0, 69, 341, 342, 0, 16, 12, 69, 28, 22]] | 1 | 461 | 2 |
#include <bits/stdc++.h>
using namespace std;
struct BIT {
vector<vector<int>> data;
int h, w;
BIT(int h, int w) : data(h + 1, vector<int>(w + 1)), h(h), w(w) {}
void add(int y, int x, int a) {
for (int i = y; i <= h; i += i & -i) {
for (int j = x; j <= w; j += j & -j) {
data[i][j] += a;
... | #include <bits/stdc++.h>
using namespace std;
struct BIT {
vector<vector<int>> data;
int h, w;
BIT(int h, int w) : data(h + 1, vector<int>(w + 1)), h(h), w(w) {}
void add(int y, int x, int a) {
for (int i = y; i <= h; i += i & -i) {
for (int j = x; j <= w; j += j & -j) {
data[i][j] += a;
... | [["-", 0, 57, 64, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 57, 64, 1, 0, 2, 3, 4, 0, 13], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 626 | 4 |
#include <bits/stdc++.h>
#define REP(i, a, n) for (ll i = ((ll)a); i < ((ll)n); i++)
using namespace std;
typedef long long ll;
template <typename T> class BinaryIndexedTree2D {
vector<vector<ll>> vec;
const ll m, n;
public:
BinaryIndexedTree2D(ll _m, ll _n)
: vec(_m + 1, vector<T>(_n + 1)), m(_m), n(_n) ... | #include <bits/stdc++.h>
#define REP(i, a, n) for (ll i = ((ll)a); i < ((ll)n); i++)
using namespace std;
typedef long long ll;
template <typename T> class BinaryIndexedTree2D {
vector<vector<ll>> vec;
const ll m, n;
public:
BinaryIndexedTree2D(ll _m, ll _n)
: vec(_m + 1, vector<T>(_n + 1)), m(_m), n(_n) ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 8, 9, 0, 7, 8, 7, 15, 16, 12, 22], ["+", 8, 9, 0, 7, 8, 7, 15, 16, 12, 22]] | 1 | 818 | 4 |
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class Main {
static InputStream is;
static PrintWriter out;
static String INPUT = "";
static void solve() {
int ... | import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class Main {
static InputStream is;
static PrintWriter out;
static String INPUT = "";
static void solve() {
int ... | [["+", 0, 1, 0, 27, 0, 504, 71, 16, 17, 109], ["+", 0, 1, 0, 27, 0, 504, 71, 16, 12, 22]] | 3 | 1,356 | 2 |
#include <stdio.h>
#include <stdlib.h>
#define int long long
#define p (int)(1e9 + 7)
int MOD(int a) {
if (a >= 0) {
return a % p;
} else {
return p + a % p;
}
}
int digit_count(int n) {
int ans;
for (ans = -1; n != 0; ans++) {
n >>= 1;
}
return ans;
}
// n????????????????????????0?????????... | #include <stdio.h>
#include <stdlib.h>
#define int long long
#define p (int)(1e9 + 7)
int MOD(int a) {
if (a >= 0) {
return a % p;
} else {
return p + a % p;
}
}
int digit_count(int n) {
int ans;
for (ans = -1; n != 0; ans++) {
n >>= 1;
}
return ans;
}
// n????????????????????????0?????????... | [["-", 0, 1, 0, 27, 28, 69, 71, 2, 63, 22], ["-", 0, 27, 28, 69, 71, 2, 3, 4, 0, 24], ["-", 0, 27, 28, 69, 71, 2, 3, 4, 0, 25], ["+", 0, 1, 0, 27, 28, 69, 71, 16, 17, 109], ["+", 0, 1, 0, 27, 28, 69, 71, 16, 12, 22]] | 0 | 761 | 5 |
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#pragma GCC optimize("-O3")
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
//----------------------... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#pragma GCC optimize("-O3")
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
//----------------------... | [["-", 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, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22]] | 1 | 959 | 5 |
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG_MODE
#define DBG(n) n;
#else
#define DBG(n) ;
#endif
#define REP(i, n) for (ll(i) = (0); (i) < (n); ++i)
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v, n) ... | #include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG_MODE
#define DBG(n) n;
#else
#define DBG(n) ;
#endif
#define REP(i, n) for (ll(i) = (0); (i) < (n); ++i)
#define PB push_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v, n) ... | [["+", 0, 57, 64, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 57, 64, 9, 0, 1, 0, 16, 12, 22], ["-", 0, 57, 75, 76, 0, 9, 0, 1, 0, 35]] | 1 | 210 | 3 |
#include <bits/stdc++.h>
int main() {
while (true) {
std::string s;
std::cin >> s;
if (s == "#")
break;
int y, m, d;
std::cin >> y >> m >> d;
if (y > 31) {
s = "?";
y -= 30;
} else if (m > 4) {
s = "?";
y -= 30;
}
std::cout << s << " " << y << " " << ... | #include <bits/stdc++.h>
int main() {
while (true) {
std::string s;
std::cin >> s;
if (s == "#")
break;
int y, m, d;
std::cin >> y >> m >> d;
if (y > 31) {
s = "?";
y -= 30;
} else if (y == 31 && m > 4) {
s = "?";
y -= 30;
}
std::cout << s << " " << y... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 120 | 4 |
#include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
for (;;) {
string g;
cin >> g;
if ("#" == g) {
break;
}
int y, m, d;
cin >> y >> m >> d;
if (y >= 31 && m >= 5) {
cout << "? " << y - 30 << " " << m <<... | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
for (;;) {
string g;
cin >> g;
if ("#" == g) {
break;
}
int y, m, d;
cin >> y >> m >> d;
if (y > 31 || y == 31 && m >= 5) {
cout << "? " << y - 30 << "... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 60]] | 1 | 127 | 6 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
int main(void) {
while (1) {
string g;
cin >> g;
if (g == "#")
break;
int y, m, d;
cin >> y >> m >> d;
if (y <=... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, m, n) for (int(i) = (m); (i) < (n); (i)++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(a) (a).begin(), (a).end()
int main(void) {
while (1) {
string g;
cin >> g;
if (g == "#")
break;
int y, m, d;
cin >> y >> m >> d;
if (y <=... | [["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 62], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 17, 151]] | 1 | 171 | 4 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string g;
int y, m, d;
while (cin >> g, g != "#") {
cin >> y >> m >> d;
if (y > 30 || (y == 30 && m > 5))
cout << "? " << y - 30 << ' ' << m << ' ' << d << endl;
else
cout << g << ' ' << y << ' ' << m << ' ' << d << ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string g;
int y, m, d;
while (cin >> g, g != "#") {
cin >> y >> m >> d;
if (y > 31 || (y == 31 && m > 4))
cout << "? " << y - 30 << ' ' << m << ' ' << d << endl;
else
cout << g << ' ' << y << ' ' << m << ' ' << d << ... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 51, 16, 12, 23, 0, 16, 31, 16, 12, 13], ["+", 51, 16, 12, 23, 0, 16, 31, 16, 12, 13], ["-", 51, 16, 12, 23, 0, 16, 12, 16, 12, 13], ["+", 51, 16, 12, 23, 0, 16, 12, 16, 12, 13]] | 1 | 114 | 6 |
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template <class S, class T>
ostream &operator<<(ostream &out, const pair<S, T> &o) {
out << "(" << o.first << "," << o.second << ")";
return out;
}
tem... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const int INF = 1e9;
const ll LINF = 1e18;
template <class S, class T>
ostream &operator<<(ostream &out, const pair<S, T> &o) {
out << "(" << o.first << "," << o.second << ")";
return out;
}
tem... | [["-", 15, 339, 51, 16, 12, 23, 0, 16, 17, 98], ["-", 51, 16, 12, 23, 0, 16, 12, 16, 31, 22], ["-", 51, 16, 12, 23, 0, 16, 12, 16, 17, 19], ["-", 51, 16, 12, 23, 0, 16, 12, 16, 12, 13], ["-", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6], ["+", 31, 16, 31, 16, 31, 16, 12, 5, 0, 6]] | 1 | 668 | 6 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, a, b) for (int i = a; i <= b; i++)
using namespace std;
const string space = " ";
int main() {
while (1) {
string g;
int y, m, d;
cin >> g;
if (g == "#")
break;
cin >> y >> m >> d;
if (y > 31 || y == 31... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, a, b) for (int i = a; i <= b; i++)
using namespace std;
const string space = " ";
int main() {
while (1) {
string g;
int y, m, d;
cin >> g;
if (g == "#")
break;
cin >> y >> m >> d;
if (y > 31 || y == 31... | [["+", 0, 52, 8, 9, 0, 1, 0, 16, 17, 151], ["+", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22]] | 1 | 121 | 2 |
ls_g=[]
ls_y=[]
ls_m=[]
ls_d=[]
cnt = -1
while True:
try:
ls=input().split()
ls_g.append(ls[0])
ls_y.append(int(ls[1]))
ls_m.append(int(ls[2]))
ls_d.append(int(ls[3]))
cnt += 1
except:
break;
for _ in range(cnt):
if ls_y[_]>31:
ls_g[_]="?"
... | ls_g=[]
ls_y=[]
ls_m=[]
ls_d=[]
cnt = -1
while True:
try:
ls=input().split()
ls_g.append(ls[0])
ls_y.append(int(ls[1]))
ls_m.append(int(ls[2]))
ls_d.append(int(ls[3]))
cnt += 1
except:
break;
for _ in range(cnt+1):
if ls_y[_]>31:
ls_g[_]="?"
... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 198 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, l, r, a[50], j;
while (cin >> n >> l >> r && n && l && r) {
int cnt = 0;
for (int i = 0; i < n; ++i)
cin >> a[i];
for (int i = l; i <= r; ++i) {
for (j = 0; j < n; ++j) {
if (i % a[j] == 0)
break;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, l, r, a[50], j;
while (cin >> n >> l >> r && n && l && r) {
int cnt = 0;
for (int i = 0; i < n; ++i)
cin >> a[i];
for (int i = l; i <= r; ++i) {
for (j = 0; j < n; ++j) {
if (i % a[j] == 0)
break;
}
... | [["+", 0, 57, 15, 339, 51, 91, 28, 23, 0, 24], ["+", 15, 339, 51, 91, 28, 23, 0, 16, 17, 109], ["+", 15, 339, 51, 91, 28, 23, 0, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 91, 28, 23, 0, 25]] | 1 | 155 | 4 |
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, j, k) for (int i = (int)j; i < (int)k; i++)
#define itrep(i, x) for (aut... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, j, k) for (int i = (int)j; i < (int)k; i++)
#define itrep(i, x) for (aut... | [["-", 0, 52, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 62], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 859 | 4 |
#include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;
enum Type {
SMALL,
BIG,
};
ll N;
ll max_digit;
ll POW[63], ruisekiwa[63];
map<ll, ll> MAP;
//桁を求める
ll calc_digit() {
for (ll dig... | #include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;
enum Type {
SMALL,
BIG,
};
ll N;
ll max_digit;
ll POW[63], ruisekiwa[63];
map<ll, ll> MAP;
//桁を求める
ll calc_digit() {
for (ll dig... | [["-", 8, 9, 0, 1, 0, 11, 12, 23, 0, 24], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 17, 33], ["-", 0, 1, 0, 11, 12, 23, 0, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 23, 0, 25]] | 1 | 887 | 4 |
#if 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <bits/stdc++.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 <stac... |
#if 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <bits/stdc++.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 <stac... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 705 | 2 |
#include <algorithm>
#include <iostream>
#include <vector>
#define llint long long
#define inf 1e18
using namespace std;
struct Edge {
llint to, cost;
Edge() {}
Edge(llint a, llint b) { to = a, cost = b; }
};
llint N;
llint L[105][3];
vector<Edge> g[105];
llint volume(llint x) {
llint ret = 1;
for (llint ... | #include <algorithm>
#include <iostream>
#include <vector>
#define llint long long
#define inf 1e18
using namespace std;
struct Edge {
llint to, cost;
Edge() {}
Edge(llint a, llint b) { to = a, cost = b; }
};
llint N;
llint L[105][3];
vector<Edge> g[105];
llint volume(llint x) {
llint ret = 1;
for (llint ... | [["-", 12, 118, 28, 69, 28, 69, 341, 342, 0, 22], ["+", 12, 118, 28, 69, 28, 69, 341, 342, 0, 22]] | 1 | 1,028 | 2 |
#include <iostream>
#include <string>
using namespace std;
main() {
int n;
cin >> n;
string s;
cin >> s;
char pre = s[0];
int cnt = 1;
for (int i = 0; i < n; i++) {
if (pre == 'x' && s[i] == 'x')
break;
pre = s[i];
cnt++;
}
cout << cnt << endl;
} | #include <iostream>
#include <string>
using namespace std;
main() {
int n;
cin >> n;
string s;
cin >> s;
char pre = s[0];
int cnt = 1;
for (int i = 1; i < n; i++) {
if (pre == 'x' && s[i] == 'x')
break;
pre = s[i];
cnt++;
}
cout << cnt << endl;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 91 | 2 |
#include <iostream>
#include <string>
using namespace std;
main() {
int n;
cin >> n;
string s;
cin >> s;
int cnt = 0;
for (int i = 1; i < n; i++) {
if (s[i - 1] == 'x' && s[i] == 'x')
break;
cnt++;
}
cout << cnt << endl;
} | #include <iostream>
#include <string>
using namespace std;
main() {
int n;
cin >> n;
string s;
cin >> s;
int cnt = 1;
for (int i = 1; i < n; i++) {
if (s[i - 1] == 'x' && s[i] == 'x')
break;
cnt++;
}
cout << cnt << endl;
} | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 81 | 2 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int N, i;
string s;
cin >> N >> s;
for (i = 1; i < N; i++) {
if (s[i] == 'x' && s[i + 1] == 'x')
break;
}
cout << i << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int N, i = 0;
string s;
cin >> N >> s;
for (i = 1; i < N; i++) {
if (s[i] == 'x' && s[i - 1] == 'x')
break;
}
cout << i << endl;
return 0;
} | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 12, 16, 31, 69, 341, 342, 0, 16, 17, 72], ["+", 12, 16, 31, 69, 341, 342, 0, 16, 17, 33]] | 1 | 76 | 4 |
#include <bits/stdc++.h>
int n, i, x;
std::string s;
char c;
main() {
for (std::cin >> n >> s; i < n; ++i)
if (c == s[i])
break;
else
c = s[i], x++;
std::cout << x << '\n';
} | #include <bits/stdc++.h>
int n, i, x;
std::string s;
char c;
main() {
for (std::cin >> n >> s; i < n; ++i)
if (c == s[i] && c == 'x')
break;
else
c = s[i], x++;
std::cout << x << '\n';
} | [["+", 0, 7, 8, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 8, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 15, 339, 51, 16, 12, 16, 12, 103, 0, 104], ["+", 15, 339, 51, 16, 12, 16, 12, 103, 0, 125]] | 1 | 71 | 6 |
#include <bits/stdc++.h>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
using ll = long long;
using ld = long double;
//#define int ll
#define INF 1e9
#define EPS 0.0000000001
#define r... | #include <bits/stdc++.h>
#define vi vector<int>
#define vvi vector<vector<int>>
#define vl vector<ll>
#define vvl vector<vector<ll>>
#define vb vector<bool>
#define vc vector<char>
#define vs vector<string>
using ll = long long;
using ld = long double;
//#define int ll
#define INF 1e9
#define EPS 0.0000000001
#define r... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35]] | 1 | 231 | 3 |
n=gets.to_i
s=gets.split
if k=s.index('xx')
puts k + 1
else
puts n
end | n=gets.to_i
s=gets.chomp
if k=s.index('xx')
puts k+1
else
puts n
end | [["-", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22], ["+", 36, 36, 0, 493, 0, 662, 12, 652, 735, 22]] | 4 | 29 | 2 |
input();s=input();f=s[0];a=1
for x in s[1:]:
if f==x=='x':break
a+=1
print(a)
| input();s=input();f=s[0];a=1
for x in s[1:]:
if f==x=='x':break
a+=1;f=x
print(a)
| [["+", 36, 36, 0, 656, 0, 7, 8, 196, 0, 35], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 12, 22]] | 5 | 46 | 4 |
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
#define int long long
signed main() {
int N, D;
cin >> N >> D;
vector<int> t(N), F(N);
REP(i, N) {
cin >> t[i] >> F[i];
F[i]--;
}
if (F[0] > t[0]) {
cout << -1 << endl;
return 0;
}
int num = 1... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
#define int long long
signed main() {
int N, D;
cin >> N >> D;
vector<int> t(N), F(N);
REP(i, N) {
cin >> t[i] >> F[i];
F[i]--;
}
if (F[0] > t[0]) {
cout << -1 << endl;
return 0;
}
int num = 1... | [["-", 0, 1, 0, 11, 12, 16, 31, 2, 63, 22], ["-", 31, 2, 3, 4, 0, 16, 31, 69, 28, 22], ["+", 12, 16, 31, 23, 0, 16, 31, 69, 28, 22], ["-", 31, 2, 3, 4, 0, 16, 12, 69, 28, 22], ["+", 12, 16, 31, 23, 0, 16, 12, 69, 28, 22]] | 1 | 255 | 5 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n, d, t[100000], f[100000], nf = 1, nt = 0, nd = 0, ans = 0;
cin >> n >> d;
for (int i = 0; i < n; i++) {
scanf("%lld %lld", &t[i], &f[i]);
}
for (int i = 0; i < n; i++) {
long long dist = abs(f[i] - nf);
long long T = t[i] - nt;... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long n, d, t[100000], f[100000], nf = 1, nt = 0, nd = 0, ans = 0;
cin >> n >> d;
for (int i = 0; i < n; i++) {
scanf("%lld %lld", &t[i], &f[i]);
}
for (int i = 0; i < n; i++) {
long long dist = abs(f[i] - nf);
long long T = t[i] - nt;... | [["-", 0, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 236 | 2 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int N, D;
cin >> N >> D;
vector<int> t(N), F(N);
for (int i = 0; i < N; i++) {
cin >> t[i] >> F[i];
}
if (t[0] < F[0]) {
cout << -1 << endl;
return 0;
}
int ans = 0, cap = 1;
for (int i = 1; i < N; i++) ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
int N, D;
cin >> N >> D;
vector<int> t(N), F(N);
for (int i = 0; i < N; i++) {
cin >> t[i] >> F[i];
}
if (t[0] < F[0] - 1) {
cout << -1 << endl;
return 0;
}
int ans = 0, cap = 1;
for (int i = 1; i < N; i... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["-", 15, 339, 51, 16, 31, 16, 12, 2, 63, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 2, 63, 22], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 48], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 273 | 6 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const double EPS = 1e-10;
const ll INF = 100000000;
const ll MOD = 1000000007;
ll n, d;
ll t[100000], f[100000];
int main() {
cin >> n >> d;
rep(i, n) cin >> t[i] >> f[i];
l... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
const double EPS = 1e-10;
const ll INF = 100000000;
const ll MOD = 1000000007;
ll n, d;
ll t[100000], f[100000];
int main() {
cin >> n >> d;
rep(i, n) cin >> t[i] >> f[i];
l... | [["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 293 | 2 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
#ifdef LOCAL
std::ifstream in("in");
std::cin.rdbuf(in.rdbuf());
#endif
int N, D;
cin >> N >> D;
ll ans = 0, pos = 0, d = 0, pret = 0;
for (int i = 0; i < N; i++) {
int t, F;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
#ifdef LOCAL
std::ifstream in("in");
std::cin.rdbuf(in.rdbuf());
#endif
int N, D;
cin >> N >> D;
ll ans = 0, pos = 0, d = 0, pret = 0;
for (int i = 0; i < N; i++) {
int t, F;
... | [["-", 0, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 31, 22]] | 1 | 214 | 2 |
#include <bits/stdc++.h>
using namespace std;
using Int = long long;
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
struct FastIO {
FastIO() {
cin.tie(0);
ios::sync_w... | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
struct FastIO {
FastIO() {
cin.tie(0);
ios::sync_w... | [["-", 0, 57, 15, 339, 51, 16, 31, 91, 17, 92], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]] | 1 | 367 | 3 |
#include <iostream>
#include <string>
using namespace std;
int main() {
string s;
int r = 0;
cin >> s;
if (s[0] == 'a')
r++;
for (int i = 0; i < s.size() - 1; i++) {
if (s[i + 1] <= s[i])
r++;
}
cout << r << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
string s;
int r = 0;
cin >> s;
if (s[0] == 'A')
r++;
for (int i = 0; i < s.size() - 1; i++) {
if (s[i + 1] <= s[i])
r++;
}
cout << r << endl;
return 0;
} | [["-", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125], ["+", 0, 57, 15, 339, 51, 16, 12, 103, 0, 125]] | 1 | 88 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int c, n, m;
cin >> c >> n >> m;
vector<int> s(n);
vector<int> p(n);
for (int i = 0; i < n; i++)
cin >> s[i] >> p[i];
vector<vector<int>> dp(n + 1, vector<int>(c + 1, 0));
for (int i = 0; i < n; i++) {
for (int j = 0; j < c; j++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int c, n, m;
cin >> c >> n >> m;
vector<int> s(n);
vector<int> p(n);
for (int i = 0; i < n; i++)
cin >> s[i] >> p[i];
vector<vector<int>> dp(n + 1, vector<int>(c + 1, 0));
for (int i = 0; i < n; i++) {
for (int j = 0; j <= c; j++) {
... | [["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 299 | 2 |
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <vector>
typedef long long ll;
const int mod = 1e9 + 7;
#define lol(i, n) for (int i = 0; i < n; i++)
using namespace std;
string n;
int main() {
cin >> n;
if (n == "ani")
cout... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <set>
#include <string>
#include <vector>
typedef long long ll;
const int mod = 1e9 + 7;
#define lol(i, n) for (int i = 0; i < n; i++)
using namespace std;
string n;
int main() {
cin >> n;
if (n == "ani")
cout... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 79 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
if (s == "ani")
cout << "square1001\n";
else
cout... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
if (s == "ani")
cout << "square1001\n";
else
cout... | [["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 65 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
if (a == "ani") {
cout << "square1001" << endl;
} else {
cout << "E869120" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
if (a == "ani") {
cout << "square1001" << endl;
} else {
cout << "e869120" << endl;
}
}
| [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 48 | 2 |
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
#define vsort(v) sort(v.begin(), v.end)
using namespace std;
signed main() {
string s;
cin >> s;
if (s == "ani")... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
#define int long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
#define vsort(v) sort(v.begin(), v.end)
using namespace std;
signed main() {
string s;
cin >> s;
if (s == "ani")... | [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 74 | 2 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
if (s == "ani") {
cout << "square1001" << endl;
} else {
cout << "e869120" << endl;
}
}
| #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
string s;
cin >> s;
if (s == "ani") {
cout << "square1001" << endl;
} else {
cout << "e869120" << endl;
}
}
| [["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 12, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 50 | 4 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define int long long
using namespace std;
signed main() {
string s;
cin >> s;
if (s == "ani")
cout << "e869120" << endl;
else
cout << "square1001" << endl;
}
| #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define int long long
using namespace std;
signed main() {
string s;
cin >> s;
if (s == "otouto")
cout << "e869120" << endl;
else
cout << "square1001" << endl;
}
| [["-", 0, 57, 15, 339, 51, 16, 12, 5, 0, 6], ["+", 0, 57, 15, 339, 51, 16, 12, 5, 0, 6]] | 1 | 57 | 2 |
puts gets[/2/]?:square1001: :e869120
| puts gets[/a/]?:square1001: :e869120
| [["-", 3, 4, 0, 754, 15, 742, 0, 575, 0, 6], ["+", 3, 4, 0, 754, 15, 742, 0, 575, 0, 6]] | 4 | 11 | 2 |
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var [a, b, c, d] = input.trim().split(" ").map(Number);
if ((a * b) % 2 != 0 && (a + b) % 2 != 0)
console.log("No\n");
else
console.log("Yes\n");
| var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var [a, b, c, d] = input.trim().split(" ").map(Number);
if ((a * b) % 2 != 0 && (c + d) % 2 != 0)
console.log("No");
else
console.log("Yes");
| [["-", 12, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["-", 64, 1, 0, 2, 3, 3, 0, 557, 0, 44], ["-", 0, 1, 0, 2, 3, 3, 0, 557, 0, 44]] | 2 | 93 | 6 |
#include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define eps LDBL_EPSILON
#define moder 1000000007
#define int long long
#define ll long long
#define INF ((ll)1 << 31) - 1
#define P std::pair<int, int>
#define prique priority_queue<int, vector<int>, greater<int>>
using namespace std;
int gc... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define eps LDBL_EPSILON
#define moder 1000000007
#define int long long
#define ll long long
#define INF ((ll)1 << 31) - 1
#define P std::pair<int, int>
#define prique priority_queue<int, vector<int>, greater<int>>
using namespace std;
int gc... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 146 | 4 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if (a * b % 2 == 1 && c * d % 2 == 1) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
}
| #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b, c, d;
cin >> a >> b >> c >> d;
if (a * b % 2 == 1 && (c + d) % 2 == 1) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
}
| [["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["-", 51, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 25]] | 1 | 76 | 4 |
#include <bits/stdc++.h>
#define REP(i, a, n) for (ll i = a; i < n; i++)
#define RREP(i, a, n) for (ll i = n - 1; i >= a; i--)
typedef long long ll;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
using namespace std;
int main() {
ll h, w, x, y;
cin >> h >> w >> x >> y;
if ((h * w) % 2 != 0 && x + y != 0)
cout... | #include <bits/stdc++.h>
#define REP(i, a, n) for (ll i = a; i < n; i++)
#define RREP(i, a, n) for (ll i = n - 1; i >= a; i--)
typedef long long ll;
const ll mod = 1e9 + 7;
const ll inf = 1e18;
using namespace std;
int main() {
ll h, w, x, y;
cin >> h >> w >> x >> y;
if ((h * w) % 2 != 0 && (x + y) % 2 != 0)
... | [["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 25], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 109], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13]] | 1 | 108 | 4 |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define int long long
using namespace std;
signed main() {
int h, w, x, y;
cin >> h >> w >> x >> y;
if (h * w % 2 == 1 && (x + y) % 2 == 1)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define int long long
using namespace std;
signed main() {
int h, w, x, y;
cin >> h >> w >> x >> y;
if (h * w % 2 == 1 && (x + y) % 2 == 1)
cout << "No" << endl;
else
cout << "Yes" << endl;
}
| [["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 81 | 4 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfenv>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#inc... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfenv>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#inc... | [["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 24], ["+", 51, 16, 12, 16, 31, 16, 31, 23, 0, 25]] | 1 | 521 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.