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
p02619
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 drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define limit(...
#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 drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define limit(...
replace
133
134
133
134
0
p02619
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) typedef long long ll; long long mod = 1e9 + 7; const int iINF = 0x3f3f3f3f; const long long INF = 1LL << 60; using namespace std; using pint = pair<int, int>; template <class T> inl...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) typedef long long ll; long long mod = 1e9 + 7; const int iINF = 0x3f3f3f3f; const long long INF = 1LL << 60; using namespace std; using pint = pair<int, int>; template <class T> inl...
replace
29
30
29
30
0
p02619
C++
Runtime Error
#pragma GCC optimize("O3") // #pragma GCC target ("avx") #include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> #include <string> #include <vector> #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define NDEBUG #define eprintf(...) ...
#pragma GCC optimize("O3") // #pragma GCC target ("avx") #include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> #include <string> #include <vector> #ifdef LOCAL #define eprintf(...) fprintf(stderr, __VA_ARGS__) #else #define NDEBUG #define eprintf(...) ...
replace
50
52
50
52
0
p02619
C++
Runtime Error
#include <algorithm> #include <functional> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define N (1000000000 + 7) #define M 998244353 #define INF 1e16 typedef long long ll; typedef pair<...
#include <algorithm> #include <functional> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; #define N (1000000000 + 7) #define M 998244353 #define INF 1e16 typedef long long ll; typedef pair<...
replace
38
39
38
39
0
p02619
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep_range(i, s, e) for (int i = (s); i < (int)(e); i++) #define rep_rev(i, s, e) for (int i = (s)-1; i >= (int)(e); i--) #define sort_vec(v) sort((v).begin(), (v).end()) typedef int64_t lint; // lint mod = 9982443...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep_range(i, s, e) for (int i = (s); i < (int)(e); i++) #define rep_rev(i, s, e) for (int i = (s)-1; i >= (int)(e); i--) #define sort_vec(v) sort((v).begin(), (v).end()) typedef int64_t lint; // lint mod = 9982443...
replace
26
27
26
27
0
p02619
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; struct fastio { fastio() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); } } _io; template <class T, class U> bool chmax(T &a, const U &b) { if (a < b) { a = b; return 1; } return 0; } template <class T, class U> bool chmin(T &a, const U...
#include <bits/stdc++.h> using namespace std; struct fastio { fastio() { std::ios::sync_with_stdio(false); std::cin.tie(nullptr); } } _io; template <class T, class U> bool chmax(T &a, const U &b) { if (a < b) { a = b; return 1; } return 0; } template <class T, class U> bool chmin(T &a, const U...
replace
23
24
23
24
0
p02619
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr char newl = '\n'; constexpr double ticks_per_sec = 2800000000; constexpr double ticks_per_sec_inv = 1.0 / ticks_per_sec; inline double rdtsc() { // in seconds uint32_t lo, hi; asm volatile("rdtsc" : "=a"(lo), "=d"(hi)); return (((ui...
#include <bits/stdc++.h> using namespace std; using ll = long long; constexpr char newl = '\n'; constexpr double ticks_per_sec = 2800000000; constexpr double ticks_per_sec_inv = 1.0 / ticks_per_sec; inline double rdtsc() { // in seconds uint32_t lo, hi; asm volatile("rdtsc" : "=a"(lo), "=d"(hi)); return (((ui...
replace
39
40
39
40
0
p02619
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "debug.h" #else #define DEBUG(...) #endif constexpr int n = 365, m = 26; int c[m], s[n][m]; int type[n]; int score(int lim = n) { static int last[m]; fill(begin(last), end(last), -1); int res = 0; for (int i = 0; i < lim; ++i) { res += s...
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "debug.h" #else #define DEBUG(...) #endif constexpr int n = 365, m = 26; int c[m], s[n][m]; int type[n]; int score(int lim = n) { static int last[m]; fill(begin(last), end(last), -1); int res = 0; for (int i = 0; i < lim; ++i) { res += s...
replace
30
31
30
34
0
p02619
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define ALL(v) (v).begin(), (v).end() using ll = long long; constexpr int INF = 1e9; constexpr long long LINF = 1e18; constexpr long long MOD = 1e9 + 7; constexpr int N = 26; constexpr int D = 365; signed main() { int tt; ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define ALL(v) (v).begin(), (v).end() using ll = long long; constexpr int INF = 1e9; constexpr long long LINF = 1e18; constexpr long long MOD = 1e9 + 7; constexpr int N = 26; constexpr int D = 365; signed main() { int tt; ...
replace
30
31
30
31
0
p02619
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define N_CONTEST (26) #define N_DAY (5) static void get_input(int &D, vector<int> &c, vector<vector<int>> &s) { cin >> D; assert(D == N_DAY); for (int i = 1; i <= N_CONTEST; i++) { cin >> c.at(i); } for (int i = 1; i <= N_DAY; i++) { for (int j = 1; j ...
#include <bits/stdc++.h> using namespace std; #define N_CONTEST (26) #define N_DAY (365) static void get_input(int &D, vector<int> &c, vector<vector<int>> &s) { cin >> D; assert(D == N_DAY); for (int i = 1; i <= N_CONTEST; i++) { cin >> c.at(i); } for (int i = 1; i <= N_DAY; i++) { for (int j = 1; ...
replace
5
6
5
6
0
p02619
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return tr...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true; } return false; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return tr...
insert
37
37
37
38
0
p02619
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int D; cin >> D; vector<int> c(26); for (int i = 0; i < 26; i++) cin >> c.at(i); vector<vector<int>> s(D, vector<int>(26)); for (int i = 0; i < D; i++) { for (int j = 0; j < 26; j++) { cin >> s.at(i).at(j); } } int ns = 0; ...
#include <bits/stdc++.h> using namespace std; int main() { int D; cin >> D; vector<int> c(26); for (int i = 0; i < 26; i++) cin >> c.at(i); vector<vector<int>> s(D, vector<int>(26)); for (int i = 0; i < D; i++) { for (int j = 0; j < 26; j++) { cin >> s.at(i).at(j); } } int ns = 0; ...
replace
21
26
21
27
0
p02619
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long; using pii = pair<int, int...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long; using pii = pair<int, int...
replace
40
41
40
41
0
p02619
C++
Runtime Error
/*/ Author: kal013 /*/ /*/ Author: kal013 /*/ // #pragma GCC optimize ("O3") #include "bits/stdc++.h" #include "ext/pb_ds/assoc_container.hpp" #include "ext/pb_ds/tree_policy.hpp" using namespace std; using namespace __gnu_pbds; template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_o...
/*/ Author: kal013 /*/ /*/ Author: kal013 /*/ // #pragma GCC optimize ("O3") #include "bits/stdc++.h" #include "ext/pb_ds/assoc_container.hpp" #include "ext/pb_ds/tree_policy.hpp" using namespace std; using namespace __gnu_pbds; template <class T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_o...
replace
191
192
191
192
0
p02620
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { int d; int c[27]; int s[400][27]; int t[400]; static int last[27]; // 最後の開催日 int ans = 0; int kotae[500]; cin >> d; rep(i, 26) cin >> c[i + 1]; rep(i, d) { rep(j, 26) { cin >> s[i + 1][j ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) int main() { int d; int c[27]; int s[400][27]; int t[400]; static int last[27]; // 最後の開催日 int ans = 0; int kotae[100005]; cin >> d; rep(i, 26) cin >> c[i + 1]; rep(i, d) { rep(j, 26) { cin >> s[i + 1]...
replace
11
12
11
12
0
p02620
C++
Runtime Error
/* これを入れて実行 g++ code.cpp ./a.out */ #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include ...
/* これを入れて実行 g++ code.cpp ./a.out */ #include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <cstring> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include ...
replace
173
174
173
174
0
p02620
C++
Runtime Error
#include <algorithm> #include <iostream> #include <set> #include <vector> using namespace std; using ll = long long; ll scoring(vector<int> &schedule); int D; vector<int> decline(26); vector<vector<int>> satis(365, vector<int>(26)); void solve_greedy(vector<int> &schedule) { for (int d = 0; d < D; d++) { int se...
#include <algorithm> #include <iostream> #include <set> #include <vector> using namespace std; using ll = long long; ll scoring(vector<int> &schedule); int D; vector<int> decline(26); vector<vector<int>> satis(365, vector<int>(26)); void solve_greedy(vector<int> &schedule) { for (int d = 0; d < D; d++) { int se...
insert
78
78
78
79
0
p02620
C++
Runtime Error
#include <bits/stdc++.h> int main() { int D; std::cin >> D; std::vector<int> C(26); for (int i = 0; i < 26; i++) { std::cin >> C[i]; } std::vector<std::vector<int>> S(D, std::vector<int>(26)); for (int i = 0; i < D; i++) { for (int j = 0; j < 26; j++) { std::cin >> S[i][j]; } } std:...
#include <bits/stdc++.h> int main() { int D; std::cin >> D; std::vector<int> C(26); for (int i = 0; i < 26; i++) { std::cin >> C[i]; } std::vector<std::vector<int>> S(D, std::vector<int>(26)); for (int i = 0; i < D; i++) { for (int j = 0; j < 26; j++) { std::cin >> S[i][j]; } } std:...
replace
28
29
28
29
0
p02620
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int d; cin >> d; vector<int> c; for (int i = 0; i < 26; i++) { int tmp; cin >> tmp; c.push_back(tmp); } vector<vector<int>> s(d, vector<int>(26, 0)); for (int i = 0; i < d; i++) { for (int j = 0; j < 26; j++) { cin >> s[i...
#include <bits/stdc++.h> using namespace std; int main() { int d; cin >> d; vector<int> c; for (int i = 0; i < 26; i++) { int tmp; cin >> tmp; c.push_back(tmp); } vector<vector<int>> s(d, vector<int>(26, 0)); for (int i = 0; i < d; i++) { for (int j = 0; j < 26; j++) { cin >> s[i...
replace
58
59
58
59
0
p02620
C++
Runtime Error
/* マラソン用 テンプレート */ /*力が欲しいか…? #pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline") //Optimization flags #pragma GCC option("arch=native","tune=native","no-zero-upper") //Enable AVX #pragma GCC target("avx") //Enable AVX */ // #include <x86intrin.h> #include <algorithm> #include <bitset> #include ...
/* マラソン用 テンプレート */ /*力が欲しいか…? #pragma GCC optimize("Ofast","unroll-loops","omit-frame-pointer","inline") //Optimization flags #pragma GCC option("arch=native","tune=native","no-zero-upper") //Enable AVX #pragma GCC target("avx") //Enable AVX */ // #include <x86intrin.h> #include <algorithm> #include <bitset> #include ...
insert
188
188
188
189
0
46381.0
p02620
C++
Runtime Error
#include <bits/stdc++.h> // #undef DEBUG // Uncomment this line to forcefully disable debug print. #if DEBUG template <typename T> void debug(T value) { std::cerr << value; } template <typename T, typename... Ts> void debug(T value, Ts... args) { std::cerr << value << ", "; debug(args...); } #define dbg(...) ...
#include <bits/stdc++.h> // #undef DEBUG // Uncomment this line to forcefully disable debug print. #if DEBUG template <typename T> void debug(T value) { std::cerr << value; } template <typename T, typename... Ts> void debug(T value, Ts... args) { std::cerr << value << ", "; debug(args...); } #define dbg(...) ...
delete
131
132
131
131
0
p02620
C++
Runtime Error
#include <cassert> #include <iostream> #include <set> #include <vector> using namespace std; int D; vector<int> C; vector<vector<int>> S; struct State { vector<int> T; vector<set<int>> X; long long score; State() : T(26, -1), X(26, set<int>{-1, D}) { score = 0; for (int i = 0; i < 26; i++) score...
#include <cassert> #include <iostream> #include <set> #include <vector> using namespace std; int D; vector<int> C; vector<vector<int>> S; struct State { vector<int> T; vector<set<int>> X; long long score; State() : T(D, -1), X(26, set<int>{-1, D}) { score = 0; for (int i = 0; i < 26; i++) score ...
replace
14
15
14
15
0
p02620
C++
Runtime Error
// #define _DEBUG #include "bits/stdc++.h" #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0, a1, a2, a3, a4, x, ...) x #define debug_1(x1) cout << #x1 << ": " << x1 << endl #define debug_2(x1, x2) \ cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << endl #defin...
// #define _DEBUG #include "bits/stdc++.h" #define CHOOSE(a) CHOOSE2 a #define CHOOSE2(a0, a1, a2, a3, a4, x, ...) x #define debug_1(x1) cout << #x1 << ": " << x1 << endl #define debug_2(x1, x2) \ cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << endl #defin...
replace
59
67
59
63
-11
p02620
C++
Runtime Error
#include <algorithm> #include <cmath> #include <ctime> #include <iostream> #include <map> #include <queue> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) // #include <bits/stdc++.h> using namespace std; int main() { int D; cin >> D; vector<lo...
#include <algorithm> #include <cmath> #include <ctime> #include <iostream> #include <map> #include <queue> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) // #include <bits/stdc++.h> using namespace std; int main() { int D; cin >> D; vector<lo...
replace
62
63
62
63
0
p02620
C++
Runtime Error
#include <algorithm> #include <array> #include <cmath> #include <iostream> #include <set> #include <vector> // const uint32_t D = 365 + 1; const uint32_t D = 5 + 1; const uint32_t contests = 26 + 1; int main() { { uint32_t Dtmp = 0; std::cin >> Dtmp; } std::array<uint32_t, contests> cost; for (size_t...
#include <algorithm> #include <array> #include <cmath> #include <iostream> #include <set> #include <vector> const uint32_t D = 365 + 1; const uint32_t contests = 26 + 1; int main() { { uint32_t Dtmp = 0; std::cin >> Dtmp; } std::array<uint32_t, contests> cost; for (size_t c = 1; c < contests; c++) ...
replace
7
9
7
8
0
p02620
C++
Runtime Error
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> //memset(dp,0,sizeof(dp)) #include <functional> #include <iomanip> #include <iostream> #include <locale> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define ll long long #d...
#include <algorithm> #include <cctype> #include <cmath> #include <cstring> //memset(dp,0,sizeof(dp)) #include <functional> #include <iomanip> #include <iostream> #include <locale> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <vector> #define ll long long #d...
replace
41
42
41
42
-11
p02621
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main(void) { int a; cin >> a; cout << a * (a * a * a - 1) / (a - 1) << endl; }
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main(void) { int a; cin >> a; int temp = 1; int ans = 0; for (int i = 0; i < 3; i++) { temp *= a; ans += temp; } cout << ans << endl; }
replace
9
10
9
16
0
p02621
C++
Runtime Error
#include <bits/stdc++.h> typedef long long ll; typedef long double lld; using namespace std; #define endl "\n" #define fi first #define se second #define MEMS(a, b) memset(a, b, sizeof(a)) #define _ \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> typedef long long ll; typedef long double lld; using namespace std; #define endl "\n" #define fi first #define se second #define MEMS(a, b) memset(a, b, sizeof(a)) #define _ \ ios_base::sync_with_stdio(false); ...
insert
78
78
78
79
0
p02621
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int a; int main() { cin >> a; cout << ((a * a * a * a - 1) / (a - 1)) - 1 << "\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int a; int main() { cin >> a; if (a == 1) cout << "3\n"; else cout << ((a * a * a * a - 1) / (a - 1)) - 1 << "\n"; return 0; }
replace
5
6
5
9
0
p02621
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long #define mod (int)1000000007 #define pb push_back #define endl "\n" #define all(a) a.begin(), a.end() #define mx(a) *max_element(all(a)) #define mn(a) *min_element(all(a)) #define rep(i, a, b) for (int i = a; i < b; i++) #define repe(i, a, b) for (int i...
#include <bits/stdc++.h> using namespace std; #define int long long #define mod (int)1000000007 #define pb push_back #define endl "\n" #define all(a) a.begin(), a.end() #define mx(a) *max_element(all(a)) #define mn(a) *min_element(all(a)) #define rep(i, a, b) for (int i = a; i < b; i++) #define repe(i, a, b) for (int i...
insert
21
21
21
22
0
p02621
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int sum(int a) { int Tong = 0; while (a >= 1 && a <= 10) { for (int i = 1; i <= 3; ++i) { Tong += pow(a, i); } cout << Tong; break; } } int main() { int a; cin >> a; sum(a); return 0; }
#include <bits/stdc++.h> using namespace std; int sum(int a) { int Tong = 0; while (a >= 1 && a <= 10) { for (int i = 1; i <= 3; ++i) { Tong += pow(a, i); } cout << Tong; break; } return 0; } int main() { int a; cin >> a; sum(a); return 0; }
insert
12
12
12
13
0
p02621
C++
Runtime Error
#include <math.h> #include <stdio.h> using namespace std; int main() { int a; scanf("%d", a); int ans = a + (a * a) + (a * a * a); printf("%d", ans); return 0; }
#include <math.h> #include <stdio.h> using namespace std; int main() { int a; scanf("%d", &a); int ans = a + (a * a) + (a * a * a); printf("%d", ans); return 0; }
replace
6
7
6
7
-11
p02621
C++
Memory Limit Exceeded
#include <bits/stdc++.h> #define ll long long int using namespace std; #define mod 1000000007 long long int fastexpo(long long int a, long long int b) { long long int ans = 1; while (b) { if (b & 1) ans = (ans * a) % mod; b = b / 2; a = (a * a) % mod; } return ans; } bool vis[500000000] = {0}...
#include <bits/stdc++.h> #define ll long long int using namespace std; #define mod 1000000007 int main() { int a; string str; cin >> a; cout << a + a * a + a * a * a << "\n"; return 0; }
delete
4
47
4
4
MLE
p02621
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; int main() { ll a; cin >> a; return a + (a * a) + (a * a * a); }
#include <bits/stdc++.h> #define ll long long #define mod 1000000007 using namespace std; int main() { ll a; cin >> a; cout << a + (a * a) + (a * a * a) << endl; }
replace
8
9
8
9
14
p02621
C++
Runtime Error
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int a; cin >> a; cout << a + a * a + a * a * a; return 1; }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int a; cin >> a; cout << a + a * a + a * a * a; return 0; }
replace
9
10
9
10
1
p02621
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; return (a + a * a + a * a * a); }
#include <bits/stdc++.h> using namespace std; int main() { long long a; cin >> a; cout << (a + a * a + a * a * a) << endl; }
replace
6
7
6
7
14
p02621
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, s, n) for (int i = (s); i < (n); i++) #define repr(i, n) for (int i = n - 1; i >= 0; i--) #define REPR(i, s, n) for (int i = (s); i >= (n); i--) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, s, n) for (int i = (s); i < (n); i++) #define repr(i, n) for (int i = n - 1; i >= 0; i--) #define REPR(i, s, n) for (int i = (s); i >= (n); i--) #define all(a) (a).begin(), (a).end() #define rall(a) (a).rbegin(), ...
replace
19
20
19
20
0
p02621
C++
Runtime Error
#include <iostream> using namespace std; int a; int main() { cin >> a; int s = 0; for (int i = 0; i < a; i++) s = s + a + 1 + a * a; return s; }
#include <iostream> using namespace std; int a; int main() { cin >> a; cout << a + a * a + a * a * a << endl; return 0; }
replace
7
11
7
9
14
p02621
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; const ll INF = 100000000; #define rep1(i, n) for (ll i = 0; i < (n); i++) #define rep2(i, k, n) for (ll i = k; i < (n); i++) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using P = pair<ll, ll>; const ll INF = 100000000; #define rep1(i, n) for (ll i = 0; i < (n); i++) #define rep2(i, k, n) for (ll i = k; i < (n); i++) template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return ...
replace
23
30
23
26
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02621
Python
Time Limit Exceeded
N = 10**7 def f(x): return x M = 10**5 arr = list(range(M)) for i in range(N): t = (i + i * i - i) % M # 四則演算 b = arr[t] # 配列ランダムアクセス b = f(b) # 関数呼び出し # 答え a = int(input()) print(a + a**2 + a**3)
N = 10**6 def f(x): return x M = 10**5 arr = list(range(M)) for i in range(N): t = (i + i * i - i) % M # 四則演算 b = arr[t] # 配列ランダムアクセス b = f(b) # 関数呼び出し # 答え a = int(input()) print(a + a**2 + a**3)
replace
0
1
0
1
TLE
p02621
Python
Time Limit Exceeded
N = 10**9 def f(x): return x M = 10**5 arr = list(range(M)) for i in range(N): t = (i + i * i - i) % M # 四則演算 b = arr[t] # 配列ランダムアクセス b = f(b) # 関数呼び出し # 答え a = int(input()) print(a + a**2 + a**3)
N = 5 * 10**8 def f(x): return x M = 10**5 arr = list(range(M)) for i in range(N): t = (i + i * i - i) % M # 四則演算 b = arr[t] # 配列ランダムアクセス b = f(b) # 関数呼び出し # 答え a = int(input()) print(a + a**2 + a**3)
replace
0
1
0
1
TLE
p02621
Python
Runtime Error
a = input() print(a + a**2 + a**3)
a = int(input()) print(a + a**2 + a**3)
replace
0
1
0
1
TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02621/Python/s078567518.py", line 2, in <module> print(a + a**2 + a**3) TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'int'
p02621
C++
Runtime Error
#include <iostream> using namespace std; int main() { int a, b, c = 0; cin >> a; b = a * a; c = a * a * a; return a + b + c; }
#include <iostream> using namespace std; int main() { int a, b, c = 0; cin >> a; b = a * a; c = a * a * a; cout << a + b + c; return 0; }
replace
7
9
7
9
14
p02622
C++
Time Limit Exceeded
#include <iostream> #include <string> using namespace std; int main() { int count = 0; unsigned char n; string s, t; cin >> s >> t; for (n = 0; n < s.size(); n++) { if (s[n] != t[n]) { s[n] = t[n]; count++; } } cout << count << endl; return 0; }
#include <iostream> #include <string> using namespace std; int main() { int count = 0; unsigned int n; string s, t; cin >> s >> t; for (n = 0; n < s.size(); n++) { if (s[n] != t[n]) { s[n] = t[n]; count++; } } cout << count << endl; return 0; }
replace
6
7
6
7
TLE
p02622
C++
Runtime Error
#include <iostream> using namespace std; int main() { char s[200000], t[200000]; cin >> s >> t; int i = 0, c = 0; while (s[i] != 0) { if (s[i] != t[i]) { s[i] = t[i]; c++; } i++; } cout << c << endl; }
#include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; int i = 0, c = 0; while (s[i] != 0) { if (s[i] != t[i]) { s[i] = t[i]; c++; } i++; } cout << c << endl; }
replace
4
5
4
6
0
p02622
C++
Runtime Error
#include <iostream> using namespace std; int main() { char s[200000], t[200000]; int ct = 0; cin >> s; cin >> t; for (int i = 0; s[i] != '\0'; i++) { ct += (s[i] != t[i]); } cout << ct << endl; return 0; }
#include <iostream> using namespace std; int main() { char s[200001], t[200001]; int ct = 0; cin >> s; cin >> t; for (int i = 0; s[i] != '\0'; i++) { ct += (s[i] != t[i]); } cout << ct << endl; return 0; }
replace
4
5
4
5
0
p02622
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int cnt = 0; int x = s.size(); for (int i = 0; i < x; i++) { if (s.at(i) != t.at(i)) { for (int j = 0; j < x; j++) { if (s.at(j) == s.at(i)) { s.at(j) = t.at(i); } } cnt++; ...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int cnt = 0; int x = s.size(); for (int i = 0; i < x; i++) { if (s.at(i) != t.at(i)) { cnt++; } } cout << cnt << endl; return 0; }
delete
10
15
10
10
TLE
p02622
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { string s, a; int o = 0; cin >> s >> a; for (int i = 0; i < s.length(); i++) for (int j = 0; j < a.length(); j++) if (s[i] != a[j] && i == j) o++; cout << o; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, a; int o = 0; cin >> s >> a; for (int i = 0; i < s.length(); i++) { if (s[i] != a[i]) { o++; } } cout << o; return 0; }
replace
6
10
6
11
TLE
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { char s[200000]; char t[200000]; cin >> s >> t; int ans = 0; int size = strlen(s); for (int i = 0; i < size; i++) { if (s[i] != t[i]) { ans += 1; } else { continue; } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { char s[2000000]; char t[2000000]; cin >> s >> t; int ans = 0; int size = strlen(s); for (int i = 0; i < size; i++) { if (s[i] != t[i]) { ans += 1; } else { continue; } } cout << ans << endl; return 0; }
replace
4
6
4
6
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> #include <istream> #include <vector> #define rep(I, N) for (int I = 0; I < N; I++) using ll = long long int; using namespace std; int main() { int N = 0; char s[200000], t[200000]; vector<char> ss(0); vector<char> tt(0); cin >> s; cin >> t; string S = s; rep(i, S.size()) { ...
#include <bits/stdc++.h> #include <istream> #include <vector> #define rep(I, N) for (int I = 0; I < N; I++) using ll = long long int; using namespace std; int main() { ll N = 0; char s[2000000], t[2000000]; cin >> s; cin >> t; string S = s; rep(i, S.size()) { if (!(s[i] == t[i])) N++; } cout...
replace
8
12
8
10
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { char s[100006], t[100006]; cin >> s >> t; int l, c = 0, i; l = strlen(s); for (i = 0; i < l; i++) { if (s[i] != t[i]) c++; } cout << c << endl; }
#include <bits/stdc++.h> using namespace std; int main() { char s[200006], t[200006]; cin >> s >> t; int l, c = 0, i; l = strlen(s); for (i = 0; i < l; i++) { if (s[i] != t[i]) c++; } cout << c << endl; }
replace
3
4
3
4
0
p02622
C++
Runtime Error
#include <iostream> #include <string> using namespace std; int main() { string s, t; int num = 0; cin >> s, t; for (int i = 0; i < (int)s.size(); ++i) { if (s[i] != t[i]) { num++; } } cout << num; }
#include <iostream> #include <string> using namespace std; int main() { string s, t; int num = 0; cin >> s >> t; for (int i = 0; i < (int)s.size(); ++i) { if (s[i] != t[i]) { num++; } } cout << num; }
replace
8
9
8
9
0
p02622
C++
Runtime Error
#include <iostream> using namespace std; int main() { char S[200000], T[200000]; int ans = 0, j = 0; cin >> S >> T; while (S[j] != '\0') { j++; } for (int i = 0; i < j; i++) { if (S[i] != T[i]) ans++; } cout << ans << endl; return 0; }
#include <iostream> using namespace std; int main() { char S[200001], T[200001]; int ans = 0, j = 0; cin >> S >> T; while (S[j] != '\0') { j++; } for (int i = 0; i < j; i++) { if (S[i] != T[i]) ans++; } cout << ans << endl; return 0; }
replace
3
4
3
4
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i, n) for (i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define ll long long #define si(x) scanf("%d", &x) #define sl(x) scanf("%lld", &x) #define sc(x) scanf("%c", &x); #define ss(...
#include <bits/stdc++.h> using namespace std; #define gc getchar_unlocked #define fo(i, n) for (i = 0; i < n; i++) #define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1) #define ll long long #define si(x) scanf("%d", &x) #define sl(x) scanf("%lld", &x) #define sc(x) scanf("%c", &x); #define ss(...
replace
46
48
46
47
-11
p02622
C++
Runtime Error
#include <iostream> using namespace std; int main() { string S; string T; cin >> S >> T; int ans = 0; for (long long int i = 0; i < 2 * 10000; i++) { if (S[i] != T[i]) { ans += 1; } } cout << ans << endl; }
#include <iostream> using namespace std; int main() { string S; string T; cin >> S >> T; int ans = 0; int N = S.size(); for (long long int i = 0; i < N; i++) { if (S[i] != T[i]) { ans += 1; } } cout << ans << endl; }
replace
7
8
7
9
-11
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int n, m, i, j, k, ans; char s[10005], t[10005]; int main() { scanf("%s%s", s + 1, t + 1); n = strlen(s + 1); for (i = 1; i <= n; i++) { if (s[i] != t[i]) ans++; } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; int n, m, i, j, k, ans; char s[1000005], t[1000005]; int main() { scanf("%s%s", s + 1, t + 1); n = strlen(s + 1); for (i = 1; i <= n; i++) { if (s[i] != t[i]) ans++; } cout << ans; return 0; }
replace
3
4
3
4
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int len, i, j, cnt = 0; char s[100005], t[100005]; scanf(" %s %s", s, t); len = strlen(s); for (i = 0; i < len; i++) { if (s[i] != t[i]) cnt++; } printf("%d\n", cnt); return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int leng, i, j, cnt = 0; // char s[100005],t[100005]; string s, t; // scanf(" %s %s",s,t); // leng = s.size(); // cout<<leng; cin >> s >> t; for (i = 0; i < (s.length()); i++) { if (s[i] != t[i]) cnt++; } printf("%d\n...
replace
5
10
5
13
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; const int mod = 1000000007; int main() { char s[20010] = {}; char t[20010] = {}; cin >> s >> t; int p = strlen(s); int ans = 0; rep(i, p) { if (s[i] != t[i]) { ans++; } } co...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; const int mod = 1000000007; int main() { char s[2 * 100000 + 1] = {}; char t[2 * 100000 + 1] = {}; cin >> s >> t; int p = strlen(s); int ans = 0; rep(i, p) { if (s[i] != t[i]) { ans...
replace
7
9
7
9
0
p02622
C++
Runtime Error
#include <iostream> #include <stdio.h> #include <string> using namespace std; int main() { char M[100020], R[100010]; int count = 0, i = 0; cin >> M >> R; // cout << M << ' ' << R; while (M[i] != NULL) { if (M[i] != R[i]) { count++; } i++; } cout << count << endl; }
#include <iostream> #include <stdio.h> #include <string> using namespace std; int main() { char M[200020], R[200010]; int count = 0, i = 0; cin >> M >> R; // cout << M << ' ' << R; while (M[i] != NULL) { if (M[i] != R[i]) { count++; } i++; } cout << count << endl; }
replace
5
6
5
6
0
p02622
C++
Runtime Error
#include <cstring> #include <iostream> #include <stdio.h> #define N 100005 using namespace std; char s[N], t[N]; int n, i, ans; int main() { scanf("%s\n%s", s, t); n = strlen(s); for (i = 0; i < n; i++) { if (s[i] != t[i]) ans++; } printf("%d", ans); return 0; }
#include <cstring> #include <iostream> #include <stdio.h> #define N 200005 using namespace std; char s[N], t[N]; int n, i, ans; int main() { scanf("%s\n%s", s, t); n = strlen(s); for (i = 0; i < n; i++) { if (s[i] != t[i]) ans++; } printf("%d", ans); return 0; }
replace
3
4
3
4
0
p02622
C++
Runtime Error
#include <stdio.h> int main(void) { char s[20001], t[20001]; int i, cnt = 0; scanf("%s", s); scanf("%s", t); for (i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) cnt++; } printf("%d", cnt); return 0; }
#include <stdio.h> int main(void) { char s[200001], t[200001]; int i, cnt = 0; scanf("%s", s); scanf("%s", t); for (i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) cnt++; } printf("%d", cnt); return 0; }
replace
3
4
3
4
0
p02622
C++
Runtime Error
/***** author : C0d1ngPhenomena *****/ #include <bits/stdc++.h> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #define endl "\n" #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector<vi> #define pii pair<int, int> #define pll pair<long lo...
/***** author : C0d1ngPhenomena *****/ #include <bits/stdc++.h> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #define endl "\n" #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector<vi> #define pii pair<int, int> #define pll pair<long lo...
replace
29
31
29
31
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> #define int long long #define x first #define y second #define getbit(x, i) (((x) >> (i)) & 1) using namespace std; typedef pair<int, int> pii; #define hashset unordered_set #define hashmap unordered_map #define newline fast_writechar('\n') #define unify(arr) arr.resize(unique(arr.begin(), arr....
#include <bits/stdc++.h> #define int long long #define x first #define y second #define getbit(x, i) (((x) >> (i)) & 1) using namespace std; typedef pair<int, int> pii; #define hashset unordered_set #define hashmap unordered_map #define newline fast_writechar('\n') #define unify(arr) arr.resize(unique(arr.begin(), arr....
replace
83
88
83
87
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int ans = 0; char a[20000], b[20000]; int main() { for (int i = 0;; i++) { a[i] = getchar(); if (a[i] == '\n') { break; } } for (int i = 0;; i++) { b[i] = getchar(); if (a[i] == '\n') { break; } } int len = strlen(a); for (int...
#include <bits/stdc++.h> using namespace std; int ans = 0; char a[200005], b[200005]; int main() { for (int i = 0;; i++) { a[i] = getchar(); if (a[i] == '\n') { break; } } for (int i = 0;; i++) { b[i] = getchar(); if (a[i] == '\n') { break; } } int len = strlen(a); for (i...
replace
3
4
3
4
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> #include <iostream> #include <math.h> #include <string> using namespace std; int main() { long long int a, b, c, d, i, x[100000], y = 0; char s[100000], z[100000]; cin >> s >> z; for (i = 0; s[i]; i++) { if (s[i] != z[i]) { y++; } } cout << y << endl; }
#include <bits/stdc++.h> #include <iostream> #include <math.h> #include <string> using namespace std; int main() { long long int a, b, c, d, i, x[100000], y = 0; // char s[100000],z[100000]; string s, z; cin >> s >> z; for (i = 0; s[i]; i++) { if (s[i] != z[i]) { y++; } } cout << y << endl;...
replace
8
9
8
10
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define pb push_back #define st first #define nd second typedef long long ll; typedef double db; typedef long double ldb; typedef complex<db> cd; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<db, db> pdd; typedef pair<ldb, ldb> pldb; typedef pair<int...
#include <bits/stdc++.h> using namespace std; #define pb push_back #define st first #define nd second typedef long long ll; typedef double db; typedef long double ldb; typedef complex<db> cd; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef pair<db, db> pdd; typedef pair<ldb, ldb> pldb; typedef pair<int...
replace
64
65
64
65
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; const int M = 100005; int main() { char S[M] = ""; char T[M] = ""; cin >> S; cin >> T; int ans = 0; rep(i, strlen(S)) { if (S[i] != T[i]) ++ans; } c...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using ll = long long; using P = pair<int, int>; const int M = 200005; int main() { char S[M] = ""; char T[M] = ""; cin >> S; cin >> T; int ans = 0; rep(i, strlen(S)) { if (S[i] != T[i]) ++ans; } c...
replace
6
7
6
7
0
p02622
C++
Runtime Error
#include <stdio.h> #include <string.h> using namespace std; typedef long long llong; #define MAX 20001 int main() { int ans = 0; char S[MAX], T[MAX]; scanf("%s", S); scanf("%s", T); int len = strlen(S); for (int i = 0; i < len; i++) { if (S[i] != T[i]) ans++; } printf("%d\n", ans); re...
#include <stdio.h> #include <string.h> using namespace std; typedef long long llong; #define MAX 200010 int main() { int ans = 0; char S[MAX], T[MAX]; scanf("%s", S); scanf("%s", T); int len = strlen(S); for (int i = 0; i < len; i++) { if (S[i] != T[i]) ans++; } printf("%d\n", ans); r...
replace
6
7
6
7
0
p02622
C++
Runtime Error
#include <stdio.h> #include <string.h> int main() { char S[200000], T[200000]; long long a = 0; if (!scanf("%s %s", S, T)) return 0; for (long long i = 0; i < (long long)strlen(S); i++) { if (S[i] != T[i]) a++; } return printf("%lld\n", a), 0; }
#include <stdio.h> #include <string.h> int main() { char S[200001], T[200001]; long long a = 0; if (!scanf("%s %s", S, T)) return 0; for (long long i = 0; i < (long long)strlen(S); i++) { if (S[i] != T[i]) a++; } return printf("%lld\n", a), 0; }
replace
3
4
3
4
0
p02622
Python
Runtime Error
S = input() T = input() N = len(S) ans = 0 for i in range(N): if not S[i] == T[i]: S[i] = T[i] ans += 1 print(ans)
S = input() T = input() N = len(S) ans = 0 for i in range(N): if S[i] != T[i]: ans += 1 print(ans)
replace
5
7
5
6
TypeError: 'str' object does not support item assignment
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02622/Python/s028680665.py", line 7, in <module> S[i] = T[i] TypeError: 'str' object does not support item assignment
p02622
Python
Runtime Error
S = input() T = input() replaces = 0 for ch in range(S): if S[ch] == T[ch]: replaces += 1 print(replaces)
S = input() T = input() replaces = 0 for ch in range(len(S)): if S[ch] != T[ch]: replaces += 1 print(replaces)
replace
3
5
3
5
TypeError: 'str' object cannot be interpreted as an integer
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02622/Python/s517520692.py", line 4, in <module> for ch in range(S): TypeError: 'str' object cannot be interpreted as an integer
p02622
C++
Runtime Error
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; int main() { char txt1[200000], txt2[200000]; cin >> txt1; cin >> txt2; int count = 0; int n = strlen(txt1); int i; for (i = 0; i < n; i++) { if (txt1[i] != txt2[i]) { count++; } } cout << count; }
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; int main() { /* int a,b; cin >> a; b=a*a; b=b+b*a+a; cout << b; */ char txt1[200010], txt2[200010]; cin >> txt1; cin >> txt2; int count = 0; int n = strlen(txt1); int i; for (i = 0; i < n; i++) { if (txt1[i] ...
replace
5
7
5
13
0
p02622
C++
Time Limit Exceeded
#include <iostream> #include <string> using namespace std; int main(void) { string S, T; cin >> S >> T; int ans = 0; for (int i = 0; S.size(); i++) { if (S[i] != T[i]) ans++; } cout << ans << endl; }
#include <iostream> #include <string> using namespace std; int main(void) { string S, T; cin >> S >> T; int ans = 0; for (int i = 0; i < S.size(); i++) { if (S[i] != T[i]) ans++; } cout << ans << endl; }
replace
9
10
9
10
TLE
p02622
C++
Runtime Error
// Tue May 26 19:06:02 IST 2020 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define forn(ii, a, b) for (int ii = (int)a; ii < (int)b; ii++) #define debug(x) cerr << #x << " " << x << " -- \n" #define I__O ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NUL...
// Tue May 26 19:06:02 IST 2020 #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define forn(ii, a, b) for (int ii = (int)a; ii < (int)b; ii++) #define debug(x) cerr << #x << " " << x << " -- \n" #define I__O ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NUL...
insert
40
40
40
41
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { char arr1[20001]; char arr2[20001]; char c; for (int i = 0; 1; i++) { c = getchar(); if (c == '\n') { arr1[i] = '\0'; break; } arr1[i] = c; } for (int i = 0; 1; i++) { c = getchar(); if (c == '\n') { arr2...
#include <bits/stdc++.h> using namespace std; int main() { char arr1[200001]; char arr2[200001]; char c; for (int i = 0; 1; i++) { c = getchar(); if (c == '\n') { arr1[i] = '\0'; break; } arr1[i] = c; } for (int i = 0; 1; i++) { c = getchar(); if (c == '\n') { ar...
replace
4
6
4
6
0
p02622
C++
Runtime Error
#include <stdio.h> int main() { char s[20010], t[20010]; scanf("%s", s); scanf("%s", t); int i = 0; int diff = 0; while (s[i] != '\0') { if (s[i] != t[i]) { diff++; } i++; } printf("%d", diff); }
#include <stdio.h> int main() { char s[200010], t[200010]; scanf("%s", s); scanf("%s", t); int i = 0; int diff = 0; while (s[i] != '\0') { if (s[i] != t[i]) { diff++; } i++; } printf("%d", diff); }
replace
3
4
3
4
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { char s[20010], t[20010]; int c = 0; scanf("%s %s", s, t); for (int i = 0; i < strlen(s); i++) { // printf("%c ",s[i]); if (s[i] == t[i]) { c++; } } printf("%ld\n", (strlen(s) - c)); }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { char s[200010], t[200010]; int c = 0; scanf("%s %s", s, t); for (int i = 0; i < strlen(s); i++) { // printf("%c ",s[i]); if (s[i] == t[i]) { c++; } } printf("%ld\n", (strlen(s) - c)); }
replace
4
5
4
5
0
p02622
C++
Runtime Error
#include <stdio.h> int main() { char S[200000], T[200000]; int ans = 0; scanf("%s", S); scanf("%s", T); for (int i = 0; S[i] != '\0'; i++) { if (S[i] != T[i]) ans++; } printf("%d\n", ans); return 0; }
#include <stdio.h> int main() { char S[200001], T[200001]; int ans = 0; scanf("%s", S); scanf("%s", T); for (int i = 0; S[i] != '\0'; i++) { if (S[i] != T[i]) ans++; } printf("%d\n", ans); return 0; }
replace
3
4
3
4
0
p02622
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { string A, B; int m, n, count = 0; n = A.length(); m = B.length(); while (n == m) { for (int i = 0; i < n; i++) { for (int j = 0; j < m; j++) { if (A[i] == B[j]) continue; else if (A[i] != B[j]) count++; ...
#include <bits/stdc++.h> using namespace std; int main() { string s1, s2; cin >> s1 >> s2; int64_t sum = 0; for (int i = 0; i < s1.size(); i++) sum += (s1[i] != s2[i]); cout << sum << "\n"; return 0; }
replace
3
20
3
9
TLE
p02622
C++
Runtime Error
#include <stdio.h> #define NUM 20001 int main() { int i, cnt = 0, errno; char s[NUM], t[NUM]; errno = scanf("%s", s); errno = scanf("%s", t); if (errno) { ; } for (i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) { cnt++; } } printf("%d", cnt); }
#include <stdio.h> #define NUM 200001 int main() { int i, cnt = 0, errno; char s[NUM], t[NUM]; errno = scanf("%s", s); errno = scanf("%s", t); if (errno) { ; } for (i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) { cnt++; } } printf("%d", cnt); }
replace
1
2
1
2
0
p02622
C++
Runtime Error
// BadWaper gg #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #define inf 1e9 #define eps 1e-6 #define mp make_pair #define N 10010 using namespace std; typedef long long l...
// BadWaper gg #include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <deque> #include <iostream> #include <map> #include <queue> #include <set> #include <vector> #define inf 1e9 #define eps 1e-6 #define mp make_pair #define N 200010 using namespace std; typedef long long ...
replace
15
16
15
16
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define SORT(c) sort((c).begin(), (c).end()); #define pb push_back #define MP make_pair #define pii pair<int, int> #define pcc pair<char, char> #define pic pair<int, char> #define pci pair<char, int> #define VS vector<string> #define VI vector<int> #define pi 3.141592653589...
#include <bits/stdc++.h> using namespace std; #define SORT(c) sort((c).begin(), (c).end()); #define pb push_back #define MP make_pair #define pii pair<int, int> #define pcc pair<char, char> #define pic pair<int, char> #define pci pair<char, int> #define VS vector<string> #define VI vector<int> #define pi 3.141592653589...
replace
97
98
97
98
0
p02622
C++
Runtime Error
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debu...
/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debu...
replace
14
16
14
16
0
p02622
C++
Runtime Error
#include <stdio.h> #include <string.h> int main(void) { char s[200000]; scanf("%s", &s); char t[200000]; scanf("%s", &t); int count = 0; for (int i = 0; i < strlen(s); i++) { if (s[i] != t[i]) count++; } printf("%d\n", count); return 0; }
#include <stdio.h> #include <string.h> int main(void) { char s[200010]; scanf("%s", s); char t[200010]; scanf("%s", t); int count = 0; for (int i = 0; i < strlen(s); i++) { if (s[i] != t[i]) count++; } printf("%d\n", count); return 0; }
replace
4
8
4
8
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using p = pair<int, int>; typedef long long ll; int main() { char s[100000], t[100000]; cin >> s >> t; ll k = 0; ll m = strlen(s); rep(i, m) { if (s[i] != t[i]) { k++; } } cout << k << endl; ret...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; using p = pair<int, int>; typedef long long ll; int main() { char s[1000000], t[1000000]; cin >> s >> t; ll k = 0; ll m = strlen(s); rep(i, m) { if (s[i] != t[i]) { k++; } } cout << k << endl; r...
replace
8
9
8
9
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long n, m, i, j, k, len, ans = 0; char s1[100005], s2[100005]; int main() { cin >> s1 >> s2; len = strlen(s1); // printf("%d\n",len); for (i = 0; i < len; i++) { if (s1[i] != s2[i]) { ans++; } } cout << ans << endl; return 0; }
#include <bits/stdc++.h> using namespace std; long long n, m, i, j, k, len, ans = 0; char s1[1000005], s2[1000005]; int main() { cin >> s1 >> s2; len = strlen(s1); // printf("%d\n",len); for (i = 0; i < len; i++) { if (s1[i] != s2[i]) { ans++; } } cout << ans << endl; return 0; }
replace
3
4
3
4
0
p02622
C++
Runtime Error
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; int main() { int count = 0; unsigned char s[200000]; unsigned char t[200000]; cin >> s; cin >> t; for (int i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) { count++; } } cout ...
#include <algorithm> #include <iostream> #include <math.h> #include <string> #include <vector> using namespace std; int main() { int count = 0; string s; string t; cin >> s; cin >> t; for (int i = 0; s[i] != '\0'; i++) { if (s[i] != t[i]) { count++; } } cout << count << endl; return 0;...
replace
9
11
9
11
0
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) typedef long long ll; int main() { string S, T; cin >> S, T; ll ans = 0; for (ll i = 0; i < S.size(); ++i) { if (S[i] != T[i]) { ++ans; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) typedef long long ll; int main() { string S, T; cin >> S >> T; ll ans = 0; for (ll i = 0; i < S.size(); ++i) { if (S[i] != T[i]) { ++ans; } } cout << ans << endl; }
replace
7
8
7
8
0
p02622
C++
Runtime Error
// 設定言語check #include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <limits.h> #include <math.h> #include <string> using namespace std; int lenght(char *str) { int i = 0; while (str[i]) { i++; } return i; } int main() { char S[200000], T[200000]; int N, ans = 0, ...
// 設定言語check #include <algorithm> #include <bits/stdc++.h> #include <iomanip> #include <iostream> #include <limits.h> #include <math.h> #include <string> using namespace std; int lenght(char *str) { int i = 0; while (str[i]) { i++; } return i; } int main() { char S[200005], T[200005]; int N, ans = 0, ...
replace
19
20
19
20
0
p02622
C++
Memory Limit Exceeded
#include <bits/stdc++.h> #define ll long long int using namespace std; #define mod 1000000007 long long int fastexpo(long long int a, long long int b) { long long int ans = 1; while (b) { if (b & 1) ans = (ans * a) % mod; b = b / 2; a = (a * a) % mod; } return ans; } bool vis[500000000] = {0}...
#include <bits/stdc++.h> #define ll long long int using namespace std; #define mod 1000000007 int main() { int a; string str; // cin >> a; string str1; cin >> str; cin >> str1; int count = 0; for (int i = 0; i < str.length(); i++) { if (str[i] != str1[i]) count++; } cout << count << "\n";...
delete
4
47
4
4
MLE
p02622
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int count = s.size(); int n = s.size() + 1; for (int i = 0; i < n; i++) { if (s.at(i) == t.at(i)) { count = count - 1; } } cout << count << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string s, t; int count = 0; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s.at(i) != t.at(i)) { count++; } } cout << count << endl; return 0; }
replace
4
9
4
9
-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)
p02623
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n, m, k, ans = 0; cin >> n >> m >> k; ll a[n + 1], b[n + 1]; memset(a, 0, sizeof(a)); memset(b, 0, sizeof(b)); for (ll i = 1; i <= n; i++) { cin >> a[i]; a[i] += a[i - 1]; } for (ll i = 1; i <= m; i++) { cin...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ll n, m, k, ans = 0; cin >> n >> m >> k; ll a[n + 1] = {0}, b[m + 1] = {0}; for (ll i = 1; i <= n; i++) { cin >> a[i]; a[i] += a[i - 1]; } for (ll i = 1; i <= m; i++) { cin >> b[i]; b[i] += b[i - 1]; } for (...
replace
6
10
6
7
0
p02623
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #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)-1; i >= 0; --i) #define FORq(i, m, n) for (int i = (m); i <= (n); ++i) #define FORqr(i, m, n) for (int i = (n); i >= (m); --i) #define M...
#include <bits/stdc++.h> using namespace std; #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)-1; i >= 0; --i) #define FORq(i, m, n) for (int i = (m); i <= (n); ++i) #define FORqr(i, m, n) for (int i = (n); i >= (m); --i) #define M...
replace
72
73
72
73
TLE
p02623
C++
Runtime Error
#include <bits/stdc++.h> #define int long long int using namespace std; signed main() { int n, m, k; cin >> n >> m >> k; int a[n], b[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int j = 0; j < m; j++) { cin >> b[j]; } int x = 0, y = 0, sum1 = 0, sum2 = 0; while (y < m && (sum2 + b[y])...
#include <bits/stdc++.h> #define int long long int using namespace std; signed main() { int n, m, k; cin >> n >> m >> k; int a[n], b[m]; for (int i = 0; i < n; i++) { cin >> a[i]; } for (int j = 0; j < m; j++) { cin >> b[j]; } int x = 0, y = 0, sum1 = 0, sum2 = 0; while (y < m && (sum2 + b[y])...
replace
6
7
6
7
0
p02623
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve(long long N, long long M, long long K, std::vector<long long> A, std::vector<long long> B) { ll rv = 0; vector<ll> sA(N + 1, 0); vector<ll> sB(N + 1, 0); for (ll i = 0; i < N; ++i) { sA[i + 1] = A[i] + sA[i]; } f...
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve(long long N, long long M, long long K, std::vector<long long> A, std::vector<long long> B) { ll rv = 0; vector<ll> sA(N + 1, 0); vector<ll> sB(M + 1, 0); for (ll i = 0; i < N; ++i) { sA[i + 1] = A[i] + sA[i]; } f...
replace
9
10
9
10
0
p02623
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N, M, K; cin >> N >> M >> K; long long A[N + 1]; A[0] = 0; for (int i = 1; i < N + 1; i++) { cin >> A[i]; A[i] += A[i - 1]; } long long B[M + 1]; B[0] = 0; for (int i = 1; i < M + 1; i++) { cin >> B[i]; B[i] += B[i - 1]; ...
#include <bits/stdc++.h> using namespace std; int main() { int N, M, K; cin >> N >> M >> K; long long A[N + 1]; A[0] = 0; for (int i = 1; i < N + 1; i++) { cin >> A[i]; A[i] += A[i - 1]; } long long B[M + 1]; B[0] = 0; for (int i = 1; i < M + 1; i++) { cin >> B[i]; B[i] += B[i - 1]; ...
replace
20
25
20
30
TLE
p02623
Python
Runtime Error
n, m, k = map(int, input().split()) (*A,) = map(int, input().split()) (*B,) = map(int, input().split()) A.append(0) B.append(0) time = 0 cnt = 0 a, b = 0, 0 while (a < m and time + A[a] <= k) or (b < n and time + B[b] <= k): if (a < m and time + A[a] <= k) and (b < n and time + B[b] <= k): if A[a] <= B[b]: ...
n, m, k = map(int, input().split()) (*A,) = map(int, input().split()) (*B,) = map(int, input().split()) SA, SB = [0], [0] for i in range(n): SA.append(SA[i] + A[i]) for j in range(m): SB.append(SB[j] + B[j]) ans, tmp = 0, m for i in range(n + 1): if SA[i] > k: break for j in range(tmp + 1)[::-1]...
replace
3
27
3
18
0
p02623
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> using namespace std; const double PI = 3.141592653589793238463; #define pb push_back #define pf push_front #define s...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> using namespace std; const double PI = 3.141592653589793238463; #define pb push_back #define pf push_front #define s...
replace
69
70
69
70
0
p02623
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double lld; ll MOD = (1e9) + 7; const int dr[] = {+1, -1, +0, +0, +1, -1, +1, -1}; const int dc[] = {+0, +0, +1, -1, +1, -1, -1, +1}; const int kx[] = {+1, +2, -1, -2, +1, +2, -1, -2}; const int ky[] = {+2, +1, +2, +1, -2, -1, -2, -1};...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef long double lld; ll MOD = (1e9) + 7; const int dr[] = {+1, -1, +0, +0, +1, -1, +1, -1}; const int dc[] = {+0, +0, +1, -1, +1, -1, -1, +1}; const int kx[] = {+1, +2, -1, -2, +1, +2, -1, -2}; const int ky[] = {+2, +1, +2, +1, -2, -1, -2, -1};...
replace
64
65
64
65
-11
p02623
C++
Time Limit Exceeded
// Problem : C - Tsundoku // Contest : AtCoder - AtCoder Beginner Contest 172 // URL : https://atcoder.jp/contests/abc172/tasks/abc172_c // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) /* WINNERS NEVER QUIT AND QUITTERS NEVER WIN!! */ #include <bits/...
// Problem : C - Tsundoku // Contest : AtCoder - AtCoder Beginner Contest 172 // URL : https://atcoder.jp/contests/abc172/tasks/abc172_c // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) /* WINNERS NEVER QUIT AND QUITTERS NEVER WIN!! */ #include <bits/...
insert
102
102
102
105
TLE