problem_id stringlengths 6 6 | language stringclasses 2
values | original_status stringclasses 3
values | original_src stringlengths 19 243k | changed_src stringlengths 19 243k | change stringclasses 3
values | i1 int64 0 8.44k | i2 int64 0 8.44k | j1 int64 0 8.44k | j2 int64 0 8.44k | error stringclasses 270
values | stderr stringlengths 0 226k |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03038 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <set>
#define LIMIT 100000
using namespace std;
struct card {
long b;
long c;
};
bool cmp(const card left, const card right) { return left.c < right.c; }
int main() {
int n, m;
long tmp;
struct card input[LIMIT];
long b, c;
multiset<long> a;
int i, j;... | #include <algorithm>
#include <iostream>
#include <set>
#define LIMIT 100000
using namespace std;
struct card {
long b;
long c;
};
bool cmp(const card left, const card right) { return right.c < left.c; }
int main() {
int n, m;
long tmp;
struct card input[LIMIT];
long b, c;
multiset<long> a;
int i, j;... | replace | 11 | 12 | 11 | 12 | TLE | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 5;
struct line {
int num, v;
} a[MAXN];
int cmp(line i, line j) { return i.v > j.v; }
int main() {
int m, n, i;
scanf("%d%d", &n, &m);
for (i = 1; i <= n; i++) {
cin >> a[i].v;
a[i].num = 1;
}
for (i; i <= n +... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 1e5 + 5;
struct line {
int num, v;
} a[MAXN * 2];
int cmp(line i, line j) { return i.v > j.v; }
int main() {
int m, n, i;
scanf("%d%d", &n, &m);
for (i = 1; i <= n; i++) {
cin >> a[i].v;
a[i].num = 1;
}
for (i; i <=... | replace | 6 | 7 | 6 | 7 | 0 | |
p03038 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
int long sum = 0;
int count = 0;
cin >> N >> M;
vector<long int> A(N);
vector<pair<long int, int>> BC(M);
vector<long int> D(0);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
for (int i = 0... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
int long sum = 0;
int count = 0;
cin >> N >> M;
vector<long int> A(N);
vector<pair<long int, int>> BC(M);
vector<long int> D(0);
for (int i = 0; i < N; i++) {
cin >> A.at(i);
}
for (int i = 0... | replace | 37 | 40 | 37 | 40 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n, m, a[N], z;
pair<int, int> v[N];
long long int sum = 0;
int main() {
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
for (int i = 0; i < m; i++) {
int x, y;
cin >> x >> y;
v[i] = make_pair... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int n, m, a[N], z;
pair<int, int> v[N];
long long int sum = 0;
int main() {
cin >> n >> m;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
for (int i = 0; i < m; i++) {
int x, y;
cin >> x >> y;
v[i] = make_pair... | replace | 21 | 22 | 21 | 22 | 0 | |
p03038 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> lpair;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i < (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define print2(x, y) cout << (x) <<... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> lpair;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
#define rep(i, m, n) for (ll i = (m); i < (n); i++)
#define rrep(i, m, n) for (ll i = (m); i >= (n); i--)
#define print(x) cout << (x) << endl;
#define print2(x, y) cout << (x) <<... | replace | 26 | 27 | 26 | 27 | 0 | |
p03039 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
void _cin() {}
template <class Head, class... Tail> void _cin(Head &&head, Tail &&...tail) {
cin >> head;
_cin(forward<Tail>(tail)...... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <numeric>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
void _cin() {}
template <class Head, class... Tail> void _cin(Head &&head, Tail &&...tail) {
cin >> head;
_cin(forward<Tail>(tail)...... | replace | 71 | 72 | 71 | 72 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
constexpr int MOD = 1'000'000'007;
constexpr int MAX = 100'000;
template <int mod> struct ModInt {
int x;
ModInt() : x(0) {}
ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}
ModInt &operator+=(const ModInt &p) {
if ((x += p.x) >= mod)
... | #include <bits/stdc++.h>
using namespace std;
constexpr int MOD = 1'000'000'007;
constexpr int MAX = 200'200;
template <int mod> struct ModInt {
int x;
ModInt() : x(0) {}
ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}
ModInt &operator+=(const ModInt &p) {
if ((x += p.x) >= mod)
... | replace | 4 | 5 | 4 | 5 | 0 | |
p03039 | C++ | Runtime Error | //
// main.cpp
//
#include <algorithm>
#include <array>
#include <assert.h>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#includ... | //
// main.cpp
//
#include <algorithm>
#include <array>
#include <assert.h>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <math.h>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#includ... | replace | 110 | 111 | 110 | 111 | 0 | |
p03039 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
constexpr ll infl = 1000000000000000007LL... | #include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
constexpr ll infl = 1000000000000000007LL... | replace | 71 | 72 | 71 | 72 | 0 | |
p03039 | C++ | Runtime Error | #include "bits/stdc++.h"
typedef long long ll;
#define int ll
#define fi first
#define se second
#define SORT(a) sort(a.begin(), a.end())
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define MP(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define INF LLONG_MAX / 2... | #include "bits/stdc++.h"
typedef long long ll;
#define int ll
#define fi first
#define se second
#define SORT(a) sort(a.begin(), a.end())
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define MP(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define INF LLONG_MAX / 2... | replace | 30 | 31 | 30 | 31 | 0 | |
p03039 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1010101010;
constex... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
using namespace std;
using lint = long long;
constexpr int MOD = 1000000007, INF = 1010101010;
constex... | replace | 171 | 172 | 171 | 172 | 0 | |
p03039 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define pb push_back
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define ll long l... | #include <bits/stdc++.h>
#define pb push_back
#define IOS \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.tie(0)
#define ll long l... | replace | 141 | 142 | 141 | 145 | TLE | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7, maxn = 1e5 + 9;
int64_t gt[maxn + 1], n, m, k;
int64_t Pow(int x, int y) {
if (y == 0)
return 1;
else {
int64_t tmp = Pow(x, y / 2);
int64_t res = (tmp % MOD * tmp % MOD) % MOD;
if (y % 2 == 0)
return res;
else
... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7, maxn = 2e5 + 9;
int64_t gt[maxn + 1], n, m, k;
int64_t Pow(int x, int y) {
if (y == 0)
return 1;
else {
int64_t tmp = Pow(x, y / 2);
int64_t res = (tmp % MOD * tmp % MOD) % MOD;
if (y % 2 == 0)
return res;
else
... | replace | 4 | 5 | 4 | 5 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd... | #include <bits/stdc++.h>
#define syosu(x) fixed << setprecision(x)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> P;
typedef pair<double, double> pdd;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd... | replace | 55 | 60 | 55 | 59 | -6 | cf155a8c-2a97-4e05-a7b0-15f525cee305.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03039/C++/s395541686.cpp:58: int main(): Assertion `n==1||m==1' failed.
|
p03039 | C++ | Runtime Error |
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const long long mod = 1e9 + 7;
const long long MAX_P = 1e5;
typedef long long ll;
long long qp(int a, ll b) {
int ans = 1;
do {
if (b & 1)
ans = 1ll * ans * a... |
#include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
const long long mod = 1e9 + 7;
const long long MAX_P = 200010;
typedef long long ll;
long long qp(int a, ll b) {
int ans = 1;
do {
if (b & 1)
ans = 1ll * ans ... | replace | 10 | 11 | 10 | 11 | 0 | |
p03039 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define INF 1000000007
#define LINF (1LL << 62)
typedef long long i64;
typedef pair<i64, i64> P;
i64 n, m, k;
// コンビネーション
// けんちょんさんありがとう
const int MAX ... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#define INF 1000000007
#define LINF (1LL << 62)
typedef long long i64;
typedef pair<i64, i64> P;
i64 n, m, k;
// コンビネーション
// けんちょんさんありがとう
const int MAX ... | replace | 21 | 22 | 21 | 22 | 0 | |
p03039 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define reps(i, n) for (int i = 1, i##_len = (... | replace | 68 | 69 | 68 | 69 | 0 | |
p03039 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
#define MN 200000
#define mod 1000000007
int fac[MN + 5], Inv[MN + 5], inv[MN + 5];
int n, m, k;
int C(int a, int b) {
if (a < b)
return 0;
return 1ll * fac[a] * inv[b] % mod * inv[a - b] % mod;
}
int solve(int n, int m) {
int ans = 0;
int w = 0;
for (int b = 1; b ... | #include <cstdio>
#include <iostream>
#define MN 200000
#define mod 1000000007
int fac[MN + 5], Inv[MN + 5], inv[MN + 5];
int n, m, k;
int C(int a, int b) {
if (a < b)
return 0;
return 1ll * fac[a] * inv[b] % mod * inv[a - b] % mod;
}
int solve(int n, int m) {
int ans = 0;
int w = 0;
for (int b = 1; b ... | replace | 17 | 18 | 17 | 18 | 0 | |
p03039 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define REP(i, b, e) for (ll i = (ll)b; i < (ll)e; i++)
#define rep0(i, n) REP(i, 0l... | #include <algorithm>
#include <cctype>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define REP(i, b, e) for (ll i = (ll)b; i < (ll)e; i++)
#define rep0(i, n) REP(i, 0l... | replace | 28 | 29 | 28 | 29 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define maxs(a, b) a = max(a, b)
#define mins(a, b) a = min(a, b)
using namespace std;
typedef long long ll;
typedef pa... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define maxs(a, b) a = max(a, b)
#define mins(a, b) a = min(a, b)
using namespace std;
typedef long long ll;
typedef pa... | replace | 77 | 78 | 77 | 78 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define fornum(A, B, C) for (A = B; A < C; A++)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
/////////////////////////////////////////////////////
#define MOD ((ll)1e9 + 7)
ll N, M, K, fa[101010];
ll i, j, k, l;
ll moddi... | #include <bits/stdc++.h>
#define ll long long
#define fornum(A, B, C) for (A = B; A < C; A++)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
/////////////////////////////////////////////////////
#define MOD ((ll)1e9 + 7)
ll N, M, K, fa[202020];
ll i, j, k, l;
ll moddi... | replace | 13 | 14 | 13 | 14 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <bitset>
using namespace std;
#define M 1000000007
#define pb push_back
#define f first
#define s second
#define rep(i, st, ed) for (ll i = st; i < ed; i++)
#define repn(i, st, ed) for (ll i = st; i <= ed; i++)
#define repb(i, ed, st) for (ll i = ed; i >= st; i--)
#define all(v) v.be... | #include <bits/stdc++.h>
#include <bitset>
using namespace std;
#define M 1000000007
#define pb push_back
#define f first
#define s second
#define rep(i, st, ed) for (ll i = st; i < ed; i++)
#define repn(i, st, ed) for (ll i = st; i <= ed; i++)
#define repb(i, ed, st) for (ll i = ed; i >= st; i--)
#define all(v) v.be... | replace | 18 | 19 | 18 | 19 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define crap \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
typedef long l... | #include <bits/stdc++.h>
using namespace std;
#define crap \
ios::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL)
typedef long l... | replace | 86 | 87 | 86 | 87 | 0 | |
p03039 | C++ | Time Limit Exceeded | // i ll be the king
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define sync \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define input(arr, n) ... | // i ll be the king
#include <bits/stdc++.h>
#define ll long long int
#define ld long double
#define sync \
ios_base::sync_with_stdio(false); \
cin.tie(NULL)
#define input(arr, n) ... | replace | 32 | 36 | 32 | 34 | TLE | |
p03039 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, m) for (long long i = 0; i < m; i++)
#define per(i, m) for (long long i = m - 1; i >= 0; i--)
#define FOR(i, n, m) for (long long i = n; i < m; i++)
#define ROF(i, n, m) for (long long i = m - 1; i >= n; i--)
#define SORT(v, n) ... | #include <bits/stdc++.h>
#define rep(i, m) for (long long i = 0; i < m; i++)
#define per(i, m) for (long long i = m - 1; i >= 0; i--)
#define FOR(i, n, m) for (long long i = n; i < m; i++)
#define ROF(i, n, m) for (long long i = m - 1; i >= n; i--)
#define SORT(v, n) ... | replace | 135 | 137 | 135 | 137 | TLE | |
p03039 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
#define dump(x) cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOREACH(x, a) ... | #include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
#define dump(x) cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define REPR(i, n) for (ll i = n; i >= 0; i--)
#define FOREACH(x, a) ... | replace | 207 | 218 | 207 | 226 | TLE | |
p03039 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
#define dump(x) cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOREACH(x, ... | #include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
#define dump(x) cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOREACH(x, ... | replace | 191 | 199 | 191 | 201 | TLE | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
#define REP(i, n, m) for (ll i = n; i < (ll)m; ++i)
#define IREP(i, n, m) for (ll i = n - 1; i >= m; --i)
#define rep(i, n) REP(i, 0, n)
#define irep(i, n) IREP(i, n, 0)
#d... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
#define REP(i, n, m) for (ll i = n; i < (ll)m; ++i)
#define IREP(i, n, m) for (ll i = n - 1; i >= m; --i)
#define rep(i, n) REP(i, 0, n)
#define irep(i, n) IREP(i, n, 0)
#d... | replace | 26 | 27 | 26 | 27 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, N) for (int i = 0; i < (int)N; ++i)
#define all(a) (a).begin(), (a).end()
template <int MOD> class ModInt {
long long x;
public:
ModInt(long long v = 0) : x(v % MOD) {
if (x < 0)
x += MOD;
}
ModInt &operator+=(const M... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, N) for (int i = 0; i < (int)N; ++i)
#define all(a) (a).begin(), (a).end()
template <int MOD> class ModInt {
long long x;
public:
ModInt(long long v = 0) : x(v % MOD) {
if (x < 0)
x += MOD;
}
ModInt &operator+=(const M... | replace | 84 | 85 | 84 | 85 | -6 | munmap_chunk(): invalid pointer
|
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++)
#define all(x) (x).begin(), (x).end()
#define pb push_back
template <class T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmi... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, l, r) for (int i = (int)(l); i < (int)(r); i++)
#define all(x) (x).begin(), (x).end()
#define pb push_back
template <class T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmi... | replace | 73 | 74 | 73 | 74 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep2(i, m, n) for (int i = int(m); i < int(n); i++)
#define rep(i, n) rep2(i, 0, n)
#define all(a) a.begin(), a.end()
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using VV... | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep2(i, m, n) for (int i = int(m); i < int(n); i++)
#define rep(i, n) rep2(i, 0, n)
#define all(a) a.begin(), a.end()
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using VV... | replace | 37 | 38 | 37 | 38 | 0 | |
p03039 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
#define int long long
int INF = 1e9 + 7;
int myPow(int n, int m) {
int res = 1;
while (m > 0) {
if (m & 1) {
res *= n;
res %= INF;
}
n = n * n % INF;
m >>= 1;
}
return res;
}
// n^(INF-2)
int invMod(int n) { return myPow... | #include <iostream>
#include <vector>
using namespace std;
#define int long long
int INF = 1e9 + 7;
int myPow(int n, int m) {
int res = 1;
while (m > 0) {
if (m & 1) {
res *= n;
res %= INF;
}
n = n * n % INF;
m >>= 1;
}
return res;
}
// n^(INF-2)
int invMod(int n) { return myPow... | replace | 25 | 26 | 25 | 26 | 0 | |
p03039 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
ll kai[200001];
ll gyaku[200001];
// aのp乗を求める
ll jou(ll a, ll p) {
ll ret = 1;
ll b2[40];
b2[0] = a;
for (int i = 1; i < 40; i++) {... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
ll kai[200001];
ll gyaku[200001];
// aのp乗を求める
ll jou(ll a, ll p) {
ll ret = 1;
ll b2[40];
b2[0] = a;
for (int i = 1; i < 40; i++) {... | replace | 53 | 69 | 53 | 75 | TLE | |
p03039 | C++ | Time Limit Exceeded |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <vector>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
const int N = 200000;
ll fac[N * 2 + 10];
ll invfac[N * 2 + 10];
ll mypow(ll x, ll n) {
if (n == ... |
#include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <vector>
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
const int N = 200000;
ll fac[N * 2 + 10];
ll invfac[N * 2 + 10];
ll mypow(ll x, ll n) {
if (n == ... | replace | 40 | 49 | 40 | 45 | TLE | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define rep(i, s, n) for (int i = s; i < (int)(n); i++)
typedef long long int ll;
using namespace std;
// 分割数
ll n;
const int MAX_N = 100010;
const int M = 1000000007;
ll f[MAX_N], rf[MAX_N];
ll inv(ll x) {
ll res = 1;
ll k = M - 2;
ll... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define rep(i, s, n) for (int i = s; i < (int)(n); i++)
typedef long long int ll;
using namespace std;
// 分割数
ll n;
const int MAX_N = 200010;
const int M = 1000000007;
ll f[MAX_N], rf[MAX_N];
ll inv(ll x) {
ll res = 1;
ll k = M - 2;
ll... | replace | 7 | 8 | 7 | 8 | 0 | |
p03039 | Python | Time Limit Exceeded | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10**9)
INF = 1 << 60
MOD = 1000000007
def main():
N, M, K = map(int, readline().split())
COM_MAX = N * M
fac, finv, inv = [0] * (COM_MAX + 1), [0] * (COM_MAX + 1), [0] * (COM_MAX + 1)
... | import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10**9)
INF = 1 << 60
MOD = 1000000007
def main():
N, M, K = map(int, readline().split())
COM_MAX = N * M
fac, finv, inv = [0] * (COM_MAX + 1), [0] * (COM_MAX + 1), [0] * (COM_MAX + 1)
... | replace | 30 | 35 | 30 | 32 | TLE | |
p03039 | Python | Time Limit Exceeded | def comb(n, k, mod=10**9 + 7):
from functools import reduce
from operator import mul
k = min(k, n - k)
x = reduce(mul, range(n - k + 1, n + 1), 1) % mod
y = reduce(mul, range(1, k + 1), 1) % mod
return x * pow(y, mod - 2, mod) % mod
def solve(string):
n, m, k = map(int, string.split())
... | def comb(n, k, mod=10**9 + 7):
from functools import reduce
from operator import mul
k = min(k, n - k)
def calc(x, y):
return x * y % mod
x = reduce(calc, range(n - k + 1, n + 1), 1) % mod
y = reduce(calc, range(1, k + 1), 1) % mod
return x * pow(y, mod - 2, mod) % mod
def solve... | replace | 5 | 7 | 5 | 11 | TLE | |
p03039 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#define MOD (long)(1e9 + 7)
#define MAX 100000
using namespace std;
class modlong;
void computeAll(long n);
modlong modComb(long n, long k);
class modlong {
long val;
const long mod = MOD;
public:
// 初期化 値を引数に与えなかった場合はval=0としておく
modlong(long init = 0) {
while (i... | #include <algorithm>
#include <iostream>
#define MOD (long)(1e9 + 7)
#define MAX 1000000
using namespace std;
class modlong;
void computeAll(long n);
modlong modComb(long n, long k);
class modlong {
long val;
const long mod = MOD;
public:
// 初期化 値を引数に与えなかった場合はval=0としておく
modlong(long init = 0) {
while (... | replace | 4 | 5 | 4 | 5 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, x, n) for (int i = x; i <= n; i++)
#define rep3(i, x, n) for (int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb(x) push_back(x)
#define all(x) x.begin(), x.end()
using... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, x, n) for (int i = x; i <= n; i++)
#define rep3(i, x, n) for (int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb(x) push_back(x)
#define all(x) x.begin(), x.end()
using... | replace | 74 | 75 | 74 | 75 | 0 | |
p03039 | Python | Runtime Error | import sys
readline = sys.stdin.readline
MOD = 10**9 + 7
INF = float("INF")
sys.setrecursionlimit(10**5)
def comb_mod(n, r):
res = 1
r = min(n - r, r)
for i in range(r):
res *= n - i
res %= MOD
res *= pow((r - i), -1, MOD)
return res
def main():
n, m, k = list(map(int,... | import sys
readline = sys.stdin.readline
MOD = 10**9 + 7
INF = float("INF")
sys.setrecursionlimit(10**5)
def comb_mod(n, r):
res = 1
r = min(n - r, r)
for i in range(r):
res *= n - i
res %= MOD
res *= pow((r - i), MOD - 2, MOD)
return res
def main():
n, m, k = list(map... | replace | 15 | 16 | 15 | 16 | 0 | |
p03039 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
#define rep(i, n) for (int i = 0; i < (n... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> Pl;
#define rep(i, n) for (int i = 0; i < (n... | replace | 28 | 29 | 28 | 29 | 0 | |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
/* short */
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v)... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pll = pair<ll, ll>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
/* short */
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) begin(v), end(v)
#define RALL(v) rbegin(v)... | replace | 32 | 33 | 32 | 33 | 0 | 8 |
p03039 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define RREP(i, n) for (int i = (n)-1; i >= 0; --i)
#define endl '\n'
#define pb push_back
#define eb emplace_back
#define prique priority_queue
#define umap unordered_map
#define B... | #include <bits/stdc++.h>
using namespace std;
#define ALL(obj) (obj).begin(), (obj).end()
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define RREP(i, n) for (int i = (n)-1; i >= 0; --i)
#define endl '\n'
#define pb push_back
#define eb emplace_back
#define prique priority_queue
#define umap unordered_map
#define B... | replace | 49 | 50 | 49 | 50 | 0 | |
p03039 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define int long long
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const int mod = 1e9 + 7;
const int ... | #include <bits/stdc++.h>
#define int long long
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const int mod = 1e9 + 7;
const int ... | replace | 46 | 53 | 46 | 55 | TLE | |
p03039 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
const int MOD = 1e9 + 7;
const int MAX = 1e5 + 10;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD -... | #include <iostream>
#include <vector>
using namespace std;
const int MOD = 1e9 + 7;
const int MAX = 2e5 + 10;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
inv[1] = 1;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD -... | replace | 5 | 6 | 5 | 6 | 0 | |
p03040 | C++ | Runtime Error | #include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif
int comp(const void *a, const void *b) {
return (*(int *)a > *(int *)b... | #include <float.h>
#include <inttypes.h>
#include <limits.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#ifdef __cplusplus
#include <bits/stdc++.h>
#endif
int comp(const void *a, const void *b) {
return (*(int *)a > *(int *)b... | replace | 89 | 90 | 89 | 90 | 0 | |
p03040 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
/*{{{*/ // template
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long LINF = numeric_limits<long long>::max() / 3;
#define pb push_back
#define eb ... | #include <bits/stdc++.h>
using namespace std;
/*{{{*/ // template
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long LINF = numeric_limits<long long>::max() / 3;
#define pb push_back
#define eb ... | replace | 160 | 162 | 160 | 162 | 0 | |
p03040 | C++ | Runtime Error | /*input
4
1 4 2
2
1 1 -8
2
*/
#pragma GCC optimize("Ofast")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
mt19937 gen;
struct node;
using pnode = nod... | /*input
4
1 4 2
2
1 1 -8
2
*/
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
mt19937 gen;
struct node;
using pnode = node *;
int sz(pnode a);
ll dd(pnode a);
struct node {
node *l = NULL, *r = NULL;
int w;
int val;
int dyd = 1;
ll dyd1;
node(int val) : val(... | delete | 8 | 10 | 8 | 8 | 0 | |
p03040 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) begin(v), end(v)
#define fi first
#define se second
template <typename A, typename B> inline bool chmax(A &a, B b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) begin(v), end(v)
#define fi first
#define se second
template <typename A, typename B> inline bool chmax(A &a, B b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
... | replace | 74 | 75 | 74 | 75 | 0 | |
p03040 | C++ | Runtime Error | #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... | replace | 94 | 95 | 94 | 95 | 0 | |
p03040 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <sys/types.h>
#include <unistd.h>
#define _overload(_1, _2, _3, name, ...) name
#define _rep(i, n) _range(i, 0, n)
#define _range(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rep(...) _overload(__VA_ARGS__, _range, _rep, )(__VA_ARGS__)
#define _rrep(i, n) _rrange(i, n, 0)
#... | #include <bits/stdc++.h>
#include <sys/types.h>
#include <unistd.h>
#define _overload(_1, _2, _3, name, ...) name
#define _rep(i, n) _range(i, 0, n)
#define _range(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rep(...) _overload(__VA_ARGS__, _range, _rep, )(__VA_ARGS__)
#define _rrep(i, n) _rrange(i, n, 0)
#... | replace | 88 | 89 | 88 | 89 | 0 | |
p03040 | C++ | Runtime Error | #include <bits/stdc++.h>
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
using namespace std;
typedef long long ll;
const int MAXN = 25 + 5;
const ll INF = 1e18;
const ll MOD = 998244353;
const double pi = 3.1415926;
ll n, sum[2][(MAXN * 3) << 2], lazy[2][(MAXN * 3) << 2], rec[MAXN][3],
bb[MAXN * 3], ... | #include <bits/stdc++.h>
#define lson l, m, rt << 1
#define rson m + 1, r, rt << 1 | 1
using namespace std;
typedef long long ll;
const int MAXN = 2e5 + 5;
const ll INF = 1e18;
const ll MOD = 998244353;
const double pi = 3.1415926;
ll n, sum[2][(MAXN * 3) << 2], lazy[2][(MAXN * 3) << 2], rec[MAXN][3],
bb[MAXN * 3],... | replace | 5 | 6 | 5 | 6 | 0 | |
p03040 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | replace | 82 | 86 | 82 | 86 | 0 | |
p03040 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> vec;
typedef vector<vec> mat;
const int MAX_N = 200000;
int bit[MAX_N + 1] = {0}, n;
int sum(int i) {
int s = 0;
while (i > 0)... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define all(v) v.begin(), v.end()
typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> vec;
typedef vector<vec> mat;
const int MAX_N = 200000;
int bit[MAX_N + 1] = {0}, n;
int sum(int i) {
int s = 0;
while (i > 0)... | replace | 63 | 64 | 63 | 64 | 0 | |
p03040 | C++ | Runtime Error | #include <iostream>
#include <set>
using namespace std;
multiset<long long> A, B;
long long bs, as, q, sz;
void lax() {
while (A.size() > (sz + 1) / 2) {
multiset<long long>::iterator it = A.end();
it--;
as += 2 * (*it);
B.insert(*it);
A.erase(*it);
}
while (!B.empty()) {
multiset<long l... | #include <iostream>
#include <set>
using namespace std;
multiset<long long> A, B;
long long bs, as, q, sz;
void lax() {
while (A.size() > (sz + 1) / 2) {
multiset<long long>::iterator it = A.end();
it--;
as += 2 * (*it);
B.insert(*it);
A.erase(it);
}
while (!B.empty()) {
multiset<long lo... | replace | 13 | 14 | 13 | 14 | 0 | |
p03040 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
void print() { cout << "\n"; }
template <class T> void pri... | #include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
void print() { cout << "\n"; }
template <class T> void pri... | replace | 115 | 117 | 115 | 117 | 0 | |
p03040 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, a, n) for (int i = (a); i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
#define FOR(it, c) \
for (__typeof((c).begin()) it = (c).begin(); it != (c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).... | insert | 36 | 36 | 36 | 38 | TLE | |
p03040 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int nn = 1e6 + 5;
int main() {
LL q, a, b, tipe, l1 = 0, l2 = 0;
LL tot_l = 0, tot_r = 0, tot = 0;
priority_queue<LL> pq1, pq2;
scanf("%d", &q);
while (q--) {
scanf("%lld", &tipe);
if (tipe == 1) {
scanf("%lld %lld", &a,... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int nn = 1e6 + 5;
int main() {
LL q, a, b, tipe, l1 = 0, l2 = 0;
LL tot_l = 0, tot_r = 0, tot = 0;
priority_queue<LL> pq1, pq2;
scanf("%lld", &q);
while (q--) {
scanf("%lld", &tipe);
if (tipe == 1) {
scanf("%lld %lld", &... | replace | 10 | 11 | 10 | 11 | TLE | |
p03040 | C++ | Runtime Error | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <bits/stdc++.h>
// GCC
// #define _GLIBCXX_DEBUG
// Clang
// #define _LIBCPP_DEBUG 0
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define f(i, n) for (int i... | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <bits/stdc++.h>
// GCC
// #define _GLIBCXX_DEBUG
// Clang
// #define _LIBCPP_DEBUG 0
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#define f(i, n) for (int i ... | replace | 12 | 13 | 12 | 13 | 0 | |
p03040 | Python | Runtime Error | from heapq import heappush, heappushpop
Q = int(input())
b = 0
la = []
sl = 0
ra = []
sr = 0
cnt = 0
for _ in range(Q):
q = map(int, input().split())
# print(la, ra)
if q[0] == 2:
# 求値
x = -la[0]
cl = (cnt + 1) // 2
cr = cnt - cl
print(x, (cl * x - sl) + (sr - cr *... | from heapq import heappush, heappushpop
Q = int(input())
b = 0
la = []
sl = 0
ra = []
sr = 0
cnt = 0
for _ in range(Q):
q = tuple(map(int, input().split()))
# print(la, ra)
if q[0] == 2:
# 求値
x = -la[0]
cl = (cnt + 1) // 2
cr = cnt - cl
print(x, (cl * x - sl) + (sr... | replace | 12 | 13 | 12 | 13 | TypeError: 'map' object is not subscriptable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03040/Python/s771493021.py", line 15, in <module>
if q[0] == 2:
TypeError: 'map' object is not subscriptable
|
p03040 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef unsigned long l... | #include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
typedef long long ll;
typedef unsigned long l... | replace | 39 | 40 | 39 | 40 | 0 | |
p03040 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) cerr << #x << " = " << (x) <<... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<double, double> pdd;
const ull mod = 1e9 + 7;
#define REP(i, n) for (int i = 0; i < (int)n; ++i)
// debug
#define dump(x) cerr << #x << " = " << (x) <<... | replace | 60 | 61 | 60 | 61 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int n, k;
scanf("%d %d", &n, &k);
char s[5];
scanf("%s", &s);
s[k - 1] = 'a' + s[k - 1] - 'A';
printf("%s", s);
}
| #include <bits/stdc++.h>
#include <iostream>
using namespace std;
int main() {
int n, k;
scanf("%d %d", &n, &k);
char s[100];
scanf("%s", &s);
s[k - 1] = 'a' + s[k - 1] - 'A';
printf("%s", s);
}
| replace | 7 | 8 | 7 | 8 | 0 | |
p03041 | C++ | Runtime Error | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
char tolower(char c) { return (c + 0x20); }
int main() {
int N, K;
string S;
cin >> N >> K;
cin >> S;
S.at(K) = tolower(S.at(K));
cout << S << endl;
} | #include <algorithm>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
char tolower(char c) { return (c + 0x20); }
int main() {
int N, K;
string S;
cin >> N >> K;
cin >> S;
S.at(K - 1) = tolower(S.at(K - 1));
cout << S << endl;
} | replace | 16 | 17 | 16 | 17 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
string s;
cin >> s;
s.at(k) = tolower(s.at(k));
cout << s << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
string s;
cin >> s;
s.at(k - 1) = s.at(k - 1) + 32;
cout << s << endl;
} | replace | 8 | 9 | 8 | 9 | 0 | |
p03041 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
const long long INF = 1e9 +... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
const long long INF = 1e9 +... | insert | 23 | 23 | 23 | 24 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
|
p03041 | C++ | Runtime Error | #include <stdio.h>
int main() {
int N, K;
char string[20];
scanf("%d %d\n", &N, &K);
scanf("%s", &string);
string[K - 1] += 32;
printf("%s\n", string);
return 0;
} | #include <stdio.h>
int main() {
int N, K;
char nama[52];
scanf("%d%d %s", &N, &K, nama);
nama[K - 1] = nama[K - 1] + 32;
printf("%s\n", nama);
return 0;
} | replace | 3 | 12 | 3 | 7 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
string S;
cin >> N >> K >> S;
S.at(K) += 'a' - 'A';
cout << S << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
string S;
cin >> N >> K >> S;
S.at(K - 1) += 'a' - 'A';
cout << S << endl;
} | replace | 6 | 7 | 6 | 7 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define P = pair<int, int>;
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
int main() {
int n, k;
c... | #include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <math.h>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define P = pair<int, int>;
using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
int main() {
int n, k;
c... | replace | 18 | 24 | 18 | 24 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
#define pb push_back
int main() {
string s;
cin >> s;
int k;
cin >> k;
k--;
if (s[k] == 'A') {
s[k] = 'a';
} else if (s[k] == 'B') {
s[k] = 'b';
} else {
... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define P pair<int, int>
#define pb push_back
int main() {
string s;
int n, k;
cin >> n >> k >> s;
k--;
if (s[k] == 'A') {
s[k] = 'a';
} else if (s[k] == 'B') {
s[k] = 'b';
} else {
... | replace | 8 | 11 | 8 | 11 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
string S;
cin >> N >> K;
cin >> S;
if (S.at(K) == 'A') {
S.at(K) = 'a';
} else if (S.at(K) == 'B') {
S.at(K) = 'b';
} else {
S.at(K) = 'c';
}
cout << S << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
string S;
cin >> N >> K;
K -= 1;
cin >> S;
if (S.at(K) == 'A') {
S.at(K) = 'a';
} else if (S.at(K) == 'B') {
S.at(K) = 'b';
} else {
S.at(K) = 'c';
}
cout << S << endl;
}
| insert | 7 | 7 | 7 | 8 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int a, b;
string s;
cin >> a >> b >> s;
s.at(b) += 32;
cout << s << endl;
}
| #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int a, b;
string s;
cin >> a >> b >> s;
s.at(b - 1) += 32;
cout << s << endl;
}
| replace | 7 | 8 | 7 | 8 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
string s;
cin >> s;
if (s.at(K) == 'A')
s.at(K) = 'a';
if (s.at(K) == 'B')
s.at(K) = 'b';
if (s.at(K) == 'C')
s.at(K) = 'c';
cout << s << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
cin >> N >> K;
string s;
cin >> s;
K--;
if (s.at(K) == 'A')
s.at(K) = 'a';
if (s.at(K) == 'B')
s.at(K) = 'b';
if (s.at(K) == 'C')
s.at(K) = 'c';
cout << s << endl;
}
| insert | 8 | 8 | 8 | 9 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
string S;
cin >> N >> K >> S;
if (S.at(K) == 'A')
S.at(K) = 'a';
if (S.at(K) == 'B')
S.at(K) = 'b';
if (S.at(K) == 'C')
S.at(K) = 'c';
cout << S << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, K;
string S;
cin >> N >> K >> S;
if (S.at(K - 1) == 'A')
S.at(K - 1) = 'a';
if (S.at(K - 1) == 'B')
S.at(K - 1) = 'b';
if (S.at(K - 1) == 'C')
S.at(K - 1) = 'c';
cout << S << endl;
} | replace | 7 | 13 | 7 | 13 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
int n, k;
string s;
cin >> n >> k;
cin >> s;
if (s.at(k) == 'A')
s.at(k) = 'a';
if (s.at(k) == 'B')
s.at(k) = 'b';
if (s.at(k) == 'C')
s.at(k) = 'c';
cout <<... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long ll;
int main() {
int n, k;
string s;
cin >> n >> k;
cin >> s;
if (s.at(k - 1) == 'A')
s.at(k - 1) = 'a';
if (s.at(k - 1) == 'B')
s.at(k - 1) = 'b';
if (s.at(k - 1) == 'C')
s.at... | replace | 10 | 16 | 10 | 16 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
#define fastio() \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
#define fastio() \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | replace | 28 | 33 | 28 | 33 | -11 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#include <iostream>
int main() {
int N, K;
cin >> N >> K;
string S;
cin >> S;
if (S.at(K) == 'A') {
S.at(K) = 'a';
} else if (S.at(K) == 'B') {
S.at(K) = 'b';
} else if (S.at(K) == 'C') {
S.at(K) = 'c';
}
cout << S << endl;
} | #include <bits/stdc++.h>
using namespace std;
#include <iostream>
int main() {
int N, K;
cin >> N >> K;
string S;
cin >> S;
if (S.at(K - 1) == 'A') {
S.at(K - 1) = 'a';
} else if (S.at(K - 1) == 'B') {
S.at(K - 1) = 'b';
} else if (S.at(K - 1) == 'C') {
S.at(K - 1) = 'c';
}
cout << S << ... | replace | 10 | 16 | 10 | 16 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int n;
cin >> n;
char s[n];
int k;
cin >> k;
cin >> s;
s[k - 1] = s[k - 1... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
char s[n];
int k;
cin >> k;
cin >> s;
s[k - 1] = s[k - 1] + 32;
cout << s;
} | replace | 7 | 11 | 7 | 8 | -11 | |
p03041 | C++ | Runtime Error | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
int n, k;
string s;
cin >> n >> k >> s;
s.at(k) += 'a' - 'A';
cout << s << endl;
return 0;
}
| #include <algorithm>
#include <iomanip>
#include <iostream>
#include <vector>
using namespace std;
int main(void) {
int n, k;
string s;
cin >> n >> k >> s;
s.at(k - 1) += 'a' - 'A';
cout << s << endl;
return 0;
}
| replace | 11 | 12 | 11 | 12 | 0 | |
p03041 | Python | Runtime Error | n, k = map(int, input().split())
s = input()
print(s.replace(s[k], s[k].lower()))
| n, k = map(int, input().split())
s = input()
print(s[: k - 1] + s[k - 1].lower() + s[k:])
| replace | 2 | 4 | 2 | 3 | 0 | |
p03041 | Python | Runtime Error | # -*- coding: utf-8 -*-
def main():
_, K = map(int, input().split(" "))
S = input()
S[K - 1] = S[K - 1].lower()
print(S)
if __name__ == "__main__":
main()
| # -*- coding: utf-8 -*-
def main():
_, K = map(int, input().split(" "))
S = input()
print(S[: K - 1] + S[K - 1].lower() + S[K:])
if __name__ == "__main__":
main()
| replace | 7 | 10 | 7 | 8 | TypeError: 'str' object does not support item assignment | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03041/Python/s201072546.py", line 13, in <module>
main()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03041/Python/s201072546.py", line 7, in main
S[K - 1] = S[K - 1].lower()
TypeE... |
p03041 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
ifstream in("input.txt");
cin.rdbuf(in.rdbuf());
int n, k;
string s;
cin >... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <fstream>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
int n, k;
string s;
cin >> n >> k >> s;
k--;
if (s[k] == 'A') {
s[k] =... | delete | 15 | 18 | 15 | 15 | -11 | |
p03041 | C++ | Runtime Error | #include <stdio.h>
int main() {
int n;
int k;
char s[n + 1];
scanf("%d", &n);
scanf("%d", &k);
scanf("%s", &s);
char j = k - 1;
s[j] += 32;
printf("%s\n", s);
return 0;
}
| #include <stdio.h>
int main() {
char name[52];
int b;
int c;
scanf("%d %d", &c, &b);
getchar();
scanf("%[^\n]", name);
name[b - 1] += 32;
printf("%s", name);
return 0;
} | replace | 3 | 17 | 3 | 11 | 0 | |
p03041 | C++ | Runtime Error | /*coderanant*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define f1(i, a, b) for (i = a; i < b; i++)
#define f2(i, a, b) for (i = a; i >= b; i--)
#define endl '\n'
#define pb push_back
#define gp " "
#define ff first
#define ss second
#define mp make_pair
const int mod =... | /*coderanant*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define f1(i, a, b) for (i = a; i < b; i++)
#define f2(i, a, b) for (i = a; i >= b; i--)
#define endl '\n'
#define pb push_back
#define gp " "
#define ff first
#define ss second
#define mp make_pair
const int mod =... | replace | 22 | 26 | 22 | 26 | -11 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define Max(x, ... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define Max(x, ... | replace | 21 | 25 | 21 | 22 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n, k;
char s[n];
cin >> n >> k >> s;
s[k - 1] += 32;
printf("%s\n", s);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n, k;
char s[100];
cin >> n >> k;
cin >> s;
s[k - 1] += 32;
printf("%s\n", s);
return 0;
} | replace | 6 | 8 | 6 | 9 | -11 | |
p03041 | C++ | Runtime Error | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
int size, th;
string thing;
cin >> size >> th;
for (int i = 0; i < size; i++) {
cin >> thing[i];
}
for (int i = 0; i < size; i++) {
if (i == th - 1) {
putchar(tolower(thing[th - 1]));
} else {
... | #include <cctype>
#include <iostream>
#include <string>
using namespace std;
int main() {
int size, th;
string thing;
cin >> size >> th >> thing;
for (int i = 0; i < size; i++) {
if (i == th - 1) {
putchar(tolower(thing[th - 1]));
} else {
cout << thing[i];
}
}
} | replace | 9 | 14 | 9 | 10 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
int N, K;
cin >> N >> K >> S;
if (S.at(K) == 'A') {
S.at(K) = 'a';
} else if (S.at(K) == 'B') {
S.at(K) = 'b';
} else if (S.at(K) == 'C') {
S.at(K) = 'c';
}
cout << S << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
int N, K;
cin >> N >> K >> S;
if (S.at(K - 1) == 'A') {
S.at(K - 1) = 'a';
} else if (S.at(K - 1) == 'B') {
S.at(K - 1) = 'b';
} else if (S.at(K - 1) == 'C') {
S.at(K - 1) = 'c';
}
cout << S << endl;
} | replace | 9 | 15 | 9 | 15 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
string X, Atoa;
cin >> A >> B >> X;
Atoa = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < 26; i++) {
if (X.at(B) == Atoa.at(i)) {
X.at(B) = Atoa.at(i + 26);
break;
}
}
cout << X << endl;
}... | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
string X, Atoa;
cin >> A >> B >> X;
Atoa = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < 26; i++) {
if (X.at(B - 1) == Atoa.at(i)) {
X.at(B - 1) = Atoa.at(i + 26);
break;
}
}
cout << X <<... | replace | 8 | 10 | 8 | 10 | 0 | |
p03041 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef std::pair<int, int> pii;
typedef std::pair<ll, ll> pll;
typedef std::pair<double, double> pdd;
using namespace std;
#define fastio() \
i... | #include <bits/stdc++.h>
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef std::pair<int, int> pii;
typedef std::pair<ll, ll> pll;
typedef std::pair<double, double> pdd;
using namespace std;
#define fastio() \
i... | delete | 40 | 46 | 40 | 40 | -11 | |
p03041 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int n, k;
cin >> n >> k;
char A[n];
cin >> A;
A[k - 1] = A[k - 1] + 32;
cout << A << "\n";
return 0;
} | #include <iostream>
using namespace std;
int main() {
int n, k;
cin >> n >> k;
char A[n];
cin >> A;
A[k - 1] = A[k - 1] + 32;
cout << A << "\n";
return 0;
} | delete | 4 | 8 | 4 | 4 | -11 | |
p03041 | Python | Runtime Error | n, k = map(int, input().split())
s = input()
s[k - 1] = s[k - 1].lower()
print(s)
| n, k = map(int, input().split())
s = input()
print(s[: k - 1] + s[k - 1].lower() + s[k:])
| replace | 2 | 4 | 2 | 3 | TypeError: 'str' object does not support item assignment | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03041/Python/s255611980.py", line 3, in <module>
s[k - 1] = s[k - 1].lower()
TypeError: 'str' object does not support item assignment
|
p03041 | Python | Runtime Error | N = int(input())
K = int(input())
S = input()
s1 = S[: K - 1]
s2 = S[K:]
if S[K - 1] == "A":
s = s1 + "a" + s2
elif S[K - 1] == "B":
s = s1 + "b" + s2
else:
s = s1 + "c" + s2
print(s)
| nums = input().split()
N = int(nums[0])
K = int(nums[1])
S = input()
s1 = S[: K - 1]
s2 = S[K:]
if S[K - 1] == "A":
s = s1 + "a" + s2
elif S[K - 1] == "B":
s = s1 + "b" + s2
else:
s = s1 + "c" + s2
print(s)
| replace | 0 | 2 | 0 | 3 | ValueError: invalid literal for int() with base 10: '3 1' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03041/Python/s245648699.py", line 1, in <module>
N = int(input())
ValueError: invalid literal for int() with base 10: '3 1'
|
p03041 | Python | Runtime Error | N, K = map(int, input().split())
S = str(input())
if S[K - 1] == "A":
S[K - 1] = "a"
print("".join(S))
elif S[K - 1] == "B":
S[K - 1] = "b"
print("".join(S))
else:
S[K - 1] = "c"
print("".join(S))
| N, K = map(int, input().split())
S = list(input())
if S[K - 1] == "A":
S[K - 1] = "a"
print("".join(S))
elif S[K - 1] == "B":
S[K - 1] = "b"
print("".join(S))
else:
S[K - 1] = "c"
print("".join(S))
| replace | 1 | 2 | 1 | 2 | TypeError: 'str' object does not support item assignment | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03041/Python/s243214892.py", line 4, in <module>
S[K - 1] = "a"
TypeError: 'str' object does not support item assignment
|
p03041 | Python | Runtime Error | N = input()
K = input()
S = list(input())
S[K - 1] = S[K - 1].lower()
print("".join(S))
| N, K = (int(i) for i in input().split())
S = list(input())
S[K - 1] = S[K - 1].lower()
print("".join(S))
| replace | 0 | 2 | 0 | 1 | EOFError: EOF when reading a line | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03041/Python/s060420090.py", line 3, in <module>
S = list(input())
EOFError: EOF when reading a line
|
p03041 | C++ | Runtime Error | #include <stdio.h>
int main() {
int N, K, X;
char nama[12];
scanf("%d %d %d", &N, &K, &X);
scanf("%s", &nama);
X = K - 1;
nama[X] = nama[X] + 32;
printf("%s", nama);
return 0;
} | #include <stdio.h>
int main() {
int n, k;
char s[52];
scanf("%d%d", &n, &k);
scanf("%s", &s);
s[k - 1] += 32;
printf("%s\n", s);
return 0;
}
| replace | 3 | 13 | 3 | 9 | 0 | |
p03041 | C++ | Runtime Error | #include <iostream>
#include <string>
int main() {
int N;
int K;
int cnt = 0;
std::cin >> N >> K;
if (N < 1 || 50 < N)
std::cout << "Error!(1 <= N <= 50)" << std::endl;
if (K > N)
std::cout << "Error!3(K > N)" << std::endl;
char *s;
std ::cin >> s;
std::string tmp = std::string(s);
if (st... | #include <iostream>
#include <string>
int main() {
int N;
int K;
char s[50];
std::cin >> N >> K >> s;
std::string tmp = std::string(s);
if (std::islower(s[K - 1])) {
s[K - 1] = toupper(s[K - 1]);
} else {
s[K - 1] = tolower(s[K - 1]);
}
std::cout << s << std::endl;
return 0;
} | replace | 7 | 15 | 7 | 9 | 0 | |
p03041 | Python | Runtime Error | n, k = map(int, input().split())
s = list(input())
s[k] = s[k].lower()
print("".join(s))
| n, k = map(int, input().split())
s = list(input())
s[k - 1] = s[k - 1].lower()
print("".join(s))
| replace | 2 | 3 | 2 | 3 | 0 | |
p03041 | C++ | Time Limit Exceeded | #pragma warning(disable : 4996)
#include <stdio.h>
int main() {
int n, k;
char s[51];
scanf("%d %d", &n, &k);
scanf("%s", s);
/*
printf("%d %d", 'a', 'A');
while (1);
*/
s[k - 1] += 32;
printf("%s", s);
while (1)
;
} | #pragma warning(disable : 4996)
#include <stdio.h>
int main() {
int n, k;
char s[51];
scanf("%d %d", &n, &k);
scanf("%s", s);
/*
printf("%d %d", 'a', 'A');
while (1);
*/
s[k - 1] += 32;
printf("%s", s);
} | delete | 15 | 17 | 15 | 15 | TLE | |
p03041 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, k;
string s;
cin >> n >> k;
cin >> s;
s.at(k) = tolower(s.at(k));
cout << s << endl;
} | #include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int n, k;
string s;
cin >> n >> k;
cin >> s;
s.at(k - 1) = tolower(s.at(k - 1));
cout << s << endl;
} | replace | 12 | 13 | 12 | 13 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.