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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = M; i > 0; i--) {
if (M % i == 0 and M / i >= N) {
cout << i << endl;
return 0;
}
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
for (int i = M / N; i > 0; i--) {
if (M % i == 0 and M / i >= N) {
cout << i << endl;
return 0;
}
}
return 0;
}
| replace | 7 | 8 | 7 | 8 | TLE | |
p03241 | C++ | Time Limit Exceeded | /*Function Template*/
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pint;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define Rep(i, n) for (ll i = 1; i < (n); i++)
#define ALL(a) (a).begin(), (a).end()
#define IOS ... | /*Function Template*/
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> pint;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define Rep(i, n) for (ll i = 1; i < (n); i++)
#define ALL(a) (a).begin(), (a).end()
#define IOS ... | replace | 165 | 168 | 165 | 174 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define INF (1 << 30)
#define MOD 1000000007
#define l_ength size
using ll = long long;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int lim = m / n;
int maxi = 0;
for (int i = 1; i <= lim; ++i) {
if (m % i == 0) {
if (m / i >= n) {
maxi = i;
}
... | #include <bits/stdc++.h>
#define INF (1 << 30)
#define MOD 1000000007
#define l_ength size
using ll = long long;
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int lim = m / n;
int maxi = 0;
if (m % n == 0) {
cout << m / n << endl;
return 0;
}
for (int i = 1; i <= lim; ++i) {
if (... | insert | 12 | 12 | 12 | 16 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define REP(i, n) for (ll i = 1; i < n; i++)
#define PER(i, n) for (ll i = n; i >= 1; i--)
#define sz(x) int(x.size())
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define REP(i, n) for (ll i = 1; i < n; i++)
#define PER(i, n) for (ll i = n; i >= 1; i--)
#define sz(x) int(x.size())
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(... | replace | 52 | 55 | 52 | 59 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <queue>
#include <set>
#include <vector>
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b)... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <limits>
#include <queue>
#include <set>
#include <vector>
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b)... | replace | 43 | 44 | 43 | 55 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N, M;
cin >> N >> M;
int mx = M / N;
int rem = M % N;
while (rem) {
mx--;
rem = M - N * mx;
rem %= mx;
}
cout << mx << "\n";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int N, M;
cin >> N >> M;
int mx = M / N;
int rem = M % N;
rem %= mx;
while (rem) {
mx--;
rem = M - N * mx;
rem %= mx;
}
cout << mx << "\n";
return 0;
}... | insert | 13 | 13 | 13 | 14 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define mod 1000000007
#define ll long long
using namespace std;
int main() {
ll n, m;
cin >> n >> m;
ll mx = 1;
for (ll i = m - 1; i >= 2; i--) {
if ((i % 2 == 0 && m % 2 != 0)) {
continue;
}
ll u = m - i * (n - 1);
if (u <= 0) {
continue;
}
if (u % ... | #include <bits/stdc++.h>
#define mod 1000000007
#define ll long long
using namespace std;
int main() {
ll n, m;
cin >> n >> m;
ll mx = 1;
for (ll i = m - 2 * (n - 1); i >= 2; i--) {
if ((i % 2 == 0 && m % 2 != 0)) {
continue;
}
ll u = m - i * (n - 1);
if (u <= 0) {
continue;
}
... | replace | 8 | 9 | 8 | 9 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, m;
cin >> n >> m;
for (long long int i = m; i > 0; i--) {
if (m % i == 0 && (m / i) >= n) {
cout << i;
break;
}
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, m;
cin >> n >> m;
for (long long int i = int(m / n); i > 0; i--) {
if (m % i == 0 && (m / i) >= n) {
cout << i;
break;
}
}
return 0;
}
| replace | 6 | 7 | 6 | 7 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, m;
cin >> n >> m;
int yakusu_count = 1;
vector<long long> yakusu(m);
yakusu.at(0) = m;
int current = 1;
for (int i = m / 2; i > 0; i--) {
if (m % i == 0) {
yakusu.at(current)... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int n, m;
cin >> n >> m;
int yakusu_count = 1;
vector<long long> yakusu(1000000);
yakusu.at(0) = m;
int current = 1;
for (int i = m / 2; i > 0; i--) {
if (m % i == 0) {
yakusu.at(cu... | replace | 9 | 10 | 9 | 10 | 0 | |
p03241 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#define INF 1e9
#define EPS 1e-9
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REP1(i, n) for (ll i = 1, i##_len = (n); i <= i##_len; ++i)
#define REPR(i, n) for (ll i = (n)-1; i >= 0; --i)
#define REPR1(i, n) for (ll i = (n); i > 0; -... | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#define INF 1e9
#define EPS 1e-9
#define REP(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REP1(i, n) for (ll i = 1, i##_len = (n); i <= i##_len; ++i)
#define REPR(i, n) for (ll i = (n)-1; i >= 0; --i)
#define REPR1(i, n) for (ll i = (n); i > 0; -... | replace | 22 | 23 | 22 | 23 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long int ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> div(0);
for (int i = 1; i <= m; i++)
if (m % i == 0)
div.emplace_back(i), div.emplace_back(m / i);
sort(div.begin(), div.en... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long int ll;
int main() {
int n, m;
cin >> n >> m;
vector<int> div(0);
for (int i = 1; i * i <= m; i++)
if (m % i == 0)
div.emplace_back(i), div.emplace_back(m / i);
sort(div.begin(), di... | replace | 10 | 11 | 10 | 11 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <random>
#include <set>
#include <string.h>
#include <vector>
using namespace std;
const int MOD = 1000000007;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M, ans;
cin >... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <random>
#include <set>
#include <string.h>
#include <vector>
using namespace std;
const int MOD = 1000000007;
typedef long long ll;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, M, ans;
cin >... | replace | 20 | 23 | 20 | 30 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
long long n, m;
cin >> n >> m;
long long ans = 1;
for (long long i = 2; i * n <= m; i++) {
if ((m - i * n) % i == 0)
ans = i;
}
cout << ans << endl;
} | #include <iostream>
using namespace std;
int main() {
long long n, m;
cin >> n >> m;
long long ans = 1;
if (n == 1) {
cout << m << endl;
return 0;
}
for (long long i = 2; i * n <= m; i++) {
if ((m - i * n) % i == 0)
ans = i;
}
cout << ans << endl;
} | insert | 7 | 7 | 7 | 11 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int kotae = 1;
for (int i = m / n + 1; i >= 2; --i) {
int tmp = kotae;
if (m % i == 0)
kotae = max(kotae, i);
if (m / kotae < n) {
kotae = tmp;
break;
}
}
cout << kotae << endl;
return 0;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
if (n == 1) {
cout << m << endl;
return 0;
}
int kotae = 1;
for (int i = m / n + 1; i >= 2; --i) {
int tmp = kotae;
if (m % i == 0)
kotae = max(kotae, i);
if (m / kotae < n) {
kotae = tmp;
... | insert | 6 | 6 | 6 | 10 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll N, M;
cin >> N >> M;
ll ans;
for (int i = M; i > 0; i--) {
if (M % i == 0 && i * N <= M) {
ans = i;
break;
}
}
cout << ans << endl;
} | #include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll N, M;
cin >> N >> M;
ll ans;
for (int i = M / N; i > 0; i--) {
if (M % i == 0 && i * N <= M) {
ans = i;
break;
}
}
cout << ans << endl;
} | replace | 10 | 11 | 10 | 11 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
long long n, m;
cin >> n >> m;
long long ans = 1;
for (long long i = m / n; i > 0; i--) {
long long a = ma... | #include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
if (b == 0)
return a;
return gcd(b, a % b);
}
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
long long n, m;
cin >> n >> m;
long long ans = 1;
for (long long i = m / n; i > 0; i--) {
if ((m - i * n) ... | replace | 16 | 20 | 16 | 20 | TLE | |
p03241 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#def... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define REP(i, n) FOR(i, 0, n)
#def... | insert | 80 | 80 | 80 | 85 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
register int n, m, ans;
cin >> n >> m;
for (register int i = m; i >= 1; i--) {
if (m / i >= n && m % i == 0) {
ans = i;
break;
}
}
cout << ans;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
register int n, m, ans;
cin >> n >> m;
for (register int i = m / n; i >= 1; i--) {
if (m / i >= n && m % i == 0) {
ans = i;
break;
}
}
cout << ans;
return 0;
} | replace | 5 | 6 | 5 | 6 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | replace | 34 | 35 | 34 | 35 | 0 | |
p03241 | C++ | Runtime Error | #include <algorithm>
#include <complex>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define REP(i, n) for... | #include <algorithm>
#include <complex>
#include <ctype.h>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define REP(i, n) for... | replace | 49 | 50 | 49 | 50 | 0 | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
#define _LIBCPP_DEBUG 0
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define MOD (1000000007)
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define pb push_back
... | #include <bits/stdc++.h>
#include <math.h>
#define _GLIBCXX_DEBUG
#define _LIBCPP_DEBUG 0
using namespace std;
#define ll long long
#define rep(i, n) for (int i = 0; i < n; i++)
#define MOD (1000000007)
#define vi vector<int>
#define vl vector<ll>
#define vvi vector<vi>
#define pii pair<int, int>
#define pb push_back
... | insert | 47 | 47 | 47 | 51 | 0 | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> veca;
int main() {
cin >> n >> m;
for (int i = 1; i < sqrt(m); i++) {
if (m % i == 0) {
if ((m / (m / i)) >= n)
veca.push_back(m / i);
if ((m / i) >= n)
veca.push_back(i);
}
}
sort(veca.begin(), veca.end()... | #include <bits/stdc++.h>
using namespace std;
int n, m;
vector<int> veca;
int main() {
cin >> n >> m;
for (int i = 1; i <= sqrt(m); i++) {
if (m % i == 0) {
if ((m / (m / i)) >= n)
veca.push_back(m / i);
if ((m / i) >= n)
veca.push_back(i);
}
}
sort(veca.begin(), veca.end(... | replace | 9 | 10 | 9 | 10 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef uns... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
typedef uns... | replace | 30 | 33 | 30 | 37 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdint>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, rept) for (int i = 0; i < (ll)rept; ++i)
typedef long long ll;
using ... | #include <algorithm>
#include <cmath>
#include <cstdint>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define rep(i, rept) for (int i = 0; i < (ll)rept; ++i)
typedef long long ll;
using ... | replace | 32 | 33 | 32 | 33 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (ll i = 0; i < (ll)(n); ++i)
vector<pair<ll, ll>> prime_factor(int64_t n) {
vector<pair<ll, ll>> ret;
for (int64_t i = 2; i * i <= n; i++) {
if (n % i == 0)
ret.push_back(pair<ll, ll>(i, 0));
while (n % i == 0) ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (ll i = 0; i < (ll)(n); ++i)
vector<pair<ll, ll>> prime_factor(int64_t n) {
vector<pair<ll, ll>> ret;
for (int64_t i = 2; i * i <= n; i++) {
if (n % i == 0)
ret.push_back(pair<ll, ll>(i, 0));
while (n % i == 0) ... | replace | 25 | 26 | 25 | 26 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using namespace boost::multiprecision;
typedef long long int ll;
typedef long double ld;
#define MOD 1000000007
#define ALL(obj) (obj).begin(), (obj).end()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
using namespace std;
// using namespace boost::multiprecision;
typedef long long int ll;
typedef long double ld;
#define MOD 1000000007
#define ALL(obj) (obj).begin(), (obj).end()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | replace | 50 | 51 | 50 | 51 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
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; 0 <= i; i--)
// 入出力
#define SCOUT(x) cout << (x) << " "
#def... | #include <bits/stdc++.h>
typedef long long ll;
const int INF = 1e9;
const int MOD = 1e9 + 7;
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; 0 <= i; i--)
// 入出力
#define SCOUT(x) cout << (x) << " "
#def... | replace | 35 | 36 | 35 | 36 | TLE | |
p03241 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
int isprime(int x) {
for (int p = 2; p * p <= x; p++)
if (x % p == 0)
return 0;
return 1;
}
int main() {
int N, M;
scanf("%d%d", &N, &M);
if (isprime(M)) {
printf("%d\n", 1);
return 1;
}
for (int n = N;; n++) {
if (M % n == 0... | #include <iostream>
#include <vector>
using namespace std;
int isprime(int x) {
for (int p = 2; p * p <= x; p++)
if (x % p == 0)
return 0;
return 1;
}
int main() {
int N, M;
scanf("%d%d", &N, &M);
if (isprime(M)) {
printf("%d\n", 1);
return 0;
}
for (int n = N;; n++) {
if (M % n == 0... | replace | 14 | 15 | 14 | 15 | 0 | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
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 (int i = m; i < n; i++)
#define pb push_back
#define fill(x, y) memset(x, y, sizeof(x))
#define eve... | #include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
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 (int i = m; i < n; i++)
#define pb push_back
#define fill(x, y) memset(x, y, sizeof(x))
#define eve... | replace | 145 | 146 | 145 | 147 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, ans;
scanf("%d%d", &n, &m);
for (int i = 1; m / i >= n; i++)
if (m % i == 0)
ans = i;
printf("%d\n", ans);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m, ans;
scanf("%d%d", &n, &m);
for (int i = 1; i * i <= m; i++) {
if (m % i == 0) {
if (i < n) {
if (m / i >= n)
ans = i;
} else {
ans = m / i;
break;
}
}
}
printf("%d\n", ans);
}
| replace | 6 | 9 | 6 | 17 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i <= n; ++i)
int MOD = 1000000007;
signed main() {
int n, m;
c... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string>
#include <vector>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep1(i, n) for (int i = 1; i <= n; ++i)
int MOD = 1000000007;
signed main() {
int n, m;
c... | replace | 978 | 979 | 978 | 979 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int max = 0;
if (m % n == 0) {
cout << m / n << endl;
return 0;
}
for (int i = 1; i <= m; i++)
if (m % i == 0 && m / i >= n && i > max)
max = i;
cout << max << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int max = 0;
if (m % n == 0) {
cout << m / n << endl;
return 0;
}
for (int i = 1; i <= m / 2; i++)
if (m % i == 0 && m / i >= n && i > max)
max = i;
cout << max << endl;
return 0;
}
| replace | 10 | 11 | 10 | 11 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef ve... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> PII;
typedef vector<int> VI;
typedef ve... | replace | 27 | 28 | 27 | 32 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
int ma = 1;
for (int i = 1; i <= m / n + 1; i++) {
if (m % i == 0 && m / i >= n && i > ma)
ma = i;
}
cout << ma << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
if (n == 1) {
cout << m;
return 0;
}
int ma = 1;
for (int i = 1; i <= m / n + 1; i++) {
if (m % i == 0 && m / i >= n && i > ma)
ma = i;
}
cout << ma << endl;
return 0;
}
| insert | 5 | 5 | 5 | 9 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include <string>
#include <type_... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string.h>
#include <string>
#include <string>
#include <type_... | replace | 36 | 39 | 36 | 47 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define SORT(a) sort(a.begin(), a.end())
#define RSORT(a) sort(a.rbegin(), a.rend())
#define REP(i, n) for (int i = 0; i < n; i++)
#define RREP(i, n) for (int i = n; 0 <= i; i--)
#define FOR(i, start, end) for (int i = start; i < end; i++)
#define RFOR(i, start, end) for (int i = start; end <= ... | #include <bits/stdc++.h>
#define SORT(a) sort(a.begin(), a.end())
#define RSORT(a) sort(a.rbegin(), a.rend())
#define REP(i, n) for (int i = 0; i < n; i++)
#define RREP(i, n) for (int i = n; 0 <= i; i--)
#define FOR(i, start, end) for (int i = start; i < end; i++)
#define RFOR(i, start, end) for (int i = start; end <= ... | insert | 50 | 50 | 50 | 54 | TLE | |
p03241 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, cc, n) for (int i = cc; i < n; ++i)
#defi... | #include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, cc, n) for (int i = cc; i < n; ++i)
#defi... | replace | 38 | 40 | 38 | 39 | -8 | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long llint;
typedef long double ld;
#define inf 1e18
#define mod 1000000007
priority_queue<llint, vector<... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long llint;
typedef long double ld;
#define inf 1e18
#define mod 1000000007
priority_queue<llint, vector<... | replace | 32 | 40 | 32 | 40 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <s... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <s... | insert | 34 | 34 | 34 | 38 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long int ll;
#define repi(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) repi(i, 0, a)
#define rrep(i, a) for (int i = a - 1; i >= 0; i--)
ll llmax(ll a, ll b) {... | #include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
typedef long long int ll;
#define repi(i, a, b) for (int i = a; i < b; i++)
#define rep(i, a) repi(i, 0, a)
#define rrep(i, a) for (int i = a - 1; i >= 0; i--)
ll llmax(ll a, ll b) {... | insert | 29 | 29 | 29 | 30 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int max;
for (int i = M; i > 0; i--) {
if (M % i == 0 && M / i >= N) {
max = i;
break;
}
}
cout << max << endl;
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int max;
for (int i = M / N + 1; i > 0; i--) {
if (M % i == 0 && M / i >= N) {
max = i;
break;
}
}
cout << max << endl;
return 0;
} | replace | 11 | 12 | 11 | 12 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <util... | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <util... | insert | 66 | 66 | 66 | 78 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(in) in.begin(), in.end()
#define INF (sizeof(int) == 4 ? (int)1e9 : (int)1e18)
#define EPS 0.0000000001
template <class T, class S> void cmin(T &a, const S &b) {
if (a > b)
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define int ll
#define rep(i, n) for (int i = 0; i < n; i++)
#define all(in) in.begin(), in.end()
#define INF (sizeof(int) == 4 ? (int)1e9 : (int)1e18)
#define EPS 0.0000000001
template <class T, class S> void cmin(T &a, const S &b) {
if (a > b)
... | replace | 36 | 41 | 36 | 44 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
#define intmax INT... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstring>
#include <functional>
#include <iostream>
#include <limits.h>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <vector>
using namespace std;
#define intmax INT... | insert | 94 | 94 | 94 | 98 | TLE | |
p03241 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
unsigned int N, M;
cin >> N >> M;
for (unsigned int i = N; i <= M; i++) {
if (M % i == 0) {
cout << M / i << endl;
return 0;
}
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
unsigned int N, M;
cin >> N >> M;
if (M % 2 != 0) {
if (N % 2 == 0) {
N++;
}
for (unsigned int i = N; i <= M; i = i + 2) {
if (M % i == 0) {
cout << M / i << endl;
return 0;
}
}
} else {
for (unsig... | replace | 7 | 11 | 7 | 23 | TLE | |
p03242 | C++ | Runtime Error | /* Author - Ankur Kumar Singh
IDE :- Offine Linux
---------------------------------*/
#include <bits/stdc++.h>
using namespace std;
/* variable type :- */
/* variable type :- */
#define ll long long int
#define ld long double
#define I ll
#define mod 1000000007
/* map */
#define abc pair<ll, ll>
map<pair<abc, abc>... | /* Author - Ankur Kumar Singh
IDE :- Offine Linux
---------------------------------*/
#include <bits/stdc++.h>
using namespace std;
/* variable type :- */
/* variable type :- */
#define ll long long int
#define ld long double
#define I ll
#define mod 1000000007
/* map */
#define abc pair<ll, ll>
map<pair<abc, abc>... | replace | 34 | 38 | 34 | 35 | 0 | |
p03242 | Python | Runtime Error | n = input()
ans = ""
for i in range(n):
if n[i] == 1:
ans += "9"
else:
ans += "1"
print(int(ans))
| n = input()
ans = ""
for i in range(len(n)):
if n[i] == "1":
ans += "9"
else:
ans += "1"
print(int(ans))
| 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/p03242/Python/s418217784.py", line 5, in <module>
for i in range(n):
TypeError: 'str' object cannot be interpreted as an integer
|
p03242 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
for (int i = 0; i < 3; i++) {
if (N.at(i) == '1')
cout << 9;
else
cout << 1;
}
cout << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string N;
cin >> N;
for (int i = 0; i < 3; i++) {
if (N.at(i) == '1')
cout << 9;
else
cout << 1;
}
cout << endl;
}
| insert | 5 | 5 | 5 | 6 | -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)
|
p03242 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int a;
cin >> a;
cout << 1110 - a;
return 1110 - a;
} | #include <iostream>
using namespace std;
int main() {
int a;
cin >> a;
cout << 1110 - a;
return 0;
} | replace | 7 | 8 | 7 | 8 | 223 | |
p03242 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
for (int i = 0; i < 3; i++) {
if (s.at(i) == '1') {
s.at(i) = '9';
continue;
} else if (s.at(i) == '9') {
s.at(i) = '1';
continue;
}
}
cout << s << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < 3; i++) {
if (s.at(i) == '1') {
s.at(i) = '9';
continue;
} else if (s.at(i) == '9') {
s.at(i) = '1';
continue;
}
}
cout << s << endl;
}
| insert | 4 | 4 | 4 | 5 | -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)
|
p03242 | C++ | Time Limit Exceeded | /******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
******************************************... | /******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
******************************************... | replace | 15 | 16 | 15 | 16 | TLE | |
p03242 | C++ | Runtime Error | // Devarshi
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define ll long long
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rep(i, n) for (i = 0; i < n; i++)
#define forn(i, n) ... | // Devarshi
#include <bits/stdc++.h>
using namespace std;
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define pb push_back
#define ll long long
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rep(i, n) for (i = 0; i < n; i++)
#define forn(i, n) ... | replace | 44 | 52 | 44 | 45 | 0 | |
p03242 | Python | Runtime Error | n = int(input())
for i in n:
if i == 1:
i = 9
elif i == 9:
i = 1
print(n)
| n = int(input())
print(1110 - n)
| replace | 1 | 7 | 1 | 2 | TypeError: 'int' object is not iterable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03242/Python/s049531454.py", line 2, in <module>
for i in n:
TypeError: 'int' object is not iterable
|
p03242 | C++ | Runtime Error | #include <bits/stdc++.h>
#define F first
#define S second
#define endl "\n"
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define re0(i, a) for (int i = 0; i < (a); i++)
using namespace std;
typedef pair<int, int> ii;
typedef long long ll;
typedef long double ld;
const int mod = 7 + 1e9;
const int inf = 1e9;
con... | #include <bits/stdc++.h>
#define F first
#define S second
#define endl "\n"
#define rep(i, a, b) for (int i = a; i < (b); i++)
#define re0(i, a) for (int i = 0; i < (a); i++)
using namespace std;
typedef pair<int, int> ii;
typedef long long ll;
typedef long double ld;
const int mod = 7 + 1e9;
const int inf = 1e9;
con... | delete | 16 | 19 | 16 | 16 | 0 | |
p03242 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<char> a;
for (int i = 0; i < 3; i++) {
cin >> a.at(i);
}
for (int i = 0; i < 3; i++) {
if (a.at(i) == '1') {
cout << '9';
} else {
cout << '1';
}
}
cout << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<char> a(3);
for (int i = 0; i < 3; i++) {
cin >> a.at(i);
}
for (int i = 0; i < 3; i++) {
if (a.at(i) == '1') {
cout << '9';
} else {
cout << '1';
}
}
cout << endl;
return 0;
} | replace | 4 | 5 | 4 | 5 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
|
p03242 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
for (int i = 0; i < 3; i++) {
if (s.at(i) == '1') {
s.at(i) = '9';
} else {
s.at(i) = '1';
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
cout << 1110 - n << endl;
} | replace | 3 | 11 | 3 | 6 | -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)
|
p03242 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define debug(x) cerr << "\n" << #x << " = " << x << ".\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define print(xx) cout << (xx) << endl
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vint;
const int INF = ((1LL << ... | #include <bits/stdc++.h>
#define debug(x) cerr << "\n" << #x << " = " << x << ".\n"
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define print(xx) cout << (xx) << endl
using namespace std;
#define int long long
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vint;
const int INF = ((1LL << ... | replace | 31 | 32 | 31 | 33 | TLE | |
p03242 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, i = 1, ans = 0;
cin >> n;
while (n) {
int a = n % 10;
if (a == 1)
ans += 9 * i;
if (a == 9)
ans += i;
i *= 10;
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, i = 1, ans = 0;
cin >> n;
while (n) {
int a = n % 10;
n /= 10;
if (a == 1)
ans += 9 * i;
if (a == 9)
ans += i;
i *= 10;
}
cout << ans << endl;
return 0;
} | insert | 8 | 8 | 8 | 9 | TLE | |
p03242 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
int n;
scanf("%d", n);
printf("%d\n", 1110 - n);
return 0;
} | #include <stdio.h>
int main(void) {
int n;
scanf("%d", &n);
printf("%d\n", 1110 - n);
return 0;
}
| replace | 6 | 7 | 6 | 7 | -11 | |
p03242 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
#define fastio() \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
#define fastio() \
ios_base::sync_with_stdio(0); \
cin.tie(0); ... | delete | 28 | 33 | 28 | 28 | 0 | |
p03242 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
vector<int> v;
while (n != 0) {
if (n % 10 == 1)
v.push_back(9);
else if (n % 10 == 9)
v.push_back(1);
else
v.push_back(n % 10);
}
int i, s = v.size();
for (i = s - 1; i >= 0; --i)
pri... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
scanf("%d", &n);
vector<int> v;
while (n != 0) {
if (n % 10 == 1)
v.push_back(9);
else if (n % 10 == 9)
v.push_back(1);
else
v.push_back(n % 10);
n /= 10;
}
int i, s = v.size();
for (i = s - 1; i >= 0... | insert | 17 | 17 | 17 | 19 | TLE | |
p03242 | Python | Runtime Error | num = input()
x = [int(i) for i in num]
for i in range(len(x)):
if x[i] == 1:
x[i] = "9"
else:
x[i] = "1"
mojiretu = ",".join(x)
print(int(mojiretu))
| num = input()
x = [int(i) for i in num]
for i in range(len(x)):
if x[i] == 1:
x[i] = "9"
else:
x[i] = "1"
mojiretu = "".join(x)
print(int(mojiretu))
| replace | 7 | 8 | 7 | 8 | ValueError: invalid literal for int() with base 10: '9,9,1' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03242/Python/s586545205.py", line 9, in <module>
print(int(mojiretu))
ValueError: invalid literal for int() with base 10: '9,9,1'
|
p03242 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
for (int i = 0; i < 3; i++) {
if (s.at(i) == '9')
s.at(i) = '1';
else
s.at(i) = '9';
}
cout << s.at(0) << s.at(1) << s.at(2) << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
for (int i = 0; i < 3; i++) {
if (s.at(i) == '9')
s.at(i) = '1';
else
s.at(i) = '9';
}
cout << s.at(0) << s.at(1) << s.at(2) << endl;
}
| insert | 5 | 5 | 5 | 6 | -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)
|
p03242 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string A;
if (A.at(0) == '1') {
A.at(0) = '9';
} else {
A.at(0) = '1';
}
if (A.at(1) == '1') {
A.at(1) = '9';
} else {
A.at(1) = '1';
}
if (A.at(2) == '1') {
A.at(2) = '9';
} else {
A.at(2) = '1';
}
cout << A << end... | #include <bits/stdc++.h>
using namespace std;
int main() {
string A;
cin >> A;
if (A.at(0) == '1') {
A.at(0) = '9';
} else {
A.at(0) = '1';
}
if (A.at(1) == '1') {
A.at(1) = '9';
} else {
A.at(1) = '1';
}
if (A.at(2) == '1') {
A.at(2) = '9';
} else {
A.at(2) = '1';
}
cout... | insert | 4 | 4 | 4 | 5 | -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)
|
p03243 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define vec vector<ll>
#define mat vector<vec>
using namespace std;
const ll mod = 1000000007;
const ll inf = LONG_LONG_MAX;
ll dx4[4] = {1, 0, -1, 0};
ll dy4[4] = {0, -1, 0, 1};
ll dx8[8] = {1, 0, -1, 1, -1, 1, 0, -1};
ll dy8[8] = {1, 1, 1, 0, 0, -1, -1, -1};
bool o... | #include <bits/stdc++.h>
#define ll long long int
#define vec vector<ll>
#define mat vector<vec>
using namespace std;
const ll mod = 1000000007;
const ll inf = LONG_LONG_MAX;
ll dx4[4] = {1, 0, -1, 0};
ll dy4[4] = {0, -1, 0, 1};
ll dx8[8] = {1, 0, -1, 1, -1, 1, 0, -1};
ll dy8[8] = {1, 1, 1, 0, 0, -1, -1, -1};
bool o... | replace | 19 | 20 | 19 | 20 | 0 | |
p03243 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define long long long
int main() {
long a, b, c, n, x, y;
while (true) {
for (int i = 1; i <= 9; i++) {
if (n / i == 111 && n % 1 == 0) {
cout << n << endl;
return 0;
}
}
n++;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
#define long long long
int main() {
long a, b, c, n, x, y;
cin >> n;
if (n <= 111) {
cout << 111 << endl;
return 0;
} else if (n <= 222) {
cout << 222 << endl;
return 0;
} else if (n <= 333) {
cout << 333 << endl;
return 0;
} else if (n ... | replace | 6 | 15 | 6 | 34 | TLE | |
p03243 | C++ | Runtime Error | /**
* Name: Ajay Subhash Jadhav
* Institute: International Institute of Technology Hyderabad
*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#... | /**
* Name: Ajay Subhash Jadhav
* Institute: International Institute of Technology Hyderabad
*/
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#... | delete | 58 | 59 | 58 | 58 | 0 | |
p03243 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n = 1;
cin >> n;
for (int i = 111; i <= 999; i += 111) {
if (n <= i) {
cout << i << endl;
return i;
}
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int n = 1;
cin >> n;
for (int i = 111; i <= 999; i += 111) {
if (n <= i) {
cout << i << endl;
return 0;
}
}
return 0;
}
| replace | 12 | 13 | 12 | 13 | 111 | |
p03243 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
using i64 = int64_t;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep2(i, x,... | #include <algorithm>
#include <array>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <stdio.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namespace std;
using i64 = int64_t;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep2(i, x,... | replace | 25 | 27 | 25 | 27 | 0 | |
p03243 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
for (scanf("%d", x); x < 1000; x++) {
char s[4];
sprintf(s, "%d", x);
if (s[0] == s[1] && s[1] == s[2])
return puts(s), 0;
}
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
for (scanf("%d", &x); x < 1000; x++) {
char s[4];
sprintf(s, "%d", x);
if (s[0] == s[1] && s[1] == s[2])
return puts(s), 0;
}
return 0;
}
| replace | 5 | 6 | 5 | 6 | -11 | |
p03243 | Python | Runtime Error | N = int(input())
print(min([x for x in [int(str(i) * 3) - N for i in range(1, 10)] if x > 0]) + N)
| N = int(input())
print(min([x for x in [int(str(i) * 3) - N for i in range(1, 10)] if x >= 0]) + N)
| replace | 1 | 2 | 1 | 2 | 0 | |
p03243 | Python | Runtime Error | n = input()
for ans in range(111, 1000, 111):
if n <= ans:
break
print(ans)
| n = input()
for ans in range(111, 1000, 111):
if int(n) <= ans:
break
print(ans)
| replace | 2 | 3 | 2 | 3 | TypeError: '<=' not supported between instances of 'str' and 'int' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03243/Python/s479378402.py", line 3, in <module>
if n <= ans:
TypeError: '<=' not supported between instances of 'str' and 'int'
|
p03243 | Python | Runtime Error | n = input()
x = (n - 1) // 111 + 1
print(x * 111)
| n = int(input())
x = (n - 1) // 111 + 1
print(x * 111)
| replace | 0 | 1 | 0 | 1 | TypeError: unsupported operand type(s) for -: 'str' and 'int' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03243/Python/s109763902.py", line 2, in <module>
x = (n - 1) // 111 + 1
TypeError: unsupported operand type(s) for -: 'str' and 'int'
|
p03243 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a;
b = (a - 1) / 111;
cout << 111 * (1 + b);
return 111 * (1 + b);
} | #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a;
b = (a - 1) / 111;
cout << 111 * (b + 1);
return 0;
} | replace | 7 | 9 | 7 | 9 | 111 | |
p03244 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define pii pair<int, int>
using namespace std;
typedef long long ll;
const int maxn = 40;
pii _1[100010];
int main() {
#ifdef LOCAL
freopen("in.txt", "r", stdin);
#endif // LOCAL
ios::sync_with_stdio(0);
int n, tmp;
scanf("%d", &n);
map<int, int> cnt1, cnt2;
for (int i = 0; i < n; ... | #include <bits/stdc++.h>
#define pii pair<int, int>
using namespace std;
typedef long long ll;
const int maxn = 40;
pii _1[100010];
int main() {
#ifdef LOCAL
freopen("in.txt", "r", stdin);
#endif // LOCAL
ios::sync_with_stdio(0);
int n, tmp;
scanf("%d", &n);
map<int, int> cnt1, cnt2;
for (int i = 0; i < n; ... | insert | 32 | 32 | 32 | 33 | TLE | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
#define mx 10005
using namespace std;
int main() {
int n, s, m[2][2], v[2][mx];
scanf("%d", &n);
for (int i = 0; i < mx; i++)
v[0][i] = v[1][i] = 0;
for (int i = 0; i < n; i++) {
scanf("%d", &s);
v[i & 1][s]++;
}
for (int i = 0; i < 4; i++)
m[i & 1][i >> 1] = !(i >>... | #include <bits/stdc++.h>
#define mx 100005
using namespace std;
int main() {
int n, s, m[2][2], v[2][mx];
scanf("%d", &n);
for (int i = 0; i < mx; i++)
v[0][i] = v[1][i] = 0;
for (int i = 0; i < n; i++) {
scanf("%d", &s);
v[i & 1][s]++;
}
for (int i = 0; i < 4; i++)
m[i & 1][i >> 1] = !(i >... | replace | 1 | 2 | 1 | 2 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(j, n) for (int j = 0; j < (n); ++j)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define drep2(j, n) for (int j = (n)-1; j >= 0; --j)
#define ... | #include <bits/stdc++.h>
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(j, n) for (int j = 0; j < (n); ++j)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
#define drep2(j, n) for (int j = (n)-1; j >= 0; --j)
#define ... | replace | 64 | 66 | 64 | 66 | 0 | |
p03244 | C++ | Runtime Error | #include <stdio.h>
#include <stdlib.h>
#define MAX_LEN (100000)
#define MAX_NUM (120)
int main(int argc, char *argv[]) {
int n, a[MAX_LEN];
int cnt_even[MAX_NUM + 1] = {}, cnt_odd[MAX_NUM + 1] = {};
int max1_cnt_even, max1_cnt_odd, max2_cnt_even, max2_cnt_odd;
int max1_num_even, max1_num_odd, max2_num_even, m... | #include <stdio.h>
#include <stdlib.h>
#define MAX_LEN (100000)
#define MAX_NUM (100000)
int main(int argc, char *argv[]) {
int n, a[MAX_LEN];
int cnt_even[MAX_NUM + 1] = {}, cnt_odd[MAX_NUM + 1] = {};
int max1_cnt_even, max1_cnt_odd, max2_cnt_even, max2_cnt_odd;
int max1_num_even, max1_num_odd, max2_num_even... | replace | 4 | 5 | 4 | 5 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> ve(100000), vo(100000);
for (int i = 0; i < n; ++i) {
int k;
cin >> k;
if (i % 2) {
vo.at(k).first++;
vo.at(k).second = k;
} else {
ve.at(k).first++;
ve.at(k).second = k;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<pair<int, int>> ve(1000000), vo(1000000);
for (int i = 0; i < n; ++i) {
int k;
cin >> k;
if (i % 2) {
vo.at(k).first++;
vo.at(k).second = k;
} else {
ve.at(k).first++;
ve.at(k).second = k;... | replace | 6 | 7 | 6 | 7 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define eee(a) (cerr << (#a) << ": " << (a) << endl);
using ll = long long;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
using mint = map<int, int>;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ch... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define eee(a) (cerr << (#a) << ": " << (a) << endl);
using ll = long long;
using pint = pair<int, int>;
using pll = pair<ll, ll>;
using mint = map<int, int>;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
const ch... | replace | 89 | 90 | 89 | 91 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
signed main() {
lint N;
cin >> N;
vector<lint> a(N), num(10010), num1(100010);
for (lint i = 0; i < N; i++) {
cin >> a[i];
if (i % 2 == 0)
num[a[i]]++;
else
num1[a[i]]++;
}
lint p = max_element(num.begin(), num.en... | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
signed main() {
lint N;
cin >> N;
vector<lint> a(N), num(100010), num1(100010);
for (lint i = 0; i < N; i++) {
cin >> a[i];
if (i % 2 == 0)
num[a[i]]++;
else
num1[a[i]]++;
}
lint p = max_element(num.begin(), num.e... | replace | 7 | 8 | 7 | 8 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v(n);
for (int i = 1; i <= n; i++)
cin >> v[i];
const int N = 100010;
vector<int> o(N);
vector<int> e(N);
int o_maxNum_first = 0;
int o_maxNum_second = 0;
int o_maxValue;
int e_maxNum_first = 0;
int e... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> v(n + 1);
for (int i = 1; i <= n; i++)
cin >> v[i];
const int N = 100010;
vector<int> o(N);
vector<int> e(N);
int o_maxNum_first = 0;
int o_maxNum_second = 0;
int o_maxValue;
int e_maxNum_first = 0;
i... | replace | 7 | 8 | 7 | 8 | 0 | |
p03244 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define COUT(a) cout << a << endl;
using namespace std;
using Int = long lo... | #include <algorithm>
#include <bits/stdc++.h>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <string>
#include <utility>
#include <vector>
#define FOR(i, a, b) for (int i = a; i < b; i++)
#define COUT(a) cout << a << endl;
using namespace std;
using Int = long lo... | replace | 22 | 23 | 22 | 23 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int v_num = 10;
int main() {
int n, v;
cin >> n;
vector<int> even(v_num, 0), odd(v_num + 1, 0);
for (int i = 0; i < n; ++i) {
cin >> v;
if (i % 2 == 0)
even[v]++;
else
odd[v]++;
}
bool same = false;
vector<int>::... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int v_num = pow(10, 5) + 1;
int main() {
int n, v;
cin >> n;
vector<int> even(v_num, 0), odd(v_num + 1, 0);
for (int i = 0; i < n; ++i) {
cin >> v;
if (i % 2 == 0)
even[v]++;
else
odd[v]++;
}
bool same = false;
v... | replace | 3 | 4 | 3 | 4 | 0 | |
p03244 | Python | Runtime Error | # coding:utf-8
import collections
def main():
n = int(input())
v = list(map(int, input().split()))
va = []
vb = []
for i in range(0, n, 2):
va.append(v[i])
vb.append(v[i + 1])
c1mc = collections.Counter(va).most_common()
c2mc = collections.Counter(vb).most_common()
i... | # coding:utf-8
import collections
def main():
n = int(input())
v = list(map(int, input().split()))
va = []
vb = []
for i in range(0, n, 2):
va.append(v[i])
vb.append(v[i + 1])
if va == vb and len(set(va)) == 1:
print(len(va))
return
c1mc = collections.Cou... | insert | 13 | 13 | 13 | 17 | 0 | |
p03244 | Python | Runtime Error | import numpy as np
even = np.zeros(100000, dtype=int)
odd = np.zeros(100000, dtype=int)
n = int(input())
v = list(map(int, input().split()))
for i in range(n):
if i % 2 == 0:
even[v[i]] += 1
else:
odd[v[i]] += 1
e1 = even.argmax()
e1n = even.max()
o1 = odd.argmax()
o1n = odd.max()
# print(e... | import numpy as np
even = np.zeros(100001, dtype=int)
odd = np.zeros(100001, dtype=int)
n = int(input())
v = list(map(int, input().split()))
for i in range(n):
if i % 2 == 0:
even[v[i]] += 1
else:
odd[v[i]] += 1
e1 = even.argmax()
e1n = even.max()
o1 = odd.argmax()
o1n = odd.max()
# print(e... | replace | 2 | 4 | 2 | 4 | TLE | |
p03244 | Python | Runtime Error | from collections import Counter
n = int(input())
v = list(map(int, input().split()))
if len(set(v)) != 1:
a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
if a[0] != b[0]:
q = (len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[0][1])
w = (len(v[0::2]) - a[0][1]) + (len(v[1:... | from collections import Counter
n = int(input())
v = list(map(int, input().split()))
if len(set(v)) != 1:
a = Counter(v[0::2]).most_common()
b = Counter(v[1::2]).most_common()
if a[0][0] != b[0][0]:
print((len(v[0::2]) - a[0][1]) + (len(v[1::2]) - b[0][1]))
else:
if a[0][1] < b[0][1]:
... | replace | 8 | 14 | 8 | 27 | IndexError: list index out of range | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03244/Python/s507429777.py", line 13, in <module>
e = ((len(v[0::2]) - a[1][1]) + (len(v[1::2]) - b[0][1]))
IndexError: list index out of range
|
p03244 | Python | Runtime Error | import collections
def solve(string):
n, *v = map(int, string.split())
if len(set(v)) == 1:
return str(n // 2)
else:
odds = v[1::2]
_o = collections.Counter(odds)
r_o = {str(v): k for k, v in _o.items()}
evens = v[::2]
_e = collections.Counter(evens)
... | import collections
def solve(string):
n, *v = map(int, string.split())
if len(set(v)) == 1:
return str(n // 2)
else:
odds = v[1::2]
_o = collections.Counter(odds)
r_o = {str(v): k for k, v in _o.items()}
evens = v[::2]
_e = collections.Counter(evens)
... | replace | 38 | 39 | 38 | 39 | ValueError: max() arg is an empty sequence | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03244/Python/s969214937.py", line 39, in <module>
print(solve(input()))
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03244/Python/s969214937.py", line 16, in solve
tmp = max(_o.val... |
p03244 | Python | Time Limit Exceeded | import collections
N = int(input())
even = collections.defaultdict(lambda: 0)
odd = collections.defaultdict(lambda: 0)
for i, a in enumerate(map(int, input().split())):
if i % 2 == 0:
even[a] += 1
else:
odd[a] += 1
if (
len(even.keys()) == 1
and len(odd.keys()) == 1
and list(even... | import collections
N = int(input())
even = collections.defaultdict(lambda: 0)
odd = collections.defaultdict(lambda: 0)
for i, a in enumerate(map(int, input().split())):
if i % 2 == 0:
even[a] += 1
else:
odd[a] += 1
if (
len(even.keys()) == 1
and len(odd.keys()) == 1
and list(even... | replace | 21 | 23 | 21 | 23 | TLE | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MAX 10
int main(void) {
int n, i, buf;
cin >> n;
vector<int> vec1(MAX), vec2(MAX);
for (i = 0; i < MAX; i++) {
vec1.at(i) = 0;
vec2.at(i) = 0;
}
for (i = 0; i < n; i++) {
cin >> buf;
if (i % 2 == 0) {
vec1.at(buf - 1)++;
} else... | #include <bits/stdc++.h>
using namespace std;
#define MAX 100000
int main(void) {
int n, i, buf;
cin >> n;
vector<int> vec1(MAX), vec2(MAX);
for (i = 0; i < MAX; i++) {
vec1.at(i) = 0;
vec2.at(i) = 0;
}
for (i = 0; i < n; i++) {
cin >> buf;
if (i % 2 == 0) {
vec1.at(buf - 1)++;
} ... | replace | 2 | 3 | 2 | 3 | 0 | |
p03244 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#i... | #include <algorithm>
#include <bitset>
#include <complex>
#include <cstdio>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#i... | replace | 88 | 89 | 88 | 89 | 0 | |
p03244 | C++ | Runtime Error |
#if 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cstdint>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#in... |
#if 1
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cstdint>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#in... | replace | 41 | 42 | 41 | 42 | 0 | |
p03244 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
// Begin Header {{{
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (i64 i = 0, i##_limit = (n); i < i##_limit; ++i)
#define reps(i, s, t) for (i64 i = (s), i##_limit = (t); i <= i##_limit; ++i)
#define repr(i, s, t) for (i64 i = (s), i##_limit = (t); i >= i##_limit; --i)
#ifndef DB... | #include "bits/stdc++.h"
// Begin Header {{{
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (i64 i = 0, i##_limit = (n); i < i##_limit; ++i)
#define reps(i, s, t) for (i64 i = (s), i##_limit = (t); i <= i##_limit; ++i)
#define repr(i, s, t) for (i64 i = (s), i##_limit = (t); i >= i##_limit; --i)
#ifndef DB... | replace | 99 | 100 | 99 | 100 | TLE | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
// hamko utils
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define repi(i, a, b) \
for (long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define... | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
// hamko utils
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define repi(i, a, b) \
for (long long i = (long long)(a); i < (long long)(b); i++)
#define pb push_back
#define... | replace | 275 | 276 | 275 | 276 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
const int N = 5;
signed main() {
int n;
cin >> n;
vector<int> a(n);
vector<int> odd(N), even(N);
int odd_max = 0, oddv = 0;
int even_max = 0, evenv = 0;
rep(i, n) {
cin >> a[i];
if (i % 2 == 0) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
const int N = 100010;
signed main() {
int n;
cin >> n;
vector<int> a(n);
vector<int> odd(N), even(N);
int odd_max = 0, oddv = 0;
int even_max = 0, evenv = 0;
rep(i, n) {
cin >> a[i];
if (i % 2 == 0) {
... | replace | 4 | 5 | 4 | 5 | 0 | |
p03244 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
const int LARGE = 10010;
int N;
cin >> N;
vector<int> v(N);
for (int... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
using namespace std;
int main() {
const int LARGE = 100010;
int N;
cin >> N;
vector<int> v(N);
for (in... | replace | 14 | 15 | 14 | 15 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define loop(i, a, b) for (ll i = a; i < b; i++)
#define inf (long long int)1e18
#define eps 0.000001
#def... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define mp make_pair
#define lb lower_bound
#define ub upper_bound
#define loop(i, a, b) for (ll i = a; i < b; i++)
#define inf (long long int)1e18
#define eps 0.000001
#def... | replace | 35 | 39 | 35 | 39 | 0 | |
p03244 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
int odd[100001];
int even[100001];
int v[100001];
cin >> N;
for (int i = 0; i < N; i++) {
cin >> v[i];
}
for (int i = 1; i < N; i += 2) {
odd[v[i]]++;
even[v[i + 1]]++;
}
int omax = 0, emax = 0, omax2 = 0, emax2 = 0;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
int odd[100001];
int even[100001];
int v[100001];
cin >> N;
for (int i = 0; i < N; i++) {
cin >> v[i];
}
for (int i = 1; i < N; i += 2) {
odd[v[i]]++;
even[v[i ^ 1]]++;
}
int omax = 0, emax = 0, omax2 = 0, emax2 = 0;
... | replace | 16 | 17 | 16 | 17 | 0 | |
p03244 | C++ | Runtime Error |
#include <algorithm>
#include <iostream>
#include <set>
#include <vector>
template <class Container> auto me(const Container &c) {
return std::max_element(std::begin(c), std::end(c));
}
auto exec2() {
int N{};
int tab1[10005]{}, tab2[10005]{};
std::cin >> N;
for (int i{0}; i < N / 2; i++) {
int tmp{... |
#include <algorithm>
#include <iostream>
#include <set>
#include <vector>
template <class Container> auto me(const Container &c) {
return std::max_element(std::begin(c), std::end(c));
}
auto exec2() {
int N{};
int tab1[100005]{}, tab2[100005]{};
std::cin >> N;
for (int i{0}; i < N / 2; i++) {
int tm... | replace | 14 | 15 | 14 | 15 | 0 | |
p03244 | C++ | Runtime Error | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using ld = long double;
using P = pair<int, int>;
using vs = vector<string>;
using vi = vector<int>;
using vvi ... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using namespace std;
using ll = int64_t;
using ld = long double;
using P = pair<int, int>;
using vs = vector<string>;
using vi = vector<int>;
using vvi ... | replace | 15 | 16 | 15 | 16 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.