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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03081 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
void solve(void) {
int n, q;
string s;
cin >> n >> q >> s;
vector<char> ts(n), ds(n);
for (int i = 0; i < q; i++) {
cin >> ts[i] >> ds[i];
}
int l = -1, r = n;
while (l + 1 < r) {
int m = (l + r) / 2, p = m;
char t = s[p];
for (int i = 0; i... | #include "bits/stdc++.h"
using namespace std;
void solve(void) {
int n, q;
string s;
cin >> n >> q >> s;
vector<char> ts(q), ds(q);
for (int i = 0; i < q; i++) {
cin >> ts[i] >> ds[i];
}
int l = -1, r = n;
while (l + 1 < r) {
int m = (l + r) / 2, p = m;
char t = s[p];
for (int i = 0; i... | replace | 8 | 9 | 8 | 9 | 0 | |
p03081 | C++ | Runtime Error | #include <cstdio>
int const NMAX = 201;
char s[NMAX], t[NMAX], d[NMAX];
int n, q;
int lastposition(int i) {
int c = i;
for (int qi = 0; qi < q; qi++) {
if (s[c] == t[qi]) {
if (d[qi] == 'L') {
c--;
if (c < 0)
return -1;
} else {
c++;
if (c >= n)
re... | #include <cstdio>
int const NMAX = 200001;
char s[NMAX], t[NMAX], d[NMAX];
int n, q;
int lastposition(int i) {
int c = i;
for (int qi = 0; qi < q; qi++) {
if (s[c] == t[qi]) {
if (d[qi] == 'L') {
c--;
if (c < 0)
return -1;
} else {
c++;
if (c >= n)
... | replace | 1 | 2 | 1 | 2 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
typedef pair<ll, l... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define FORR(i, m, n) for (int i = m; i >= n; i--)
#define ALL(x) (x).begin(), (x).end()
using namespace std;
typedef long long ll;
typedef pair<ll, l... | replace | 16 | 17 | 16 | 17 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (int i ... | #include <bits/stdc++.h>
using namespace std;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (int i ... | replace | 78 | 79 | 78 | 79 | 0 | |
p03081 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, s, t... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, s, t... | replace | 75 | 76 | 75 | 76 | 0 | |
p03081 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int N, Q;
cin >> N >> Q;
string S;
cin >> S;
char t[N], d[N];
int ts = -1, te = N;
for (int i = 0; i < Q; i++) {
cin >> t[i] >> d[i];
}
for (int i = Q - 1; i >= 0; i-... | #include <iostream>
#include <string>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int N, Q;
cin >> N >> Q;
string S;
cin >> S;
char t[Q], d[Q];
int ts = -1, te = N;
for (int i = 0; i < Q; i++) {
cin >> t[i] >> d[i];
}
for (int i = Q - 1; i >= 0; i-... | replace | 11 | 12 | 11 | 12 | 0 | |
p03081 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
ll N, Q;
string s;
vector<char> t, d;
void input() {
cin >> N >> Q >> s;
t.resize(N);
d.resize(N);
f... | #include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <unordered_map>
#include <vector>
using namespace std;
using ll = long long;
ll N, Q;
string s;
vector<char> t, d;
void input() {
cin >> N >> Q >> s;
t.resize(Q);
d.resize(Q);
f... | replace | 19 | 21 | 19 | 21 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define p_ary(ary, a, b, i) \
do { \
cout << "["; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define p_ary(ary, a, b, i) \
do { \
cout << "["; ... | replace | 30 | 31 | 30 | 31 | 0 | |
p03081 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <assert.h>
#include <cmath>
#include <fstream>
#include <iostream>
#include <queue>
#include <set>
#include <stdio.h>
#include <vector>
// #include <unordered_map>
// #include <unordered_set>
// #include <boost/container/static_vector.hpp>
// #include <boost/unordered_set.... | #include <algorithm>
#include <array>
#include <assert.h>
#include <cmath>
#include <fstream>
#include <iostream>
#include <queue>
#include <set>
#include <stdio.h>
#include <vector>
// #include <unordered_map>
// #include <unordered_set>
// #include <boost/container/static_vector.hpp>
// #include <boost/unordered_set.... | replace | 17 | 18 | 17 | 18 | 0 | |
p03081 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
const int maxn = 222;
const int maxs = 200100;
const int mod = 1000000007;
char t[maxn], d[maxn];
int main() {
int n, q;
cin >> n >> q;
string s;
cin >> s;
for (int i = 0; i < q; i++)
cin >> t[i] >> d[i];
int tot = 0;
int lo = 0, hi = n - 1, ans = -1;
wh... | #include "bits/stdc++.h"
using namespace std;
const int maxn = 200200;
const int maxs = 200100;
const int mod = 1000000007;
char t[maxn], d[maxn];
int main() {
int n, q;
cin >> n >> q;
string s;
cin >> s;
for (int i = 0; i < q; i++)
cin >> t[i] >> d[i];
int tot = 0;
int lo = 0, hi = n - 1, ans = -1;
... | replace | 2 | 3 | 2 | 3 | 0 | |
p03081 | C++ | Runtime Error | #pragma comment(linker, "/stack:247474112")
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define REP(i, n) for (ll i = 0; i < n; ++i)
#define RANGE(i, x, n) for (ll i = x; i < n; ++i)
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
void accelerate() {
ios::sync_with_stdio(false);
... | #pragma comment(linker, "/stack:247474112")
#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define REP(i, n) for (ll i = 0; i < n; ++i)
#define RANGE(i, x, n) for (ll i = x; i < n; ++i)
using namespace std;
typedef long long ll;
const int INF = 0x3f3f3f3f;
void accelerate() {
ios::sync_with_stdio(false);
... | replace | 76 | 77 | 76 | 77 | 0 | |
p03081 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, int> query;
ty... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, int> query;
ty... | replace | 22 | 25 | 22 | 25 | 0 | |
p03081 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, N) for (i = 0; i < N; i++)
typedef long long ll;
typedef pair<int, int> P;
typedef struct {
int first;
int second;
int third;
} T;
// 昇順
bool comp_Se(T &l, T &r) { return l.second < r.second; }
int N, Q;
string s;
vector<pair<char, char>> v;
int fall... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, N) for (i = 0; i < N; i++)
typedef long long ll;
typedef pair<int, int> P;
typedef struct {
int first;
int second;
int third;
} T;
// 昇順
bool comp_Se(T &l, T &r) { return l.second < r.second; }
int N, Q;
string s;
vector<pair<char, char>> v;
int fall... | replace | 79 | 80 | 79 | 80 | TLE | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0, i##_max = (N); i < i##_max; ++i)
#define repp(i, l, r) for (int i = (l), i##_max = (r); i < i##_max; ++i)
#define per(i, N) for (int i = (N)-1; i >= 0; --i)
#define perr(i, l, r) for (int i = r - 1, i##_min(l); i >= i##_min; --i)
#define al... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0, i##_max = (N); i < i##_max; ++i)
#define repp(i, l, r) for (int i = (l), i##_max = (r); i < i##_max; ++i)
#define per(i, N) for (int i = (N)-1; i >= 0; --i)
#define perr(i, l, r) for (int i = r - 1, i##_min(l); i >= i##_min; --i)
#define al... | replace | 54 | 55 | 54 | 55 | 0 | |
p03081 | C++ | Runtime Error | // https://atcoder.jp/contests/exawizards2019/tasks/exawizards2019_c
// C - Snuke the Wizard
#include <bits/stdc++.h>
#if LOCAL
#include "dump.hpp"
#else
#define dump(...)
#endif
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
template <class... | // https://atcoder.jp/contests/exawizards2019/tasks/exawizards2019_c
// C - Snuke the Wizard
#include <bits/stdc++.h>
#if LOCAL
#include "dump.hpp"
#else
#define dump(...)
#endif
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (ll i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
template <class... | replace | 83 | 84 | 83 | 84 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, s) for (int i = 0; i < s; ++i)
#define ALL(v) (v).begin(), (v).end()
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) \
for (__typeof__((s).begin()... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, s) for (int i = 0; i < s; ++i)
#define ALL(v) (v).begin(), (v).end()
#define COUT(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define EACH(i, s) \
for (__typeof__((s).begin()... | replace | 58 | 59 | 58 | 59 | 0 | |
p03081 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | replace | 54 | 55 | 54 | 55 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long N;
long Q;
vector<char> t_ls;
vector<char> d_ls;
string s;
bool check_left(long ind) {
for (int i = 0; i < ::Q; i++) {
if (::t_ls[i] == ::s[ind]) {
if (::d_ls[i] == (char)'L') {
ind -= 1;
} else {
ind += 1;
}
}
if (ind >... | #include <bits/stdc++.h>
using namespace std;
long N;
long Q;
vector<char> t_ls;
vector<char> d_ls;
string s;
bool check_left(long ind) {
for (int i = 0; i < ::Q; i++) {
if (::t_ls[i] == ::s[ind]) {
if (::d_ls[i] == (char)'L') {
ind -= 1;
} else {
ind += 1;
}
}
if (ind >... | replace | 54 | 56 | 54 | 56 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<double, int> pdi;
typedef pair<ll, ll> pll;
#define S second
#define F first
#define kill(x) return (cout << x << endl, 0)
#define debug(x) cerr << #x << " : " << x << endl
#define ddebug(x, y) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<double, int> pdi;
typedef pair<ll, ll> pll;
#define S second
#define F first
#define kill(x) return (cout << x << endl, 0)
#define debug(x) cerr << #x << " : " << x << endl
#define ddebug(x, y) ... | replace | 24 | 25 | 24 | 25 | 0 | |
p03081 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >... | replace | 31 | 32 | 31 | 32 | 0 | |
p03081 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
string s;
ll N, Q;
vector<char> t(20000);
vector<char> d(20000);
int simulation(int pos) {
for (int i = 0; i < Q; ++i) {
if (pos == 0)
return -1;
if (pos == N + 1)
return 1;
if (s[pos - 1] == t[i]) {
if (d[i] == 'R')... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
string s;
ll N, Q;
vector<char> t(200000);
vector<char> d(200000);
int simulation(int pos) {
for (int i = 0; i < Q; ++i) {
if (pos == 0)
return -1;
if (pos == N + 1)
return 1;
if (s[pos - 1] == t[i]) {
if (d[i] == 'R... | replace | 7 | 9 | 7 | 9 | 0 | |
p03082 | C++ | Time Limit Exceeded | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define int long long
using namesp... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
#define int long long
using namesp... | replace | 103 | 107 | 103 | 106 | TLE | |
p03082 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vpi std::vector<pi>
#define pi std::pair<int, int>
#define fi first
#define se second
#define all(n) n.begin(), n.end()
#define FROMTO(var, from, to) \
for (int var... | #include <bits/stdc++.h>
#define vi std::vector<int>
#define vvi std::vector<std::vector<int>>
#define vpi std::vector<pi>
#define pi std::pair<int, int>
#define fi first
#define se second
#define all(n) n.begin(), n.end()
#define FROMTO(var, from, to) \
for (int var... | insert | 243 | 243 | 243 | 244 | TLE | |
p03082 | C++ | Time Limit Exceeded | // 見せてやるぜ、奇跡ってやつをよぉ……
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#inclu... | // 見せてやるぜ、奇跡ってやつをよぉ……
#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#inclu... | replace | 74 | 75 | 74 | 75 | TLE | |
p03082 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#define Rep(i, a, b) for (register int i = (a); i <= (b); ++i)
#define Repe(i, a, b) for (register int i = (a); i >= (b); --i)
#defin... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#define Rep(i, a, b) for (register int i = (a); i <= (b); ++i)
#define Repe(i, a, b) for (register int i = (a); i >= (b); --i)
#defin... | delete | 107 | 108 | 107 | 107 | TLE | |
p03082 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
#define LL long long
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define PB push_back
#define MP make_pair
#define all(x) x.begin(), x.end()
#define MOD 1000000007LL
#define int long long
int N, X, S[200];
int dp[200][100001];
bool already[200][100001] = {};
int... | #include "bits/stdc++.h"
using namespace std;
#define LL long long
#define REP(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define PB push_back
#define MP make_pair
#define all(x) x.begin(), x.end()
#define MOD 1000000007LL
#define int long long
int N, X, S[200];
int dp[200][100001];
bool already[200][100001] = {};
int... | insert | 30 | 30 | 30 | 31 | TLE | |
p03082 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#inclu... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#inclu... | insert | 99 | 99 | 99 | 101 | TLE | |
p03082 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// type definitions
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef complex<int> ci;
typedef complex<double> cd;
typedef complex<long double> cld;
typedef long doubl... | #include <bits/stdc++.h>
using namespace std;
// type definitions
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef complex<int> ci;
typedef complex<double> cd;
typedef complex<long double> cld;
typedef long doubl... | replace | 105 | 106 | 105 | 106 | TLE | |
p03082 | C++ | Runtime Error | // #pragma GCC optimize("O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
// #pragma GCC optimize ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int mod = 1e9 + 7;
const int N = 201;
int s[200];
ll f[N], fr[N];
ll ... | // #pragma GCC optimize("O3")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,tune=native")
// #pragma GCC optimize ("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
const int mod = 1e9 + 7;
const int N = 201;
int s[200];
ll f[N], fr[N];
ll ... | replace | 30 | 31 | 30 | 31 | 0 | |
p03082 | C++ | Runtime Error | // todo 文字数を少なくする
#pragma GCC optimize("-O3")
#include <bits/stdc++.h>
using namespace std;
//@起動時
struct initon {
initon() {
cin.tie(0);
ios::sync_with_stdio(false);
cout.setf(ios::fixed);
cout.precision(16);
srand((unsigned)clock() + (unsigned)time(NULL));
};
} __initon;
// 衝突対策
#define ws __... | // todo 文字数を少なくする
#pragma GCC optimize("-O3")
#include <bits/stdc++.h>
using namespace std;
//@起動時
struct initon {
initon() {
cin.tie(0);
ios::sync_with_stdio(false);
cout.setf(ios::fixed);
cout.precision(16);
srand((unsigned)clock() + (unsigned)time(NULL));
};
} __initon;
// 衝突対策
#define ws __... | replace | 2,709 | 2,710 | 2,709 | 2,711 | -11 | |
p03082 | Python | Runtime Error | # -*- coding: utf-8 -*-
from collections import defaultdict
n, X = map(int, input().split())
s = list(map(int, input().split()))
s = sorted(s, reverse=True)
mod = 10**9 + 7
dp = defaultdict(int)
dp[X] = 1
for i in range(n):
new_dp = defaultdict(int)
for x in dp:
mod_x = x % s[i]
new_dp[x]... | # -*- coding: utf-8 -*-
from collections import defaultdict
n, X = map(int, input().split())
s = list(map(int, input().split()))
s = sorted(s, reverse=True)
mod = 10**9 + 7
dp = defaultdict(int)
dp[X] = 1
for i in range(n):
new_dp = defaultdict(int)
for x in dp:
mod_x = x % s[i]
new_dp[x]... | delete | 21 | 22 | 21 | 21 | 0 | |
p03082 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <iomanip>
#define DEBUG 1
using namespace std;
typedef long long LL;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<LD, LD> PLDLD;
typedef vector<int> VI;
typedef vector<LL> VLL;
typedef vector<char> VB;
#define FOR(i, a, b) for (int i = (... | #include <bits/stdc++.h>
#include <iomanip>
#define DEBUG 1
using namespace std;
typedef long long LL;
typedef long double LD;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<LD, LD> PLDLD;
typedef vector<int> VI;
typedef vector<LL> VLL;
typedef vector<char> VB;
#define FOR(i, a, b) for (int i = (... | insert | 311 | 311 | 311 | 313 | TLE | |
p03082 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int MOD = 1e9 + 7;
const int N = 202;
int n, x, s[N];
int fac[N];
LL dp[202][100000 + 10];
LL A[202][202];
int main() {
scanf("%d%d", &n, &x);
for (int i = 1; i <= n; i++) {
scanf("%d", &s[i]);
}
dp[0][x] = 1;
sort(s + 1, s + 1 + n... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int MOD = 1e9 + 7;
const int N = 202;
int n, x, s[N];
int fac[N];
LL dp[202][100000 + 10];
LL A[202][202];
int main() {
scanf("%d%d", &n, &x);
for (int i = 1; i <= n; i++) {
scanf("%d", &s[i]);
}
dp[0][x] = 1;
sort(s + 1, s + 1 + n... | insert | 19 | 19 | 19 | 21 | TLE | |
p03082 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define MOD 1000000007
#... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define MOD 1000000007
#... | replace | 204 | 210 | 204 | 211 | TLE | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e5 + 5, MOD = 1e9 + 7;
int B, W, n;
int sumW[MAX_N];
int sumB[MAX_N];
int F[MAX_N];
int _sum(int a, int b) {
int c = a + b;
if (MOD <= c)
c -= MOD;
return c;
}
int _sub(int a, int b) {
int c = a - b;
if (c < 0)
c += MOD;
return ... | #include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e5 + 10, MOD = 1e9 + 7;
int B, W, n;
int sumW[MAX_N];
int sumB[MAX_N];
int F[MAX_N];
int _sum(int a, int b) {
int c = a + b;
if (MOD <= c)
c -= MOD;
return c;
}
int _sub(int a, int b) {
int c = a - b;
if (c < 0)
c += MOD;
return... | replace | 3 | 4 | 3 | 4 | 0 | |
p03083 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define N (long long)(1e9 + 7)
#define MAX 500000
using namespace std;
long long factorial[MAX] = {0}, finverse[MAX] = {0}, inverse[MAX] = {0};
void smodfact() {
factorial[0] = factorial[1] = 1;
finverse[0] = finverse[1] = 1;
inverse[1] = 1;
for (int i = 2; i < MAX; ++i) {
factoria... | #include <bits/stdc++.h>
#define N (long long)(1e9 + 7)
#define MAX 500000
using namespace std;
long long factorial[MAX] = {0}, finverse[MAX] = {0}, inverse[MAX] = {0};
void smodfact() {
factorial[0] = factorial[1] = 1;
finverse[0] = finverse[1] = 1;
inverse[1] = 1;
for (int i = 2; i < MAX; ++i) {
factoria... | replace | 26 | 27 | 26 | 27 | TLE | |
p03083 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#incl... | replace | 27 | 28 | 27 | 28 | 0 | |
p03083 | C++ | Runtime Error | #include <iostream>
using namespace std;
const int N = 1e5 + 10, mod = 1e9 + 7;
int jc[N], inv[N], bit[N], B, W, sw[N], sb[N];
int ksm(int x, int k) {
int s = 1;
for (; k; k >>= 1, x = 1ll * x * x % mod)
if (k & 1)
s = 1ll * s * x % mod;
return s;
}
int C(int n, int k) { return 1ll * jc[n] * inv[k] % mo... | #include <iostream>
using namespace std;
const int N = 2e5 + 10, mod = 1e9 + 7;
int jc[N], inv[N], bit[N], B, W, sw[N], sb[N];
int ksm(int x, int k) {
int s = 1;
for (; k; k >>= 1, x = 1ll * x * x % mod)
if (k & 1)
s = 1ll * s * x % mod;
return s;
}
int C(int n, int k) { return 1ll * jc[n] * inv[k] % mo... | replace | 2 | 3 | 2 | 3 | 0 | |
p03083 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
const long long mod = 1e9 + 7;
long long mod_pow(long long x, long long k) {
long long ret = 1;
while (k) {
if (k & 1)
ret *= x, ret %= mod;
x *= x, x %= mod;
k >>= 1;
}
return ret;
}
int main() {
int b, w;
cin >> b >> w;
int N... | #include <iostream>
#include <vector>
using namespace std;
const long long mod = 1e9 + 7;
long long mod_pow(long long x, long long k) {
long long ret = 1;
while (k) {
if (k & 1)
ret *= x, ret %= mod;
x *= x, x %= mod;
k >>= 1;
}
return ret;
}
int main() {
int b, w;
cin >> b >> w;
int N... | replace | 32 | 33 | 32 | 33 | -11 | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
const char nl = '\n';
using namespace std;
using ll = long long;
using ld = long double;
const int MOD = 1e9 + 7;
const int N = 1e5 + 10;
ll pw(ll x, ll e) {
ll ans = 1;
for (; e; e /= 2, x = (x * x) % MOD) {
if (e % 2)
ans = (ans * x) % MOD;
}
return ans;
}
ll fac[N], ifac[... | #include <bits/stdc++.h>
const char nl = '\n';
using namespace std;
using ll = long long;
using ld = long double;
const int MOD = 1e9 + 7;
const int N = 2e5 + 10;
ll pw(ll x, ll e) {
ll ans = 1;
for (; e; e /= 2, x = (x * x) % MOD) {
if (e % 2)
ans = (ans * x) % MOD;
}
return ans;
}
ll fac[N], ifac[... | replace | 6 | 7 | 6 | 7 | 0 | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
// #define int ll
// #define int __int128
// #define ll __int128
// typedef __int128 long long;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
ty... | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
// #define int ll
// #define int __int128
// #define ll __int128
// typedef __int128 long long;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<int> vi;
ty... | replace | 100 | 101 | 100 | 101 | 0 | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < (n); i++)
#define reps(i, n) for (int i = 1; i <= (n); i++)
#define all(x) (x).begin(), (x).end()
#define uniq(x) (x).erase(unique(all(x)), (x).end())
#define bit(n) (1LL << (n))
#define... | replace | 158 | 159 | 158 | 159 | 0 | |
p03083 | C++ | Runtime Error | // minamoto
#include <bits/stdc++.h>
#define R register
#define fp(i, a, b) for (R int i = (a), I = (b) + 1; i < I; ++i)
#define fd(i, a, b) for (R int i = (a), I = (b)-1; i > I; --i)
#define go(u) for (int i = head[u], v = e[i].v; i; i = e[i].nx, v = e[i].v)
using namespace std;
char sr[1 << 21], z[20];
int K = -1, Z ... | // minamoto
#include <bits/stdc++.h>
#define R register
#define fp(i, a, b) for (R int i = (a), I = (b) + 1; i < I; ++i)
#define fd(i, a, b) for (R int i = (a), I = (b)-1; i > I; --i)
#define go(u) for (int i = head[u], v = e[i].v; i; i = e[i].nx, v = e[i].v)
using namespace std;
char sr[1 << 21], z[20];
int K = -1, Z ... | replace | 21 | 22 | 21 | 22 | 0 | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 100005;
const int MOD = 1000000007;
//
int fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void init() {
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;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 200005;
const int MOD = 1000000007;
//
int fac[MAX], finv[MAX], inv[MAX];
// テーブルを作る前処理
void init() {
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;
... | replace | 4 | 5 | 4 | 5 | 0 | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 7;
const int MOD = 1000 * 1000 * 1000 + 7;
int mod(int n) { return (n % MOD + MOD) % MOD; }
int fp(int n, int p) {
int ans = 1, c = n;
for (int i = 0; (1ll << i) <= p; ++i) {
if ((p >> i) & 1)
ans = mod(ans * c);
c... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 2e5 + 7;
const int MOD = 1000 * 1000 * 1000 + 7;
int mod(int n) { return (n % MOD + MOD) % MOD; }
int fp(int n, int p) {
int ans = 1, c = n;
for (int i = 0; (1ll << i) <= p; ++i) {
if ((p >> i) & 1)
ans = mod(ans * c);
c... | replace | 3 | 4 | 3 | 4 | 0 | |
p03083 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REP_FROM(i, j, n) for (int i = (j); i < (n); ++i)
#define all(x) (x).begin(), (x).end()
ll power(ll base, ll exponent, ll module) {
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
using ll = long long;
const ll mod = 1000000007;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REP_FROM(i, j, n) for (int i = (j); i < (n); ++i)
#define all(x) (x).begin(), (x).end()
ll power(ll base, ll exponent, ll module) {
... | replace | 50 | 52 | 50 | 52 | -6 | munmap_chunk(): invalid pointer
|
p03083 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("tune=native")
#pragma GCC target("avx")
// #pragma GCC target("avx2")
#pragma GCC optimize("unroll-loops")
using namespace std;
using i64 = int64_t;
const i64 MOD = 1e9 + 7;
const i64 INF = 1e18 + 7;
// pythonのrangeのような範囲for文用のclass for(const... | #include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("tune=native")
#pragma GCC target("avx")
// #pragma GCC target("avx2")
#pragma GCC optimize("unroll-loops")
using namespace std;
using i64 = int64_t;
const i64 MOD = 1e9 + 7;
const i64 INF = 1e18 + 7;
// pythonのrangeのような範囲for文用のclass for(const... | delete | 254 | 275 | 254 | 254 | TLE | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int64_t MOD = 1'000'000'007;
int64_t fact[200001], factinv[200001];
int64_t mpow(int64_t x, int64_t y) {
if (y == 0)
return 1;
if (y == 1)
return x % MOD;
if (y % 2 == 0)
return mpow(x * x % MOD, y / 2) % MOD;
return mpow(x * x % MOD, y / 2) * x ... | #include <bits/stdc++.h>
using namespace std;
const int64_t MOD = 1'000'000'007;
int64_t fact[200001], factinv[200001];
int64_t mpow(int64_t x, int64_t y) {
if (y == 0)
return 1;
if (y == 1)
return x % MOD;
if (y % 2 == 0)
return mpow(x * x % MOD, y / 2) % MOD;
return mpow(x * x % MOD, y / 2) * x ... | replace | 49 | 50 | 49 | 50 | 0 | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define all(x) x.begin(), x.end()
typedef long long ll;
typedef long double ld;
const int N = 1000 * 100 + 10, M = 210;
const int mod = 1000 * 1000 * 1000 + 7;
int fact[N], inv[N];
int tv(int x, int y) {
if (!y)
... | #include <bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define PB push_back
#define all(x) x.begin(), x.end()
typedef long long ll;
typedef long double ld;
const int N = 10000 * 100 + 10, M = 210;
const int mod = 1000 * 1000 * 1000 + 7;
int fact[N], inv[N];
int tv(int x, int y) {
if (!y)
... | replace | 11 | 12 | 11 | 12 | 0 | |
p03083 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | replace | 45 | 46 | 45 | 46 | 0 | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define FOR(i, a, b) for (int(i) = (a); (i) <= (b); (i)++)
#define ROF(i, a, b) for (int(i) = (a); (i) >= (b); (i)--)
#define REP(i, n) FOR(i, 0, (n)-1)
#define sqr(x) ((x) * (x))
#define all(x) (x).begin(), (x).end()
#defi... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
#define FOR(i, a, b) for (int(i) = (a); (i) <= (b); (i)++)
#define ROF(i, a, b) for (int(i) = (a); (i) >= (b); (i)--)
#define REP(i, n) FOR(i, 0, (n)-1)
#define sqr(x) ((x) * (x))
#define all(x) (x).begin(), (x).end()
#defi... | replace | 55 | 56 | 55 | 56 | 0 | |
p03083 | C++ | Runtime Error | #include <iostream>
using namespace std;
const int N = 100 * 1000 + 5;
const int mod = 1000 * 1000 * 1000 + 7;
long long psw[N];
long long psb[N];
long long fac[2 * N];
int po(long long x, long long y) {
if (y == 0)
return 1;
long long ans = po(x, y / 2);
ans *= ans;
ans %= mod;
if (y % 2) {
ans *= ... | #include <iostream>
using namespace std;
const int N = 100 * 1000 + 5;
const int mod = 1000 * 1000 * 1000 + 7;
long long psw[2 * N];
long long psb[2 * N];
long long fac[2 * N];
int po(long long x, long long y) {
if (y == 0)
return 1;
long long ans = po(x, y / 2);
ans *= ans;
ans %= mod;
if (y % 2) {
... | replace | 6 | 8 | 6 | 8 | 0 | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MOD = 1e9 + 7;
int pw(int n, int k) {
if (k < 0)
return pw(n, k + MOD - 1);
int res = 1;
while (k) {
if (k & 1)
res *= n;
res %= MOD;
n *= n;
n %= MOD;
k >>= 1;
}
return res;
}
std::vector<int> Factoria... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int MOD = 1e9 + 7;
int pw(int n, int k) {
if (k < 0)
return pw(n, k + MOD - 1);
int res = 1;
while (k) {
if (k & 1)
res *= n;
res %= MOD;
n *= n;
n %= MOD;
k >>= 1;
}
return res;
}
std::vector<int> Factoria... | replace | 47 | 48 | 47 | 48 | 0 | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007, inv2 = mod + 1 >> 1;
long long fac[200010], inv[200010];
int B, W;
long long Pow(long long x, long long y) {
long long ans = 1;
for (; y; y >>= 1, x = x * x % mod)
if (y & 1)
ans = ans * x % mod;
return ans;
}
void pre(int n = 2... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007, inv2 = mod + 1 >> 1;
long long fac[200010], inv[200010];
int B, W;
long long Pow(long long x, long long y) {
long long ans = 1;
for (; y; y >>= 1, x = x * x % mod)
if (y & 1)
ans = ans * x % mod;
return ans;
}
void pre(int n = 2... | replace | 22 | 23 | 22 | 27 | 0 | |
p03083 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <tuple>
#include <utility>
#include <vector>
#define int long long
#define ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <tuple>
#include <utility>
#include <vector>
#define int long long
#define ... | replace | 48 | 49 | 48 | 49 | 0 | |
p03083 | C++ | Runtime Error | #pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define all(v) v.begin(), v.end()
#define sz(v) int(v.size())
using namespace std;
using ll = int64_t;
constexpr int N = 1e5;
constexpr int MOD = ... | #pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
#include <bits/stdc++.h>
#define pb push_back
#define fi first
#define se second
#define all(v) v.begin(), v.end()
#define sz(v) int(v.size())
using namespace std;
using ll = int64_t;
constexpr int N = 3 * 1e5;
constexpr int MO... | replace | 14 | 15 | 14 | 15 | 0 | |
p03083 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#define Rep(i, a, b) for (register int i = (a); i <= (b); ++i)
#define Repe(i, a, b) for (register int i = (a); i >= (b); --i)
#defin... | #include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#define Rep(i, a, b) for (register int i = (a); i <= (b); ++i)
#define Repe(i, a, b) for (register int i = (a); i >= (b); --i)
#defin... | delete | 119 | 120 | 119 | 119 | TLE | |
p03083 | C++ | Runtime Error | typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
std::fill((T *)array, (T *)(array + N), val);
}
const int MAX = 110000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
std::unordered_map<ll,... | typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
std::fill((T *)array, (T *)(array + N), val);
}
const int MAX = 210000;
const int MOD = 1000000007;
long long fac[MAX], finv[MAX], inv[MAX];
std::unordered_map<ll,... | replace | 7 | 8 | 7 | 8 | 0 | |
p03083 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define LL long long
#define mp(x, y) make_pair(x, y)
#define pll pair<long long, long long>
#define pii pair<int, int>
using ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define LL long long
#define mp(x, y) make_pair(x, y)
#define pll pair<long long, long long>
#define pii pair<int, int>
using ... | replace | 54 | 55 | 54 | 55 | 0 | |
p03083 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
vector<long long int> inverse;
vector<long long int> f, f_inverse;
void factorial_Initialize(int max) {
vector<long long int> a(max + 1, 1);
inverse = a;
f = a;
f_inverse = a;
for (int i = 2; i <= max; i++) {
inverse[i] = ... | #include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
vector<long long int> inverse;
vector<long long int> f, f_inverse;
void factorial_Initialize(int max) {
vector<long long int> a(max + 1, 1);
inverse = a;
f = a;
f_inverse = a;
for (int i = 2; i <= max; i++) {
inverse[i] = ... | insert | 48 | 48 | 48 | 49 | TLE | |
p03083 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define ALL(a) (a).begin(), (a).end()
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
const int MAX = 100002;
long long fac[MAX], finv[MAX], inv[MAX];
void pre_comb(void) {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
#define ALL(a) (a).begin(), (a).end()
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7;
const int MAX = 200002;
long long fac[MAX], finv[MAX], inv[MAX];
void pre_comb(void) {
fac[0] = fac[1] = 1;
finv[0] = finv[1] = 1;
... | replace | 6 | 7 | 6 | 7 | 0 | |
p03084 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n, m, q;
string s, t;
const int mod = (int)1e9 + 7;
const int maxN = (int)1e5 + 100;
int tp[2][maxN];
int nxt[2][2][2][maxN];
int num[2];
const int INF = (int)1e9;
const int BUBEN = 5;
int get_dir(int a) {
if (a > 0)
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n, m, q;
string s, t;
const int mod = (int)1e9 + 7;
const int maxN = (int)1e5 + 100;
int tp[2][maxN];
int nxt[2][2][2][maxN];
int num[2];
const int INF = (int)1e9;
const int BUBEN = 4;
int get_dir(int a) {
if (a > 0)
... | replace | 14 | 15 | 14 | 15 | TLE | |
p03084 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
struct FastIO {
FastIO() {
cin.tie(0);
ios::sync_w... | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
struct FastIO {
FastIO() {
cin.tie(0);
ios::sync_w... | insert | 97 | 97 | 97 | 99 | TLE | |
p03084 | C++ | Time Limit Exceeded | // vvvvvvvvvvvv TEMPLATE vvvvvvvvvvvv
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll linf = 1e18;
const double eps = 1e-12, pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##... | // vvvvvvvvvvvv TEMPLATE vvvvvvvvvvvv
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const ll linf = 1e18;
const double eps = 1e-12, pi = acos(-1);
#define FOR(i, a, b) for (ll i = (a), __last_##i = (b); i < __last_##i; i++)
#define RFOR(i, a, b) for (ll i = (b)-1, __last_##... | insert | 82 | 82 | 82 | 83 | TLE | |
p03084 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define MAX 200002
int n;
int m;
char buf[MAX];
string s;
string t;
int qq;
vector<int> row[2];
vector<int> col[2];
vector<int> R;
vector<int> C;
void row_ava(int y) {
for (int i = 0; i < 2; i++) {
int id = lower_bound(row[i].begin(), row[i].end(), y) - row[i].... | #include "bits/stdc++.h"
using namespace std;
#define MAX 200002
int n;
int m;
char buf[MAX];
string s;
string t;
int qq;
vector<int> row[2];
vector<int> col[2];
vector<int> R;
vector<int> C;
void row_ava(int y) {
for (int i = 0; i < 2; i++) {
int id = lower_bound(row[i].begin(), row[i].end(), y) - row[i].... | replace | 59 | 60 | 59 | 60 | 0 | |
p03085 | Python | Runtime Error | def main():
to = ["T", "G"]
fr = ["A", "C"]
print(to[fr.index(input())])
if __name__ == "__main__":
main()
| def main():
to = ["T", "G"]
fr = ["A", "C"]
inc = input()
try:
print(to[fr.index(inc)])
except Exception:
print(fr[to.index(inc)])
if __name__ == "__main__":
main()
| replace | 4 | 5 | 4 | 10 | 0 | |
p03085 | Python | Runtime Error | b = input()
a = ""
for i in range(4):
if b[i] == "A":
a += "T"
elif b[i] == "T":
a += "A"
elif b[i] == "C":
a += "G"
elif b[i] == "G":
a += "C"
print(a)
| b = input()
a = ""
for i in range(len(b)):
if b[i] == "A":
a += "T"
elif b[i] == "T":
a += "A"
elif b[i] == "C":
a += "G"
elif b[i] == "G":
a += "C"
print(a)
| replace | 2 | 3 | 2 | 3 | IndexError: string index out of range | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03085/Python/s500848859.py", line 4, in <module>
if b[i] == 'A':
IndexError: string index out of range
|
p03085 | Python | Runtime Error | input("ATCG"["TAGC".find(input())])
| print("ATCG"["TAGC".find(input())])
| replace | 0 | 1 | 0 | 1 | EOFError: EOF when reading a line | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03085/Python/s332767566.py", line 1, in <module>
input("ATCG"["TAGC".find(input())])
EOFError: EOF when reading a line
|
p03085 | Python | Runtime Error | b = int(input())
if b == "A":
print("T")
elif b == "C":
print("G")
elif b == "T":
print("A")
else:
print("C")
| b = input()
if b == "A":
print("T")
elif b == "C":
print("G")
elif b == "T":
print("A")
else:
print("C")
| replace | 0 | 1 | 0 | 1 | ValueError: invalid literal for int() with base 10: 'A' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03085/Python/s167969735.py", line 1, in <module>
b = int(input())
ValueError: invalid literal for int() with base 10: 'A'
|
p03085 | Python | Runtime Error | b = int(input())
print("A" if b == "T" else "T" if b == "A" else "C" if b == "G" else "G")
| b = input()
print("A" if b == "T" else "T" if b == "A" else "C" if b == "G" else "G")
| replace | 0 | 1 | 0 | 1 | ValueError: invalid literal for int() with base 10: 'A' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03085/Python/s867039619.py", line 1, in <module>
b = int(input())
ValueError: invalid literal for int() with base 10: 'A'
|
p03085 | Python | Runtime Error | s = input()
dict = {"A": "T", "C": "G"}
print(dict[s])
| s = input()
dict = {"A": "T", "C": "G", "T": "A", "G": "C"}
print(dict[s])
| replace | 2 | 3 | 2 | 3 | 0 | |
p03086 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
int n = s.size();
int res = 0;
for (int i = 0; i < n; ++i) {
for (int j = i; j < n; ++j) {
string sub = s.substr(i, j - i + 1);
int num = sub.size();
bool flg = true;
for (int k... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string s;
cin >> s;
int n = s.size();
int res = 0;
for (int i = 0; i < n; ++i) {
for (int j = i; j < n; ++j) {
string sub = s.substr(i, j - i + 1);
int num = sub.size();
bool flg = true;
for (int k... | replace | 17 | 18 | 17 | 18 | TLE | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int ans = 0;
for (int i = 0; i < S.size(); i++) {
int ans1 = 0;
int j = i;
while (S.at(j) == 'A' || S.at(j) == 'T' || S.at(j) == 'G' ||
S.at(j) == 'C') {
ans1++;
j++;
}
ans = max(ans, ans1... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
S += 'Z';
int ans = 0;
for (int i = 0; i < S.size(); i++) {
int ans1 = 0;
int j = i;
while (S.at(j) == 'A' || S.at(j) == 'T' || S.at(j) == 'G' ||
S.at(j) == 'C') {
ans1++;
j++;
}
ans = m... | insert | 6 | 6 | 6 | 7 | 0 | |
p03086 | 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(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define pb push_back
using namespace std;
int main() {
string s;
int ans = 0;
cin >> s;
rep(i, s.size()) {
int c = 0;
... | #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(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define pb push_back
using namespace std;
int main() {
string s;
int ans = 0;
cin >> s;
rep(i, s.size()) {
int c = 0;
... | replace | 14 | 16 | 14 | 15 | 0 | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int i, j, sum = 0;
vector<int> v;
for (i = 0; i < str.size(); i++) {
if (str[i] == 'A' || str[i] == 'G' || str[i] == 'C' || str[i] == 'T') {
sum = sum + 1;
} else {
v.push_back(sum);
sum = 0;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string str;
cin >> str;
int i, j, sum = 0;
vector<int> v;
for (i = 0; i < str.size(); i++) {
if (str[i] == 'A' || str[i] == 'G' || str[i] == 'C' || str[i] == 'T') {
sum = sum + 1;
} else {
v.push_back(sum);
sum = 0;
}
... | insert | 17 | 17 | 17 | 18 | 0 | |
p03086 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define REP(a, i, n) for (int i = a; i < n; ++i)
bool f(char b) {
if ((b == 'A') || (b == 'T') || (b == 'C') || (b == 'G')) {
return true;
} else {
return false;
}
}
int main() {
stri... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
#define REP(a, i, n) for (int i = a; i < n; ++i)
bool f(char b) {
if ((b == 'A') || (b == 'T') || (b == 'C') || (b == 'G')) {
return true;
} else {
return false;
}
}
int main() {
stri... | insert | 33 | 33 | 33 | 38 | 0 | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
priority_queue<int> ans;
int count = 0;
int N = S.size();
for (int i = 0; i < N; i++) {
if (S.at(i) == 'A' || S.at(i) == 'G' || S.at(i) == 'C' || S.at(i) == 'T')
count++;
else {
ans.push(count);
count =... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
priority_queue<int> ans;
int count = 0;
int N = S.size();
for (int i = 0; i < N; i++) {
if (S.at(i) == 'A' || S.at(i) == 'G' || S.at(i) == 'C' || S.at(i) == 'T')
count++;
else {
ans.push(count);
count =... | insert | 17 | 17 | 17 | 18 | 0 | |
p03086 | C++ | Runtime Error | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "string"
#include "un... | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "string"
#include "un... | insert | 34 | 34 | 34 | 35 | -11 | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string S;
int buf = 0;
vector<int> cnt;
cin >> S;
for (int i = 0; i < S.size(); i++) {
if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T') {
buf++;
} else {
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
string S;
int buf = 0;
vector<int> cnt;
cin >> S;
for (int i = 0; i < S.size(); i++) {
if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T') {
buf++;
} else {
... | insert | 18 | 18 | 18 | 19 | 0 | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1000000007;
int main() {
string s;
cin >> s;
int size = s.size();
vector<int> a(size);
for (int i = 0; i < size; i++) {
if (s.at(i) == 'A' || s.at(i) == 'C' || s.at(i) == 'G' || s.at(i) == 'T') {
a.at(i) = 1;
}
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int MOD = 1000000007;
int main() {
string s;
cin >> s;
int size = s.size();
vector<int> a(size);
for (int i = 0; i < size; i++) {
if (s.at(i) == 'A' || s.at(i) == 'C' || s.at(i) == 'G' || s.at(i) == 'T') {
a.at(i) = 1;
}
... | replace | 18 | 21 | 18 | 25 | 0 | |
p03086 | C++ | Runtime Error | // スタックサイズ: 100MB
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
... | // スタックサイズ: 100MB
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
using namespace std;
... | insert | 48 | 48 | 48 | 49 | 0 | |
p03086 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#define endl '\n'
#define fi first
#define se second
#define pb push_back
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
using namespace std... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#define endl '\n'
#define fi first
#define se second
#define pb push_back
#define debug(x) cout << "[debug] " << #x << ": " << x << endl
using namespace std... | insert | 36 | 36 | 36 | 37 | 0 | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string str, stra;
int j = 0, max = 0;
cin >> str;
for (int i = 0; i < str.size(); i++) {
j = i;
stra = "";
while (str.at(j) == 'A' || str.at(j) == 'T' || str.at(j) == 'G' ||
str.at(j) == 'C') {
stra = stra + str.at(j);
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string str, stra;
int j = 0, max = 0;
cin >> str;
for (int i = 0; i < str.size(); i++) {
j = i;
stra = "";
while (j < str.size() && (str.at(j) == 'A' || str.at(j) == 'T' ||
str.at(j) == 'G' || str.at(j) == '... | replace | 9 | 11 | 9 | 11 | 0 | |
p03086 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
std::string s;
std::vector<int> vec;
int c = 0;
int main() {
std::cin >> s;
for (int i = 0; i < s.size(); i++) {
if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') {
c++;
} else {
vec.push_back(c);
c = 0;
}
}
st... | #include <algorithm>
#include <iostream>
#include <vector>
std::string s;
std::vector<int> vec;
int c = 0;
int main() {
std::cin >> s;
for (int i = 0; i < s.size(); i++) {
if (s[i] == 'A' || s[i] == 'T' || s[i] == 'G' || s[i] == 'C') {
c++;
} else {
vec.push_back(c);
c = 0;
}
}
ve... | insert | 17 | 17 | 17 | 18 | 0 | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int ans = 0;
int cont;
for (int i = 0; i < S.size(); i++) {
cont = 0;
while (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' ||
S.at(i) == 'T') {
i++;
cont++;
}
if (cont > ans)
ans... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int ans = 0;
int cont;
for (int i = 0; i < S.size(); i++) {
cont = 0;
while (i < S.size() && (S.at(i) == 'A' || S.at(i) == 'C' ||
S.at(i) == 'G' || S.at(i) == 'T')) {
i++;
cont++;
... | replace | 12 | 14 | 12 | 14 | 0 | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
vector<int> v;
for (int i = 0; i < s.size(); i++)
if (s[i] != 'A' && s[i] != 'C' && s[i] != 'G' && s[i] != 'T')
v.push_back(i);
int ans = 0;
for (int i = 1; i < v.size(); i++)
ans = max(ans, v[i] - v[i - 1] - 1);
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
vector<int> v;
for (int i = 0; i < s.size(); i++)
if (s[i] != 'A' && s[i] != 'C' && s[i] != 'G' && s[i] != 'T')
v.push_back(i);
if (v.empty()) {
cout << s.size() << endl;
return 0;
}
int ans = 0;
for (int i ... | insert | 9 | 9 | 9 | 13 | 0 | |
p03086 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
int cnt = 0;
vector<int> vec;
for (int i = 0; i < S.length(); i++) {
if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') {
cnt++;
} else {
vec.push_back(cnt);
cn... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
int cnt = 0;
vector<int> vec;
for (int i = 0; i < S.length(); i++) {
if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') {
cnt++;
} else {
vec.push_back(cnt);
cn... | insert | 17 | 17 | 17 | 18 | 0 | |
p03086 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define co(a) cout << a << endl
#define sz size()
#define bgn begin()
#define en end()
#... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define co(a) cout << a << endl
#define sz size()
#define bgn begin()
#define en end()
#... | replace | 191 | 192 | 191 | 192 | TLE | |
p03086 | Python | Runtime Error | pat = ["A", "C", "G", "T"]
s = input()
left = right = 0
ans = 0
while left < len(s):
right = left
while s[right] in pat:
right += 1
ans = max(ans, right - left)
left = right + 1
print(ans)
| pat = ["A", "C", "G", "T"]
s = input()
left = right = 0
ans = 0
while left < len(s):
right = left
while right < len(s) and s[right] in pat:
right += 1
ans = max(ans, right - left)
left = right + 1
print(ans)
| replace | 9 | 10 | 9 | 10 | 0 | |
p03086 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
string str;
vector<int> vec;
cin >> str;
for (int i = 0; i < (int)str.length(); i++) {
for (int j = 0; j < (int)str.length() - i; j++) {
if (str[i + j] != 'A' && str[i + j] != 'C' && str[i + j] != 'G' &&
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main() {
string str;
vector<int> vec;
cin >> str;
for (int i = 0; i < (int)str.length(); i++) {
for (int j = 0; j < (int)str.length() - i; j++) {
if (str[i + j] != 'A' && str[i + j] != 'C' && str[i + j] != 'G' &&
... | insert | 19 | 19 | 19 | 23 | 0 | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
vector<int> a;
int x = 0;
for (int i = 0; i < S.size(); i++) {
if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T') {
x++;
} else {
a.push_back(x);
x = 0;
}
}
sort(a.rbegin(),... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
vector<int> a;
int x = 0;
for (int i = 0; i < S.size(); i++) {
if (S.at(i) == 'A' || S.at(i) == 'C' || S.at(i) == 'G' || S.at(i) == 'T') {
x++;
} else {
a.push_back(x);
x = 0;
}
}
a.push_back(x);
... | insert | 16 | 16 | 16 | 17 | 0 | |
p03086 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
char D[4] = {'A', 'T', 'G', 'C'};
int count = 0;
vector<int> C;
for (int i = 0; i < S.size(); i++) {
for (int j = 0; j < 4; j++) {
if (S.at(i) == D[j]) {
count++;
break;
}
if (j == 3) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
char D[4] = {'A', 'T', 'G', 'C'};
int count = 0;
vector<int> C;
for (int i = 0; i < S.size(); i++) {
for (int j = 0; j < 4; j++) {
if (S.at(i) == D[j]) {
count++;
break;
}
if (j == 3) {
... | insert | 20 | 20 | 20 | 21 | 0 | |
p03086 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define range(i, n, m) for (int i = n; i < m; i++)... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <sstream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define range(i, n, m) for (int i = n; i < m; i++)... | replace | 40 | 42 | 40 | 42 | TLE | |
p03086 | Python | Runtime Error | S = input()
res = []
tmp = []
for s in S:
if s == "A" or s == "C" or s == "G" or s == "T":
tmp.append(s)
else:
res.append(len(tmp))
tmp = []
print(max(res))
| S = input()
res = []
tmp = []
for s in S:
if s == "A" or s == "C" or s == "G" or s == "T":
tmp.append(s)
else:
res.append(len(tmp))
tmp = []
res.append(len(tmp))
print(max(res))
| replace | 10 | 11 | 10 | 11 | 0 | |
p03086 | Python | Runtime Error | N = input()
answer_list = []
answer = 0
for i in range(len(N)):
if N[i] == "A" or N[i] == "T" or N[i] == "C" or N[i] == "G":
answer += 1
else:
answer_list.append(answer)
answer = 0
print(max(answer_list))
| N = input()
answer_list = []
answer = 0
for i in range(len(N)):
if N[i] == "A" or N[i] == "T" or N[i] == "C" or N[i] == "G":
answer += 1
else:
answer_list.append(answer)
answer = 0
if i + 1 == len(N):
answer_list.append(answer)
print(max(answer_list))
| insert | 10 | 10 | 10 | 12 | 0 | |
p03086 | Python | Runtime Error | S = input()
S_list = list(S)
answers = []
acgt = 0
for s in S_list:
if s == "A" or s == "C" or s == "G" or s == "T":
acgt += 1
else:
answers.append(acgt)
acgt = 0
print(max(answers))
| S = input()
S_list = list(S)
answers = []
acgt = 0
for s in S_list:
if s == "A" or s == "C" or s == "G" or s == "T":
acgt += 1
else:
answers.append(acgt)
acgt = 0
answers.append(acgt)
if answers:
print(max(answers))
else:
print(acgt)
| replace | 10 | 11 | 10 | 15 | 0 | |
p03086 | Python | Runtime Error | s = input()
i = 0
ans = 0
while i < len(s):
if s[i] == "A" or s[i] == "T" or s[i] == "C" or s[i] == "G":
for j in range(len(s) - i):
if (
s[i + j] != "A"
and s[i + j] != "T"
and s[i + j] != "C"
and s[i + j] != "G"
):
... | s = input()
i = 0
ans = 0
atcg = "ACGT"
for i in range(len(s)):
for j in range(i, len(s)):
t = s[i : j + 1]
cnt = 0
for n in range(4):
cnt += t.count(atcg[n])
if cnt == len(t):
ans = max(ans, cnt)
print(ans)
| replace | 3 | 15 | 3 | 15 | 0 | |
p03086 | Python | Runtime Error | import re
s = input()
pat = r"[ACGT]+"
atgc = re.findall(pat, s)
ress = []
for i in atgc:
ress.append(len(i))
print(max(ress))
| import re
s = input()
pat = r"[ACGT]+"
atgc = re.findall(pat, s)
ress = []
for i in atgc:
ress.append(len(i))
if ress == [""] or ress == []:
print(0)
else:
print(max(ress))
| replace | 8 | 10 | 8 | 12 | 0 | |
p03086 | Python | Runtime Error | s = input()
ans = 0
li = ["A", "C", "G", "T"]
count = 0
for i in s:
if i in li:
count += 1
else:
if count > ans:
ans = count
count = 0
if count == len(ans):
print(count)
else:
print(ans)
| s = input()
ans = 0
li = ["A", "C", "G", "T"]
count = 0
for i in s:
if i in li:
count += 1
else:
if count > ans:
ans = count
count = 0
if count > ans:
ans = count
print(ans)
| replace | 11 | 15 | 11 | 15 | TypeError: object of type 'int' has no len() | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03086/Python/s143153057.py", line 12, in <module>
if count == len(ans):
TypeError: object of type 'int' has no len()
|
p03086 | Python | Runtime Error | S = input()
AA = ["A", "C", "G", "T"]
ans = []
ll = 0
for i in range(len(S)):
if S[i] in AA:
ll += 1
else:
ans.append(ll)
ll = 0
print(max(ans))
| S = input()
AA = ["A", "C", "G", "T"]
ans = []
ll = 0
for i in range(len(S)):
if S[i] in AA:
ll += 1
else:
ans.append(ll)
ll = 0
ans.append(ll)
print(max(ans))
| insert | 11 | 11 | 11 | 12 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.