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
p02767
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> x(n); for (int i = 0; i < n; i++) { cin >> x[i]; } sort(x.begin(), x.end()); int ans = 100 * 100 * 100 + 1; for (int i = x.at(1); i <= x.at(x.size() - 1); i++) { int tmp = 0; for (int j = 0; j < n; j++) {...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> x(n); for (int i = 0; i < n; i++) { cin >> x[i]; } sort(x.begin(), x.end()); int ans = 100 * 100 * 100 + 1; for (int i = x.at(0); i <= x.at(x.size() - 1); i++) { int tmp = 0; for (int j = 0; j < n; j++) {...
replace
11
12
11
12
0
p02767
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N, count = 0; cin >> N; if (N == 1) { cout << 0; exit(0); } vector<int> X(N, 0); for (int i = 0; i < N; i++) { cin >> X.at(i); } sort(X.begin(), X.end()); vector<int> A(X.at(N - 1) - X.at(0) - 1, 0); for (int i = X.at(0)...
#include <bits/stdc++.h> using namespace std; int main() { int N, count = 0; cin >> N; if (N == 1) { cout << 0; exit(0); } vector<int> X(N, 0); for (int i = 0; i < N; i++) { cin >> X.at(i); } sort(X.begin(), X.end()); if (X.at(N - 1) == X.at(0)) { cout << 0; exit(0); } vec...
insert
18
18
18
23
0
p02767
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int people; cin >> people; vector<int> vi; for (int i = 0; i < people; i++) { int a; cin >> a; vi.push_back(a); } vector<int> vii; for (int i = vi[0]; i <= vi[vi.size() - 1]; i++) { int sum = 0; for (int j = 0; j < vi.size(); j...
#include <bits/stdc++.h> using namespace std; int main() { int people; cin >> people; vector<int> vi; for (int i = 0; i < people; i++) { int a; cin >> a; vi.push_back(a); } sort(vi.begin(), vi.end()); vector<int> vii; for (int i = vi[0]; i <= vi[vi.size() - 1]; i++) { int sum = 0; fo...
insert
11
11
11
12
0
p02767
C++
Runtime Error
#include <bits/stdc++.h> #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++) #define FORR(i, n) for (ll i = (ll)n - 1LL; i >= 0LL; i--) #define rep(i, n) FOR(i, 0, n) #define ALL(x) begin(x), end(x) using namespace std; using ll = long long; template <typename T> using V = vector<T>; constexpr ll Mod = 998244353; c...
#include <bits/stdc++.h> #define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++) #define FORR(i, n) for (ll i = (ll)n - 1LL; i >= 0LL; i--) #define rep(i, n) FOR(i, 0, n) #define ALL(x) begin(x), end(x) using namespace std; using ll = long long; template <typename T> using V = vector<T>; constexpr ll Mod = 998244353; c...
replace
37
38
37
38
0
p02768
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using Int = long long; int PREP = (cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(9), 0); // int SEGV = getenv("D") || (exit(system("D= SEGFAULT_SIGNALS=all catchsegv // ./prog.exe") >> 8), 0); const Int MOD = 1000000007; Int POW(In...
#include <bits/stdc++.h> using namespace std; using Int = long long; int PREP = (cin.tie(nullptr), ios::sync_with_stdio(false), cout << fixed << setprecision(9), 0); // int SEGV = getenv("D") || (exit(system("D= SEGFAULT_SIGNALS=all catchsegv // ./prog.exe") >> 8), 0); const Int MOD = 1000000007; Int POW(In...
replace
28
32
28
29
TLE
p02768
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; typedef pair<string, int> P; const double PI = 3.14159265358979323846; long long modpow(long long a, long long n, long long mod) { long long res = 1; while (n > 0) { if (n & 1) res = res *...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long ll; typedef pair<string, int> P; const double PI = 3.14159265358979323846; long long modpow(long long a, long long n, long long mod) { long long res = 1; while (n > 0) { if (n & 1) res = res *...
replace
79
80
79
80
0
p02768
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; const int MOD = 1000000007; long long power(long long a, long long b) { if (b == 0) return 1; if (b % 2 == 0) { l...
#include <algorithm> #include <cmath> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; const int MOD = 1000000007; long long power(long long a, long long b) { if (b == 0) return 1; if (b % 2 == 0) { l...
replace
36
41
36
37
TLE
p02768
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; long long n, a, b; const int MAXN = 212345; long long m = 1e9 + 7; long long inv[MAXN]; long long inverse_factorial[MAXN]; long long binomial_coefficient(int n, int k) { long long prod = 1; for (int i = n; i >= n - k + 1; i--) prod = (i * prod) % m; return (pr...
#include <bits/stdc++.h> using namespace std; long long n, a, b; const int MAXN = 212345; long long m = 1e9 + 7; long long inv[MAXN]; long long inverse_factorial[MAXN]; long long binomial_coefficient(int n, int k) { long long prod = 1; for (int i = n; i >= n - k + 1; i--) prod = (i * prod) % m; return (pr...
replace
35
36
35
36
0
p02768
C++
Runtime Error
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define cinf(n, x) \ for (int i = 0; i < (n); i++) \ cin >> x[i]; #define ft first #define sc second #defi...
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) #define cinf(n, x) \ for (int i = 0; i < (n); i++) \ cin >> x[i]; #define ft first #define sc second #defi...
replace
92
94
92
107
0
p02768
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC optimize("O3") using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <typena...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #pragma GCC optimize("O3") using namespace std; using namespace __gnu_pbds; template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; template <typena...
replace
86
90
86
90
TLE
p02768
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> typedef long long ll; typedef unsigned long long ull; using namespace std; #define FAL...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> typedef long long ll; typedef unsigned long long ull; using namespace std; #define FAL...
replace
215
217
215
226
0
p02768
C++
Time Limit Exceeded
#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...
replace
97
98
97
103
TLE
p02768
C++
Runtime Error
#include "bits/stdc++.h" #define REP(i, num) for (int i = 0; i < (num); ++i) #define LOOP(i) while (i--) #define ALL(c) c.begin(), c.end() #define PRINTALL(c) \ for (auto pitr = c.begin(); pitr != c.end(); ++pitr) { \ cout << *pitr;...
#include "bits/stdc++.h" #define REP(i, num) for (int i = 0; i < (num); ++i) #define LOOP(i) while (i--) #define ALL(c) c.begin(), c.end() #define PRINTALL(c) \ for (auto pitr = c.begin(); pitr != c.end(); ++pitr) { \ cout << *pitr;...
replace
90
91
90
91
0
p02768
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdlib> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> #define DEBUG 1 constexpr int kMod = 1000000007; typedef long long LL; LL modpow(LL a, LL n) { LL po...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdlib> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <vector> #define DEBUG 1 constexpr int kMod = 1000000007; typedef long long LL; LL modpow(LL a, LL n) { LL po...
replace
44
49
44
45
TLE
p02768
C++
Time Limit Exceeded
#include <algorithm> #include <bits/stdc++.h> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #i...
#include <algorithm> #include <bits/stdc++.h> #include <bitset> #include <cassert> #include <ciso646> #include <cmath> #include <complex> #include <cstdio> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #i...
replace
287
298
287
288
TLE
p02768
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define INF 1e9 #define PI 3.14159265359 #define MOD 1000000007 #define ALL(v) v.begin(), v.end() typedef long long ll; // a^n mod を計算する long long modpow(long long a, long long n, long long mod) { long long res = 1; w...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define INF 1e9 #define PI 3.14159265359 #define MOD 1000000007 #define ALL(v) v.begin(), v.end() typedef long long ll; // a^n mod を計算する long long modpow(long long a, long long n, long long mod) { long long res = 1; w...
replace
41
42
41
43
TLE
p02768
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int64_t mod = 1000000007; int64_t mypow(int64_t x, int64_t y) { if (y == 1) return x; else if (y % 2 == 1) return mypow(x, y - 1) * x % mod; else { int64_t tmp = mypow(x, y / 2); return tmp * tmp % mod; } } int64_t soujo(int64_t x, int64_t y) // x...
#include <bits/stdc++.h> using namespace std; int64_t mod = 1000000007; int64_t mypow(int64_t x, int64_t y) { if (y == 1) return x; else if (y % 2 == 1) return mypow(x, y - 1) * x % mod; else { int64_t tmp = mypow(x, y / 2); return tmp * tmp % mod; } } int64_t soujo(int64_t x, int64_t y) // x...
replace
36
38
36
38
0
p02768
C++
Runtime Error
#include <bits/stdc++.h> #define INF 1e9 using namespace std; #define REPR(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(a) (a).begin(), (a).end() template <class T> bool chmin(T &a, const T &b) ...
#include <bits/stdc++.h> #define INF 1e9 using namespace std; #define REPR(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(a) (a).begin(), (a).end() template <class T> bool chmin(T &a, const T &b) ...
replace
50
51
50
51
0
comb[a]: 4 comb[b]: 4
p02768
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rp(i, k, n) for (int i = k; i < n; i++) typedef long long ll; typedef double ld; template <class T> inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, const T &b) { if (b < a...
#include <bits/stdc++.h> using namespace std; #define rp(i, k, n) for (int i = k; i < n; i++) typedef long long ll; typedef double ld; template <class T> inline bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, const T &b) { if (b < a...
replace
64
65
64
65
0
p02768
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; #define ll long long #define dd double #define MOD 1000000007 #define nl cout << endl #define rt int Q[100005] = {0} #define mp make_pair #define test() \ ...
#include <bits/stdc++.h> using namespace std; typedef unsigned long long ull; typedef long long ll; #define ll long long #define dd double #define MOD 1000000007 #define nl cout << endl #define rt int Q[100005] = {0} #define mp make_pair #define test() \ ...
replace
87
91
87
91
TLE
p02768
Python
Runtime Error
def create_array(n: int, r: int, mod, mod2): m_ls = [1] * (r + 1) for i, j in zip(range(n, 0, -1), range(1, r + 1)): m_ls[j] = (m_ls[j - 1] * i * pow(j, mod2, mod)) % mod return m_ls def main(): n, a, b = map(int, input().split()) _mod = 1_000_000_007 _mod2 = 1_000_000_005 m_ls =...
def create_array(n: int, r: int, mod, mod2): m_ls = [1] * (r + 1) for i, j in zip(range(n, 0, -1), range(1, r + 1)): m_ls[j] = (m_ls[j - 1] * i * pow(j, mod2, mod)) % mod return m_ls def main(): n, a, b = map(int, input().split()) _mod = 1000000007 _mod2 = 1000000005 m_ls = creat...
replace
10
12
10
12
0
p02768
Python
Runtime Error
n, a, b = map(int, input().split()) mod = 10**9 + 7 max = min(n, 2 * 10**5) fac1 = [n] * max fac2 = [1] * max for i in range(2, max): fac1[i] = fac1[i - 1] * (n - i + 1) % mod fac2[i] = fac2[i - 1] * i % mod c = fac1[a] * pow(fac2[a], mod - 2, mod) % mod d = fac1[b] * pow(fac2[b], mod - 2, mod) % mod print((p...
n, a, b = map(int, input().split()) mod = 10**9 + 7 max = min(n, 2 * 10**5) fac1 = [n] * (max + 1) fac2 = [1] * (max + 1) for i in range(2, max + 1): fac1[i] = fac1[i - 1] * (n - i + 1) % mod fac2[i] = fac2[i - 1] * i % mod c = fac1[a] * pow(fac2[a], mod - 2, mod) % mod d = fac1[b] * pow(fac2[b], mod - 2, mod)...
replace
4
7
4
7
0
p02768
Python
Runtime Error
n, a, b = map(int, input().split()) mod = 10**9 + 7 def choose(n, r, mod): r = min(r, n - r) x = 1 y = 1 for i in range(r): x = x * (n - i) % mod y = y * (i + 1) % mod y = pow(y, -2, mod) return x * y % mod ans = pow(2, n, mod) - 1 - choose(n, a, mod) - choose(n, b, mod) whi...
n, a, b = map(int, input().split()) mod = 10**9 + 7 def choose(n, r, mod): r = min(r, n - r) x = 1 y = 1 for i in range(r): x = x * (n - i) % mod y = y * (i + 1) % mod y = pow(y, mod - 2, mod) return x * y % mod ans = pow(2, n, mod) - 1 - choose(n, a, mod) - choose(n, b, mod)...
replace
11
12
11
12
0
p02768
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) using namespace std; typedef long long ll; typedef pair<int, int> P; const int inf = 1 << 21; const ll INF = 1LL << 60; const ll mod = 1e9 + 7; const int dx[4] = {-1, 0, 1, 0}; co...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) using namespace std; typedef long long ll; typedef pair<int, int> P; const int inf = 1 << 21; const ll INF = 1LL << 60; const ll mod = 1e9 + 7; const int dx[4] = {-1, 0, 1, 0}; co...
replace
41
44
41
48
TLE
p02768
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MAX = 310000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i %...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int MAX = 310000; const int MOD = 1000000007; long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MAX; i++) { fac[i] = fac[i - 1] * i %...
replace
41
43
41
49
TLE
p02768
C++
Runtime Error
#include <bits/stdc++.h> #include <type_traits> using namespace std; using ll = int64_t; #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 ddrep(i, n) for (int i = n; i > 0; --i) #define srep(i, s, t) for (int ...
#include <bits/stdc++.h> #include <type_traits> using namespace std; using ll = int64_t; #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 ddrep(i, n) for (int i = n; i > 0; --i) #define srep(i, s, t) for (int ...
replace
76
77
76
77
0
p02768
C++
Time Limit Exceeded
// Created by sz #include <bits/stdc++.h> using namespace std; using ll = long long; int mod = 1e9 + 7; struct modular { int value; modular(long long v = 0) { value = v % mod; if (value < 0) value += mod; } modular(long long a, long long b) : value(0) { *this += a; *this /= b; } modul...
// Created by sz #include <bits/stdc++.h> using namespace std; using ll = long long; int mod = 1e9 + 7; struct modular { int value; modular(long long v = 0) { value = v % mod; if (value < 0) value += mod; } modular(long long a, long long b) : value(0) { *this += a; *this /= b; } modul...
replace
92
97
92
93
TLE
p02768
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; typedef long long ll; typedef vector<int> vi; const double PI = acos(-1.0); const ll MOD = 1000000007ll; ll n, a, b; ll kai[200010]; ll inkai[200010]; void input() { cin >> n >> a >> b; } ll power(ll p, ll q) { ll res...
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; typedef long long ll; typedef vector<int> vi; const double PI = acos(-1.0); const ll MOD = 1000000007ll; ll n, a, b; ll kai[200010]; ll inkai[200010]; void input() { cin >> n >> a >> b; } ll power(ll p, ll q) { ll res...
replace
38
39
38
39
0
p02768
C++
Time Limit Exceeded
#include <bits/stdc++.h> // #pragma GCC target ("avx2") // #pragma GCC optimization ("O3") // #pragma GCC optimization ("unroll-loops") #define clz __builtin_clzll #define popcount __builtin_popcountll #define FORS(i, s, n) for (i64 i = (s); i < (n); ++i) #define RFORS(i, s, n) for (i64 i = (n)-1; i >= (s); --i) #defi...
#include <bits/stdc++.h> // #pragma GCC target ("avx2") // #pragma GCC optimization ("O3") // #pragma GCC optimization ("unroll-loops") #define clz __builtin_clzll #define popcount __builtin_popcountll #define FORS(i, s, n) for (i64 i = (s); i < (n); ++i) #define RFORS(i, s, n) for (i64 i = (n)-1; i >= (s); --i) #defi...
replace
406
407
406
407
TLE
p02768
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); ++i) #define all(x) begin(x), end(x) typedef long long ll; typedef pair<int, int> pii; const int inf = 1010001000; const ll INF = 1001000100010001000; const int mod = (int)1e9 + 7; long long modpow(long long a, long long n) ...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); ++i) #define all(x) begin(x), end(x) typedef long long ll; typedef pair<int, int> pii; const int inf = 1010001000; const ll INF = 1001000100010001000; const int mod = (int)1e9 + 7; long long modpow(long long a, long long n) ...
insert
61
61
61
62
-11
p02768
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define chmin(x, y) x = min(x, y) using namespace std; typedef long long ll; typedef pair<int, int> P; const int mod = 1000000007; struct mint { ll x; // typedef long long ll; mint(ll x = 0) : x((x % mod + mod) % mod) {} mint &operator+=(co...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define chmin(x, y) x = min(x, y) using namespace std; typedef long long ll; typedef pair<int, int> P; const int mod = 1000000007; struct mint { ll x; // typedef long long ll; mint(ll x = 0) : x((x % mod + mod) % mod) {} mint &operator+=(co...
replace
78
81
78
88
0
p02768
C++
Time Limit Exceeded
#include <iostream> #include <vector> using namespace std; long long mod = 1e9 + 7; struct nCk { long long pow(long long x, long long n) { long long ret = 1; if (n > 0) { ret = pow(x, n / 2); if (n % 2 == 0) { (ret = (ret * ret)) %= mod; } else { (ret = ((ret * ret) % mod) * ...
#include <iostream> #include <vector> using namespace std; long long mod = 1e9 + 7; struct nCk { long long pow(long long x, long long n) { long long ret = 1; if (n > 0) { ret = pow(x, n / 2); if (n % 2 == 0) { (ret = (ret * ret)) %= mod; } else { (ret = ((ret * ret) % mod) * ...
replace
33
37
33
34
TLE
p02768
C++
Runtime Error
#include <bits/stdc++.h> // #include <unistd.h> // #include <iostream> using namespace std; #define DEBUG(x) cerr << #x << ": " << x << endl; #define DEBUG_VEC(v) \ cerr << #v << ":"; \ for (int i ...
#include <bits/stdc++.h> // #include <unistd.h> // #include <iostream> using namespace std; #define DEBUG(x) cerr << #x << ": " << x << endl; #define DEBUG_VEC(v) \ cerr << #v << ":"; \ for (int i ...
replace
85
86
85
86
-11
p02768
C++
Time Limit Exceeded
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define inf 0x3f3f3f3f using namespace std; typedef long long LL; typedef pair<int, int> pll; const int m...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #define inf 0x3f3f3f3f using namespace std; typedef long long LL; typedef pair<int, int> pll; const int m...
replace
57
71
57
60
TLE
p02769
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using ii = pair<ll, ll>; const int MAX{200010}; const ll MOD{1000000007}, oo{1LL << 62}; ll fs[MAX], inv[MAX]; ll mod_pow(ll a, ll n) { ll res = 1, base = a; while (n) { if (n & 1) res = (res * base) % MOD; base = (base * base) ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ii = pair<ll, ll>; const int MAX{400010}; const ll MOD{1000000007}, oo{1LL << 62}; ll fs[MAX], inv[MAX]; ll mod_pow(ll a, ll n) { ll res = 1, base = a; while (n) { if (n & 1) res = (res * base) % MOD; base = (base * base) ...
replace
6
7
6
7
0
p02769
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; typedef long long ll; const int N = 1e5 + 10; ll a[N]; ll qmi(ll a, ll b) { ll res = 1; while (b) { if (b & 1) res = res * a % mod; a = a * a % mod; b >>= 1; } return res; } ll c(ll n, ll m) { return a[n] % mod * qmi(a[m]...
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; typedef long long ll; const int N = 2e5 + 10; ll a[N]; ll qmi(ll a, ll b) { ll res = 1; while (b) { if (b & 1) res = res * a % mod; a = a * a % mod; b >>= 1; } return res; } ll c(ll n, ll m) { return a[n] % mod * qmi(a[m]...
replace
4
5
4
5
0
p02769
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e5 + 10; const ll p = 1e9 + 7; int a[N]; ll inv(ll a, ll p) { // p为素数,a<p if (a == 1) return 1; return (p - p / a) * inv(p % a, p) % p; } ll C(ll n, ll m) { ll res = 1; for (ll i = 1, j = n - m + 1; i <= m; ++i, ++j) { re...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 2e5 + 10; const ll p = 1e9 + 7; int a[N]; ll inv(ll a, ll p) { // p为素数,a<p if (a == 1) return 1; return (p - p / a) * inv(p % a, p) % p; } ll C(ll n, ll m) { ll res = 1; for (ll i = 1, j = n - m + 1; i <= m; ++i, ++j) { re...
replace
22
24
22
28
TLE
p02769
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define r1(i, n) for (int i = 0; i < n; i++) #define r2(i, n) for (int i = 1; i < n; i++) #define intc(n) \ int n; \ cin >> n; #define ll long long #define ll...
#include <bits/stdc++.h> #define r1(i, n) for (int i = 0; i < n; i++) #define r2(i, n) for (int i = 1; i < n; i++) #define intc(n) \ int n; \ cin >> n; #define ll long long #define ll...
replace
38
39
38
39
TLE
p02769
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long typedef pair<int, int> P; #define mod 1000000007 #define INF (1LL << 60) #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define rep1(i, a, n) for (int i = (a), i##_len = (n); i < i##_len; ++i) #define repi(itr, ds) for (auto itr =...
#include <bits/stdc++.h> using namespace std; #define int long long typedef pair<int, int> P; #define mod 1000000007 #define INF (1LL << 60) #define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define rep1(i, a, n) for (int i = (a), i##_len = (n); i < i##_len; ++i) #define repi(itr, ds) for (auto itr =...
replace
156
157
156
157
-11
p02769
C++
Time Limit Exceeded
#include <algorithm> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define INF (1 << 30) - 1 #define LINF 1LL << 60 const int MOD = 1000000007; using ll = long long; using P = pair<int, i...
#include <algorithm> #include <cstring> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define INF (1 << 30) - 1 #define LINF 1LL << 60 const int MOD = 1000000007; using ll = long long; using P = pair<int, i...
replace
95
105
95
98
TLE
p02769
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) typedef long long ll; ll mod = 1000000007; ll modsize = 200010; vector<ll> fac(modsize); vector<ll> inv(modsize); vector<ll> facinv(modsize); void modcalc()...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; #define chmin(x, y) x = min(x, y) #define chmax(x, y) x = max(x, y) typedef long long ll; ll mod = 1000000007; ll modsize = 200010; vector<ll> fac(modsize); vector<ll> inv(modsize); vector<ll> facinv(modsize); void modcalc()...
insert
57
57
57
58
TLE
p02769
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = (n); i > 0; i--) #define all(n) n.begin(), n.end() #define print(n) cout << n << endl const int MAX = 200001; const int MOD = 1000000007; vector<ll> fac(MAX), finv(MAX), ...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) #define rrep(i, n) for (int i = (n); i > 0; i--) #define all(n) n.begin(), n.end() #define print(n) cout << n << endl const int MAX = 200001; const int MOD = 1000000007; vector<ll> fac(MAX), finv(MAX), ...
replace
39
40
39
41
TLE
p02769
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll modulo = 1000000007ll; ll binpow(ll a, ll b) { if (b == 0) return 1; if (b % 2 == 0) { return (binpow(a, b / 2) * binpow(a, b / 2)) % modulo; } else { return (((binpow(a, b / 2) * binpow(a, b / 2)) % modulo) * a) % modulo; } } ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll modulo = 1000000007ll; ll binpow(ll a, ll b) { if (b == 0) return 1; if (b % 2 == 0) { return (binpow(a, b / 2) * binpow(a, b / 2)) % modulo; } else { return (((binpow(a, b / 2) * binpow(a, b / 2)) % modulo) * a) % modulo; } } ...
replace
54
57
54
64
TLE
p02769
C++
Runtime Error
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; long long mod = 1e9 + 7; struct all { vector<long long> kai, gya, nck; all(long long n) { kai.resize(n); gya.resize(n); nck.resize(n); } long long pow(lo...
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; long long mod = 1e9 + 7; struct all { vector<long long> kai, gya, nck; all(long long n) { kai.resize(n + 1); gya.resize(n + 1); nck.resize(n + 1); } long...
replace
12
15
12
15
-6
Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
p02769
C++
Time Limit Exceeded
#include <cstdio> #include <cstring> #include <iostream> using namespace std; #define FOR(i, l, r) for (int i = (l); i <= (r); ++i) typedef long long LL; const LL mod = 1000000007; LL n, k; LL pow(LL x, LL n) { LL ret = 1; while (n) { if (n & 1) { ret *= x; ret %= mod; } x *= x; x %= m...
#include <cstdio> #include <cstring> #include <iostream> using namespace std; #define FOR(i, l, r) for (int i = (l); i <= (r); ++i) typedef long long LL; const LL mod = 1000000007; LL n, k; LL pow(LL x, LL n) { LL ret = 1; while (n) { if (n & 1) { ret *= x; ret %= mod; } x *= x; x %= m...
replace
75
79
75
85
TLE
p02769
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define fore(i, a) for (auto &i : a) #define all(x) (x).begin(), (x).end() // #pragma GCC optimize ("-O3") using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(fal...
#include <bits/stdc++.h> #define rep(i, a, b) for (int i = a; i < b; i++) #define rrep(i, a, b) for (int i = a; i >= b; i--) #define fore(i, a) for (auto &i : a) #define all(x) (x).begin(), (x).end() // #pragma GCC optimize ("-O3") using namespace std; void _main(); int main() { cin.tie(0); ios::sync_with_stdio(fal...
replace
136
137
136
137
0
p02769
C++
Memory Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long; #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 (ll i = (m); i < (n); ++i) #define INF 1e9 const ll mod = 1e9 + 7; const int MAX = 510000; const int MOD = 1000000007; long lo...
#include <bits/stdc++.h> using namespace std; using ll = long long; #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 (ll i = (m); i < (n); ++i) #define INF 1e9 const ll mod = 1e9 + 7; const int MAX = 510000; const int MOD = 1000000007; long lo...
delete
37
57
37
37
MLE
p02769
C++
Runtime Error
#include <algorithm> // minmax, sort, swap #include <cmath> #include <cstdio> // printf, scanf #include <deque> // deque #include <functional> // function<void(int)> #include <iomanip> // cout<<setprecision(n) #include <iostream> // cin, cout, cerr #include <map> // key-value pairs sorted by keys #...
#include <algorithm> // minmax, sort, swap #include <cmath> #include <cstdio> // printf, scanf #include <deque> // deque #include <functional> // function<void(int)> #include <iomanip> // cout<<setprecision(n) #include <iostream> // cin, cout, cerr #include <map> // key-value pairs sorted by keys #...
insert
107
107
107
108
0
p02769
C++
Time Limit Exceeded
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #def...
#include <algorithm> #include <assert.h> #include <bitset> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #def...
replace
61
62
61
62
TLE
p02769
C++
Runtime Error
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep0(i, n) for (int i = 0; i <= (int)(n); ++i) #define rep1(i, n) for (int i = 1; i <= (int)(n); ++i) #define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i) #defin...
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define int long long #define rep(i, n) for (int i = 0; i < (int)(n); ++i) #define rep0(i, n) for (int i = 0; i <= (int)(n); ++i) #define rep1(i, n) for (int i = 1; i <= (int)(n); ++i) #define rrep(i, n) for (int i = (int)(n)-1; i >= 0; --i) #defin...
replace
115
116
115
116
0
p02769
C++
Time Limit Exceeded
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> using namespace std; #define int __int128 inline int gi() { short tmp = getchar(); int flag = 1; while (!isdigit(tmp)) { if (tmp == '-') { f...
#include <algorithm> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> using namespace std; #define int __int128 inline int gi() { short tmp = getchar(); int flag = 1; while (!isdigit(tmp)) { if (tmp == '-') { f...
delete
86
87
86
86
TLE
p02769
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <iostream> using namespace std; const int MAX = 400000; // 欲しい最大数に応じて変動 n*2でOK const int MOD = 1000000007; // 10^9+7用mod long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MA...
#include <bits/stdc++.h> #include <iostream> using namespace std; const int MAX = 400000; // 欲しい最大数に応じて変動 n*2でOK const int MOD = 1000000007; // 10^9+7用mod long long fac[MAX], finv[MAX], inv[MAX]; // テーブルを作る前処理 void COMinit() { fac[0] = fac[1] = 1; finv[0] = finv[1] = 1; inv[1] = 1; for (int i = 2; i < MA...
replace
43
49
43
45
TLE
p02769
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <class t> inline t read(t &x) { char c = getchar(); bool f = 0; x = 0; while (!isdigit(c)) f |= c == '-', c = getchar(); while (isdigit(c)) x = (x << 1) + (x << 3) + (c ^ 48), c = getchar(); if (f) x = -x; return x; } template <class t> in...
#include <bits/stdc++.h> using namespace std; template <class t> inline t read(t &x) { char c = getchar(); bool f = 0; x = 0; while (!isdigit(c)) f |= c == '-', c = getchar(); while (isdigit(c)) x = (x << 1) + (x << 3) + (c ^ 48), c = getchar(); if (f) x = -x; return x; } template <class t> in...
replace
26
27
26
27
0
p02769
C++
Runtime Error
#include <bits/stdc++.h> typedef long long lint; using namespace std; // nCr mod p(n<p)をキビキビ計算する // 構築:O(n), クエリ:O(1) struct combination_mod { using lint = long long int; int sz; lint mod; vector<lint> fac; vector<lint> finv; combination_mod(int _sz, lint _mod) : sz(_sz), mod(_mod) { fac.assign(sz + 1,...
#include <bits/stdc++.h> typedef long long lint; using namespace std; // nCr mod p(n<p)をキビキビ計算する // 構築:O(n), クエリ:O(1) struct combination_mod { using lint = long long int; int sz; lint mod; vector<lint> fac; vector<lint> finv; combination_mod(int _sz, lint _mod) : sz(_sz), mod(_mod) { fac.assign(sz + 1,...
insert
35
35
35
40
0
p02769
C++
Runtime Error
#include <bits/stdc++.h> #define int long long using namespace std; const int MODN = 1e9 + 7; const int MAXN = 1e5 + 10; int fact[MAXN]; int quick_pow(int a, int b, int modn = MODN) { a %= MODN; int ret = 1; // int cheng=a; while (b) { if (b & 1) ret *= a; ret %= MODN; a *= a; a %= MODN; ...
#include <bits/stdc++.h> #define int long long using namespace std; const int MODN = 1e9 + 7; const int MAXN = 2e5 + 10; int fact[MAXN]; int quick_pow(int a, int b, int modn = MODN) { a %= MODN; int ret = 1; // int cheng=a; while (b) { if (b & 1) ret *= a; ret %= MODN; a *= a; a %= MODN; ...
replace
4
5
4
5
0
p02769
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // def #define debug(x) cout << #x << ": " << x << endl #define out(x) cout << x << endl #define repeat(i, a, b) for (int i = (a); i < (b); i++) #define revrepeat(i, a, b) for (int i = (b)-1; i >= (a); i--) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define revre...
#include <bits/stdc++.h> using namespace std; // def #define debug(x) cout << #x << ": " << x << endl #define out(x) cout << x << endl #define repeat(i, a, b) for (int i = (a); i < (b); i++) #define revrepeat(i, a, b) for (int i = (b)-1; i >= (a); i--) #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define revre...
replace
139
144
139
141
0
p02769
C++
Runtime Error
/******* DFS TREE ************** * https://codeforces.com/contest/1276/problem/B */ /* ID: vqt LANG: C++14 PROB: namenum */ // #pragma GCC optimize ("O2") #pragma GCC optimize("O3") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <unistd.h> using name...
/******* DFS TREE ************** * https://codeforces.com/contest/1276/problem/B */ /* ID: vqt LANG: C++14 PROB: namenum */ // #pragma GCC optimize ("O2") #pragma GCC optimize("O3") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #include <unistd.h> using name...
replace
326
327
326
327
0
p02769
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } class ModInt { static int MOD; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } class ModInt { static int MOD; ...
replace
131
132
131
132
TLE
p02769
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cassert> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #includ...
#include <algorithm> #include <bits/stdc++.h> #include <cassert> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #includ...
replace
925
926
925
926
0
p02769
Python
Runtime Error
import sys sys.setrecursionlimit(10**6) INF = float("inf") MOD = 10**9 + 7 def input(): return sys.stdin.readline().strip() class Combination: """ O(n)の前計算を1回行うことで,O(1)でnCr mod mを求められる n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms) 使用例: comb = Combination(1000000) print(comb(5...
import sys sys.setrecursionlimit(10**6) INF = float("inf") MOD = 10**9 + 7 def input(): return sys.stdin.readline().strip() class Combination: """ O(n)の前計算を1回行うことで,O(1)でnCr mod mを求められる n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms) 使用例: comb = Combination(1000000) print(comb(5...
replace
51
52
51
52
0
p02769
Python
Runtime Error
from functools import lru_cache CHECK = False N, K = list(map(int, input().split())) MOD = 10**9 + 7 @lru_cache(maxsize=None) def modInverse(a, p): # Fermat's little theorem, a**(p-1) = 1 mod p return pow(a, p - 2, p) if CHECK: fact = [1] for i in range(1, 2 * N + 1): fact.append((fact[-...
from functools import lru_cache CHECK = False N, K = list(map(int, input().split())) MOD = 10**9 + 7 @lru_cache(maxsize=None) def modInverse(a, p): # Fermat's little theorem, a**(p-1) = 1 mod p return pow(a, p - 2, p) if N - 1 <= K or CHECK: fact = [1] for i in range(1, 2 * N + 1): fact....
replace
16
17
16
17
NameError: name 'nCr' is not defined
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02769/Python/s497531236.py", line 32, in <module> print(nCr(stars + bars, bars)) NameError: name 'nCr' is not defined
p02769
C++
Runtime Error
#include <bits/stdc++.h> #define fup(i, a, b) for (int i = a; i <= b; ++i) #define fdw(i, a, b) for (int i = a; i >= b; --i) #define sync \ ios::sync_with_stdio(false); \ cin.tie(0) #define cl(a) memset...
#include <bits/stdc++.h> #define fup(i, a, b) for (int i = a; i <= b; ++i) #define fdw(i, a, b) for (int i = a; i >= b; --i) #define sync \ ios::sync_with_stdio(false); \ cin.tie(0) #define cl(a) memset...
delete
39
40
39
39
-11
p02769
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define INF 9e18 #define HELL (int)(1e9 + 7) #define int long long #define double long double #define uint unsigned long long #define deb(x) cerr << #x << " => " << x << "\n" #define deba(x) \...
#include <bits/stdc++.h> using namespace std; #define endl "\n" #define INF 9e18 #define HELL (int)(1e9 + 7) #define int long long #define double long double #define uint unsigned long long #define deb(x) cerr << #x << " => " << x << "\n" #define deba(x) \...
replace
47
48
47
48
0
TIME => 4
p02770
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() const ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define F first #define S second #define pii pair<int, int> #define eb emplace_back #define all(v) v.begin(), v.end() #define rep(i, n) for (int i = 0; i < (n); ++i) #define rep3(i, l, n) for (int i = l; i < (n); ++i) #define sz(v) (int)v.size() const ...
replace
111
112
111
112
0
p02770
C++
Runtime Error
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <string> #include <vector> #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 ...
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <string> #include <vector> #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 ...
replace
37
38
37
38
0
p02770
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
163
164
163
164
0
p02770
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define NDEBUG #include <cassert> typedef long long ll; typedef long double Double; typedef unsigned long long ull; typedef pair<int, int> ii; typedef pair<ll, ll> llll; typedef pair<double, double> dd; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vec...
#include <bits/stdc++.h> using namespace std; #define NDEBUG #include <cassert> typedef long long ll; typedef long double Double; typedef unsigned long long ull; typedef pair<int, int> ii; typedef pair<ll, ll> llll; typedef pair<double, double> dd; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef vec...
replace
188
202
188
195
TLE
p02770
C++
Runtime Error
// #i#include "pch.h" #include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> typedef long long ll; ty...
// #i#include "pch.h" #include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iostream> #include <limits.h> #include <map> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <time.h> typedef long long ll; ty...
replace
173
174
173
174
0
p02771
C++
Runtime Error
#include <stdio.h> int main() { int a, b, c; scanf("%d %d %d", a, b, c); if ((a == b && a != c) || (a == c && a != b) || (b == c && b != a)) printf("Yes"); else printf("No"); return 0; }
#include <stdio.h> int main() { int a, b, c; scanf("%d %d %d", &a, &b, &c); if ((a == b && a != c) || (a == c && a != b) || (b == c && b != a)) printf("Yes"); else printf("No"); return 0; }
replace
3
4
3
4
-11
p02771
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define inf 100000000000000000 #define ll long long int #define pb push_back #define f first #define s second #define mod 1000000007 #define fast ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) void mahakal() { #ifndef ONLINE_JUDGE freopen("input.txt", "r"...
#include <bits/stdc++.h> using namespace std; #define inf 100000000000000000 #define ll long long int #define pb push_back #define f first #define s second #define mod 1000000007 #define fast ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL) void mahakal() { #ifndef ONLINE_JUDGE freopen("input.txt", "r"...
replace
18
19
18
19
0
p02771
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n...
replace
12
16
12
13
0
p02771
Python
Runtime Error
a, b, c = list(map(int, input().split())) if len(set(a, b, c)) == 2: print("Yes") else: print("No")
a = list(map(int, input().split())) if len(set(a)) == 2: print("Yes") else: print("No")
replace
0
2
0
2
TypeError: set expected at most 1 argument, got 3
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02771/Python/s500632696.py", line 2, in <module> if len(set(a, b, c)) == 2: TypeError: set expected at most 1 argument, got 3
p02771
C++
Runtime Error
#include <iostream> #include <stdio.h> using namespace std; int main() { int d[10]; for (int i = 0; i < 3; i++) scanf("%d", d[i]); bool chk = true; int v = d[0]; if (v != d[1]) { if (v != d[2]) { if (d[1] == d[2]) chk = true; else chk = false; } else { chk = true...
#include <iostream> #include <stdio.h> using namespace std; int main() { int d[10]; for (int i = 0; i < 3; i++) scanf("%d", &d[i]); bool chk = true; int v = d[0]; if (v != d[1]) { if (v != d[2]) { if (d[1] == d[2]) chk = true; else chk = false; } else { chk = tru...
replace
7
8
7
8
-11
p02771
C++
Runtime Error
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define all(x) x.begin(), x.end() #define fi first #define se second...
#include <algorithm> #include <cassert> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define all(x) x.begin(), x.end() #define fi first #define se second...
replace
40
41
40
41
-11
p02771
C++
Runtime Error
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define ms(a, b) memset(a, b, sizeof(a)) const int inf = 0x3f3f3f3f; const ll INF = 0x3f3f3f3f3f3f3f3f; const int maxn = 1e6 + 10; const int mod = 1e9 + 7; const int maxm = 1e3 + 10; using namespace std; int main(int argc, char const *argv[]) ...
#include <bits/stdc++.h> #define ll long long #define ull unsigned long long #define ms(a, b) memset(a, b, sizeof(a)) const int inf = 0x3f3f3f3f; const ll INF = 0x3f3f3f3f3f3f3f3f; const int maxn = 1e6 + 10; const int mod = 1e9 + 7; const int maxm = 1e3 + 10; using namespace std; int main(int argc, char const *argv[]) ...
replace
12
14
12
14
0
Time elapsed: 0.029698 s.
p02771
C++
Runtime Error
#include <iostream> #include <stdio.h> int main() { int a, b, c; scanf("%d%d%d", a, b, c); if ((a != b && b != c && c != a) || (a == b && a == c)) { printf("No\n"); } else { printf("Yes\n"); } }
#include <iostream> #include <stdio.h> int main() { int a, b, c; scanf("%d%d%d", &a, &b, &c); if ((a != b && b != c && c != a) || (a == b && a == c)) { printf("No\n"); } else { printf("Yes\n"); } }
replace
4
5
4
5
-11
p02771
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define pb push_back #define f(i, n) for (i = 0; i < n; i++) #define F(i, a, b) for (i = a; a <= b; i++) #define arr(a, n) \ for (i = 0; i < n; i++) ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define pb push_back #define f(i, n) for (i = 0; i < n; i++) #define F(i, a, b) for (i = a; a <= b; i++) #define arr(a, n) \ for (i = 0; i < n; i++) ...
replace
51
57
51
57
0
p02771
Python
Runtime Error
A, B, C = map(int, input().split()) list = [A, B, C] ans = list(set(list)) if len(ans) == 2: print("Yes") else: print("No")
A, B, C = map(int, input().split()) l = [A, B, C] ans = list(set(l)) if len(ans) == 2: print("Yes") else: print("No")
replace
1
3
1
3
TypeError: 'list' object is not callable
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02771/Python/s516174339.py", line 3, in <module> ans = list(set(list)) TypeError: 'list' object is not callable
p02771
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define pi acos(-1.0) #define inf 0x3f3f3f3f typedef long long ll; typedef unsigned long long ull; typedef double db; int mo[4][2] = {-1, 0, 1, 0, 0, -1, 0, 1}; // int mo[8][2] = { -1,0,1,0,-1,-1,1,1,0,-1,0,1,1,-1,-1,1 }; const int maxn = 1e5 + 10; int n, m, is, t, ans, p[m...
#include <bits/stdc++.h> using namespace std; #define pi acos(-1.0) #define inf 0x3f3f3f3f typedef long long ll; typedef unsigned long long ull; typedef double db; int mo[4][2] = {-1, 0, 1, 0, 0, -1, 0, 1}; // int mo[8][2] = { -1,0,1,0,-1,-1,1,1,0,-1,0,1,1,-1,-1,1 }; const int maxn = 1e5 + 10; int n, m, is, t, ans, p[m...
replace
14
15
14
15
0
p02771
Python
Runtime Error
nums = list(map(int, input.split(" "))) if len(set(nums)) == 2: print("Yes") else: print("No")
nums = list(map(int, input().split(" "))) if len(set(nums)) == 2: print("Yes") else: print("No")
replace
0
1
0
1
AttributeError: 'builtin_function_or_method' object has no attribute 'split'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02771/Python/s880754388.py", line 1, in <module> nums = list(map(int, input.split(" "))) AttributeError: 'builtin_function_or_method' object has no attribute 'split'
p02771
Python
Runtime Error
li = list(map(int, input().split())) if (set(len(li))) == 2: print("Yes") else: print("No")
li = list(map(int, input().split())) if (len(set(li))) == 2: print("Yes") else: print("No")
replace
1
2
1
2
TypeError: 'int' object is not iterable
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02771/Python/s620789941.py", line 2, in <module> if (set(len(li))) == 2: TypeError: 'int' object is not iterable
p02771
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; using ll = long long int; int main() { ll a, b, c; cin >> a >> b >> c; map<ll, int> mp; mp[a]++; mp[b]++; mp[c]++; auto it = mp.begin(); while (it != mp.end()) { if (it->second == 2) { cout << "Yes\n"; return 0; } } cout << "No\n"; ...
#include <bits/stdc++.h> using namespace std; using ll = long long int; int main() { ll a, b, c; cin >> a >> b >> c; map<ll, int> mp; mp[a]++; mp[b]++; mp[c]++; auto it = mp.begin(); while (it != mp.end()) { if (it->second == 2) { cout << "Yes\n"; return 0; } it++; } cout << ...
insert
16
16
16
17
TLE
p02772
C++
Runtime Error
#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 long, long long> #define mod 1000000007 #de...
#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 long, long long> #define mod 1000000007 #de...
replace
25
26
25
26
-6
*** stack smashing detected ***: terminated
p02772
Python
Runtime Error
n = int(input()) arr = [input() for _ in range(n)] dic = {} for i in range(n): if arr[i] not in dic: dic[arr[i]] = 1 else: dic[arr[i]] += 1 largest = max(dic.values()) ans = [] for keys in dic.keys(): if dic[keys] == largest: ans.append(keys) ans = sorted(ans) for words in ans: p...
N = int(input()) A = list(map(int, input().split())) for a in A: if a % 2 == 1: continue if a % 3 == 0 or a % 5 == 0: continue print("DENIED") exit() print("APPROVED")
replace
0
16
0
11
EOFError: EOF when reading a line
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02772/Python/s663457315.py", line 2, in <module> arr = [input() for _ in range(n)] File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02772/Python/s663457315.py", line 2, in <listcomp> a...
p02772
Python
Runtime Error
N = int(input()) Ai = input() Ai = Ai.split(" ") ans = "APPROVED" for moji in Ai: if moji % 2 != 0: pass else: if (moji % 3 == 0) or (moji % 5 == 0): pass else: ans = "DENIED" break print(ans)
N = int(input()) Ai = input() Ai = Ai.split(" ") ans = "APPROVED" for moji in Ai: moji = int(moji) if moji % 2 != 0: pass else: if (moji % 3 == 0) or (moji % 5 == 0): pass else: ans = "DENIED" break print(ans)
insert
5
5
5
6
TypeError: not all arguments converted during string formatting
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02772/Python/s507255714.py", line 6, in <module> if moji % 2 != 0: TypeError: not all arguments converted during string formatting
p02772
C++
Runtime Error
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a.at(i); } vector<int> b; for (int i = 0; i < N; i++) { if (a.at(i) % 2 == 0) { b.push_back(a.at(i)); } } for (int i = 0;...
#include <iostream> #include <string> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> a(N); for (int i = 0; i < N; i++) { cin >> a.at(i); } vector<int> b; for (int i = 0; i < N; i++) { if (a.at(i) % 2 == 0) { b.push_back(a.at(i)); } } for (int i = 0;...
replace
18
19
18
19
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 2) >= this->size() (which is 2)
p02772
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; // #include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> using namespace std; // #include <boost/multiprecision/cpp_int.hpp> // using namespace boost::multiprecision; #define fio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
delete
79
85
79
79
-11
p02772
C++
Runtime Error
#include "bits/stdc++.h" #define lim 1000000007 #define MAX 10001 #define uomap unordered_map #define uoset unordered_set #define pb push_back #define vec vector #define mkp make_pair #define fir first #define sec second #define LOG(fmt, args...) fprintf(stdout, fmt, ##args); using namespace std; typedef long long int ...
#include "bits/stdc++.h" #define lim 1000000007 #define MAX 10001 #define uomap unordered_map #define uoset unordered_set #define pb push_back #define vec vector #define mkp make_pair #define fir first #define sec second #define LOG(fmt, args...) fprintf(stdout, fmt, ##args); using namespace std; typedef long long int ...
delete
25
29
25
25
TLE
p02772
C++
Runtime Error
#include <bits/stdc++.h> #define N 5000005 #define sag (root + root + 1) #define sol (root + root) #define ort ((bas + son) / 2) #define mod 1000000007 using namespace std; typedef long long ll; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) cin >> arr[i]; for (int i = 0; i < n; i...
#include <bits/stdc++.h> #define N 5000005 #define sag (root + root + 1) #define sol (root + root) #define ort ((bas + son) / 2) #define mod 1000000007 using namespace std; typedef long long ll; int main() { int n; cin >> n; int arr[n]; for (int i = 0; i < n; i++) cin >> arr[i]; for (int i = 0; i < n; i...
replace
20
22
20
22
0
p02772
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; vector<int> a(n); cin >> n; for (int i = 0; i < n; i++) { cin >> a.at(i); } int c = 0; for (int i = 0; i < n; i++) { if (a.at(i) % 2 == 0) { if (a.at(i) % 3 == 0 || a.at(i) % 5 == 0) { c++; } } else { ...
#include <bits/stdc++.h> using namespace std; int main() { int n; vector<int> a(100); cin >> n; for (int i = 0; i < n; i++) { cin >> a.at(i); } int c = 0; for (int i = 0; i < n; i++) { if (a.at(i) % 2 == 0) { if (a.at(i) % 3 == 0 || a.at(i) % 5 == 0) { c++; } } else { ...
replace
5
6
5
6
-6
terminate called after throwing an instance of 'std::length_error' what(): cannot create std::vector larger than max_size()
p02772
C++
Runtime Error
#include <iostream> #include <vector> using namespace std; int main(void) { int n; cin >> n; vector<int> a; for (int i = 0; i < n; i++) { cin >> a[i]; if (a[i] % 2 == 0 && !(a[i] % 3 == 0 || a[i] % 5 == 0)) { cout << "DENIED" << endl; return 0; } } cout << "APPROVED" << endl; }
#include <iostream> #include <vector> using namespace std; int main(void) { int n; cin >> n; vector<int> a(n); for (int i = 0; i < n; i++) { cin >> a[i]; if (a[i] % 2 == 0 && !(a[i] % 3 == 0 || a[i] % 5 == 0)) { cout << "DENIED" << endl; return 0; } } cout << "APPROVED" << endl; }
replace
6
7
6
7
-11
p02772
C++
Runtime Error
#include <bits/stdc++.h> // #include<boost/multiprecision/cpp_int.hpp> #define fl(i, a, n) for (int i = a; i <= n; i++) #define pb push_back #define pob pop_back #define int long long int #define ff first #define ss second #define pi 3.1415926535898 #define vi vector<int> #define mi map<int, int> #define umi unordered_...
#include <bits/stdc++.h> // #include<boost/multiprecision/cpp_int.hpp> #define fl(i, a, n) for (int i = a; i <= n; i++) #define pb push_back #define pob pop_back #define int long long int #define ff first #define ss second #define pi 3.1415926535898 #define vi vector<int> #define mi map<int, int> #define umi unordered_...
replace
38
39
38
40
0
p02772
C++
Runtime Error
#include <bits/stdc++.h> #define pb push_back #define It set<node>::iterator #define endl '\n' #define fastio \ ios::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #define pb push_back #define It set<node>::iterator #define endl '\n' #define fastio \ ios::sync_with_stdio(false); \ cin.tie(NULL); ...
replace
22
23
22
23
0
p02772
C++
Runtime Error
#include <bits/stdc++.h> #include <iomanip> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> vec{n}; for (int i = 0; i < n; i++) { cin >> vec.at(i); } bool H = 1; for (int i = 0; i < n; i++) { if (vec.at(i) % 2 == 0) { if (vec.at(i) % 3 == 0 || vec.at(i) % 5 ...
#include <bits/stdc++.h> #include <iomanip> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> vec(n); for (int i = 0; i < n; i++) { cin >> vec.at(i); } bool H = 1; for (int i = 0; i < n; i++) { if (vec.at(i) % 2 == 0) { if (vec.at(i) % 3 == 0 || vec.at(i) % 5 ...
replace
8
9
8
9
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 1) >= this->size() (which is 1)
p02772
C++
Runtime Error
#include <stdio.h> #include <stdlib.h> #include <fstream> #include <iomanip> #include <iostream> #include <sstream> #include <stdint.h> #include <string.h> // #define _USE_MATH_DEFINES // #include <math.h> #include <deque> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <stri...
#include <stdio.h> #include <stdlib.h> #include <fstream> #include <iomanip> #include <iostream> #include <sstream> #include <stdint.h> #include <string.h> // #define _USE_MATH_DEFINES // #include <math.h> #include <deque> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <stri...
replace
64
70
64
68
0
p02772
C++
Runtime Error
#include <bits/stdc++.h> #define all(vec) vec.begin(), vec.end() #define rall(vec) vec.rbegin(), vec.rend() #define sz(r) r.size() #define rem1(v, i) (v.erase(v.begin() + i)) #define rem2(v, i, j) (v.erase(v.begin() + i, v.begin() + j + 1)) #define rev(v, i, j) (reverse(v.begin() + i, v.begin() + j + 1)) #define digit...
#include <bits/stdc++.h> #define all(vec) vec.begin(), vec.end() #define rall(vec) vec.rbegin(), vec.rend() #define sz(r) r.size() #define rem1(v, i) (v.erase(v.begin() + i)) #define rem2(v, i, j) (v.erase(v.begin() + i, v.begin() + j + 1)) #define rev(v, i, j) (reverse(v.begin() + i, v.begin() + j + 1)) #define digit...
replace
31
36
31
36
0
p02772
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, a[n], i, flag = 0; cin >> n; for (i = 0; i < n; i++) cin >> a[i]; for (i = 0; i < n; i++) { if (a[i] % 2 == 0) { if (a[i] % 3 != 0 && a[i] % 5 != 0) { flag = 1; break; } } } if (flag == 0) cout << "...
#include <bits/stdc++.h> using namespace std; int main() { long long n, a[n], i, flag = 0; cin >> n; for (i = 0; i < n; i++) cin >> a[i]; for (i = 0; i < n; i++) { if (a[i] % 2 == 0) { if (a[i] % 3 != 0 && a[i] % 5 != 0) { flag = 1; break; } } } if (flag == 0) cou...
replace
3
4
3
4
0
p02772
C++
Runtime Error
#include <bits/stdc++.h> #define DEBUG fprintf(stderr, "Passing [%s] line %d\n", __FUNCTION__, __LINE__) #define itn int #define gI gi using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef pair<int, PII> PIII; inline int gi() { int f = 1, x = 0; char c = getchar(); while (c < '0' || c ...
#include <bits/stdc++.h> #define DEBUG fprintf(stderr, "Passing [%s] line %d\n", __FUNCTION__, __LINE__) #define itn int #define gI gi using namespace std; typedef long long LL; typedef pair<int, int> PII; typedef pair<int, PII> PIII; inline int gi() { int f = 1, x = 0; char c = getchar(); while (c < '0' || c ...
replace
37
38
37
38
0
p02772
C++
Runtime Error
/* *********************************************** Author :taciturnity Created Time :2020/2/3 22:02:32 File Name :main.cpp ************************************************ */ #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #i...
/* *********************************************** Author :taciturnity Created Time :2020/2/3 22:02:32 File Name :main.cpp ************************************************ */ #include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <iostream> #i...
replace
35
36
35
36
0
p02772
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } for (int i = 0; i < N; i++) { if (A.at(i) % 2 != 0) A.at(i) = 1; else { if (A.at(i) % 3 == 0 || A.at(i) % 5 == 0) A.at(i) = 1; ...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> A(N); for (int i = 0; i < N; i++) { cin >> A.at(i); } for (int i = 0; i < N; i++) { if (A.at(i) % 2 != 0) A.at(i) = 1; else { if (A.at(i) % 3 == 0 || A.at(i) % 5 == 0) A.at(i) = 1; ...
replace
27
28
27
30
0