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 <bits/stdc++.h>
using namespace std;
typedef long long LL;
struct BUG {
LL out, in;
bool operator<(const BUG &t) const { return out < t.out; }
};
bool cmp(const BUG &a, const BUG &b) { return a.in > b.in; };
int n;
BUG bug[300001];
bool solve(int x) {
priority_queue<BUG> que;
LL sum = 0;
int i;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
struct BUG {
LL out, in;
bool operator<(const BUG &t) const { return out < t.out; }
};
bool cmp(const BUG &a, const BUG &b) { return a.in > b.in; };
int n;
BUG bug[300001];
bool solve(int x) {
priority_queue<BUG> que;
LL sum = 0;
int i;
... | [["+", 0, 14, 8, 9, 0, 7, 10, 27, 28, 22], ["+", 0, 14, 8, 9, 0, 7, 10, 27, 17, 68], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 353 | 4 |
#include <bits/stdc++.h>
#define int long long int
#define F first
#define S second
#define MP make_pair
using namespace std;
typedef pair<int, int> PII;
typedef pair<int, PII> PIP;
int n;
PII ab[300010];
priority_queue<PIP> q;
int ans = 0;
struct segtree {
int tree[1048576];
int size;
void reset() {
size ... | #include <bits/stdc++.h>
#define int long long int
#define F first
#define S second
#define MP make_pair
using namespace std;
typedef pair<int, int> PII;
typedef pair<int, PII> PIP;
int n;
PII ab[300010];
priority_queue<PIP> q;
int ans = 0;
struct segtree {
int tree[1048576];
int size;
void reset() {
size ... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 585 | 8 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#de... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
#define loop(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) loop(i, 0, a)
#de... | [["-", 8, 9, 0, 52, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 52, 8, 9, 0, 43, 39, 78], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 72], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 12, 13]] | 1 | 380 | 4 |
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> P;
struct BIT {
vector<long long> data;
int n;
BIT(int n) : n(n) { data.resize(n + 1); }
long long sum(int i) {
long long s = 0LL;
for (int x = i + 1; x > 0; x -= x & -x)
s += data[x];
retur... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef pair<int, int> P;
struct BIT {
vector<long long> data;
int n;
BIT(int n) : n(n) { data.resize(n + 1); }
long long sum(int i) {
long long s = 0LL;
for (int x = i + 1; x > 0; x -= x & -x)
s += data[x];
retur... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 460 | 2 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int n;
pair<int, int> p[300000];
bool ok(int t) {
priority_queue<int> Q;
ll sum = 0;
for (int i = n - 1; i >= n - t + 1; i--) {
Q.push(p[i].second);
sum += p[i].second;
}
for (int i = n... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int n;
pair<int, int> p[300000];
bool ok(int t) {
priority_queue<int> Q;
ll sum = 0;
for (int i = n - 1; i >= n - t + 1; i--) {
Q.push(p[i].second);
sum += p[i].second;
}
for (int i = n... | [["-", 12, 118, 28, 69, 341, 342, 0, 16, 17, 33], ["-", 12, 118, 28, 69, 341, 342, 0, 16, 12, 13]] | 1 | 331 | 42 |
#include <bits/stdc++.h>
#define P pair<int, int>
#define int long long
using namespace std;
P a[300000];
signed main() {
int b;
cin >> b;
for (int c = 0; c < b; c++) {
scanf("%lld%lld", &a[c].first, &a[c].second);
}
sort(a, a + b, [](P n, P m) {
if (n.first != m.first)
return n.first < m.first... | #include <bits/stdc++.h>
#define P pair<int, int>
#define int long long
using namespace std;
P a[300000];
signed main() {
int b;
cin >> b;
for (int c = 0; c < b; c++) {
scanf("%lld%lld", &a[c].first, &a[c].second);
}
sort(a, a + b, [](P n, P m) {
if (n.first != m.first)
return n.first < m.first... | [["-", 8, 9, 0, 57, 64, 37, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 64, 37, 0, 16, 17, 47], ["-", 51, 218, 8, 9, 0, 37, 0, 16, 17, 20], ["+", 51, 218, 8, 9, 0, 37, 0, 16, 17, 19]] | 1 | 351 | 4 |
#include <bits/stdc++.h>
using namespace std;
#define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repl(i, 0, n)
#define mp(a, b) make_pair((a), (b))
#define pb(a) push_back((a))
#define all(x) (x).begin(), (x).end()
#define uniq(x) sort(all(x)), (x).erase(unique(all(x)), end(x))
#define fi... | #include <bits/stdc++.h>
using namespace std;
#define repl(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define rep(i, n) repl(i, 0, n)
#define mp(a, b) make_pair((a), (b))
#define pb(a) push_back((a))
#define all(x) (x).begin(), (x).end()
#define uniq(x) sort(all(x)), (x).erase(unique(all(x)), end(x))
#define fi... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 457 | 2 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(a) a.begin(), a.end()
typedef long long ll;
typedef pair<int, int> Bug;
vector<Bug> bug;
int N;
int solve(int l, int r) {
if (l + 1 == r)
return l;
int k = (l + r) / 2;
ll sumA = 0;
priority_queue<int> p... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(a) a.begin(), a.end()
typedef long long ll;
typedef pair<int, int> Bug;
vector<Bug> bug;
int N;
int solve(int l, int r) {
if (l + 1 == r)
return l;
int k = (l + r) / 2;
ll sumA = 0;
priority_queue<int> p... | [["+", 31, 16, 12, 2, 3, 4, 0, 16, 17, 72], ["+", 31, 16, 12, 2, 3, 4, 0, 16, 12, 13]] | 1 | 310 | 2 |
#include <algorithm>
#include <cstdio>
#include <set>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int n, hp[100000], emit[100000];
// num 匹の微生物を生かせるかを判定
bool check(int num) {
multiset<int> S;
ll emit_sum = 0;
for (int i = n - 1; i >= 0; i--) { // 生かす微生物の最小 HP を決... | // O(n log^2 n)
#include <algorithm>
#include <cstdio>
#include <set>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int n, hp[300000], emit[300000];
// num 匹の微生物を生かせるかを判定
bool check(int num) {
multiset<int> S;
ll emit_sum = 0;
for (int i = n - 1; i >= 0; i--) { /... | [["-", 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, 43, 49, 80, 81, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 80, 81, 13], ["-", 0, 2, 3, 4, 0, 66, 28, 118, 119, 120], ["+", 0, 2, 3, 4, 0, 66, 28, 118, 119, 120]] | 1 | 318 | 10 |
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
#define REP0(i, n) for (int i = 0; i < n; ++i)
#define REP1(i, n) for (int i = 1; i <= n; ++i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;
typedef pair<int, int> P;
struct bg {
ll a,... | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <vector>
using namespace std;
#define REP0(i, n) for (int i = 0; i < n; ++i)
#define REP1(i, n) for (int i = 1; i <= n; ++i)
#define ALL(c) (c).begin(), (c).end()
typedef long long ll;
typedef pair<int, int> P;
struct bg {
ll a,... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 706 | 2 |
import java.util.*;
public class Main {
public static void main(String[] args) {
int pasta[] = new int[3];
int juice[] = new int[2];
Scanner sc = new Scanner(System.in);
for (int i = 0; i < 3; i++) {
pasta[i] = sc.nextInt();
}
for (int i = 0; i < 2; i++) {
juice[i] = sc.nextInt();
... | import java.util.*;
public class Main {
public static void main(String[] args) {
int pasta[] = new int[3];
int juice[] = new int[2];
Scanner sc = new Scanner(System.in);
for (int i = 0; i < 3; i++) {
pasta[i] = sc.nextInt();
}
for (int i = 0; i < 2; i++) {
juice[i] = sc.nextInt();
... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 18], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 47]] | 3 | 211 | 4 |
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int men[] = new int[3];
int nomi[] = new int[2];
for (int i = 0; i < 3; i++) {
men[i] = sc.nextInt();
}
for (int j = 0; j < 2; j++) {
nomi[j] = sc.nextInt();
}
... | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int men[] = new int[3];
int nomi[] = new int[2];
for (int i = 0; i < 3; i++) {
men[i] = sc.nextInt();
}
for (int j = 0; j < 2; j++) {
nomi[j] = sc.nextInt();
}
... | [["+", 8, 196, 0, 503, 49, 200, 51, 16, 17, 33], ["+", 8, 196, 0, 503, 49, 200, 51, 16, 12, 499]] | 3 | 281 | 2 |
#include <stdio.h>
int main(void) {
int ne[6];
int ans[2];
int i;
for (i = 0; i < 5; i++) {
scanf("%d", &ne[i]);
}
if (ne[0] < ne[1] && ne[0] < ne[2])
ans[0] = ne[0];
if (ne[1] < ne[0] && ne[1] < ne[2])
ans[0] = ne[1];
else
ans[0] = ne[2];
if (ne[3] < ne[4])
ans[1] = ne[3];
... | #include <stdio.h>
int main(void) {
int ne[6];
int ans[2];
int i;
for (i = 0; i < 5; i++) {
scanf("%d", &ne[i]);
}
if (ne[0] < ne[1] && ne[0] < ne[2])
ans[0] = ne[0];
else if (ne[1] < ne[0] && ne[1] < ne[2])
ans[0] = ne[1];
else
ans[0] = ne[2];
if (ne[3] < ne[4])
ans[1] = ne[3... | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95]] | 0 | 183 | 1 |
#include <stdio.h>
int min(int a, int b) {
if (a < b)
return a;
else
return b;
}
int main() {
int P = 10000, p, J = 10000, j, i;
for (i = 0; i < 3; i++) {
scanf("%d", &p);
P = min(P, p);
}
for (i = 0; i < 2; i++) {
scanf("%d", &j);
J = min(J, j);
}
printf("%d\n", P + J);
return... | #include <stdio.h>
int min(int a, int b) {
if (a < b)
return a;
else
return b;
}
int main() {
int P = 10000, p, J = 10000, j, i;
for (i = 0; i < 3; i++) {
scanf("%d", &p);
P = min(P, p);
}
for (i = 0; i < 2; i++) {
scanf("%d", &j);
J = min(J, j);
}
printf("%d\n", P + J - 50);
r... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 130 | 2 |
#include <stdio.h>
int main(void) {
int p[3], j[2];
int i, n;
int min = 5000;
for (i = 0; i < 3; i++) {
scanf("%d", &p[i]);
}
for (i = 0; i < 2; i++) {
scanf("%d", &j[i]);
}
for (i = 0; i < 3; i++) {
for (n = 0; n < 2; n++) {
if (min > p[i] + j[n])
min = p[i] + j[n];
els... | #include <stdio.h>
int main(void) {
int p[3], j[2];
int i, n;
int min = 5000;
for (i = 0; i < 3; i++) {
scanf("%d", &p[i]);
}
for (i = 0; i < 2; i++) {
scanf("%d", &j[i]);
}
for (i = 0; i < 3; i++) {
for (n = 0; n < 2; n++) {
if (min > p[i] + j[n])
min = p[i] + j[n];
els... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 157 | 2 |
#include <stdio.h>
int main(void) {
int pas[3], lpas, ju[2], lju, i, j;
for (i = 0; i < 3; i++) {
scanf("%d", &pas[i]);
if (i == 0)
lpas = pas[0];
if (lpas > pas[i])
lpas = pas[i];
}
for (j = 0; j < 2; j++) {
scanf("%d", &ju[j]);
if (j == 0)
lju = ju[0];
if (lju > ju[i]... | #include <stdio.h>
int main(void) {
int pas[3], lpas, ju[2], lju, i, j;
for (i = 0; i < 3; i++) {
scanf("%d", &pas[i]);
if (i == 0)
lpas = pas[0];
if (lpas > pas[i])
lpas = pas[i];
}
for (j = 0; j < 2; j++) {
scanf("%d", &ju[j]);
if (j == 0)
lju = ju[0];
if (lju > ju[j]... | [["-", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["+", 0, 57, 15, 23, 0, 16, 12, 69, 71, 22], ["-", 0, 57, 64, 1, 0, 11, 12, 69, 71, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 69, 71, 22]] | 0 | 159 | 4 |
#include <stdio.h>
int main(void) {
int pas[3], ju1, ju2, i, box1, box2;
for (i = 0; i < 3; i++)
scanf("%d", &pas[i]);
scanf("%d%d", &ju1, &ju2);
if (pas[0] < pas[1] && pas[0] < pas[2])
box1 = pas[0];
if (pas[0] < pas[1] && pas[0] > pas[2])
box1 = pas[2];
if (pas[0] > pas[1] && pas[0] < pas[2])
... | #include <stdio.h>
int main(void) {
int pas[3], ju1, ju2, i, box1, box2;
for (i = 0; i < 3; i++)
scanf("%d", &pas[i]);
scanf("%d%d", &ju1, &ju2);
if (pas[0] < pas[1] && pas[0] < pas[2])
box1 = pas[0];
else if (pas[0] < pas[1] && pas[0] > pas[2])
box1 = pas[2];
else if (pas[0] > pas[1] && pas[0] ... | [["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]] | 0 | 213 | 2 |
#include <stdio.h>
int main(void) {
int a, b, c, x, y, m, n, sum;
scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
if (a <= b)
m = a;
else if (b <= c)
m = b;
else
m = c;
if (x <= y)
n = x;
else
n = y;
sum = m + n - 50;
printf("%d\n", sum);
return 0;
} | #include <stdio.h>
int main(void) {
int a, b, c, x, y, m, n, sum;
scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
if (a <= b && a <= c)
m = a;
else if (b <= c)
m = b;
else
m = c;
if (x <= y)
n = x;
else
n = y;
sum = m + n - 50;
printf("%d\n", sum);
return 0;
} | [["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 98], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 12, 22]] | 0 | 110 | 4 |
#include <stdio.h>
int main(void) {
int a, b, c;
scanf("%d%d%d%d%d", &a, &b, &c);
if (a > b) {
a = b;
}
if (a > c) {
a = c;
}
scanf("%d%d%d", &b, &c);
if (b > c) {
b = c;
}
printf("%d\n", a + b - 50);
return 0;
} | #include <stdio.h>
int main(void) {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if (a > b) {
a = b;
}
if (a > c) {
a = c;
}
scanf("%d%d", &b, &c);
if (b > c) {
b = c;
}
printf("%d\n", a + b - 50);
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 98 | 4 |
a;
main(b, c, d, e) {
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
a = !printf("%d\n", ((c < (a < b ? a : b) ? c
: a < b
? a
: b) + d <
e
? d
: e) -
... | a;
main(b, c, d, e) {
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
a = !printf("%d\n",
((c < (a < b ? a : b) ? c : (a < b ? a : b)) + (d < e ? d : e)) -
50);
} | [["+", 0, 16, 31, 23, 0, 41, 75, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 41, 75, 23, 0, 25], ["+", 0, 16, 31, 23, 0, 16, 12, 23, 0, 24], ["+", 0, 16, 31, 23, 0, 16, 12, 23, 0, 25]] | 0 | 84 | 4 |
#include <stdio.h>
int main(void) {
int a, b, c, d, e, f, g, h;
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
if (a <= b && b <= c) {
f = a;
} else if (a <= c && c <= b) {
f = a;
} else if (b <= c && c <= a) {
f = b;
} else if (b <= a && a <= c) {
f = b;
} else if (c <= a && a <= b) {
f = ... | #include <stdio.h>
int main(void) {
int a, b, c, d, e, f, g, h;
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
if (a <= b && b <= c) {
f = a;
} else if (a <= c && c <= b) {
f = a;
} else if (b <= c && c <= a) {
f = b;
} else if (b <= a && a <= c) {
f = b;
} else if (c <= a && a <= b) {
f = ... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 19], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 19]] | 0 | 195 | 4 |
#include <stdio.h>
int main(void) {
int a[5], i, t, u;
for (i = 0; i < 5; i++) {
scanf("%d", &a[i]);
}
if (a[0] < a[1] && a[0] < a[2]) {
t = a[0];
} else if (a[1] < a[0] && a[1] < a[2]) {
t = a[1];
} else {
t = a[2];
}
if (a[3] < a[4]) {
u = a[3];
} else {
u = a[4];
}
print... | #include <stdio.h>
int main(void) {
int a[5], i, t, u;
for (i = 0; i < 5; i++) {
scanf("%d", &a[i]);
}
if (a[0] < a[1] && a[0] < a[2]) {
t = a[0];
} else if (a[1] < a[0] && a[1] < a[2]) {
t = a[1];
} else {
t = a[2];
}
if (a[3] < a[4]) {
u = a[3];
} else {
u = a[4];
}
print... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 168 | 2 |
#include <stdio.h>
int main(void) {
int pasta[3];
int juice[2];
int pastaMin;
int juiceMin;
int i;
pastaMin = 2001;
for (i = 0; i < 3; i++) {
scanf("%d", &pasta[i]);
if (pastaMin < pasta[i]) {
pastaMin = pasta[i];
}
}
juiceMin = 2001;
for (i = 0; i < 2; i++) {
scanf("%d", &j... | #include <stdio.h>
int main(void) {
int pasta[3];
int juice[2];
int pastaMin;
int juiceMin;
int i;
pastaMin = 2001;
for (i = 0; i < 3; i++) {
scanf("%d", &pasta[i]);
if (pastaMin > pasta[i]) {
pastaMin = pasta[i];
}
}
juiceMin = 2001;
for (i = 0; i < 2; i++) {
scanf("%d", &j... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47]] | 0 | 149 | 4 |
i;
a[9];
b = 1e5;
main(j) {
for (; i - 5;)
scanf("%d", a + i++);
for (i = -1; ++i - 5; b = b > j ? j : b)
j = a[i % 3] + a[3 + i / 3] - 50;
printf("%d", b);
return 0;
} | i;
a[9];
b = 1e5;
main(j) {
for (; i - 5;)
scanf("%d", a + i++);
for (i = -1; ++i - 6; b = b > j ? j : b)
j = a[i % 3] + a[3 + i / 3] - 50;
printf("%d\n", b);
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44]] | 0 | 90 | 3 |
#define m(a, b) a < b ? a : b
main(a, b, c, d, e) {
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
b = m(a, b);
printf("%d\n", m(b, c) + m(d, e) - 50);
return 0;
} | #define m(a, b) (a < b ? a : b)
main(a, b, c, d, e) {
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
b = m(a, b);
printf("%d\n", m(b, c) + m(d, e) - 50);
return 0;
} | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 0 | 81 | 2 |
#include <stdio.h>
int main() {
int a, b, c, d, e;
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
a = a > b ? b : a > c ? c : a;
d = d > e ? e : d;
printf("%d\n", -50 + a + d);
return 0;
} | #include <stdio.h>
int main() {
int a, b, c, d, e;
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
a = a > b ? b > c ? c : b : a > c ? c : a;
d = d > e ? e : d;
printf("%d\n", -50 + a + d);
return 0;
} | [["+", 0, 11, 12, 41, 64, 41, 15, 16, 17, 47], ["+", 0, 11, 12, 41, 64, 41, 15, 16, 12, 22], ["+", 0, 1, 0, 11, 12, 41, 64, 41, 0, 101], ["+", 0, 1, 0, 11, 12, 41, 64, 41, 64, 22], ["+", 0, 1, 0, 11, 12, 41, 64, 41, 0, 102], ["+", 0, 1, 0, 11, 12, 41, 64, 41, 75, 22]] | 0 | 84 | 6 |
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int n, k;
int dp[102][4][2];
int yt[102];
void debug() {
for (int d = 0; d <= n; d++) {
printf("%2d ", d);
for (int i = 1; i <= 3; i++) {
printf("(%5d,%5d) ", d, dp[d][i][0], dp[d][i][1]);
}
cout << endl;
}
}
int ... | #include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
int n, k;
int dp[102][4][2];
int yt[102];
void debug() {
for (int d = 0; d <= n; d++) {
printf("%2d ", d);
for (int i = 1; i <= 3; i++) {
printf("(%5d,%5d) ", d, dp[d][i][0], dp[d][i][1]);
}
cout << endl;
}
}
int ... | [["-", 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]] | 1 | 478 | 4 |
#include <iostream>
#include <string.h>
using namespace std;
int dp[101][4][4]; //何日目から、どのぱすたを、何日連続で食べているか
int plan[101]; //先に決められている予定 要素:日付
#define MOD 10000;
int main(void) {
int day;
int k;
cin >> day >> k;
memset(plan, 0, sizeof(plan));
for (int i = 0; i < k; ++i) {
int d, p;
cin >> d >> p;
... | #include <iostream>
#include <string.h>
using namespace std;
int dp[101][4][4]; //何日目から、どのぱすたを、何日連続で食べているか
int plan[101]; //先に決められている予定 要素:日付
#define MOD 10000;
int main(void) {
int day;
int k;
cin >> day >> k;
memset(plan, 0, sizeof(plan));
for (int i = 0; i < k; ++i) {
int d, p;
cin >> d >> p;
... | [["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 24], ["+", 0, 43, 49, 50, 51, 16, 31, 23, 0, 25], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 109], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 1 | 542 | 4 |
#include <cstdio>
#include <cstring>
#define MOD (10000)
using namespace std;
int sum(int *p) { return (p[0] + p[1]); }
int main(void) {
int n, k;
static int dp[100][3][2];
int done[100];
scanf("%d %d", &n, &k);
memset(done, -1, sizeof(done));
for (int i = 0; i < k; i++) {
int a, b;
scanf("%d ... | #include <cstdio>
#include <cstring>
#define MOD (10000)
using namespace std;
int sum(int *p) { return (p[0] + p[1]); }
int main(void) {
int n, k;
static int dp[100][3][2];
int done[100];
scanf("%d %d", &n, &k);
memset(done, -1, sizeof(done));
for (int i = 0; i < k; i++) {
int a, b;
scanf("%d ... | [["-", 28, 69, 341, 342, 0, 69, 341, 342, 0, 22], ["+", 28, 69, 341, 342, 0, 69, 341, 342, 0, 13]] | 1 | 451 | 2 |
#include <stdio.h>
int field[105][105], n, m;
int dfs(int x, int y) {
if (x < 0 || x > n + 2 || y < 0 || y > m + 1)
return 0;
if (field[x][y] == 1)
return 1;
if (field[x][y] == 2)
return 0;
int res = 0;
field[x][y] = 2;
res += dfs(x, y + 1);
res += dfs(x, y - 1);
res += dfs(x + 1, y);
re... | #include <stdio.h>
int field[105][105], n, m;
int dfs(int x, int y) {
if (x < 0 || x > m + 2 || y < 0 || y > n + 2)
return 0;
if (field[x][y] == 1)
return 1;
if (field[x][y] == 2)
return 0;
int res = 0;
field[x][y] = 2;
res += dfs(x, y + 1);
res += dfs(x, y - 1);
res += dfs(x + 1, y);
re... | [["-", 31, 16, 31, 16, 12, 16, 12, 16, 31, 22], ["+", 31, 16, 31, 16, 12, 16, 12, 16, 31, 22], ["-", 15, 23, 0, 16, 12, 16, 12, 16, 31, 22], ["+", 15, 23, 0, 16, 12, 16, 12, 16, 31, 22], ["-", 15, 23, 0, 16, 12, 16, 12, 16, 12, 13], ["+", 15, 23, 0, 16, 12, 16, 12, 16, 12, 13]] | 0 | 296 | 6 |
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
constexpr int mod = 10000000;
constexpr int MAX_DIGIT = 500;
constexpr int MAX_M = 500;
int dp[MAX_DIGIT + 1][MAX_M][10][2]
[2]; // digit, modulo m, prev, less flag, zig-zag flag
int calc(const string &limit, int m) {
const int n ... | #include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
constexpr int mod = 10000;
constexpr int MAX_DIGIT = 500;
constexpr int MAX_M = 500;
int dp[MAX_DIGIT + 1][MAX_M][10][2]
[2]; // digit, modulo m, prev, less flag, zig-zag flag
int calc(const string &limit, int m) {
const int n = l... | [["-", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13], ["+", 36, 36, 0, 30, 0, 43, 49, 50, 51, 13]] | 1 | 693 | 2 |
#include <iostream>
#include <numeric>
#include <vector>
using namespace std;
class range {
private:
struct Iterator {
int val;
int operator*() { return val; }
bool operator!=(Iterator &itr) { return val < itr.val; }
void operator++() { ++val; }
};
Iterator i, n;
public:
range(int n) : i({0})... | #include <iostream>
#include <numeric>
#include <vector>
using namespace std;
class range {
private:
struct Iterator {
int val;
int operator*() { return val; }
bool operator!=(Iterator &itr) { return val < itr.val; }
void operator++() { ++val; }
};
Iterator i, n;
public:
range(int n) : i({0})... | [["-", 0, 57, 64, 338, 8, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 338, 8, 1, 0, 11, 17, 107]] | 1 | 1,809 | 4 |
#include <bits/stdc++.h>
using namespace std;
#define DUMP(x) cerr << #x << "=" << x << endl
#define DUMP2(x, y) \
cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")" << endl
#define BINARY(x) static_cast<bitset<16>>(x)
#define rep(i, n) for... | #include <bits/stdc++.h>
using namespace std;
#define DUMP(x) cerr << #x << "=" << x << endl
#define DUMP2(x, y) \
cerr << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")" << endl
#define BINARY(x) static_cast<bitset<16>>(x)
#define rep(i, n) for... | [["-", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 22]] | 1 | 584 | 4 |
#include <bits/stdc++.h>
#define MOD 10000
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int dp[502][2][10][500][3], m, len[2];
char S[2][550];
int solve(int o) {
memset(dp, 0, sizeof(dp));
dp[0][0][0][0][0] = 1;
rep(i, len[o]) rep(j, 2) rep(k, 10) rep(l, m) rep(d, 3) {
if (dp[i][j][k][l... | #include <bits/stdc++.h>
#define MOD 10000
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
int dp[502][2][10][500][3], m, len[2];
char S[2][550];
int solve(int o) {
memset(dp, 0, sizeof(dp));
dp[0][0][0][0][0] = 1;
rep(i, len[o]) rep(j, 2) rep(k, 10) rep(l, m) rep(d, 3) {
if (dp[i][j][k][l... | [["-", 28, 69, 28, 69, 28, 69, 341, 342, 0, 13], ["+", 28, 69, 28, 69, 28, 69, 341, 342, 0, 22]] | 1 | 506 | 2 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <string>
const int MOD = 10000;
std::string a, b; // <=1e500
int m; // <=500
int dp[2][2][510][510][15][3];
char Ch(int i) { return '0' + i; }
int func(bool lower, bool upper, int mod, int idx, int prev,
int stat) { // stat: 0:... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <string>
const int MOD = 10000;
std::string a, b; // <=1e500
int m; // <=500
int dp[2][2][510][510][15][3];
char Ch(int i) { return '0' + i; }
int func(bool lower, bool upper, int mod, int idx, int prev,
int stat) { // stat: 0:... | [["+", 28, 69, 28, 69, 341, 342, 0, 16, 17, 85], ["+", 28, 69, 28, 69, 341, 342, 0, 16, 12, 13]] | 1 | 555 | 2 |
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <time.h>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <time.h>
#include... | [["-", 49, 80, 49, 80, 49, 80, 49, 80, 81, 13], ["+", 49, 80, 49, 80, 49, 80, 49, 80, 81, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 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, 7, 8, 7, 8, 7, 15, 16, 12, 13], ["+", 0, 7, 8... | 1 | 1,023 | 8 |
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, L;
int hi, tuki;
float fhi, ftuki;
cin >> L >> a >> b >> c >> d;
hi = a / c;
fhi = (float)a / c;
tuki = b / d;
ftuki = (float)b / d;
if (hi < fhi) {
fhi++;
}
if (tuki < ftuki) {
ftuki++;
}
if (hi > tuki) {
cout ... | #include <iostream>
using namespace std;
int main() {
int a, b, c, d, L;
int hi, tuki;
float fhi, ftuki;
cin >> L >> a >> b >> c >> d;
hi = a / c;
fhi = (float)a / c;
tuki = b / d;
ftuki = (float)b / d;
if (hi < fhi) {
hi++;
}
if (tuki < ftuki) {
tuki++;
}
if (hi > tuki) {
cout <<... | [["-", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 27, 28, 22]] | 1 | 131 | 4 |
#include <iostream>
using namespace std;
int main() {
int L, A, B, C, D, K, E, F;
cin >> L >> A >> B >> C >> D;
E = A / C;
F = B / D;
if (A % C > 0) {
E += 1;
}
if (B % D > 0) {
F += 1;
}
if (E < F) {
K = L - E;
} else
K = L - F;
cout << K << '\n';
return 0;
} | #include <iostream>
using namespace std;
int main() {
int L, A, B, C, D, K, E, F;
cin >> L >> A >> B >> C >> D;
E = A / C;
F = B / D;
if (A % C > 0) {
E += 1;
}
if (B % D > 0) {
F += 1;
}
if (E > F) {
K = L - E;
} else
K = L - F;
cout << K << '\n';
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 113 | 2 |
#include <iostream>
using namespace std;
int main() {
int L, A, B, C, D, a, b;
cin >> L;
cin >> A;
cin >> B;
cin >> C;
cin >> D;
a = A / C;
b = B / D;
if (A % C > 0)
a++;
if (B % D > 0)
b++;
if (a > b)
cout << L - a << '\n';
if (a < b)
cout << L - b << '\n';
return 0;
} | #include <iostream>
using namespace std;
int main() {
int L, A, B, C, D, a, b;
cin >> L;
cin >> A;
cin >> B;
cin >> C;
cin >> D;
a = A / C;
b = B / D;
if (A % C > 0)
a++;
if (B % D > 0)
b++;
if (a > b)
cout << L - a << '\n';
else
cout << L - b << '\n';
return 0;
} | [["-", 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, 18], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["-", 0, 14, 8, 9, 0, 57, 15, 339, 0, 25], ["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95]] | 1 | 116 | 7 |
#include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
int main() {
int l, a, b, c, d;
cin >> l >> a >> b >> c >> d;
int day = max(ceil((double)a / c), ceil((double)c / d));
int ans = l - day;
cout << ans << endl;
return 0;
} | #include <algorithm>
#include <cmath>
#include <iostream>
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); ++i)
int main() {
int l, a, b, c, d;
cin >> l >> a >> b >> c >> d;
int day = max(ceil((double)a / c), ceil((double)b / d));
int ans = l - day;
cout << ans << endl;
return 0;
} | [["-", 0, 2, 3, 4, 0, 16, 31, 74, 51, 22], ["+", 0, 2, 3, 4, 0, 16, 31, 74, 51, 22]] | 1 | 89 | 2 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
cout << a - max(b / d + (b % c == 0 ? 0 : 1), c / e + (c % e == 0 ? 0 : 1))
<< endl;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, e;
cin >> a >> b >> c >> d >> e;
cout << a - max(b / d + (b % d == 0 ? 0 : 1), c / e + (c % e == 0 ? 0 : 1))
<< endl;
} | [["-", 12, 23, 0, 41, 15, 16, 31, 16, 12, 22], ["+", 12, 23, 0, 41, 15, 16, 31, 16, 12, 22]] | 1 | 78 | 2 |
#include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T> using Table = vector<vector<T>>;
const ld eps = 1e-9;
//// < "D:\D_Download\Visual Studio
///2015\Projects\programing_contest_c++\Debug\a.txt" > "D:... | #include "bits/stdc++.h"
#include <unordered_map>
#include <unordered_set>
#pragma warning(disable : 4996)
using namespace std;
using ld = long double;
template <class T> using Table = vector<vector<T>>;
const ld eps = 1e-9;
//// < "D:\D_Download\Visual Studio
///2015\Projects\programing_contest_c++\Debug\a.txt" > "D:... | [["-", 51, 16, 31, 16, 31, 23, 0, 16, 17, 72], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 33]] | 1 | 116 | 4 |
#include <iostream>
using namespace std;
int main() {
int l, a, b, c, d, e, f, m;
cin >> l >> a >> b >> c >> d;
e = a / c;
m = a % c;
if (m != 0)
e++;
f = b / d;
m = b % c;
if (m != 0)
f++;
if (e > f) {
cout << l - e << endl;
} else {
cout << l - f << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int l, a, b, c, d, e, f, m;
cin >> l >> a >> b >> c >> d;
e = a / c;
m = a % c;
if (m != 0)
e++;
f = b / d;
m = b % d;
if (m != 0)
f++;
if (e > f) {
cout << l - e << endl;
} else {
cout << l - f << endl;
}
return 0;
} | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 113 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e;
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
(b % d) ? (b = b / d + 1) : (b = b / d);
(c % e) ? (c = c / e + 1) : (c = c / e);
printf("%d\n", 20 - max(b, c));
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e;
scanf("%d%d%d%d%d", &a, &b, &c, &d, &e);
(b % d) ? (b = b / d + 1) : (b = b / d);
(c % e) ? (c = c / e + 1) : (c = c / e);
printf("%d\n", a - max(b, c));
} | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22]] | 1 | 110 | 2 |
#include <iostream>
using namespace std;
int main() {
int l, a, b, c, d;
cin >> l >> a >> b >> c >> d;
while (a > 0 && b > 0) {
a -= c;
b -= d;
--l;
}
cout << l << endl;
} | #include <iostream>
using namespace std;
int main() {
int l, a, b, c, d;
cin >> l >> a >> b >> c >> d;
while (a > 0 || b > 0) {
a -= c;
b -= d;
--l;
}
cout << l << endl;
} | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]] | 1 | 64 | 2 |
#include <iostream>
using namespace std;
int main() {
int l, a, b, c, d;
cin >> l >> a >> b >> c >> d;
while (a > 0 && b > 0) {
a -= c;
b -= d;
l--;
}
cout << l << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int l, a, b, c, d;
cin >> l >> a >> b >> c >> d;
while (a > 0 || b > 0) {
a -= c;
b -= d;
l--;
}
cout << l << endl;
return 0;
} | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 106]] | 1 | 67 | 2 |
#define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << o << endl; ... | #define _USE_MATH_DEFINES
#include "bits/stdc++.h"
using namespace std;
//#define int long long
#define DBG 1
#define dump(o) \
if (DBG) { \
cerr << #o << " " << o << endl; ... | [["+", 12, 2, 3, 4, 0, 16, 31, 23, 0, 25], ["-", 12, 16, 12, 2, 3, 4, 0, 23, 0, 25]] | 1 | 161 | 4 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, l;
cin >> l >> a >> b >> c >> d;
int da = a / c;
if (a - da * c > 0)
da++;
int db = b / d;
if (b - da * d > 0)
db++;
cout << l - max(da, db) << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, l;
cin >> l >> a >> b >> c >> d;
int da = a / c;
if (a - da * c > 0)
da++;
int db = b / d;
if (b - db * d > 0)
db++;
cout << l - max(da, db) << endl;
return 0;
} | [["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22]] | 1 | 93 | 2 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int l;
int a, b;
int c, d;
int ans;
int j, m;
scanf(" %d %d %d %d %d", &l, &a, &b, &c, &d);
j = m = 0;
if (a % c != 0) {
j = 1;
}
if (b % d != 0) {
m = 1;
}
ans = max(a / b + j, b / d + m);
... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int l;
int a, b;
int c, d;
int ans;
int j, m;
scanf(" %d %d %d %d %d", &l, &a, &b, &c, &d);
j = m = 0;
if (a % c != 0) {
j = 1;
}
if (b % d != 0) {
m = 1;
}
ans = max(a / c + j, b / d + m);
... | [["-", 12, 2, 3, 4, 0, 16, 31, 16, 12, 22], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 12, 22]] | 1 | 125 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int homework[5] = {
0}; //{ day , Japanese , Math , maxJapanesePage , maxMathPage }
int freeday = 0;
for (int i = 0; i < 5; i++) {
cin >> homework[i];
}
freeday = homework[0] - max(ceil((double)homework[1] / homework[3]),
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int homework[5] = {
0}; //{ day , Japanese , Math , maxJapanesePage , maxMathPage }
int freeday = 0;
for (int i = 0; i < 5; i++) {
cin >> homework[i];
}
freeday = homework[0] - max(ceil((double)homework[1] / homework[3]),
... | [["-", 0, 16, 31, 74, 51, 69, 341, 342, 0, 13], ["+", 0, 16, 31, 74, 51, 69, 341, 342, 0, 13]] | 1 | 102 | 2 |
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
int L, A, B, C, D, AC, BD;
cin >> L >> A >> B >> C >> D;
if (A % C == 0)
AC = L - (A / C);
else
AC = L - (A / C + 1);
if (B % D == 0)
BD = L - (B / D);
else
BD = L - (B / D + 1);
if (AC > BD)
cout << AC << e... | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int L, A, B, C, D, AC, BD;
cin >> L >> A >> B >> C >> D;
if (A % C == 0)
AC = L - (A / C);
else
AC = L - (A / C + 1);
if (B % D == 0)
BD = L - (B / D);
else
BD = L - (B / D + 1);
if (AC < BD)
cout << AC << e... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 122 | 2 |
#include <stdio.h>
int main(void) {
int l, a, b, c, d, x, y, z;
scanf("%d %d %d %d %d", &l, &a, &b, &c, &d);
x = a % c;
if (a % c > 0) {
x + 1;
}
y = b % d;
if (b % d > 0) {
y + 1;
}
if (x > y) {
z = l - x;
} else {
z = l - y;
}
printf("%d\n", z);
return 0;
} | #include <stdio.h>
int main(void) {
int l, a, b, c, d, x, y, z;
scanf("%d %d %d %d %d", &l, &a, &b, &c, &d);
x = a / c;
if (a % c > 0) {
x += 1;
}
y = b / d;
if (b % d > 0) {
y += 1;
}
if (x > y) {
z = l - x;
} else {
z = l - y;
}
printf("%d\n", z);
return 0;
} | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 72], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 107]] | 1 | 124 | 8 |
#include <iostream>
using namespace std;
int main() {
int a, b, c, d, l, x, y, z;
cin >> l >> a >> b >> c >> d;
if (a % c > 0) {
x = a / c + 1;
} else {
x = a / c;
}
if (b % d > 0) {
x = b / d + 1;
} else {
x = b / d;
}
z = max(x, y);
cout << l - z << endl;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, b, c, d, l, x, y, z;
cin >> l >> a >> b >> c >> d;
if (a % c > 0) {
x = a / c + 1;
} else {
x = a / c;
}
if (b % d > 0) {
y = b / d + 1;
} else {
y = b / d;
}
z = max(x, y);
cout << l - z << endl;
return 0;
}
| [["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["-", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22], ["+", 75, 76, 0, 9, 0, 1, 0, 11, 31, 22]] | 1 | 115 | 4 |
#include <iostream>
#include <string>
using namespace std;
int main() {
/*
int a,b,c,d,e;
cin >> a >> b >> c >> d >> e;
int x;
if(a > 0){
x = e*(b-a);
}
if(a == 0){
x = e*b + d;
}
if(a < 0){
x = -c*a + e*b + d;
}
cout << x <<endl;
*/
/*
int a,b,c,d,e,f;
... | #include <iostream>
#include <string>
using namespace std;
int main() {
/*
int a,b,c,d,e;
cin >> a >> b >> c >> d >> e;
int x;
if(a > 0){
x = e*(b-a);
}
if(a == 0){
x = e*b + d;
}
if(a < 0){
x = -c*a + e*b + d;
}
cout << x <<endl;
*/
/*
int a,b,c,d,e,f;
... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 22]] | 1 | 111 | 2 |
#include <iostream>
using namespace std;
int main() {
int L, A, B, C, D;
cin >> L >> A >> B >> C >> D;
cout << L - max((A + C - 1) / C, (B + D - 1) / B) << endl;
} | #include <iostream>
using namespace std;
int main() {
int L, A, B, C, D;
cin >> L >> A >> B >> C >> D;
cout << L - max((A + C - 1) / C, (B + D - 1) / D) << endl;
} | [["-", 12, 16, 12, 2, 3, 4, 0, 16, 12, 22], ["+", 12, 16, 12, 2, 3, 4, 0, 16, 12, 22]] | 1 | 64 | 2 |
#include <iostream>
using namespace std;
int main(void) {
int l, a, b, c, d, p, q, ans;
cin >> l >> a >> b >> c >> d;
p = a / c;
a = a % c;
p += (a) ? 1 : 0;
q = b / d;
b = b % c;
q += (b) ? 1 : 0;
cout << l - ((p > q) ? p : q) << endl;
return 0;
} | #include <iostream>
using namespace std;
int main(void) {
int l, a, b, c, d, p, q, ans;
cin >> l >> a >> b >> c >> d;
p = a / c;
a = a % c;
p += (a) ? 1 : 0;
q = b / d;
b = b % d;
q += (b) ? 1 : 0;
cout << l - ((p > q) ? p : q) << endl;
return 0;
} | [["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 22]] | 1 | 107 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)... | [["-", 0, 16, 12, 23, 0, 16, 31, 16, 12, 22], ["+", 0, 16, 12, 23, 0, 16, 31, 16, 12, 22]] | 1 | 116 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define reep(n1, n2, n3) for (int n1 = n3; n1 < n2; n1++)
#define rep(n1, n2) reep(n1, n2, 0)
#define... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define reep(n1, n2, n3) for (int n1 = n3; n1 < n2; n1++)
#define rep(n1, n2) reep(n1, n2, 0)
#define... | [["+", 3, 4, 0, 16, 31, 23, 0, 16, 17, 33], ["+", 3, 4, 0, 16, 31, 23, 0, 16, 12, 13]] | 1 | 194 | 4 |
#include <iostream>
using namespace std;
int main() {
int natu, suugaku, kokugo, suu, koku;
cin >> natu >> kokugo >> suugaku >> koku >> suu;
int km = (kokugo / koku);
if (kokugo % koku > 0)
km++;
int sm = (suugaku / suu);
if (suugaku % suu > 0)
suu++;
if (km > sm) {
cout << natu - km << endl;
... | #include <iostream>
using namespace std;
int main() {
int natu, suugaku, kokugo, suu, koku;
cin >> natu >> kokugo >> suugaku >> koku >> suu;
int km = (kokugo / koku);
if (kokugo % koku > 0)
km++;
int sm = (suugaku / suu);
if (suugaku % suu > 0)
sm++;
if (km > sm) {
cout << natu - km << endl;
... | [["-", 8, 9, 0, 57, 64, 1, 0, 27, 28, 22], ["+", 8, 9, 0, 57, 64, 1, 0, 27, 28, 22]] | 1 | 105 | 2 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int p, a, b, c, d, x, y;
cin >> p;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
x = a / c;
if (a % c)
x++;
y = b / d;
if (b & d)
y++;
cout << p - max(x, y) << endl;
return 0;
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int p, a, b, c, d, x, y;
cin >> p;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
x = a / c;
if (a % c)
x++;
y = b / d;
if (b % d)
y++;
cout << p - max(x, y) << endl;
return 0;
} | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 67], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 109]] | 1 | 95 | 2 |
#include <stdio.h>
#define max(A, B) (A > B ? A : B)
int l, a, b, c, d;
main() {
scanf("%d%d%d%d%d", &l, &a, &b, &c, &d);
printf("%d\n", l - max(a / c + !!a % c, b / d + !!b % d));
return 0;
} | #include <stdio.h>
#define max(A, B) (A > B ? A : B)
int l, a, b, c, d;
main() {
scanf("%d%d%d%d%d", &l, &a, &b, &c, &d);
printf("%d\n", l - max(a / c + !!(a % c), b / d + !!(b % d)));
return 0;
} | [["+", 0, 16, 12, 91, 28, 91, 28, 23, 0, 24], ["+", 0, 16, 12, 91, 28, 91, 28, 23, 0, 25]] | 1 | 84 | 4 |
l=gets.chomp.to_i
a=gets.chomp.to_i
b=gets.chomp.to_i
c=gets.chomp.to_i
d=gets.chomp.to_i
m=a/c
n=b/d
if a%c>0
m+=1
end
if b%d>0
n+=1
end
puts 1-[m,n].max | l=gets.chomp.to_i
a=gets.chomp.to_i
b=gets.chomp.to_i
c=gets.chomp.to_i
d=gets.chomp.to_i
m=a/c
n=b/d
if a%c>0
m+=1
end
if b%d>0
n+=1
end
puts l-[m,n].max | [["-", 0, 493, 0, 652, 3, 4, 0, 738, 31, 612], ["+", 0, 493, 0, 652, 3, 4, 0, 738, 31, 22]] | 4 | 75 | 2 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
using namespace std;
const long double eps = 1e-12;
typedef long long ll;
typedef pair<int, int> pt;
#define sz(a) ((int)a.size())
#define... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
using namespace std;
const long double eps = 1e-12;
typedef long long ll;
typedef pair<int, int> pt;
#define sz(a) ((int)a.size())
#define... | [["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 1,331 | 2 |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int l = sc.nextInt();
double a = sc.nextInt();
double b = sc.nextInt();
double c = sc.nextInt();
double d = sc.nextInt();
int j, m;
j = (int)Math.ceil(a / c);
... |
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int l = sc.nextInt();
double a = sc.nextInt();
double b = sc.nextInt();
double c = sc.nextInt();
double d = sc.nextInt();
int j, m;
j = (int)Math.ceil(a / c);
... | [["+", 64, 1, 0, 492, 3, 4, 0, 16, 31, 22], ["+", 64, 1, 0, 492, 3, 4, 0, 16, 17, 33], ["+", 75, 1, 0, 492, 3, 4, 0, 16, 31, 22], ["+", 75, 1, 0, 492, 3, 4, 0, 16, 17, 33]] | 3 | 138 | 4 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int l = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = sc.nextInt();
int l1 = a / c;
int l2 = b / d;
if (a % c != 0)
... | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int l = sc.nextInt();
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
int d = sc.nextInt();
int l1 = a / c;
int l2 = b / d;
if (a % c != 0)
... | [["+", 0, 1, 0, 492, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 33]] | 3 | 137 | 2 |
#include <stdio.h>
int max(int a, int b) {
if (a >= b)
return a;
return b;
}
int main() {
int a, b, c, d, e;
int n, m;
scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
if (b % d)
n = b / d + 1;
else
n = b / d;
if (c / e)
m = c / e + 1;
else
m = c / e;
printf("%d\n", a - max(n, m));
... | #include <stdio.h>
int max(int a, int b) {
if (a >= b)
return a;
return b;
}
int main() {
int a, b, c, d, e;
int n, m;
scanf("%d %d %d %d %d", &a, &b, &c, &d, &e);
if (b % d)
n = b / d + 1;
else
n = b / d;
if (c % e)
m = c / e + 1;
else
m = c / e;
printf("%d\n", a - max(n, m));
... | [["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 85], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 109]] | 0 | 131 | 2 |
#include <math.h>
#include <stdio.h>
int main() {
int a, b, c, d, day;
int japanese, math, play;
scanf("%d %d %d %d %d", &day, &a, &b, &c, &d);
japanese = ceil((double)a / (double)c);
math = ceil((double)b / (double)d);
if (japanese < math) {
play = day - math;
} else if (japanese > math) {
play =... | #include <math.h>
#include <stdio.h>
int main() {
int a, b, c, d, day;
int japanese, math, play = 0;
scanf("%d %d %d %d %d", &day, &a, &b, &c, &d);
japanese = ceil((double)a / (double)c);
math = ceil((double)b / (double)d);
if (japanese < math) {
play = day - math;
} else if (japanese >= math) {
p... | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 75, 76, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 75, 76, 0, 57, 15, 23, 0, 16, 17, 20]] | 0 | 122 | 4 |
#include <stdio.h>
int main() {
int i, A, B, C, D, L, day, x, y, ja, ma;
scanf("%d\n", &L);
scanf("%d\n", &A);
scanf("%d\n", &B);
scanf("%d\n", &C);
scanf("%d\n", &D);
ja = A / C;
ma = B / D;
x = A % C;
y = B % D;
if (x = !0) {
ja = ja + 1;
}
if (y = !0) {
ma = ma + 1;
}
if (ja > ... | #include <stdio.h>
int main() {
int i, A, B, C, D, L, day, x, y, ja, ma;
scanf("%d\n", &L);
scanf("%d\n", &A);
scanf("%d\n", &B);
scanf("%d\n", &C);
scanf("%d\n", &D);
ja = A / C;
ma = B / D;
x = A % C;
y = B % D;
if (x != 0) {
ja = ja + 1;
}
if (y != 0) {
ma = ma + 1;
}
if (ja > ... | [["-", 8, 9, 0, 57, 15, 23, 0, 11, 17, 32], ["-", 0, 57, 15, 23, 0, 11, 12, 91, 17, 111], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79]] | 0 | 176 | 6 |
#include <stdio.h>
int main() {
int L, A, B, C, D, x, y, z;
scanf("%d \n %d \n %d \n %d \n %d", &L, &A, &B, &C, &D);
if (A / C == 0) {
x = A % C;
} else {
x = A % C + 1;
}
if (B / D == 0) {
y = B % D;
} else {
y = B % D + 1;
}
if (x >= y) {
z = L - x;
} else {
z = L - y;
}... | #include <stdio.h>
int main() {
int L, A, B, C, D, x, y, z;
scanf("%d \n %d \n %d \n %d \n %d", &L, &A, &B, &C, &D);
if (A % C == 0) {
x = A / C;
} else {
x = A / C + 1;
}
if (B % D == 0) {
y = B / D;
} else {
y = B / D + 1;
}
if (x >= y) {
z = L - x;
} else {
z = L - y;
}... | [["-", 0, 57, 15, 23, 0, 16, 31, 16, 17, 85], ["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 109], ["-", 64, 9, 0, 1, 0, 11, 12, 16, 17, 109], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 17, 85], ["-", 0, 1, 0, 11, 12, 16, 31, 16, 17, 109], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 17, 85]] | 0 | 145 | 12 |
#include <stdio.h>
int main(void) {
int l, a, b, c, d;
scanf("%d", &l);
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
scanf("%d", &d);
if ((a - 1) / c > (b - 1) / d)
printf("%d", l - (a - 1) / c);
else
printf("%d", l - (b - 1) / d);
return 0;
} | #include <stdio.h>
int main(void) {
int l, a, b, c, d;
scanf("%d", &l);
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
scanf("%d", &d);
if ((a - 1) / c > (b - 1) / d)
printf("%d\n", l - (a - 1) / c - 1);
else
printf("%d\n", l - (b - 1) / d - 1);
return 0;
} | [["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 64, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 64, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 33], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 0 | 126 | 6 |
#include <stdio.h>
int main() {
int a[5], i, c, d;
for (i = 0; i < 4; i++) {
scanf("%d\n", &a[i]);
}
c = a[1] / a[3];
if (a[1] % a[3] > 0)
c++;
d = a[2] / a[4];
if (a[2] % a[4] > 0)
d++;
if (c >= d) {
i = a[0] - c;
} else
i = a[0] - d;
printf("%d\n", i);
return 0;
} | #include <stdio.h>
int main() {
int a[5], i, c, d;
for (i = 0; i < 5; i++) {
scanf("%d\n", &a[i]);
}
c = a[1] / a[3];
if (a[1] % a[3] > 0)
c++;
d = a[2] / a[4];
if (a[2] % a[4] > 0)
d++;
if (c >= d) {
i = a[0] - c;
} else
i = a[0] - d;
printf("%d\n", i);
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 0 | 147 | 2 |
#include <math.h>
#include <stdio.h>
int main(int argc, const char *argv[]) {
int l, a, b, c, d;
int jday, mday, result;
scanf("%d %d %d %d %d", &l, &a, &b, &c, &d);
if (a % c == 0) {
jday = a / c;
} else {
jday = (a / c) + 1;
}
if (b % d == 0) {
mday = b / d;
} else {
mday = (b / d... | #include <math.h>
#include <stdio.h>
int main(int argc, const char *argv[]) {
int l, a, b, c, d;
int jday, mday, result;
scanf("%d %d %d %d %d", &l, &a, &b, &c, &d);
if (a % c == 0) {
jday = a / c;
} else {
jday = (a / c) + 1;
}
if (b % d == 0) {
mday = b / d;
} else {
mday = (b / d... | [["-", 64, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 64, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 0, 9, 0, 1, 0, 11, 12, 16, 31, 13], ["+", 0, 9, 0, 1, 0, 11, 12, 16, 31, 22]] | 0 | 153 | 4 |
#include <stdio.h>
int main() {
int a, b, c, d, l;
int la, lb;
scanf("%d%d%d%d%d", &l, &a, &b, &c, &d);
la = l;
lb = l;
while (1) {
if (a <= 0) {
break;
} else {
a = a - c;
la = la - 1;
}
}
while (1) {
if (b <= 0) {
break;
} else {
b = b - d;
lb = ... | #include <stdio.h>
int main() {
int a, b, c, d, l;
int la, lb;
scanf("%d%d%d%d%d", &l, &a, &b, &c, &d);
la = l;
lb = l;
while (1) {
if (a <= 0) {
break;
} else {
a = a - c;
la = la - 1;
}
}
while (1) {
if (b <= 0) {
break;
} else {
b = b - d;
lb = ... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 169 | 2 |
a[], i;
main() {
for (; ~scanf("%d", a + i++) ||
!printf("%.f\n", *a - fmax(~-a[1] / a[3], ~-a[2] / a[4]) - 1);)
;
exit(0);
} | a[5], i;
main() {
for (; ~scanf("%d", a + i++) ||
!printf("%.f\n", *a - fmax(~-a[1] / a[3], ~-a[2] / a[4]) - 1);)
;
exit(0);
} | [["+", 36, 36, 0, 30, 0, 1, 0, 69, 71, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 0 | 75 | 2 |
L;
main(A, B, C, D) {
scanf("%d%d%d%d%d", &L, &A, &B, &C, &D);
L = !printf("%.f\n", L - fmax(++A / C, ++B / D) - 1);
} | L;
main(A, B, C, D) {
scanf("%d%d%d%d%d", &L, &A, &B, &C, &D);
L = !printf("%.f\n", L - fmax(--A / C, --B / D) - 1);
} | [["-", 12, 2, 3, 4, 0, 16, 31, 27, 17, 29], ["+", 12, 2, 3, 4, 0, 16, 31, 27, 17, 68]] | 0 | 65 | 4 |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
int a, b, c, d, e;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cout << a - max((b + d - 1) / b, (c + e - 1) / e) << endl;
}
| #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int main() {
int a, b, c, d, e;
cin >> a;
cin >> b;
cin >> c;
cin >> d;
cin >> e;
cout << a - max((b + d - 1) / d, (c + e - 1) / e) << endl;
}
| [["-", 12, 16, 12, 2, 3, 4, 0, 16, 12, 22], ["+", 12, 16, 12, 2, 3, 4, 0, 16, 12, 22]] | 1 | 77 | 2 |
#include "bits/stdc++.h"
using namespace std;
int main() {
int answer;
int A, B, C, D, L;
int math, Japanese;
cin >> L >> A >> B >> C >> D;
math = (B - 1) / C + 1;
Japanese = (B - 1) / C + 1;
cout << L - max(math, Japanese) << endl;
/*
int datanum = 0;
for(int dataset = 0; dataset < 1; dataset... | #include "bits/stdc++.h"
using namespace std;
int main() {
int answer;
int A, B, C, D, L;
int math, Japanese;
cin >> L >> A >> B >> C >> D;
math = (B - 1) / D + 1;
Japanese = (A - 1) / C + 1;
cout << L - max(math, Japanese) << endl;
/*
int datanum = 0;
for(int dataset = 0; dataset < 1; dataset... | [["-", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22], ["+", 0, 1, 0, 11, 12, 16, 31, 16, 12, 22], ["-", 12, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 12, 16, 31, 16, 31, 23, 0, 16, 31, 22]] | 1 | 86 | 4 |
#include <bits/stdc++.h>
typedef long long LL;
using namespace std;
int main() {
double L, A, B, C, D;
cin >> L >> A >> B >> C >> D;
cout << L - ceil(A / C) - ceil(B / D) << endl;
}
| #include <bits/stdc++.h>
typedef long long LL;
using namespace std;
int main() {
double L, A, B, C, D;
cin >> L >> A >> B >> C >> D;
cout << L - max(ceil(A / C), ceil(B / D)) << endl;
}
| [["+", 0, 16, 31, 16, 12, 16, 12, 2, 63, 22], ["+", 31, 16, 12, 16, 12, 2, 3, 4, 0, 24], ["-", 0, 1, 0, 16, 31, 16, 12, 16, 17, 33], ["+", 31, 16, 12, 16, 12, 2, 3, 4, 0, 21], ["+", 12, 2, 3, 4, 0, 2, 3, 4, 0, 25]] | 1 | 60 | 5 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int L, A, B, C, D, day[2];
cin >> L >> A >> B >> C >> D;
day[0] = A / C;
if (day[0] * C != A) {
day[0]++;
}
day[1] = B / D;
if (day[1] * D != B) {
day[1]++;
}
sort(day, day + 1);
cout << L - day[... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int L, A, B, C, D, day[2];
cin >> L >> A >> B >> C >> D;
day[0] = A / C;
if (day[0] * C != A) {
day[0]++;
}
day[1] = B / D;
if (day[1] * D != B) {
day[1]++;
}
sort(day, day + 2);
cout << L - day[... | [["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]] | 1 | 120 | 2 |
#include <iostream>
using namespace std;
int main() {
int day, J, M, Jday, Mday, asobuz;
cin >> day;
cin >> J;
cin >> M;
cin >> Jday;
cin >> Mday;
int a = 0;
while (J >= 0) {
J -= Jday;
a++;
}
int b = 0;
while (M >= 0) {
M -= Mday;
b++;
}
if (a > b) {
asobuz = a;
} ... | #include <iostream>
using namespace std;
int main() {
int day, J, M, Jday, Mday, asobuz;
cin >> day;
cin >> J;
cin >> M;
cin >> Jday;
cin >> Mday;
int a = 0;
while (J > 0) {
J -= Jday;
a++;
}
int b = 0;
while (M > 0) {
M -= Mday;
b++;
}
if (a > b) {
asobuz = a;
} el... | [["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47]] | 1 | 114 | 4 |
#include <stdio.h>
int main() {
int L, A, B, C, D;
int t1, t2;
scanf("%d", &L);
scanf("%d", &A);
scanf("%d", &B);
scanf("%d", &C);
scanf("%d", &D);
t1 = A / C;
if (A % C != 0)
t1++;
t2 = B / D;
if (B % D != 0)
t2++;
if (t2 > t1)
t1 = t2;
L = L - t1;
printf("%d\n", t1);
ret... | #include <stdio.h>
int main() {
int L, A, B, C, D;
int t1, t2;
scanf("%d", &L);
scanf("%d", &A);
scanf("%d", &B);
scanf("%d", &C);
scanf("%d", &D);
t1 = A / C;
if (A % C != 0)
t1++;
t2 = B / D;
if (B % D != 0)
t2++;
if (t2 > t1)
t1 = t2;
L = L - t1;
printf("%d\n", L);
retu... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 1 | 137 | 2 |
#include <stdio.h>
int main(void) {
int n, a, b, c, d;
int s, ss;
scanf("%d", &n);
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
scanf("%d", &d);
s = a / c;
// printf("s=%d\n",s);
if (a % c != 0) {
s = s + 1;
// printf("s1=%d\n",s);
}
ss = b / d;
// printf("ss=%d\n",ss);
if (b ... | #include <stdio.h>
int main(void) {
int n, a, b, c, d;
int s, ss;
scanf("%d", &n);
scanf("%d", &a);
scanf("%d", &b);
scanf("%d", &c);
scanf("%d", &d);
s = a / c;
// printf("%d\n",s);
if (a % c != 0) {
s = s + 1;
}
ss = b / d;
// printf("%d\n",ss);
if (b % d != 0) {
ss = ss + 1;
}
... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]] | 1 | 175 | 2 |
#include <stdio.h>
int main(void) {
int L, A, B, C, D;
int a, b, c;
scanf("%d", &L);
scanf("%d", &A);
scanf("%d", &B);
scanf("%d", &C);
scanf("%d", &D);
a = A / C;
if (A / C != 0) {
a = A / C;
a = a + 1;
}
b = B / D;
if (B / D != 0) {
b = B / D;
b = b + 1;
}
if (a > b) {
... | #include <stdio.h>
int main(void) {
int L, A, B, C, D;
int a, b, c;
scanf("%d", &L);
scanf("%d", &A);
scanf("%d", &B);
scanf("%d", &C);
scanf("%d", &D);
a = A / C;
if (A % C != 0) {
a = A / C;
a = a + 1;
}
b = B / D;
if (B % D != 0) {
b = B / D;
b = b + 1;
}
if (a >= b) {
... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 85], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]] | 1 | 175 | 6 |
#include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int day, a, b, c, d;
cin >> day >> a >> b >> c >> d;
if (a % c != 0) {
a = 1 + (a / c);
} else
a /= c;
if (b % d != 0) {
b = 1 + (b / d);
} else
d /= d;
if (a > b)
day -= a;
else
day -= ... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
int main() {
int day, a, b, c, d;
cin >> day >> a >> b >> c >> d;
if (a % c != 0) {
a = 1 + (a / c);
} else
a /= c;
if (b % d != 0) {
b = 1 + (b / d);
} else
b /= d;
if (a > b)
day -= a;
else
day -= ... | [["-", 0, 57, 75, 76, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 31, 22]] | 1 | 113 | 2 |
#include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
const int MOD = 10000;
vector<int> A, B;
int M;
int dp[505][10][3][505][2];
void sub1(vector<int> &q) {
for (int i = q.size() - 1; i >= 0; ++i) {
if (q[i] == 0) {
q[i] = 9;
} else {
... | #include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
const int MOD = 10000;
vector<int> A, B;
int M;
int dp[505][10][3][505][2];
void sub1(vector<int> &q) {
for (int i = q.size() - 1; i >= 0; --i) {
if (q[i] == 0) {
q[i] = 9;
} else {
... | [["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["+", 0, 14, 8, 9, 0, 7, 26, 27, 17, 68], ["-", 0, 57, 75, 76, 0, 1, 0, 16, 17, 79], ["+", 0, 57, 75, 76, 0, 1, 0, 11, 17, 32], ["+", 75, 76, 0, 1, 0, 11, 12, 91, 17, 111]] | 1 | 546 | 5 |
#include <stdio.h>
int main(void) {
char joi[1000001];
int i, len;
int rj, ro, ri;
int level;
scanf("%s", joi, &len);
level = 0;
for (i = 0; i < len; i++) {
if (joi[i] == 'J') {
for (rj = 0; joi[i] == 'J'; rj++, i++)
;
for (ro = 0; joi[i] == 'O'; ro++, i++)
;
for (r... | #include <stdio.h>
int main(void) {
char joi[1000001];
int i, len;
int rj, ro, ri;
int level;
scanf("%s%n", joi, &len);
level = 0;
for (i = 0; i < len; i++) {
if (joi[i] == 'J') {
for (rj = 0; joi[i] == 'J'; rj++, i++)
;
for (ro = 0; joi[i] == 'O'; ro++, i++)
;
for ... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 178 | 2 |
#include <stdio.h>
int main(void) {
int n1, n2, n3, max = 0;
for (; ~scanf("%*[^J]");) {
n1 = n2 = n3 = 0;
scanf("%*[J]%n%*[O]%n%*[I]%n", &n1, &n2, &n3);
n3 -= n2;
n2 -= n1;
if (n1 >= n2 && n2 <= n3)
if (max < n2)
max = n2;
}
printf("%d\n", n2);
return 0;
} | #include <stdio.h>
int main(void) {
int n1, n2, n3, max = 0;
for (; ~scanf("%*[^J]");) {
n1 = n2 = n3 = 0;
scanf("%*[J]%n%*[O]%n%*[I]%n", &n1, &n2, &n3);
n3 -= n2;
n2 -= n1;
if (n1 >= n2 && n2 <= n3)
if (max < n2)
max = n2;
}
printf("%d\n", max);
return 0;
} | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 99 | 6 |
#include <stdio.h>
int main(void) {
int n1, n2, n3, max = 0;
for (; ~scanf("%*[^J]");) {
n1 = n2 = n3 = 0;
scanf("%*[J]%n%*[O]%n%*[I]%n", &n1, &n2, &n3);
n3 -= n2;
n2 -= n1;
if (n1 >= n2 && n2 <= n3)
if (max < n2)
max = n2;
}
printf("%d\n", n2);
return 0;
} | #include <stdio.h>
int main(void) {
int n1, n2, n3, max = 0;
while (~scanf("%*[^J]")) {
n1 = n2 = n3 = 0;
scanf("%*[J]%n%*[O]%n%*[I]%n", &n1, &n2, &n3);
n3 -= n2;
n2 -= n1;
if (n1 >= n2 && n2 <= n3)
if (max < n2)
max = n2;
}
printf("%d\n", max);
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 88], ["+", 0, 30, 0, 14, 8, 9, 0, 52, 0, 89], ["-", 0, 30, 0, 14, 8, 9, 0, 7, 0, 35], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22]] | 0 | 99 | 6 |
#include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
int cou = 0, ans = 0, j, i, o;
char joi[1111111];
string tmp;
scanf("%s", joi);
tmp = joi;
int len = tmp.size();
while (len > cou) {
if (joi[cou] != 'J') {
cou++;
continue;
}
j = 0, o = 0, i ... | #include <cstdio>
#include <iostream>
#include <string>
using namespace std;
int main() {
int cou = 0, ans = 0, j, i, o;
char joi[1111111];
string tmp;
scanf("%s", joi);
tmp = joi;
int len = tmp.size();
while (len > cou) {
if (joi[cou] != 'J') {
cou++;
continue;
}
j = 0, o = 0, i ... | [["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 60], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 20], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 60], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22], ["-", 0, 57, 64, 9, 0, 1, 0, 11, ... | 1 | 195 | 8 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#defin... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#defin... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 24], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 25], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 495 | 5 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
using namespace std;
int main() {
string str;
cin >> str;
int Jcou = 0, Ocou = 0, Icou = 0;
int ans = 0;
for (int i = 0; i < str.size(); i++) {
if (Ocou == 0 && Icou == 0 && str[i] == 'J')
Jcou++;
else i... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
using namespace std;
int main() {
string str;
cin >> str;
int Jcou = 0, Ocou = 0, Icou = 0;
int ans = 0;
for (int i = 0; i < str.size(); i++) {
if (Ocou == 0 && Icou == 0 && str[i] == 'J')
Jcou++;
else i... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47]] | 1 | 238 | 4 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define LL long long
#define ULL unsigned long long
const int LL_INF = ~(ULL)0 >> 1;
signed main() {
string s;
cin >> s;
int max = 0;
for (int i = 0; i < s.size(); ++i) {
if (s[i] != 'J')
continue;
int j, o, sti;
for (j ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define LL long long
#define ULL unsigned long long
const int LL_INF = ~(ULL)0 >> 1;
signed main() {
string s;
cin >> s;
int max = 0;
for (int i = 0; i < s.size(); ++i) {
if (s[i] != 'J')
continue;
int j, o, sti;
for (j ... | [["-", 31, 16, 31, 16, 12, 23, 0, 16, 31, 22], ["-", 31, 16, 31, 16, 12, 23, 0, 16, 17, 18], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 17, 19], ["+", 31, 16, 31, 16, 12, 23, 0, 16, 12, 22], ["-", 51, 2, 3, 4, 0, 2, 3, 4, 0, 22], ["+", 51, 2, 3, 4, 0, 2, 3, 4, 0, 22]] | 1 | 284 | 6 |
#include <iostream>
using namespace std;
char a[1000001];
char w[] = "JOI";
int k = 0, l[3];
int main() {
cin >> a;
for (char *c = a; *c != '\0'; ++c) {
for (int i = 0; i < 3; ++i) {
l[i] = 0;
while (*c != '\0' && *c == w[i]) {
++l[i];
++c;
}
}
if (l[0] >= l[1] && l... | #include <iostream>
using namespace std;
char a[1000001];
char w[] = "JOI";
int k = 0, l[3];
int main() {
cin >> a;
for (char *c = a; *c != '\0';) {
for (int i = 0; i < 3; ++i) {
l[i] = 0;
while (*c != '\0' && *c == w[i]) {
++l[i];
++c;
}
}
if (l[0] >= l[1] && l[2] ... | [["-", 0, 14, 8, 9, 0, 7, 26, 27, 17, 29], ["-", 0, 14, 8, 9, 0, 7, 26, 27, 28, 22]] | 1 | 161 | 2 |
#include <bits/stdc++.h>
using namespace std;
int main() {
char str;
int n[3] = {}, ans = 0, x;
while (cin >> str) {
if (str == 'J' && n[1] == 0 && n[2] == 0)
n[0]++;
else if (str == 'O' && n[1] < n[0] && n[2] == 0)
n[1]++;
else if (str == 'I' && n[2] < (x = min(n[0], n[1])))
if ((n[... | #include <bits/stdc++.h>
using namespace std;
int main() {
char str;
int n[3] = {}, ans = 0, x;
while (cin >> str) {
if (str == 'J' && n[1] == 0 && n[2] == 0)
n[0]++;
else if (str == 'O' && n[1] < n[0] && n[2] == 0)
n[1]++;
else if (str == 'I' && n[2] < (x = min(n[0], n[1]))) {
if ((... | [["+", 0, 57, 75, 76, 0, 57, 64, 9, 0, 45], ["+", 0, 57, 75, 76, 0, 57, 64, 9, 0, 46]] | 1 | 196 | 29 |
#include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
int main() {
string str;
cin >> str;
stack<pair<char, int>> st;
int max_l = 0;
st.emplace(str[0], 1);
for (int i = 1; i < str.size(); i++) {
auto n = st.top();
if (str[i] == n.fi) {
n.se++;
st.pop();
... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
int main() {
string str;
cin >> str;
stack<pair<char, int>> st;
int max_l = 0;
st.emplace(str[0], 1);
for (int i = 1; i < str.size(); i++) {
auto n = st.top();
if (str[i] == n.fi) {
n.se++;
st.pop();
... | [["-", 31, 16, 31, 16, 31, 16, 31, 16, 17, 47], ["+", 31, 16, 31, 16, 31, 16, 31, 16, 17, 20], ["-", 31, 16, 31, 16, 31, 16, 12, 16, 17, 47], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 17, 20]] | 1 | 252 | 4 |
#include <bits/stdc++.h>
#define r(i, a, n) for (i = 0; i < n; i++)
using namespace std;
int main() {
string s;
int i, j, k, l, sum = 0, a, b, c;
cin >> s;
r(i, 0, s.size()) {
a = b = c = 0;
for (; s[i] == 'J'; a++)
i++;
for (; s[i] == 'O'; b++)
i++;
for (; s[i] == 'I'; c++)
i+... | #include <bits/stdc++.h>
#define r(i, a, n) for (i = 0; i < n;)
using namespace std;
int main() {
string s;
int i, j, k, l, sum = 0, a, b, c;
cin >> s;
r(i, 0, s.size()) {
a = b = c = 0;
for (; s[i] == 'J'; a++)
i++;
for (; s[i] == 'O'; b++)
i++;
for (; s[i] == 'I'; c++)
i++;
... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 150 | 2 |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
string str;
int ans = 0;
int n1, n2, n3;
cin >> str;
for (int i = 0; i < str.length(); ++i) {
n1 = n2 ... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
string str;
int ans = 0;
int n1, n2, n3;
cin >> str;
for (int i = 0; i < str.length(); ++i) {
n1 = n2 =... | [["+", 0, 7, 8, 9, 0, 1, 0, 27, 28, 22], ["+", 0, 7, 8, 9, 0, 1, 0, 27, 17, 68], ["+", 8, 9, 0, 7, 8, 9, 0, 1, 0, 35]] | 1 | 166 | 3 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using names... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using names... | [["-", 0, 7, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 7, 8, 9, 0, 43, 49, 50, 51, 13]] | 1 | 408 | 2 |
#include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b;
int ca[5000], cb[5000];
cin >> a >> b;
for (int i = 0; i < a; i++)
cin >> ca[i];
for (int i = 0; i < b; i++)
cin >> cb[i];
int sum = 0;
for (int i = 0; i < b; i++... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
int a, b;
int ca[5000], cb[5000];
cin >> a >> b;
for (int i = 0; i < a; i++)
cin >> ca[i];
for (int i = 0; i < b; i++)
cin >> cb[i];
int sum = 0;
for (int i = 0; i < b; i++... | [["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 22], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35]] | 1 | 254 | 4 |
s=map(int,input().split())
if len(s)==2:c=s[0];d=s[1]
else:c=s[0];d=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
e=0;i=0
while i<d-e:
p=i;q=0
for j in range(c):
if a[j]==b[p]:q+=1;p+=1
e=max(e,q)
i+=1
print(e) | s=list(map(int,input().split()))
if len(s)==2:c=s[0];d=s[1]
else:c=s[0];d=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
e=0;i=0
while i<d-e:
p=i;q=0
for j in range(c):
if a[j]==b[p]:q+=1;p+=1
e=max(e,q)
i+=1
print(e) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 148 | 3 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.