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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03209 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define rep(i, s, N) for (ll i{s}; i < N; i++)
#define rem(i, N, s) for (ll i{N}; i > s; i--)
using namespace std;
using ll = long long int;
using ld = long double;
using P = pair<ll, ll>;
const int MOD = (int)1e9 + 7;
const... | #include <bits/stdc++.h>
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
#define rep(i, s, N) for (ll i{s}; i < N; i++)
#define rem(i, N, s) for (ll i{N}; i > s; i--)
using namespace std;
using ll = long long int;
using ld = long double;
using P = pair<ll, ll>;
const int MOD = (int)1e9 + 7;
const... | insert | 114 | 114 | 114 | 116 | TLE | |
p03209 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<int, int>;
ll cntp(ll n) {
if (n == 0)
return 1LL;
return 2 * cntp(n - 1) + 1;
}
ll volm(ll n) {
if (n == 0)
return 1LL;
return 2 * volm(n - 1) + 3;
}
ll f(ll n, ll x) {
if (n == 0) {
if (x == 0)
return 0; ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
using P = pair<int, int>;
ll cntp(ll n) {
if (n == 0)
return 1LL;
return 2 * cntp(n - 1) + 1;
}
ll volm(ll n) {
if (n == 0)
return 1LL;
return 2 * volm(n - 1) + 3;
}
ll f(ll n, ll x) {
if (n == 0) {
if (x == 0)
return 0; ... | replace | 25 | 26 | 25 | 26 | TLE | |
p03209 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define ll long long
void file() {
#ifndef ONLINE_JUDGE
freopen("a_input.txt", "r", stdin);
freopen("a_output.txt", "w", stdout);
#endif
}
void fast() {
std::ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
}
ll p[55], a... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define ll long long
void file() {
#ifndef ONLINE_JUDGE
freopen("a_input.txt", "r", stdin);
freopen("a_output.txt", "w", stdout);
#endif
}
void fast() {
std::ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(NULL);
}
ll p[55], a... | replace | 31 | 32 | 31 | 32 | -11 | |
p03209 | C++ | Runtime Error | #include <bits/stdc++.h>
#define INF INT_MAX / 2
#define MOD 1000000007
using namespace std;
using ll = long long;
using ull = unsigned long long;
vector<ll> two(52);
ull func(ull N, ll X) {
if (X <= 0)
return 0;
else if (X <= two[N + 1] - 2)
return func(N - 1, X - 1);
else
return func(N - 1, X -... | #include <bits/stdc++.h>
#define INF INT_MAX / 2
#define MOD 1000000007
using namespace std;
using ll = long long;
using ull = unsigned long long;
vector<ull> two(52);
ull func(ull N, ll X) {
if (X <= 0)
return 0;
else if (X <= two[N + 1] - 2)
return func(N - 1, X - 1);
else
return func(N - 1, X ... | replace | 10 | 11 | 10 | 11 | 0 | |
p03209 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vect... | #include <algorithm>
#include <array>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <utility>
#include <vect... | insert | 29 | 29 | 29 | 32 | 0 | |
p03209 | C++ | Runtime Error | #include <cstdio>
#define ll long long
using namespace std;
ll f[55], p[55];
ll F(ll n, ll x) {
if (n == 0)
return 1;
if (x == 1)
return 0;
if (x > 1 && x <= f[n - 1] + 1)
return F(n - 1, x - 1);
if (x == 2 + f[n - 1])
return p[n - 1] + 1;
if (2 + f[n - 1] < x && x <= 2 + 2 * f[n - 1])
r... | #include <cstdio>
#define ll long long
using namespace std;
ll f[55], p[55];
ll F(ll n, ll x) {
if (n == 0)
return 1;
if (x == 1)
return 0;
if (x > 1 && x <= f[n - 1] + 1)
return F(n - 1, x - 1);
if (x == 2 + f[n - 1])
return p[n - 1] + 1;
if (2 + f[n - 1] < x && x <= 2 + 2 * f[n - 1])
r... | replace | 29 | 31 | 29 | 31 | -11 | |
p03209 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<long long> l(51);
vector<long long> p(51);
long long solve(int n, long long x) {
assert(l[n] > x && x >= 0);
if (n == 1) {
return x;
}
if (x == l[n]) {
return p[n];
}
long long ans = 0;
if (x > l[n - 1] + 1) {
ans += p[n - 1] + 1;
x -=... | #include <bits/stdc++.h>
using namespace std;
vector<long long> l(51);
vector<long long> p(51);
long long solve(int n, long long x) {
assert(l[n] >= x && x >= 0);
if (n == 0) {
return x;
}
if (x == l[n]) {
return p[n];
}
long long ans = 0;
if (x > l[n - 1] + 1) {
ans += p[n - 1] + 1;
x -... | replace | 7 | 9 | 7 | 9 | 0 | |
p03209 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define mod 1000000007
int n, k;
int a[100005], b[100005];
int solve(int shift, int size, int pos) {
if (size == 0)
return b[shift];
int mid = (2 * shift + a[size] - 1) / 2;
if (pos == shift)
return 0;
else if (pos < mid)
return so... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define mod 1000000007
int n, k;
int a[100005], b[100005];
int solve(int shift, int size, int pos) {
if (size == 0)
return 1;
int mid = (2 * shift + a[size] - 1) / 2;
if (pos == shift)
return 0;
else if (pos < mid)
return solve(shi... | replace | 9 | 10 | 9 | 10 | 0 | |
p03209 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fw(p) for (int w = 0; w < (p); w++)
#define fx(p) for (int x = 0; x < (p); x++)
#define fy(p) for (int y = 0; y < (p); y++)
#define fz(p) for (int z = 0; z < (p); z++)
#define fyg(p, g) for (int y = (g); y < (p); y++)
#define fzg(p, g) for (int ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fw(p) for (int w = 0; w < (p); w++)
#define fx(p) for (int x = 0; x < (p); x++)
#define fy(p) for (int y = 0; y < (p); y++)
#define fz(p) for (int z = 0; z < (p); z++)
#define fyg(p, g) for (int y = (g); y < (p); y++)
#define fzg(p, g) for (int ... | replace | 68 | 69 | 68 | 69 | 0 | |
p03209 | C++ | Runtime Error | #include <cmath>
#include <iostream>
using namespace std;
using ll = long long;
ll f(ll N, ll X) {
if (X == 0)
return 0;
if (N == 0 && X == 1)
return 1;
if (X < pow(2, N + 1) - 1)
return f(N - 1, X - 1);
if (X == pow(2, N + 1) - 1)
return pow(2, N);
if (X > pow(2, N + 1) - 1)
return pow(2... | #include <cmath>
#include <iostream>
using namespace std;
using ll = long long;
ll f(ll N, ll X) {
if (X == 0)
return 0;
if (X > pow(2, N + 2) - 3)
return pow(2, N + 1) - 1;
if (N == 0 && X == 1)
return 1;
if (X < pow(2, N + 1) - 1)
return f(N - 1, X - 1);
if (X == pow(2, N + 1) - 1)
retu... | insert | 8 | 8 | 8 | 10 | 0 | |
p03209 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ALL(v) v.begin(), v.end()
#define V vector
#define P pair
typedef long long ll;
const int INT_INF = 1e9;
const ll INF = 1LL << 30;
const ll MOD = 1e9 + 7;
V<ll> len, pat;
ll rec(ll n, ll x) {
if (n == 0) {
if (x == 1)
return 1;
else
return 0... | #include <bits/stdc++.h>
using namespace std;
#define ALL(v) v.begin(), v.end()
#define V vector
#define P pair
typedef long long ll;
const int INT_INF = 1e9;
const ll INF = 1LL << 30;
const ll MOD = 1e9 + 7;
V<ll> len, pat;
ll rec(ll n, ll x) {
if (n == 0) {
if (x == 1)
return 1;
else
return 0... | replace | 39 | 41 | 39 | 41 | 0 | |
p03209 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
vector<ll> b(51), p(51);
ll f(ll n, ll x) {
if (x == 0)
return 0;
if (n == 0)
return 1;
if (x <= 1 + b[n - 1])
return f(n - 1, x - 1);
else
return p[n - 1] + 1 + f(n - 1, x - 2 - ... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
vector<ll> b(51), p(51);
ll f(ll n, ll x) {
if (x == 0)
return 0;
if (n == 0)
return 1;
if (x <= 1 + b[n - 1])
return f(n - 1, x - 1);
else
return p[n - 1] + 1 + f(n - 1, x - 2 - ... | replace | 24 | 25 | 24 | 25 | 0 | |
p03209 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <tupl... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctime>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <tupl... | replace | 39 | 42 | 39 | 52 | TLE | |
p03209 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sta... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sta... | replace | 49 | 51 | 49 | 50 | 0 | |
p03209 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, a, b) for (int i = a; i < (b); ++i)
#define reprev(i, n) for (int i = n - 1; i >= 0; --i)
#define reprrev(i, a, b) for (int i = b - 1; i >= (a); --i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
// aiはlevel... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repr(i, a, b) for (int i = a; i < (b); ++i)
#define reprev(i, n) for (int i = n - 1; i >= 0; --i)
#define reprrev(i, a, b) for (int i = b - 1; i >= (a); --i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
// aiはlevel... | replace | 25 | 26 | 25 | 26 | TLE | |
p03209 | C++ | Runtime Error | // Created by sz
#include <bits/stdc++.h>
using namespace std;
__int128 total_level[55];
__int128 total_party[55];
void scan(__int128 &x) // 输入
{
x = 0;
int f = 1;
getchar();
char ch;
if ((ch = getchar()) == '-')
f = -f;
else
x = x * 10 + ch - '0';
while ((ch = getchar()) >= '0' && ch <= '9')
... | // Created by sz
#include <bits/stdc++.h>
using namespace std;
__int128 total_level[55];
__int128 total_party[55];
void scan(__int128 &x) // 输入
{
x = 0;
int f = 1;
getchar();
char ch;
if ((ch = getchar()) == '-')
f = -f;
else
x = x * 10 + ch - '0';
while ((ch = getchar()) >= '0' && ch <= '9')
... | insert | 51 | 51 | 51 | 53 | 0 | |
p03210 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int X;
scanf("%d", X);
if (X == 3)
printf("%s", "YES");
else if (X == 5)
printf("%s", "YES");
else if (X == 7)
printf("%s", "YES");
else
printf("%s", "NO");
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int X;
scanf("%d", &X);
if (X == 3)
printf("%s", "YES");
else if (X == 5)
printf("%s", "YES");
else if (X == 7)
printf("%s", "YES");
else
printf("%s", "NO");
}
| replace | 5 | 6 | 5 | 6 | -11 | |
p03210 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | replace | 52 | 54 | 52 | 53 | TLE | |
p03210 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | replace | 52 | 54 | 52 | 53 | TLE | |
p03210 | C++ | Runtime Error | #include <stdio.h>
int main() {
int x;
scanf("%d", x);
if (x != 1 && x != 9 && x % 2 == 1) {
printf("YES");
return 0;
}
printf("NO");
return 0;
} | #include <stdio.h>
int main() {
int x;
scanf("%d", &x);
if (x != 1 && x != 9 && x % 2 == 1) {
printf("YES");
return 0;
}
printf("NO");
return 0;
} | replace | 4 | 5 | 4 | 5 | -11 | |
p03210 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | replace | 52 | 54 | 52 | 54 | TLE | |
p03210 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | replace | 52 | 54 | 52 | 53 | TLE | |
p03210 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | #include <algorithm>
#include <array>
#include <bitset>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <unordered_set>
using namespace std;
struct BoolName : numpunct<c... | replace | 52 | 54 | 52 | 53 | TLE | |
p03210 | Python | Runtime Error | #!/usr/bin/env python3
a = int(input())
a, b = list(map(int, input().split()))
a = list(str(input()))
| #!/usr/bin/env python3
x = int(input())
if x == 3 or x == 5 or x == 7:
print("YES")
else:
print("NO")
| replace | 2 | 5 | 2 | 8 | EOFError: EOF when reading a line | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03210/Python/s739413400.py", line 4, in <module>
a, b = list(map(int, input().split()))
EOFError: EOF when reading a line
|
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int checker(int x) {
if (x >= 753) {
return x - 753;
} else
return 753 - x;
}
int main() {
string S;
cin >> S;
int SIZE = S.size() - 2;
int MY = stoi(S);
vector<int> gard(SIZE);
for (int i = 0; i < SIZE; i++) {
gard.at(i) = checker(MY % 1000);
... | #include <bits/stdc++.h>
using namespace std;
int checker(int x) {
if (x >= 753) {
return x - 753;
} else
return 753 - x;
}
int main() {
string S;
cin >> S;
int SIZE = S.size() - 2;
int64_t MY = stoll(S);
vector<int> gard(SIZE);
for (int i = 0; i < SIZE; i++) {
gard.at(i) = checker(MY % 10... | replace | 14 | 15 | 14 | 15 | 0 | |
p03211 | C++ | Runtime Error | #include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main() {
string S;
std::ifstream in("input.txt");
std::cin.rdbuf(in.rdbuf());
cin >> S;
int imin = 1000;
int tmp;
for (int i = 0; i <= S.size() - 3; i++) {
tmp = stoi(S.substr(i, 3));
tmp = abs(753 - tmp);
... | #include <fstream>
#include <iostream>
#include <string>
using namespace std;
int main() {
string S;
cin >> S;
int imin = 1000;
int tmp;
for (int i = 0; i <= S.size() - 3; i++) {
tmp = stoi(S.substr(i, 3));
tmp = abs(753 - tmp);
imin = min(imin, tmp);
}
cout << imin << endl;
}
| delete | 10 | 12 | 10 | 10 | -6 | terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
|
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
int N = S.size();
vector<int> A(N - 2);
for (int i = 0; i < N - 2; i++) {
string s = "";
for (int j = 0; j < 3; j++) {
s += S.at(i + j);
}
A.at(i) = stoi(s);
}
int Min = 1000;
for (int i = 0; i < N - 2; i++)
if ... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int N = S.size();
vector<int> A(N - 2);
for (int i = 0; i < N - 2; i++) {
string s = "";
for (int j = 0; j < 3; j++) {
s += S.at(i + j);
}
A.at(i) = stoi(s);
}
int Min = 1000;
for (int i = 0; i < N - 2; ... | insert | 4 | 4 | 4 | 5 | -6 | terminate called after throwing an instance of 'std::length_error'
what(): cannot create std::vector larger than max_size()
|
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int a = s.size();
vector<int> ans(a - 2);
for (int i = 0; i < a; i++) {
string x = s.substr(i, 3);
int y = stoi(x);
ans[i] = abs(753 - y);
}
sort(ans.begin(), ans.end());
cout << ans[0] << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int a = s.size();
vector<int> ans(a - 2);
for (int i = 0; i < a - 2; i++) {
string x = s.substr(i, 3);
int y = stoi(x);
ans[i] = abs(753 - y);
}
sort(ans.begin(), ans.end());
cout << ans[0] << endl;
} | replace | 8 | 9 | 8 | 9 | 0 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
int c = 1000;
for (int i = 0; i < a.size() - 1; i++) {
if (c > abs((a.at(i) - '0') * 100 + (a.at(i + 1) - '0') * 10 +
(a.at(i + 2) - '0') - 753))
c = abs((a.at(i) - '0') * 100 + (a.at(i + 1) - '0') * 10 +
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string a;
cin >> a;
int c = 1000;
for (int i = 0; i < a.size() - 2; i++) {
if (c > abs((a.at(i) - '0') * 100 + (a.at(i + 1) - '0') * 10 +
(a.at(i + 2) - '0') - 753))
c = abs((a.at(i) - '0') * 100 + (a.at(i + 1) - '0') * 10 +
... | replace | 7 | 8 | 7 | 8 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 10) >= this->size() (which is 10)
|
p03211 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int i, len, ans = 100000;
char s[12];
cin >> s;
len = strlen(s);
// cout <<s << endl << len<< endl;
for (i = 0; i < len; i++)
// cout << s[i] <<endl;
for (i = 0; i < len - 2; i++) {
ans = min(abs((s[... | #include <algorithm>
#include <cstring>
#include <iostream>
using namespace std;
int main() {
int i, len, ans = 100000;
char s[12];
cin >> s;
len = strlen(s);
for (i = 0; i < len - 2; i++) {
ans = min(
abs((s[i] - '0') * 100 + (s[i + 1] - '0') * 10 + s[i + 2] - '0' - 753),
ans);
}
cout... | replace | 9 | 18 | 9 | 14 | TLE | |
p03211 | C++ | Runtime Error | #include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
int main() {
string S;
cin >> S;
int min = 1000;
for (int i = 0; i < 7; i++) {
if (abs(753 - stoi(S.substr(i, 3))) < min) {
min = abs(753 - stoi(S.substr(i, 3)));
}
}
cout << min;
} | #include <iostream>
#include <stdlib.h>
#include <string>
using namespace std;
int main() {
string S;
cin >> S;
int min = 1000;
for (int i = 0; i < S.size() - 2; i++) {
if (abs(753 - stoi(S.substr(i, 3))) < min) {
min = abs(753 - stoi(S.substr(i, 3)));
}
}
cout << min;
} | replace | 8 | 9 | 8 | 9 | 0 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int main() {
string S;
cin >> S;
int n = S.length();
int Snum = stoi(S);
int ans = 999;
for (int i = 0; i < n - 2; i++) {
int M = abs(Snum % 1000 - 753);
ans = min(M, ans);
if (ans == 0)
break;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
int main() {
string S;
cin >> S;
int n = S.length();
ll Snum = stoll(S);
int ans = 999;
for (int i = 0; i < n - 2; i++) {
int M = abs(Snum % 1000 - 753);
ans = min(M, ans);
if (ans == 0)
break;
... | replace | 10 | 11 | 10 | 11 | 0 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 1000;
for (int i = 0; s.size() - 2; i++) {
int num = (s[i] - '0') * 100 + (s[i + 1] - '0') * 10 + (s[i + 2] - '0');
ans = min(ans, abs(num - 753));
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 1000;
for (int i = 0; i < s.size() - 2; i++) {
int num = (s[i] - '0') * 100 + (s[i + 1] - '0') * 10 + (s[i + 2] - '0');
ans = min(ans, abs(num - 753));
}
cout << ans << endl;
} | replace | 7 | 8 | 7 | 8 | -11 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string S;
cin >> S;
int jud, min = 1000, a;
for (int i = 0; i < S.length(); i++) {
for (int t = S.length() - i; t > 0; t--) {
a = stoi(S.substr(i, t));
if (753 - a >= 0)
jud = 753 - a;
else
jud = a - 753;
... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
string S;
cin >> S;
int jud, min = 1000, a;
for (int i = 0; i <= S.length() - 2; i++) {
a = stoi(S.substr(i, 3));
if (753 - a >= 0)
jud = 753 - a;
else
jud = a - 753;
if (jud <= min)
min = jud;
}
cout << min;
}... | replace | 7 | 17 | 7 | 15 | 0 | |
p03211 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
using namespace std;
int main() {
char s[11];
scanf("%s", s);
int tmp = 2, min = 1000;
while (s[tmp] != '\n') {
int n;
n = 100 * (s[tmp - 2] - '0') + 10 * (s[tmp - 1] - '0') + (s[tmp] - '0');
if (abs(n - 753) < min)
min = abs(n - 753);
tmp++;
}
... | #include <algorithm>
#include <cstdio>
using namespace std;
int main() {
char s[11];
scanf("%s", s);
int tmp = 2, min = 1000;
while (s[tmp] != '\0') {
int n;
n = 100 * (s[tmp - 2] - '0') + 10 * (s[tmp - 1] - '0') + (s[tmp] - '0');
if (abs(n - 753) < min)
min = abs(n - 753);
tmp++;
}
... | replace | 10 | 11 | 10 | 11 | 0 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REP(i, num, n) for (ll i = num, i##_len = (n); i < i##_len; ++i)
#define repprev(i, a, b) for (ll i = b - 1; i >= a; i--)
#define reprev(i, n) repprev(i, 0, n)
u... | #include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define rep(i, n) for (ll i = 0, i##_len = (n); i < i##_len; ++i)
#define REP(i, num, n) for (ll i = num, i##_len = (n); i < i##_len; ++i)
#define repprev(i, a, b) for (ll i = b - 1; i >= a; i--)
#define reprev(i, n) repprev(i, 0, n)
u... | replace | 62 | 68 | 62 | 63 | -6 | terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
|
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, spart;
cin >> s;
int min = 999;
int tmp = 0;
for (int i = 0; i < s.length() - 2; i++) {
spart = s[i] + s[i + 1] + s[i + 2];
tmp = stoi(spart);
if (min > abs(tmp - 753))
min = abs(tmp - 753);
}
cout << min << endl;
re... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s, spart;
cin >> s;
int min = 999;
int tmp = 0;
for (int i = 0; i < s.length() - 2; i++) {
spart = s.substr(i, 3);
tmp = stoi(spart);
if (min > abs(tmp - 753))
min = abs(tmp - 753);
}
cout << min << endl;
return 0;
} | replace | 9 | 10 | 9 | 10 | -6 | terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
|
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int a = 1000;
for (int i = 0; i < S.size() - 2; i++) {
a = min(abs(753 - ((S.at(i) - '0') * 100 + (S.at(i + 1) - '0') * 10 +
S.at(i - 2) - '0')),
a);
}
cout << a << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int a = 1000;
for (int i = 0; i < S.size() - 2; i++) {
a = min(abs(753 - ((S.at(i) - '0') * 100 + (S.at(i + 1) - '0') * 10 +
S.at(i + 2) - '0')),
a);
}
cout << a << endl;
} | replace | 9 | 10 | 9 | 10 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 18446744073709551614) >= this->size() (which is 10)
|
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
string s;
cin >> s;
int u = stoi(s);
vector<int> a(s.size());
for (int i = 0; i < s.size(); i++) {
a[i] = u % 10;
u = u / 10;
}
reverse(a.begin(), a.end());
int minV =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
string s;
cin >> s;
ll u = stol(s);
vector<int> a(s.size());
for (int i = 0; i < s.size(); i++) {
a[i] = u % 10;
u = u / 10;
}
reverse(a.begin(), a.end());
int minV = ... | replace | 8 | 9 | 8 | 9 | 0 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string x;
int z, result = 1000;
cin >> x;
for (int i = 0; i < 9; i++) {
string s = x.substr(i, 3);
z = abs(stoi(s) - 753);
result = min(result, z);
}
cout << result << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string x;
int z, result = 1000;
cin >> x;
for (int i = 0; i < x.length() - 2; i++) {
string s = x.substr(i, 3);
z = abs(stoi(s) - 753);
result = min(result, z);
}
cout << result << endl;
} | replace | 7 | 8 | 7 | 8 | 0 | |
p03211 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
const double PI = 3.14159265358979323846;
typedef vector<int> vint;
typedef pair<int, int> pint;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
// cout << fixed << setprecision(20);
signed main() {
int... | #include <bits/stdc++.h>
using namespace std;
#define int long long
const double PI = 3.14159265358979323846;
typedef vector<int> vint;
typedef pair<int, int> pint;
const int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
const int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};
// cout << fixed << setprecision(20);
signed main() {
int... | replace | 15 | 16 | 15 | 16 | TLE | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
vector<int> a(S.length() - 2);
for (int i = 0; i < S.length() - 2; i++) {
a[i] = abs(753 - stoi(S.substr(i, 3)));
}
sort(a.begin(), a.end());
cout << a[0] << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
vector<int> a(S.length() - 2);
for (int i = 0; i < S.length() - 2; i++) {
a[i] = abs(753 - stoi(S.substr(i, 3)));
}
sort(a.begin(), a.end());
cout << a[0] << endl;
}
| insert | 5 | 5 | 5 | 6 | -6 | terminate called after throwing an instance of 'std::length_error'
what(): cannot create std::vector larger than max_size()
|
p03211 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
int ret = stoi(S);
for (auto i = 0u; i < S.size() - 2; ++i) {
auto s = S.substr(i, 3);
ret = min(ret, abs(753 - stoi(s)));
}
cout << ret << endl;
ret... | #include <algorithm>
#include <iostream>
#include <map>
#include <string>
#include <vector>
using namespace std;
int main() {
string S;
cin >> S;
int ret = 1000;
for (auto i = 0u; i < S.size() - 2; ++i) {
auto s = S.substr(i, 3);
ret = min(ret, abs(753 - stoi(s)));
}
cout << ret << endl;
return... | replace | 12 | 13 | 12 | 13 | 0 | |
p03211 | C++ | Runtime Error | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int abs(int a, int b) {
if (a >= b) {
return a - b;
} else {
return b - a;
}
}
int main() {
string S;
cin >> S;
int s = (int)S.size();
vector<int> T;
for (int i = 0; i < s; i++) {
T[i] = S[i] - '0';
}
int mi... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int abs(int a, int b) {
if (a >= b) {
return a - b;
} else {
return b - a;
}
}
int main() {
string S;
cin >> S;
int s = (int)S.size();
vector<int> T(s);
for (int i = 0; i < s; i++) {
T[i] = S[i] - '0';
}
int... | replace | 18 | 19 | 18 | 19 | -11 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string vec;
cin >> vec;
ll b = 1000;
for (ll i = 0; i < 7; i++) {
ll c, d, e;
c = vec.at(i) - '0';
d = vec.at(i + 1) - '0';
e = vec.at(i + 2) - '0';
b = min(b, abs(100 * c + 10 * d + e - 753));
}
cout << b <... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string vec;
cin >> vec;
ll b = 1000;
ll x = vec.size();
for (ll i = 0; i < vec.size() - 2; i++) {
ll c, d, e;
c = vec.at(i) - '0';
d = vec.at(i + 1) - '0';
e = vec.at(i + 2) - '0';
b = min(b, abs(100 * c + 10 ... | replace | 7 | 8 | 7 | 9 | 0 | |
p03211 | C++ | Runtime Error | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define pf(n) printf("%d\n", n)
typedef long long ll;
typedef pair<ll, ll> p;
const in... | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define pf(n) printf("%d\n", n)
typedef long long ll;
typedef pair<ll, ll> p;
const in... | replace | 20 | 33 | 20 | 28 | 0 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int counter = 10000;
int n = stoi(s);
deque<int> a;
while (n > 0) {
a.push_front(n % 10);
n = n / 10;
}
for (int i = 0; i < a.size() - 2; i++) {
counter =
min(counter, abs(a.at(i) * 100 + a.at(i + 1) * 10... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int counter = 10000;
long long n = stoll(s);
deque<int> a;
while (n > 0) {
a.push_front(n % 10);
n = n / 10;
}
for (int i = 0; i < a.size() - 2; i++) {
counter =
min(counter, abs(a.at(i) * 100 + a.at(i + ... | replace | 7 | 8 | 7 | 8 | 0 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string S;
cin >> S;
int diff = 753, t = 753;
int s = stoi(S);
int length = S.size();
cout << s << endl;
for (int i = 0; i < S.size() - 3; i++) {
diff = 753 - s / (int)pow(10, length - 3);
cout << s / (int)pow(10, le... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
string s;
cin >> s;
int diff, t = 753;
for (int i = 0; i < s.size() - 2; i++) {
diff = 753 - (s[i] - '0') * 100 - (s[i + 1] - '0') * 10 - (s[i + 2] - '0');
t = min(t, abs(diff));
}
cout << t;
return 0;
}
| replace | 6 | 21 | 6 | 12 | 0 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a, ans;
cin >> a;
ans = abs(a % 1000 - 753);
for (int i = 10; i < 10000000000000; i = i * 10) {
if (abs((a % (i * 1000) / i) - 753) < ans) {
ans = abs((a % (i * 1000) / i) - 753);
}
if (a / (i * 1000) == 0) {
break;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long a, ans;
cin >> a;
ans = abs(a % 1000 - 753);
for (long long i = 10; i < 10000000000000; i = i * 10) {
if (abs((a % (i * 1000) / i) - 753) < ans) {
ans = abs((a % (i * 1000) / i) - 753);
}
if (a / (i * 1000) == 0) {
bre... | replace | 7 | 8 | 7 | 8 | 0 | |
p03211 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main() {
string s, t = "";
cin >> s;
int ans = 999;
rep(i, s.size() - 2) {
t += s[i] + s[i + 1] +... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
using ll = long long;
int main() {
string s, t = "";
cin >> s;
int ans = 999;
rep(i, s.size() - 2) {
t += s[i];
t += s[... | replace | 12 | 13 | 12 | 15 | -6 | terminate called after throwing an instance of 'std::invalid_argument'
what(): stoi
|
p03211 | C++ | Runtime Error | #include <algorithm>
#include <array>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int main(int argc, char const *argv[]) {
string s;
cin >> s;
vect... | #include <algorithm>
#include <array>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <sstream>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
using namespace std;
int main(int argc, char const *argv[]) {
string s;
cin >> s;
vect... | replace | 17 | 18 | 17 | 18 | 0 | |
p03211 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
... | insert | 109 | 109 | 109 | 110 | -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)
|
p03211 | C++ | Runtime Error | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 5;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
int main() {
string s;
int MIN = INF;
for (int i = 0; i < s.size() - 2; i++) {
int num = abs((s[i] - '0') * 100 + (s[i + 1] - '0') *... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 5;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
int main() {
string s;
cin >> s;
int MIN = INF;
for (int i = 0; i < s.size() - 2; i++) {
int num = abs((s[i] - '0') * 100 + (s[i +... | insert | 11 | 11 | 11 | 12 | -11 | |
p03211 | C++ | Runtime Error | #include <assert.h>
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 1e9;
for (int i = 0; i < s.size(); i++)
for (int j = 1; j < s.size() - i + 1; j++)
ans = min(ans, abs(753 - stoi(s.substr(i, j))));
cout << ans << endl;
return 0;
}
| #include <assert.h>
#include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int ans = 1e9;
for (int i = 0; i < s.size() - 2; i++)
ans = min(ans, abs(753 - stoi(s.substr(i, 3))));
cout << ans << endl;
return 0;
}
| replace | 9 | 12 | 9 | 11 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
typedef long long ll;
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define per(i, a, b) for (ll i = a; i >= b; i--)
using namespace std;
typedef vector<ll> vi;
typedef vector<vector<ll>> vvi;
const string defaultval = "753";
ll dfs(string s, int n) {
ll x = stoi(s);
... | #include <bits/stdc++.h>
#include <iostream>
typedef long long ll;
#define rep(i, a, b) for (ll i = a; i <= b; i++)
#define per(i, a, b) for (ll i = a; i >= b; i--)
using namespace std;
typedef vector<ll> vi;
typedef vector<vector<ll>> vvi;
const string defaultval = "753";
ll dfs(string s, ll n) {
ll x = stoll(s);
... | replace | 11 | 13 | 11 | 13 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
if (n < 357) {
puts("0");
return 0;
}
int ans = 0;
for (int i = 357; i <= n; i += 2) {
int temp = i;
bool while_flag = true;
bool count3 ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
if (n < 357) {
puts("0");
return 0;
}
int ans = 0;
for (int i = 357; i <= n; i += 2) {
int temp = i;
bool while_flag = true;
bool count3 ... | insert | 88 | 88 | 88 | 92 | TLE | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
t... | #include <bits/stdc++.h>
using namespace std;
#define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++)
#define rep(x, to) for (int(x) = 0; (x) < (to); (x)++)
#define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--)
#define all(c) (c).begin(), (c).end()
#define sz(v) (int)(v).size()
typedef int64_t ll;
t... | insert | 30 | 30 | 30 | 34 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace ... | #include <algorithm>
#include <array>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace ... | replace | 34 | 36 | 34 | 36 | TLE | |
p03212 | C++ | Time Limit Exceeded | #include <iostream>
#include <queue>
using namespace std;
int n, ans, now, cnt3, cnt5, cnt7;
queue<string> q;
int main() {
cin >> n;
q.push("3");
q.push("5");
q.push("7");
while (!q.empty()) {
string s = q.front();
q.pop();
now = 0;
cnt3 = 0;
cnt5 = 0;
cnt7 = 0;
for (int i = 1;... | #include <iostream>
#include <queue>
using namespace std;
long long n, ans, now, cnt3, cnt5, cnt7;
queue<string> q;
int main() {
cin >> n;
q.push("3");
q.push("5");
q.push("7");
while (!q.empty()) {
string s = q.front();
q.pop();
now = 0;
cnt3 = 0;
cnt5 = 0;
cnt7 = 0;
for (int ... | replace | 5 | 6 | 5 | 6 | TLE | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, b) for (int i = 0; i < (b); i++)
#define REPS(i, b) for (int i = 1; i <= (b); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
using ll = long long;
ll N, ans;
bool is753(string s) {
vector<int> c(3, 0);
RE... | #include <bits/stdc++.h>
#define REP(i, b) for (int i = 0; i < (b); i++)
#define REPS(i, b) for (int i = 1; i <= (b); i++)
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
using ll = long long;
ll N, ans;
bool is753(string s) {
vector<int> c(3, 0);
RE... | replace | 27 | 28 | 27 | 28 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
bool check(int a) {
bool b3 = false, b5 = false, b7 = false;
while (a) {
switch (a % 10) {
case 3:
b3 = true;
break;
case 5:
b5 = true;
break;
case 7:
b7 = true;
break;
default:
return false;
}
a /= 1... | #include <bits/stdc++.h>
using namespace std;
bool check(int a) {
bool b3 = false, b5 = false, b7 = false;
while (a) {
switch (a % 10) {
case 3:
b3 = true;
break;
case 5:
b5 = true;
break;
case 7:
b7 = true;
break;
default:
return false;
}
a /= 1... | insert | 26 | 26 | 26 | 30 | TLE | |
p03212 | Python | Runtime Error | n = int(input())
def dfs(s):
if int(s) > n:
return 0
ret = 1 if all(s.count > 0 for c in "753") else 0
for c in "753":
ret += dfs(s + c)
return ret
print(dfs("0"))
| n = int(input())
def dfs(s):
if int(s) > n:
return 0
ret = 1 if all(s.count(c) > 0 for c in "753") else 0
for c in "753":
ret += dfs(s + c)
return ret
print(dfs("0"))
| replace | 6 | 7 | 6 | 7 | TypeError: '>' not supported between instances of 'builtin_function_or_method' and 'int' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03212/Python/s633600507.py", line 13, in <module>
print(dfs('0'))
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03212/Python/s633600507.py", line 7, in dfs
ret = 1 if all(s.count > ... |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define FOR(NAME, START, NUM) for (ll NAME = START; NAME < (NUM); NAME++)
#define REP(NAME, NUM) for (ll NAME = 0; NAME < (NUM); NAME++)
#define BREP(NAME, NUM) for (ll NAME = (NUM)-1; NAME >= 0;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
#define FOR(NAME, START, NUM) for (ll NAME = START; NAME < (NUM); NAME++)
#define REP(NAME, NUM) for (ll NAME = 0; NAME < (NUM); NAME++)
#define BREP(NAME, NUM) for (ll NAME = (NUM)-1; NAME >= 0;... | insert | 61 | 61 | 61 | 65 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define Rep(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(x) (x).begin(), (x).end()
#define ll long long
ll n;
vector<char> c753 = {'3', '5', '7'};
ll dfs(string m) {
if (stoi(m.c_str()) > n)
return 0;
ll re... | #include <bits/stdc++.h>
using namespace std;
#define Rep(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(x) (x).begin(), (x).end()
#define ll long long
ll n;
vector<char> c753 = {'3', '5', '7'};
ll dfs(string m) {
if (stol(m.c_str()) > n)
return 0;
ll re... | replace | 13 | 14 | 13 | 14 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main(void) {
long long N, i, sum = 0;
cin >> N;
for (i = 3; i < N + 1;) {
long long a = 0, b = 0, c = 0, d = 1, n = i;
for (; n > 0;) {
if (n % 10 == 3) {
a = 1;
} else if (n % 10 == 5) {
b = 1;
} else if (n % 10 == 7) {
... | #include <iostream>
using namespace std;
int main(void) {
long long N, i, sum = 0;
cin >> N;
if (N > 500000000) {
sum = 14384;
for (i = 500000003; i < N + 1;) {
long long a = 0, b = 0, c = 0, d = 1, n = i;
for (; n > 0;) {
if (n % 10 == 3) {
a = 1;
} else if (n % 10 =... | insert | 5 | 5 | 5 | 34 | TLE | |
p03212 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using namespace std;
bool is_good(int x) {
map<int, int> mp;
while (x > 0) {
int res = x % 10;
x /= 10;
mp[res]++;
}
if (mp[3] > 0 && mp[5] > 0 && mp[7] > 0 && mp.size() == 3) {
return true;
} else
return false;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using namespace std;
bool is_good(int x) {
map<int, int> mp;
while (x > 0) {
int res = x % 10;
x /= 10;
mp[res]++;
}
if (mp[3] > 0 && mp[5] > 0 && mp[7] > 0 && mp.size() == 3) {
return true;
} else
return false;
... | replace | 26 | 27 | 26 | 27 | TLE | |
p03212 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
long long int N;
bool func(string s) {
bool seven = false, five = false, three... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
long long int N;
bool func(string s) {
bool seven = false, five = false, three... | replace | 40 | 41 | 40 | 41 | 0 | |
p03212 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#define repp(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define repm(i, a, b) for (int i = (int)a; i > (int)b; --i)
using ll = long long;
static const ll mod = 1e9;
static co... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#define repp(i, a, b) for (int i = (int)a; i < (int)b; ++i)
#define repm(i, a, b) for (int i = (int)a; i > (int)b; --i)
using ll = long long;
static const ll mod = 1e9;
static co... | replace | 21 | 22 | 21 | 22 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define ll long long
const int N = 1e6 + 5, MOD = 1e9 + 7;
using namespace std;
ll n, ans = 0;
map<ll, bool> vis;
bool occ[10];
bool gg(ll a) {
memset(occ, 0, sizeof(occ));
while (a) {
occ[a %... | #include <bits/stdc++.h>
#define pb push_back
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define ll long long
const int N = 1e6 + 5, MOD = 1e9 + 7;
using namespace std;
ll n, ans = 0;
map<ll, bool> vis;
bool occ[10];
bool gg(ll a) {
memset(occ, 0, sizeof(occ));
while (a) {
occ[a %... | delete | 38 | 41 | 38 | 38 | 0 | |
p03212 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;
int N;
int dfs(string s) {
... | #include <algorithm>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
#define rep(i, N) for (int i = 0; i < (int)N; i++)
using namespace std;
typedef long long ll;
const ll LLINF = 9223372036854775807;
const int MOD = 1000000007;
int N;
int dfs(string s) {
... | replace | 17 | 18 | 17 | 18 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int MOD = 1000000007;
int INF = numeric_limits<int>::max() / 2;
int ans = 0;
int N;
void dfs(string S) {
if (stoi(S) > N)
return;
bool ans3{}, ans5{}, ans7{};
for (int i = 0; i < S.size()... | #include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int MOD = 1000000007;
int INF = numeric_limits<int>::max() / 2;
int ans = 0;
int N;
void dfs(string S) {
if (stol(S) > N)
return;
bool ans3{}, ans5{}, ans7{};
for (int i = 0; i < S.size()... | replace | 11 | 12 | 11 | 12 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
vector<int> ans;
void c(int x) {
string s = to_string(x);
bool a = fa... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
vector<int> ans;
void c(int x) {
string s = to_string(x);
bool a = fa... | replace | 28 | 30 | 28 | 31 | TLE | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) x.begin(), x.end()
#define mod 1000000007
typedef long long ll;
int cnt = 0;
int n;
void dfs(string num) {
if (stoi(num) <= n) {
bool three = false, five = false, seven = false;
rep(i, num.lengt... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) x.begin(), x.end()
#define mod 1000000007
typedef long long ll;
int cnt = 0;
int n;
void dfs(string num) {
if (stoll(num) <= n) {
bool three = false, five = false, seven = false;
rep(i, num.leng... | replace | 11 | 12 | 11 | 12 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#in... | #include <algorithm>
#include <bitset>
#include <ciso646>
#include <cmath>
#include <complex>
#include <cstdio>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#in... | replace | 72 | 73 | 72 | 73 | TLE | |
p03212 | C++ | Time Limit Exceeded | /************************************************
*Author : lrj124
*Created Time : 2018.12.02.20:14
*Mail : 1584634848@qq.com
*Problem : c
************************************************/
#include <bits/stdc++.h>
using namespace std;
int n, ans;
inline void dfs(int now) {
if (now <= n... | /************************************************
*Author : lrj124
*Created Time : 2018.12.02.20:14
*Mail : 1584634848@qq.com
*Problem : c
************************************************/
#include <bits/stdc++.h>
using namespace std;
int n, ans;
inline void dfs(long long now) {
if (no... | replace | 9 | 10 | 9 | 10 | TLE | |
p03212 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
... | replace | 68 | 71 | 68 | 71 | TLE | |
p03212 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = int64_t;
string N;
ll f(ll d, bool u3, bool u5, bool u7, bool uN) {
if (d == N.size()) {
return u3 && u5 && u7;
}
if (uN) {
return f(d + 1, true, u5, u7, uN) + f(d + 1, u3, true, u7, uN) +
f(d + 1, u3, u5, true, uN);
} else {
if (... | #include "bits/stdc++.h"
using namespace std;
using ll = int64_t;
string N;
ll f(ll d, bool u3, bool u5, bool u7, bool uN) {
if (d == N.size()) {
return u3 && u5 && u7;
}
if (uN) {
return f(d + 1, true, u5, u7, uN) + f(d + 1, u3, true, u7, uN) +
f(d + 1, u3, u5, true, uN);
} else {
if (... | replace | 33 | 34 | 33 | 34 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int dfs(string s, int n) {
if (stoi(s) > n)
return 0;
int cnt3 = 0, cnt5 = 0, cnt7 = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == '3')
cnt3++;
if (s[i] == '5')
cnt5++;
if (s[i] == '7')
cnt7++;
}
int res = 0;
if (cnt3 ... | #include <bits/stdc++.h>
using namespace std;
int dfs(string s, int n) {
if (stol(s) > n)
return 0;
int cnt3 = 0, cnt5 = 0, cnt7 = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == '3')
cnt3++;
if (s[i] == '5')
cnt5++;
if (s[i] == '7')
cnt7++;
}
int res = 0;
if (cnt3 ... | replace | 4 | 5 | 4 | 5 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define size_of_array(array) (sizeof(array) / sizeof(array[0]))
#define MAX 100005
#define NIL -1
using ll = long long;
using namespace std;
using Graph = vector<vector<int>>;
using Field = vector<vector<char>>;
using P = pair<int, int>;
template... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define size_of_array(array) (sizeof(array) / sizeof(array[0]))
#define MAX 100005
#define NIL -1
using ll = long long;
using namespace std;
using Graph = vector<vector<int>>;
using Field = vector<vector<char>>;
using P = pair<int, int>;
template... | replace | 48 | 51 | 48 | 53 | -11 | |
p03212 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
unsigned long long n;
cin >> n;
int count = 0;
bool seven, five, three;
for (unsigned long long i = 357; i <= n; i += 2) {
seven = 0;
five = 0;
three = 0;
unsigned long long num = i;
while (num > ... | #include <algorithm>
#include <iostream>
#include <string>
using namespace std;
int main() {
unsigned long long n;
cin >> n;
int count = 0;
bool seven, five, three;
for (unsigned long long i = 357; i <= n; i += 2) {
if (i == 77777753 + 2)
i = 333333357 - 2;
if (i == 377777775 + 2)
i = 533... | insert | 11 | 11 | 11 | 19 | TLE | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// #define ONLINE_JUDGE
#define pb(a) push_back(a)
#define all(a) (a.begin(), a.end())
using ll = long long;
const int E5 = 1e5;
//////////// Solution /////////////////////////////////
int ans = 0;
int n;
void dfs(ll cur, int mask) {
if (cur > n)
return;
if (... | #include <bits/stdc++.h>
using namespace std;
#define ONLINE_JUDGE
#define pb(a) push_back(a)
#define all(a) (a.begin(), a.end())
using ll = long long;
const int E5 = 1e5;
//////////// Solution /////////////////////////////////
int ans = 0;
int n;
void dfs(ll cur, int mask) {
if (cur > n)
return;
if (mas... | replace | 3 | 4 | 3 | 4 | -11 | |
p03212 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k = 0;
cin >> n;
for (int i = 357; i <= n; i += 2) {
int a = i, a3 = 0, a5 = 0, a7 = 0;
while (a > 0) {
if (a % 10 == 3) {
a3 = 1;
} else if (a % 10 == 5) {
a5 = 1;
} else if (a % 10 == 7) {
a7 = 1... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, k = 0;
cin >> n;
if (n > 777777777) {
n = 777777777;
}
for (int i = 357; i <= n; i += 2) {
int a = i, a3 = 0, a5 = 0, a7 = 0;
while (a > 0) {
if (a % 10 == 3) {
a3 = 1;
} else if (a % 10 == 5) {
a5 = 1;
... | insert | 6 | 6 | 6 | 9 | TLE | |
p03212 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
bool sgs(int x) {
bool f3 = false, f5 = false, f7 = false;
while (x != 0) {
if (x % 10 == 3) {
f3 = true;
} else if (x % 10 == 5) {
f5 = true;
} else if (x % 10 == 7) {
f7 = true;
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fi first
#define se second
bool sgs(int x) {
bool f3 = false, f5 = false, f7 = false;
while (x != 0) {
if (x % 10 == 3) {
f3 = true;
} else if (x % 10 == 5) {
f5 = true;
} else if (x % 10 == 7) {
f7 = true;
... | replace | 32 | 33 | 32 | 44 | TLE | |
p03212 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, cnt = 0;
cin >> n;
if (n < 357) {
cout << "0\n";
return 0;
}
int start = 357;
if (n > 100000000) {
start = 99999999;
cnt += 8334;
}
for (int i = start; i <= n; i = i + 2) {
int j = i, flg = 1, c3 = 0, c5 = 0, c7 =... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n, cnt = 0;
cin >> n;
if (n < 357) {
cout << "0\n";
return 0;
}
int start = 357;
if (n > 500000000) {
start = 499999999;
cnt += 14384;
}
for (int i = start; i <= n; i = i + 2) {
int j = i, flg = 1, c3 = 0, c5 = 0, c7... | replace | 11 | 14 | 11 | 14 | TLE | |
p03212 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
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;
}
ll N;
void ... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
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;
}
ll N;
void ... | replace | 29 | 30 | 29 | 30 | TLE | |
p03212 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define pb push_back
string nextStr(string str) {
bool flag = str[0] == '7';
if (str[0] == '3')
str[0] = '5';
else if (str[0] == '5')
str[0] = '7';
else
str[0] =... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define pb push_back
string nextStr(string str) {
bool flag = str[0] == '7';
if (str[0] == '3')
str[0] = '5';
else if (str[0] == '5')
str[0] = '7';
else
str[0] =... | replace | 54 | 55 | 54 | 55 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
string tem = "753";
int dfs(string s, int n) {
if (stoi(s) > n)
ret... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
string tem = "753";
int dfs(string s, int n) {
if (stol(s) > n)
ret... | replace | 11 | 12 | 11 | 12 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int n;
int ans = 0;
void check(int x) {
bool f3 = false, f5 = false, f7 = false;
while (x != 0) {
if (x > n)
break;
int a = x % 10;
if (a == 3)
f3 = true;
else if (a == 5)
... | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int n;
int ans = 0;
void check(int x) {
bool f3 = false, f5 = false, f7 = false;
while (x != 0) {
if (x > n)
break;
int a = x % 10;
if (a == 3)
f3 = true;
else if (a == 5)
... | replace | 31 | 32 | 31 | 32 | TLE | |
p03212 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int dfs(int s, int N) {
int ret;
if (s > N) {
return 0;
}
bool flg3 = false;
bool flg5 = false;
bool flg7 = false;
// s は 753 数か?
int tmp = s;
while (tmp > 0) {
int digit = tmp % 10;
tmp /= 10;
if (digit == 3)
flg3 = true;
else i... | #include <bits/stdc++.h>
using namespace std;
int dfs(long s, int N) {
int ret;
if (s > N) {
return 0;
}
bool flg3 = false;
bool flg5 = false;
bool flg7 = false;
// s は 753 数か?
int tmp = s;
while (tmp > 0) {
int digit = tmp % 10;
tmp /= 10;
if (digit == 3)
flg3 = true;
else ... | replace | 3 | 4 | 3 | 4 | TLE | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define FORR(i, a, b) for (int i ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define FOR(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define FORR(i, a, b) for (int i ... | replace | 23 | 24 | 23 | 24 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define PI (acos(-1))
#define swap(a, b) ((a != b) && (a += b, b = a - b, a -= b))
#define rep(i, N) for (int i = 0; i < (N); i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back
using ll = long long;
long long gcd(long long a, long long b) { return b ? gcd(b, a... | #include <bits/stdc++.h>
using namespace std;
#define PI (acos(-1))
#define swap(a, b) ((a != b) && (a += b, b = a - b, a -= b))
#define rep(i, N) for (int i = 0; i < (N); i++)
#define all(a) (a).begin(), (a).end()
#define pb push_back
using ll = long long;
long long gcd(long long a, long long b) { return b ? gcd(b, a... | insert | 46 | 46 | 46 | 48 | TLE | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
#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 all(x) (x).beg... | #include <bits/stdc++.h>
#include <sys/time.h>
using namespace std;
#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 all(x) (x).beg... | replace | 198 | 201 | 198 | 218 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
// #define int long long
bool is753(int n) {
int three = 0;
int five = 0;
int seven = 0;
while (true) {
switch (n % 10) {
case 3:
++three;
break;
case 5:
++five;
break;
case 7:
++seven;
break;
default:
... | #include "bits/stdc++.h"
using namespace std;
// #define int long long
inline bool is753(int n) {
int three = 0;
int five = 0;
int seven = 0;
while (true) {
switch (n % 10) {
case 3:
++three;
break;
case 5:
++five;
break;
case 7:
++seven;
break;
default... | replace | 5 | 6 | 5 | 6 | TLE | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REPS(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
typedef unsigned int uint;
typedef unsigned long long int ull;
typedef long long int l... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REPS(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
typedef unsigned int uint;
typedef unsigned long long int ull;
typedef long long int l... | replace | 30 | 31 | 30 | 31 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
#define dump(x) cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOREACH(x, ... | #include <bits/stdc++.h>
const int INF = 1e9;
const int MOD = 1e9 + 7;
const long long LINF = 1e18;
#define dump(x) cout << 'x' << ' = ' << (x) << ` `;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOREACH(x, ... | replace | 15 | 16 | 15 | 16 | 0 | |
p03212 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
bool is753(int n) {
bool c3, c5, c7;
c3 = c5 = c7 = false;
do {
int num = n % 10;
switch (num) {
case 3:
c3 = true;
break;
case 5:
c5 = true;
break;
case 7:
c7 = true;
break;
default:
return false;
... | #include <bits/stdc++.h>
using namespace std;
bool is753(int n) {
bool c3, c5, c7;
c3 = c5 = c7 = false;
do {
int num = n % 10;
switch (num) {
case 3:
c3 = true;
break;
case 5:
c5 = true;
break;
case 7:
c7 = true;
break;
default:
return false;
... | replace | 36 | 37 | 36 | 37 | TLE | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
#define INF 1000000000
#define ll long long
#define pll pair<ll, ll>
using namespace std;
int main() {
ll ans = 0;
ll N;
cin >> N;
vector<char> num = {'3', '5', '7'};
queue<string> q;
q.push("3");
q.push("5");
q.push("7");
while (!q.empty()) {
string check = q.front();
... | #include <bits/stdc++.h>
#define INF 1000000000
#define ll long long
#define pll pair<ll, ll>
using namespace std;
int main() {
ll ans = 0;
ll N;
cin >> N;
vector<char> num = {'3', '5', '7'};
queue<string> q;
q.push("3");
q.push("5");
q.push("7");
while (!q.empty()) {
string check = q.front();
... | insert | 21 | 21 | 21 | 24 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const int mod = 1e9 + 7;
vector<ll> z;
void zzz(int i, ll j) {
z.push_back(j);
if (i < 9) {
zzz(i + 1, j * 10 + 3);
zzz(i + 1, j * 10 + 5);
zzz(i + 1, j * 10 + 7);
}
}
int main() {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1e9;
const int mod = 1e9 + 7;
vector<ll> z;
void zzz(int i, ll j) {
z.push_back(j);
if (i < 10) {
zzz(i + 1, j * 10 + 3);
zzz(i + 1, j * 10 + 5);
zzz(i + 1, j * 10 + 7);
}
}
int main() {
... | replace | 13 | 14 | 13 | 14 | 0 | |
p03212 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#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 ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;
int main() {
string N;
cin >> N;
int dp[1... | #include <bits/stdc++.h>
using namespace std;
#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 ALL(obj) (obj).begin(), (obj).end()
#define INF 1e9
typedef long long ll;
int main() {
string N;
cin >> N;
if (N.s... | insert | 13 | 13 | 13 | 19 | 0 | |
p03212 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
const string decimals = "753";
bool check(string &s, long n) {
if (stoi(s) > n) {
return false;
}
for (char c : decimals) {
if (s.find(c) == string::npos) {
return false;
}
}
return true;
}
int dfs(string s, long n) {
int res = ... | #include <iostream>
#include <string>
using namespace std;
const string decimals = "753";
bool check(string &s, long n) {
if (stoll(s) > n) {
return false;
}
for (char c : decimals) {
if (s.find(c) == string::npos) {
return false;
}
}
return true;
}
int dfs(string s, long n) {
int res =... | replace | 7 | 8 | 7 | 8 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.