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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02843 | C++ | Runtime Error | #include "bits/stdc++.h"
#define REP(i, num) for (int i = 0; i < (num); ++i)
#define LOOP(i) while (i--)
#define ALL(c) c.begin(), c.end()
#define PRINTALL(c) \
for (auto pitr = c.begin(); pitr != c.end(); ++pitr) { \
cout << *pitr;... | #include "bits/stdc++.h"
#define REP(i, num) for (int i = 0; i < (num); ++i)
#define LOOP(i) while (i--)
#define ALL(c) c.begin(), c.end()
#define PRINTALL(c) \
for (auto pitr = c.begin(); pitr != c.end(); ++pitr) { \
cout << *pitr;... | replace | 51 | 52 | 51 | 63 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int X;
cin >> X;
vector<vector<bool>> dp(7, vector<bool>(100001));
dp[0][0] = true;
for (int i = 0; i < 6; i++) {
int c = 100 + i;
for (int j = 0; j <= X; j++) {
dp[i + 1][j] = dp[i + 1][j] || dp[i][j];
if (dp[i + 1][j]) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int X;
cin >> X;
vector<vector<bool>> dp(7, vector<bool>(100505));
dp[0][0] = true;
for (int i = 0; i < 6; i++) {
int c = 100 + i;
for (int j = 0; j <= X; j++) {
dp[i + 1][j] = dp[i + 1][j] || dp[i][j];
if (dp[i + 1][j]) {
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int X;
cin >> X;
int num, frac;
num = X / 100;
frac = X % 100;
if ((frac + 1) / num <= 5)
cout << 1 << endl;
else
cout << 0 << endl;
return 0;
}
| #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 X;
cin >> X;
int num, frac;
num = X / 100;
frac = X % 100;
if (num != 0 && (frac / num < 5 || (frac / num == 5 && frac % num == 0)))
cout << 1 << endl;
else
cout <<... | replace | 11 | 12 | 11 | 12 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
int x;
cin >> x;
rep(i, 1000) {
rep(j, 1000) {
rep(k, 1000) {
rep(l, 1000) {
rep(m, 1000) {
rep(n, 1000) {
... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
int x;
cin >> x;
rep(i, x) {
if (100 * i <= x && x <= 105 * i) {
cout << '1' << endl;
return 0;
}
}
cout << '0' << endl;
ret... | replace | 9 | 24 | 9 | 13 | TLE | |
p02843 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
using namespace std;
typedef long long ll;
ll x;
ll a[6] = {100, 101, 102, 103, 104, 105};
set<ll> s;
void dfs(ll now) {
if (now > 100000)
return;
s.insert(now);
rep(i, 6) dfs(now + a[i]);
}... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
using namespace std;
typedef long long ll;
ll x;
ll a[6] = {100, 101, 102, 103, 104, 105};
set<ll> s;
void dfs(ll now) {
if (now > 100000)
return;
s.insert(now);
rep(i, 6) {
if (!s.count... | replace | 13 | 14 | 13 | 17 | TLE | |
p02843 | Python | Runtime Error | n = input()
num = int(n[0:-2])
yen = int(n[-2::])
if num * 5 >= yen:
print(1)
else:
print(0)
| n = input()
if len(n) >= 3:
num = int(n[0:-2])
yen = int(n[-2::])
if num * 5 >= yen:
print(1)
else:
print(0)
else:
print(0)
| replace | 1 | 5 | 1 | 8 | 0 | |
p02843 | Python | Runtime Error | x = input()
k = int(x[0:-2])
x = int(x[-2:])
k -= x / 5
if x % 5 == 0 and k >= 0:
print(1)
elif k > 0:
print(1)
else:
print(0)
| x = input()
if len(x) < 3:
print(0)
exit()
k = int(x[0:-2])
x = int(x[-2:])
k -= x / 5
if x % 5 == 0 and k >= 0:
print(1)
elif k > 0:
print(1)
else:
print(0)
| insert | 1 | 1 | 1 | 4 | 0 | |
p02843 | Python | Runtime Error | X = int(input())
dp = [0] * (100000)
dp[0] = 1
for i in range(X + 1):
if dp[i] == 1:
for j in range(6):
dp[i + 100 + j] = 1
if i + 100 + j == X:
print(1)
exit()
print(0)
| X = int(input())
dp = [0] * (100200)
dp[0] = 1
for i in range(X + 1):
if dp[i] == 1:
for j in range(6):
dp[i + 100 + j] = 1
if i + 100 + j == X:
print(1)
exit()
print(0)
| replace | 2 | 3 | 2 | 3 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main(void) {
int X;
cin >> X;
int cnt = X / 100;
int amari = X % 100; // 調整が必要な金額
if (cnt == 0) {
cout << "0" << endl;
return 0;
}
// 0
for (int i = 0; i <= cnt; i++) {
// 1
for (int j = 0; j <= cnt - i; j++) {
// 2
for (int k = 0... | #include <iostream>
using namespace std;
int main(void) {
int X;
cin >> X;
int cnt = X / 100;
int amari = X % 100; // 調整が必要な金額
if (cnt == 0) {
cout << "0" << endl;
return 0;
} else if (cnt >= 100) {
cout << "1" << endl;
return 0;
}
// 0
for (int i = 0; i <= cnt; i++) {
// 1
fo... | insert | 10 | 10 | 10 | 13 | TLE | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int x;
cin >> x;
vector<bool> t(100001, false);
for (int i = 0; i <= x; i++) {
if (i == 100 || i == 101 || i == 102 || i == 103 || i == 104 || i == 105) ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int x;
cin >> x;
vector<bool> t(200001, false);
for (int i = 0; i <= x; i++) {
if (i == 100 || i == 101 || i == 102 || i == 103 || i == 104 || i == 105) ... | replace | 12 | 13 | 12 | 13 | 0 | |
p02843 | C++ | Time Limit Exceeded | // #undef _DEBUG
// #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace std::chrono;
#define int long long
#define ll long long
auto start_time = system_clock::now();
//@formatter:off
#ifdef _DEBUG
// ... | // #undef _DEBUG
// #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace std::chrono;
#define int long long
#define ll long long
auto start_time = system_clock::now();
//@formatter:off
#ifdef _DEBUG
// ... | replace | 3,716 | 3,719 | 3,716 | 3,717 | TLE | |
p02843 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int x;
cin >> x;
if (x < 100) {
cout << 0 << endl;
return 0;
}
int amari = x % 100;
int sho = x / 100;
if (amari == 0) {
c... | #include <algorithm>
#include <iomanip>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int x;
cin >> x;
if (x < 100) {
cout << 0 << endl;
return 0;
}
int amari = x % 100;
int sho = x / 100;
if (amari == 0) {
c... | replace | 31 | 36 | 31 | 35 | TLE | |
p02843 | C++ | Runtime Error | #include <cstdio>
#include <cstdlib>
template <class T> inline void fr(T &a) {
T s = 0, w = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
w = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
s = s * 10 + ch - '0', ch = getchar();
a = w * s;
}
template <class T>... | #include <cstdio>
#include <cstdlib>
template <class T> inline void fr(T &a) {
T s = 0, w = 1;
char ch = getchar();
while (ch < '0' || ch > '9') {
if (ch == '-')
w = -1;
ch = getchar();
}
while (ch >= '0' && ch <= '9')
s = s * 10 + ch - '0', ch = getchar();
a = w * s;
}
template <class T>... | replace | 24 | 25 | 24 | 31 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
typedef long long ll;
int main() {
ll x;
cin >> x;
int res = x / 100;
int t = x % 100;
if (t / res < 5 || (t / res == 5 && t % res == 0)) {
cout << '1' << endl;
} else
cout << '0' << endl;
return 0... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
typedef long long ll;
int main() {
ll x;
cin >> x;
if (1 <= x && x < 100) {
cout << '0' << endl;
return 0;
}
int res = x / 100;
int t = x % 100;
if (t / res < 5 || (t / res == 5 && t % res == 0)) {... | insert | 9 | 9 | 9 | 13 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int rest = n - 100 * i;
if (rest >= 0 && rest <= i * 5) {
cout << 1 << endl;
return 0;
}
if (rest < 0) {
break;
}
}
puts(0);
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
cin >> n;
for (int i = 0; i < n; i++) {
int rest = n - 100 * i;
if (rest >= 0 && rest <= i * 5) {
cout << 1 << endl;
return 0;
}
if (rest < 0) {
break;
}
}
cout << 0 << endl;
return 0;
}
| replace | 15 | 16 | 15 | 16 | 0 | |
p02843 | C++ | Runtime Error | /*
template
ref1:https://github.com/tatyam-prime/kyopro_library
ref2:https://tatyam.hatenablog.com/entry/2019/12/15/003634
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using uint = unsigned;
using pcc = pair<char, char>;
using pii = pair<... | /*
template
ref1:https://github.com/tatyam-prime/kyopro_library
ref2:https://tatyam.hatenablog.com/entry/2019/12/15/003634
*/
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using uint = unsigned;
using pcc = pair<char, char>;
using pii = pair<... | replace | 579 | 580 | 579 | 580 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
const int mod = 1e9 + 7;
const int inf = 1 << 20;
const long long INF = 1LL << 60;
using namespace std;
typedef long long ll;
typedef pair<in... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
const int mod = 1e9 + 7;
const int inf = 1 << 20;
const long long INF = 1LL << 60;
using namespace std;
typedef long long ll;
typedef pair<in... | insert | 28 | 28 | 28 | 33 | TLE | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
long long t;
// cin >> t;
t = 1;
while (t--) {
int n, i;
cin >> n;
vector<int> v = {1... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long t;
// cin >> t;
t = 1;
while (t--) {
int n, i;
cin >> n;
vector<int> v = {100, 101, 102, 103, 104, 105};
int z = v.size();
int ispossible[1000001];
ispossible[0] = 1;
for (int i = 0; i < z; ++i) {
int value ... | replace | 4 | 10 | 4 | 5 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int x;
cin >> x;
int dp[100100] = {0};
int a[6] = {100, 101, 102, 103, 104, 105};
dp[0] = 1;
for (int i = 0; i < 6; i++) {
for (int j = 0; j < x; j++) {
if (dp[j] == 1) {
dp[j + a[i]] = 1;
}
}
}
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int x;
cin >> x;
int dp[101000] = {0};
int a[6] = {100, 101, 102, 103, 104, 105};
dp[0] = 1;
for (int i = 0; i < 6; i++) {
for (int j = 0; j < x; j++) {
if (dp[j] == 1) {
dp[j + a[i]] = 1;
}
}
}
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cstring>
#include <queue>
#define mp make_pair
#define pb push_back
#define p push
#define FOR(a, c) for (int a = 0; a < c; a++)
#define ll long long int
#define getI(a) scanf("%d", &a)
#define getII(a, b) scanf("%d%d", &a, &b)
#define getIII(a, b, c) scanf("%d%d%d", &a, &b, &c)
#de... | #include <bits/stdc++.h>
#include <cstring>
#include <queue>
#define mp make_pair
#define pb push_back
#define p push
#define FOR(a, c) for (int a = 0; a < c; a++)
#define ll long long int
#define getI(a) scanf("%d", &a)
#define getII(a, b) scanf("%d%d", &a, &b)
#define getIII(a, b, c) scanf("%d%d%d", &a, &b, &c)
#de... | replace | 51 | 52 | 51 | 52 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int X;
cin >> X;
int C;
C = X / 100;
if (C * 100 <= X && X <= C * 105) {
cout << 0 << endl;
return 1;
}
cout << 0 << endl;
} | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int X;
cin >> X;
int C;
C = X / 100;
if (C * 100 <= X && X <= C * 105) {
cout << 1 << endl;
return 0;
}
cout << 0 << endl;
} | replace | 10 | 12 | 10 | 12 | 1 | |
p02843 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
typedef long long ll;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
... | replace | 30 | 31 | 30 | 31 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define rep(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rrep(i, a, b) for (int i = int(a) - 1; i >= int(b); --i)
#define All(x) (x).begin(), (x).end()
#define r... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define rep(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rrep(i, a, b) for (int i = int(a) - 1; i >= int(b); --i)
#define All(x) (x).begin(), (x).end()
#define r... | replace | 861 | 862 | 861 | 862 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
const ll inf = 1e6 + 5;
typedef pair<int, bool> pib;
int main() {
int n;
cin >> n;
int goal = n % 100;
int item = n / 100;
if (goal == 0) {
cout << 1;
exit(0);
}
queue<int> q;
q.push(0);
vector<int>... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
const ll inf = 1e6 + 5;
typedef pair<int, bool> pib;
int main() {
int n;
cin >> n;
int goal = n % 100;
int item = n / 100;
if (goal == 0) {
cout << 1;
exit(0);
}
queue<int> q;
q.push(0);
vector<int>... | replace | 28 | 29 | 28 | 31 | TLE | |
p02843 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) (v).begin(), (v).end()
int main() {
int n;
cin >> n;
vector<bool> dp(n + 5, false);
if (n < 100) {
cout << 0 << endl;
... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) (v).begin(), (v).end()
int main() {
int n;
cin >> n;
vector<bool> dp(n + 10, false);
if (n < 100) {
cout << 0 << endl;
... | replace | 11 | 12 | 11 | 12 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
vector<int> d(x + 1);
if (x < 100) {
cout << '0';
return 0;
}
for (int i = 0; i < 100; i++)
d[i] = 0;
d[100] = d[101] = d[102] = d[103] = d[104] = d[105] = 1;
for (int i = 106; i < x + 1; i++) {
d[i] = (d[i - 10... | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
vector<int> d(x + 1);
if (x < 100) {
cout << '0';
return 0;
}
if (x < 106) {
cout << '1';
return 0;
}
for (int i = 0; i < 100; i++)
d[i] = 0;
d[100] = d[101] = d[102] = d[103] = d[104] = d[105] = 1;
for ... | insert | 11 | 11 | 11 | 15 | 0 | |
p02843 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
int X;
cin >> X;
if (X >= 2000) {
cout << 1 << endl;
return 0;
} else {
int S = X / 100;
int R = X % (100 * S);
// cout << S << " " << R << endl;
if (R <= S * 5) {
cout << 1 << endl;
ret... | #include <iostream>
#include <queue>
#include <vector>
using namespace std;
int main() {
int X;
cin >> X;
if (X >= 2000) {
cout << 1 << endl;
return 0;
} else if (X < 100) {
cout << 0 << endl;
return 0;
} else {
int S = X / 100;
int R = X % (100 * S);
// cout << S << " " << R << e... | insert | 10 | 10 | 10 | 13 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using vi = vector<int>;
using vvi = vector<vi>;
#define ote(x) cout << (x) << endl
#define all(x) (x).begin(), (x).end()
#define rp(i, s, e) for (int i = (s); i < (e); ++i)
#define rpz(i, e) rp(i, 0, e)
i... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using vi = vector<int>;
using vvi = vector<vi>;
#define ote(x) cout << (x) << endl
#define all(x) (x).begin(), (x).end()
#define rp(i, s, e) for (int i = (s); i < (e); ++i)
#define rpz(i, e) rp(i, 0, e)
i... | replace | 19 | 20 | 19 | 23 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define ll long long
using namespace std;
int main() {
string s;
cin >> s;
ll a = stoll(s);
while (true) {
if (a < 100) {
cout << 0 << endl;
exit(0);
... | #include <algorithm>
#include <climits>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define ll long long
using namespace std;
int main() {
string s;
cin >> s;
ll a = stoll(s);
while (true) {
if (a < 100) {
cout << 0 << endl;
exit(0);
... | insert | 63 | 63 | 63 | 65 | TLE | |
p02843 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
const int INF = 1 << 30;
const long long LINF = 1LL << 60;
bool dp[1000] = {};
int main() {
int x;
cin >> x;
dp[0] = true;
for (int i = 100; i <= ... | #include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long int ll;
const int INF = 1 << 30;
const long long LINF = 1LL << 60;
bool dp[1000001] = {};
int main() {
int x;
cin >> x;
dp[0] = true;
for (int i = 100; i ... | replace | 13 | 14 | 13 | 14 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MM = 1000000000;
ll mod = MM + 7;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define Rep(i, j, n) for (int i = j; i < n; i++)
#define all(vec) vec.begin(), vec.end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MM = 1000000000;
ll mod = MM + 7;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define Rep(i, j, n) for (int i = j; i < n; i++)
#define all(vec) vec.begin(), vec.end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;... | replace | 27 | 33 | 27 | 36 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
int judge = x / 100;
int calcu = x % 100;
int count = 0;
bool answer = true;
for (int i = 5;; i--) {
count += judge / i;
if (count > judge) {
answer = false;
break;
} else if (calcu == 0) {
answer =... | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
int judge = x / 100;
int calcu = x % 100;
int count = 0;
bool answer = true;
for (int i = 5; i != 0; i--) {
count += calcu / i;
if (count > judge) {
answer = false;
break;
} else if (calcu == 0) {
a... | replace | 11 | 13 | 11 | 13 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (n); ++i)
using namespace std;
int main() {
const int N = 6;
const vector<int> v = {100, 101, 102, 103, 104, 105};
int X;
cin >> X;
if (X < 100) {
cout << 0 << endl;
return 0;
}
vec... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i <= (n); ++i)
using namespace std;
int main() {
const int N = 6;
const vector<int> v = {100, 101, 102, 103, 104, 105};
int X;
cin >> X;
if (X < 100) {
cout << 0 << endl;
return 0;
} else i... | insert | 15 | 15 | 15 | 18 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int algo(int);
int main() {
int x;
cin >> x;
cout << algo(x) << endl;
return 0;
}
int algo(int price) {
if (price < 100)
return 0;
if (100 <= price && price <= 105)
return 1;
int answer = algo(price - 100) + algo(price - 101) + algo(price - 102) +
... | #include <iostream>
using namespace std;
int algo(int);
int main() {
int x;
cin >> x;
cout << algo(x) << endl;
return 0;
}
int algo(int price) {
int s100 = price / 100;
int a100 = price % 100;
if (a100 <= 5 * s100)
return 1;
else
return 0;
} | replace | 12 | 19 | 12 | 15 | TLE | |
p02843 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int x;
cin >> x;
bool dp[x + 1];
for (int i = 0; i <= x; i++)
dp[i] = false;
dp[0] = true;
for (int i = 0; i < x; i++) {
if (dp[i]) {
for (int j = 1; j <= 5; j++) {
dp[i + 100 + j] = true;
}
}
}
cout << dp[x] << endl;
... | #include <iostream>
using namespace std;
int main() {
int x;
cin >> x;
bool dp[x + 1];
for (int i = 0; i <= x; i++)
dp[i] = false;
dp[0] = true;
for (int i = 0; i < x; i++) {
if (dp[i]) {
for (int j = 0; j <= 5; j++) {
if (i + 100 + j <= x)
dp[i + 100 + j] = true;
}
... | replace | 11 | 13 | 11 | 14 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef long long ll;
typedef vector<ll> vint;
typedef vector<vector<ll>> vvint;
typedef vector<vector<vector<ll>>> vvvint;
typedef vector<string> vstring;
typedef vector<vector<string>> vvstring;
typedef vector<cha... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef long long ll;
typedef vector<ll> vint;
typedef vector<vector<ll>> vvint;
typedef vector<vector<vector<ll>>> vvvint;
typedef vector<string> vstring;
typedef vector<vector<string>> vvstring;
typedef vector<cha... | replace | 319 | 327 | 319 | 324 | TLE | |
p02843 | C++ | Runtime Error | // #include <bits/stdc++.h>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef vector<long long> vll, vLL;
type... | // #include <bits/stdc++.h>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <map>
#include <queue>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef vector<vector<int>> vvint;
typedef vector<long long> vll, vLL;
type... | replace | 41 | 42 | 41 | 42 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, ans = 0;
cin >> x;
for (int o = 0; 100 * o <= x; o++) {
for (int p = 0; 101 * p <= x; p++) {
for (int q = 0; 102 * q <= x; q++) {
for (int r = 0; 103 * r <= x; r++) {
for (int s = 0; 104 * s <= x; s++) {
for ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, ans = 0;
cin >> x;
if (x >= 2000) {
ans = 1;
} else {
for (int i = 0; i < 20; i++) {
if (i * 100 <= x && x <= i * 105) {
ans = 1;
break;
}
}
}
cout << ans << endl;
} | replace | 5 | 19 | 5 | 12 | TLE | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define V vector<long long>
#define VV vector<vector<long long>>
#define rep(i, n) for (ll(i) = 0; (i) < (n); ++(i))
using namespace std;
int main() {
ll x;
cin >> x;
V can(x + 1, 0);
rep(i, 6) can[100 + i] = 1;
for (ll i = 100; i <= x; i++) {
if (can[i] == 1... | #include <bits/stdc++.h>
#define ll long long
#define V vector<long long>
#define VV vector<vector<long long>>
#define rep(i, n) for (ll(i) = 0; (i) < (n); ++(i))
using namespace std;
int main() {
ll x;
cin >> x;
V can(x + 1, 0);
rep(i, 6) if (100 + i <= x) can[100 + i] = 1;
for (ll i = 0; i <= x; i++) {
... | replace | 11 | 13 | 11 | 13 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long ll;
typedef pair<ll, ll> P;
const ll mod = 1000000007;
const ll LINF = 1LL << 60;
co... | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long ll;
typedef pair<ll, ll> P;
const ll mod = 1000000007;
const ll LINF = 1LL << 60;
co... | replace | 26 | 27 | 26 | 27 | -11 | |
p02843 | 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 reps(i, a, b) for (int i = a; i < b; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
ll x;
cin >> x;
vector<int> vec(x + 1, ... | #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 reps(i, a, b) for (int i = a; i < b; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
ll x;
cin >> x;
vector<int> vec(max(x +... | replace | 11 | 12 | 11 | 12 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int x;
cin >> x;
vector<int> dp(x * 2);
dp[0] = 1;
for (int i = 0; i <= x; i++) {
if (!dp[i])
continue;
for (int j = 100; j <= 105; j++) {
dp[i + j] = 1;
}
}
cout << dp[x] << endl;
}
| #include <bits/stdc++.h>
#define int long long
using namespace std;
signed main() {
int x;
cin >> x;
vector<int> dp(x + 200);
dp[0] = 1;
for (int i = 0; i <= x; i++) {
if (!dp[i])
continue;
for (int j = 100; j <= 105; j++) {
dp[i + j] = 1;
}
}
cout << dp[x] << endl;
}
| replace | 7 | 8 | 7 | 8 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define fi first
#define se second
#define fastio \
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define fi first
#define se second
#define fastio \
... | replace | 85 | 87 | 85 | 91 | TLE | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = (int)(a); i <= (int)(n); ++i)
#define rrep(i, a, n) for (int i = (int)(a); i >= (int)(n); --i)
#define debug(x) cerr << #x << " = " << x << "\n"
#define debugv(x) \
rep(f, 0, (x.size() - 1)) cerr <<... | #include <bits/stdc++.h>
#define rep(i, a, n) for (int i = (int)(a); i <= (int)(n); ++i)
#define rrep(i, a, n) for (int i = (int)(a); i >= (int)(n); --i)
#define debug(x) cerr << #x << " = " << x << "\n"
#define debugv(x) \
rep(f, 0, (x.size() - 1)) cerr <<... | replace | 28 | 29 | 28 | 29 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
vector<bool> DP(100010);
for (int i = 100; i <= 105; i++)
DP[i] = true;
for (int i = 0; i < x; i++) {
for (int j = 100; j <= 105; j++) {
DP[i + j] = DP[i + j] or DP[i];
}
}
cout << DP[x] << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
vector<bool> DP(100110);
for (int i = 100; i <= 105; i++)
DP[i] = true;
for (int i = 0; i < x; i++) {
for (int j = 100; j <= 105; j++) {
DP[i + j] = DP[i + j] or DP[i];
}
}
cout << DP[x] << endl;
} | replace | 7 | 8 | 7 | 8 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int val = N / 100;
if (N * 20 / (val * 100) == 20)
cout << 1 << endl;
else if (N % 105 == 0)
cout << 1 << endl;
else
cout << 0 << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
int val = N / 100;
if (val == 0)
cout << 0 << endl;
else if (N * 20 / (val * 100) == 20)
cout << 1 << endl;
else if (N % 105 == 0)
cout << 1 << endl;
else
cout << 0 << endl;
}
| replace | 6 | 7 | 6 | 9 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string x;
cin >> x;
int matubi = stoi(x.substr(x.length() - 2, 2));
int sonota = stoi(x.substr(0, x.length() - 2));
if (sonota * 5 >= matubi) {
cout << 1 << endl;
} else {
cout << 0 << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string x;
cin >> x;
if (x.length() <= 2) {
cout << 0 << endl;
return 0;
}
int matubi = stoi(x.substr(x.length() - 2, 2));
int sonota = stoi(x.substr(0, x.length() - 2));
if (sonota * 5 >= matubi) {
cout << 1 << endl;
} else {
co... | insert | 6 | 6 | 6 | 10 | 0 | |
p02843 | C++ | Runtime Error | /*
* Pawan Harendra Mishra
*/
#include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
typedef long long ll;
typedef pair<ll, ll> pll;
int x;
vector<int> a = {100, 101, 102, 103, 104, 105};
vector<int> b(100001, -1);
bool reduce(int c) {
if (c == 0)
return true;
else if (c < 0)
r... | /*
* Pawan Harendra Mishra
*/
#include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
typedef long long ll;
typedef pair<ll, ll> pll;
int x;
vector<int> a = {100, 101, 102, 103, 104, 105};
vector<int> b(100001, -1);
bool reduce(int c) {
if (c == 0)
return true;
else if (c < 0)
r... | replace | 29 | 31 | 29 | 32 | -11 | |
p02843 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(x) (x).begin(), (x).end() // sortなどの引数を省略したい
#... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define ALL(x) (x).begin(), (x).end() // sortなどの引数を省略したい
#... | replace | 23 | 26 | 23 | 30 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long X, d[] = {100, 101, 102, 103, 104, 105};
bool dp[1 << 17];
int main() {
cin >> X;
for (int i = 100; i < 106; i++)
dp[i] = true;
for (int i = 100; i < 1 << 17; i++)
if (dp[i])
for (int j = 0; j < 6; j++)
dp[i + d[j]] = dp[i];
cout << dp[X] ... | #include <bits/stdc++.h>
using namespace std;
long X, d[] = {100, 101, 102, 103, 104, 105};
bool dp[1 << 17];
int main() {
cin >> X;
for (int i = 100; i < 106; i++)
dp[i] = true;
for (int i = 100; i <= 1e5; i++)
if (dp[i])
for (int j = 0; j < 6; j++)
dp[i + d[j]] = dp[i];
cout << dp[X] << ... | replace | 8 | 9 | 8 | 9 | 0 | |
p02843 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
int wk1, wk2;
wk1 = x / 100;
wk2 = x % 100;
bool flag = false;
for (int i = 0; i <= wk1; i++) {
for (int j = 0; j + i <= wk1; j++) {
for (int k = 0; i + j + k <= wk1; k++) {
for (int l = 0; i + j + k + l <= w... | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
cin >> x;
int wk1, wk2;
wk1 = x / 100;
wk2 = x % 100;
bool flag = false;
for (int i = 0; i <= wk1; i++) {
for (int j = 0; j + i <= wk1; j++) {
for (int k = 0; i + j + k <= wk1; k++) {
for (int l = 0; i + j + k + l <= w... | replace | 17 | 23 | 17 | 22 | TLE | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cou... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define io \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cou... | insert | 46 | 46 | 46 | 50 | 0 | |
p02843 | C++ | Runtime Error | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<vector<vector<int>>> vvvi;
typedef vector<vector<vector<vector<int>>>> vvvvi;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef vector<vecto... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<vector<vector<int>>> vvvi;
typedef vector<vector<vector<vector<int>>>> vvvvi;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
typedef vector<vecto... | insert | 34 | 34 | 34 | 43 | 0 | |
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rrep(i, n) rrepi(i, n, 0)
#define rrepi(i, a, b) for (int i = int(a); i > int(b); --i)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) repi(i, 0, n)
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rrep(i, n) rrepi(i, n, 0)
#define rrepi(i, a, b) for (int i = int(a); i > int(b); --i)
#define all(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end... | replace | 42 | 43 | 42 | 43 | 0 | |
p02843 | C++ | Runtime Error | // Dragon_warrior7(IITK)
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define nl cout << '\n'
#define sor(x) sort(x.begin(), x.end())
#define rev(v) reverse(v.begin(), v.end())
#define maxin(v) *max_element(v.begin(), v.end())
#define minin(v) *min_element(v.begin(), v.end())... | // Dragon_warrior7(IITK)
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define nl cout << '\n'
#define sor(x) sort(x.begin(), x.end())
#define rev(v) reverse(v.begin(), v.end())
#define maxin(v) *max_element(v.begin(), v.end())
#define minin(v) *min_element(v.begin(), v.end())... | replace | 42 | 43 | 42 | 43 | 0 | |
p02843 | C++ | Runtime Error | #include "bits/stdc++.h"
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
using LL = long long;
using VLL = std::vector<LL>;
using VVLL = std::vector<VLL>;
using VVVLL = std::vector<VVLL>;
using LD = long double;
using VLD = std::vector<LD>;
using VVLD = std::vector<VLD>;
using VVVLD = std::vector<VVL... | #include "bits/stdc++.h"
#define _USE_MATH_DEFINES
#include <math.h>
using namespace std;
using LL = long long;
using VLL = std::vector<LL>;
using VVLL = std::vector<VLL>;
using VVVLL = std::vector<VVLL>;
using LD = long double;
using VLD = std::vector<LD>;
using VVLD = std::vector<VLD>;
using VVVLD = std::vector<VVL... | replace | 91 | 92 | 91 | 92 | 0 | |
p02843 | C++ | Runtime Error | #include <iostream>
#include <vector>
using namespace std;
const int m[] = {100, 101, 102, 103, 104, 105};
int main() {
int x;
vector<bool> v(100000 + 10, false);
cin >> x;
for (int i = 0; i < 6; ++i) {
v[m[i]] = true;
}
for (int i = 100; i <= 100000; ++i) {
if (v[i] == true) {
for (int... | #include <iostream>
#include <vector>
using namespace std;
const int m[] = {100, 101, 102, 103, 104, 105};
int main() {
int x;
vector<bool> v(100000 + 300, false);
cin >> x;
for (int i = 0; i < 6; ++i) {
v[m[i]] = true;
}
for (int i = 100; i <= 100000; ++i) {
if (v[i] == true) {
for (in... | replace | 9 | 10 | 9 | 10 | -6 | free(): invalid next size (normal)
|
p02843 | C++ | Runtime Error | #include <bits/stdc++.h>
#define FOR(i, m, n) for (int i = m; i < (n); i++)
#define RFOR(i, m, n) for (int i = (m - 1); i >= 0; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, n, 0)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
using namespace std;
typedef long long ll;
const int... | #include <bits/stdc++.h>
#define FOR(i, m, n) for (int i = m; i < (n); i++)
#define RFOR(i, m, n) for (int i = (m - 1); i >= 0; i--)
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, n, 0)
#define ALL(v) v.begin(), v.end()
#define RALL(v) v.rbegin(), v.rend()
using namespace std;
typedef long long ll;
const int... | replace | 80 | 81 | 80 | 84 | 0 | |
p02844 | Python | Time Limit Exceeded | N = int(input())
S = input()
ans = 0
for i in range(1000):
T = str(i).zfill(3)
j = 0
for c in S:
if c == T[j]:
j += 1
if j > 2:
ans += 1
break
print(ans)
| N = int(input())
S = input()
ans = 0
d = [set() for _ in range(3)]
for i in range(N - 2):
if S[i] in d[0]:
continue
d[0].add(S[i])
for j in range(i + 1, N - 1):
if S[i] + S[j] in d[1]:
continue
d[1].add(S[i] + S[j])
for k in range(j + 1, N):
if S[i] + ... | replace | 3 | 12 | 3 | 17 | TLE | |
p02844 | Python | Time Limit Exceeded | def password():
for i in range(10):
for j in range(10):
for k in range(10):
yield [str(i), str(j), str(k)]
n = int(input())
s = input()
ans = 0
for perm in password():
j = 0
for i in range(n):
if perm[j] == s[i]:
j += 1
if j >= len(perm)... | def password():
for i in range(10):
for j in range(10):
for k in range(10):
yield [str(i), str(j), str(k)]
n = int(input())
s = input()
ans = 0
for perm in password():
if perm[0] in s:
a = s.find(perm[0])
if perm[1] in s[a + 1 :]:
b = s[a + 1 :]... | replace | 12 | 20 | 12 | 18 | TLE | |
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18
using namespace std;
int a[3];
int check(string s, int d) {
if (d == 3)
return 1;
if (s.size() == 0)
return 0;
if ((s[0] - '0') == a[d])
return check(s.substr(1), d + 1);
return check(s.substr(1), d);
}
... | #include <bits/stdc++.h>
#define ll long long int
#define MOD 1000000007
#define INF 1e18
using namespace std;
int a[3];
int check(string s, int d) {
if (d == 3)
return 1;
if (s.size() == 0)
return 0;
if ((s[0] - '0') == a[d])
return check(s.substr(1), d + 1);
return check(s.substr(1), d);
}
... | replace | 34 | 35 | 34 | 44 | TLE | |
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
string s;
cin >> n >> s;
set<string> secrets;
for (int i = 0; i < n - 2; i++) {
for (int j = i + 1; j < n - 1; j++) {
for (int k = j + 1;... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
int n;
string s;
cin >> n >> s;
set<string> secrets;
rep(i, 10) {
int pos1 = s.find(to_string(i));
if (pos1 == string::npos || pos1 > n - 3)
... | replace | 11 | 15 | 11 | 25 | TLE | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
cin >> n;
int ans = 0;
string s;
cin >> s;
int a1[20] = {}, a2[20] = {};
long long d[20][20][20] = {};
for (int i = 0; i < n - 2; i++) {
if (a1[s.at(i) - '0'] == 0) {
a1[s.at(i) - '0']++;
for (int j = i + 1; j < n - 1;... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int n;
cin >> n;
int ans = 0;
string s;
cin >> s;
int a1[20] = {}, a2[20] = {};
long long d[20][20][20] = {};
for (int i = 0; i < n - 2; i++) {
if (a1[s.at(i) - '0'] == 0) {
a1[s.at(i) - '0']++;
for (int j = i + 1; j < n - 1;... | replace | 22 | 23 | 22 | 23 | 0 | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int n;
cin >> n;
string s;
cin >> s;
vector<int> ints(n);
rep(i, n) ints[i] = s[i] - '0';
// 累積和
vector<vector<int>> sum(n, vector<int>(10));
sum[ints[0]][0]++;
rep(i, n... | #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;
string s;
cin >> s;
vector<int> ints(n);
rep(i, n) ints[i] = s[i] - '0';
// 累積和
vector<vector<int>> sum(n, vector<int>(10));
sum[0][ints[0]]++;
rep(i, n... | replace | 15 | 16 | 15 | 16 | 0 | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define all(cont) cont.begin(), cont.end()
#define foreach(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define fore(i, a, b) for (int i = a, almo5t = b; i < almo5t; ++i)
#define SZ(x) ((int)x.size())
#defin... | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define fst first
#define snd second
#define all(cont) cont.begin(), cont.end()
#define foreach(it, l) for (auto it = l.begin(); it != l.end(); it++)
#define fore(i, a, b) for (int i = a, almo5t = b; i < almo5t; ++i)
#define SZ(x) ((int)x.size())
#defin... | delete | 26 | 31 | 26 | 26 | 0 | |
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
string S;
cin >> N;
cin >> S;
int count = 0;
bool finished = false;
int tmp;
vector<int> digit(3);
for (int num = 0; num < 1000; num++) {
tmp = num;
for (int d = 2; d >= 0; d--) {
digit[d] = tmp % 10;
tmp /= 10;... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
string S;
cin >> N;
cin >> S;
int count = 0;
bool finished = false;
int tmp;
vector<int> digit(3);
for (int num = 0; num < 1000; num++) {
tmp = num;
for (int d = 2; d >= 0; d--) {
digit[d] = tmp % 10;
tmp /= 10;... | insert | 43 | 43 | 43 | 45 | TLE | |
p02844 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using pqg = priority_queue<ll, vector<ll>, greater<ll>>; // 1,3,5..
using pql = priority_queue<ll, vector<ll>>; // 5, 3, 1...
using p... | #include <algorithm>
#include <bits/stdc++.h>
#include <iostream>
#include <utility>
#include <vector>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using pqg = priority_queue<ll, vector<ll>, greater<ll>>; // 1,3,5..
using pql = priority_queue<ll, vector<ll>>; // 5, 3, 1...
using p... | insert | 37 | 37 | 37 | 38 | TLE | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
int main() {
int n;
string s;
cin >> n >> s;
int ans = 0;
for (int i = 0; i < 1000; +... | #include <bits/stdc++.h>
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pb push_back
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
int main() {
int n;
string s;
cin >> n >> s;
int ans = 0;
for (int i = 0; i < 1000; +... | replace | 19 | 20 | 19 | 20 | 0 | |
p02844 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bits/stdc++.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
us... | #include <algorithm>
#include <assert.h>
#include <bits/stdc++.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
us... | replace | 27 | 28 | 27 | 28 | 0 | |
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
int n;
string s;
cin >> n >> s;
set<int> lucky;
for (int i = 0; i < n - 2; i++) {
for (int j = i + 1; j < n - 1; j++) {
for (int k = j ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define all(v) v.begin(), v.end()
using namespace std;
typedef long long ll;
int main() {
int n;
string s;
cin >> n >> s;
set<int> lucky;
int dig1, dig2, dig3;
for (int i = 0; i < 10; i++) {
for (int j = 0; j < 10; j++) {
f... | replace | 12 | 17 | 12 | 36 | TLE | |
p02844 | Python | Runtime Error | N = int(input())
S = input()
ans = 0
for i in range(10):
for j in range(10):
for k in range(10):
fi = S.find(S[i])
fj = S.find(S[j])
fk = S.find(S[k])
if fi >= 0 and fj >= 0 and fk >= 0 and fi < fj and fj < fk:
ans += 1
print(ans)
| N = int(input())
S = input()
ans = 0
for i in range(10):
for j in range(10):
for k in range(10):
fi = S.find(str(i))
if fi < 0:
continue
fj = S[fi + 1 :].find(str(j))
if fj < 0:
continue
fk = S[fi + fj + 2 :].find(s... | replace | 7 | 12 | 7 | 17 | IndexError: string index out of range | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02844/Python/s291909677.py", line 10, in <module>
fk = S.find(S[k])
IndexError: string index out of range
|
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
string S;
cin >> S;
int res = 0;
vector<vector<int>> done(10, vector<int>(10, 0));
for (int i = 0; i < N; ++i) {
vector<int> suf_cnt(10, 0);
int occ_cnt = 0;
f... | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
cin.tie(nullptr);
int N;
cin >> N;
string S;
cin >> S;
int res = 0;
char c[3];
for (c[0] = '0'; c[0] <= '9'; ++c[0]) {
for (c[1] = '0'; c[1] <= '9'; ++c[1]) {
for (c[2] = '0'; c[2] <= '9'; ++c[2])... | replace | 13 | 26 | 13 | 24 | TLE | |
p02844 | Python | Runtime Error | n = int(input())
s = input()
candidates = [0 for i in range(10**3)]
count = 0
for i in range(1000):
tmp_pass = f"{i:03}"
index_0 = s.find(tmp_pass[0])
if index_0 != -1 and index_0 < len(s) - 2:
s_1 = s[index_0 + 1 :]
index_1 = s_1.find(tmp_pass[1])
if index_1 != -1 and index_1 < l... | n = int(input())
s = input()
candidates = [0 for i in range(10**3)]
count = 0
for i in range(1000):
tmp_pass = "{:03}".format(i)
index_0 = s.find(tmp_pass[0])
if index_0 != -1 and index_0 < len(s) - 2:
s_1 = s[index_0 + 1 :]
index_1 = s_1.find(tmp_pass[1])
if index_1 != -1 and ind... | replace | 7 | 8 | 7 | 8 | 0 | |
p02844 | Python | Time Limit Exceeded | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
N = int(input())
S = input().rstrip()
ans = 0
for i in range(1000):
t = str(i).zfill(3)
ti = 0
for j in range(N):
if S[j] == t[ti]:
ti += 1
if ti == 3:
break
if ti == 3:
ans += 1
print(... | import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
N = int(input())
S = input().rstrip()
ans = 0
for i in range(1000):
t = str(i).zfill(3)
t1 = S.find(t[0])
if t1 == -1:
continue
t2 = S.find(t[1], t1 + 1)
if t2 == -1:
continue
t3 = S.find(t[2], t2 + 1)
if t... | replace | 11 | 19 | 11 | 21 | TLE | |
p02844 | Python | Time Limit Exceeded | import sys
input = sys.stdin.readline
n = int(input())
s = input()
ans = 0
for i in range(1000):
cnt = 0
if i < 100:
if i < 10:
match = "00" + str(i)
else:
match = "0" + str(i)
else:
match = str(i)
for j in range(n):
if s[j] == match[cnt]:
... | import sys
input = sys.stdin.readline
n = int(input())
s = input()
ans = 0
for i in range(1000):
cnt = 0
if i < 100:
if i < 10:
match = "00" + str(i)
else:
match = "0" + str(i)
else:
match = str(i)
for S in s:
if S == match[cnt]:
cn... | replace | 18 | 20 | 18 | 20 | TLE | |
p02844 | Python | Time Limit Exceeded | n = int(input())
S = input()
ans = 0
for i in range(1000):
a = "{0:03d}".format(i)
f1, f2 = False, False
for s in S:
if not f1 and s == a[0]:
f1 = True
continue
if f1 and not f2 and s == a[1]:
f2 = True
continue
if f1 and f2 and s == a... | n = int(input())
S = input()
ans = 0
for i in range(1000):
a = "{0:03d}".format(i)
if a[0] in S:
idx1 = S.index(a[0])
S1 = S[idx1 + 1 :]
if a[1] in S1:
idx2 = S1.index(a[1])
S2 = S1[idx2 + 1 :]
if a[2] in S2:
ans += 1
print(ans)
| replace | 6 | 17 | 6 | 14 | TLE | |
p02844 | Python | Time Limit Exceeded | N = int(input())
S = input()
ans = 0
for i in range(10):
for j in range(10):
for k in range(10):
hit = 0
for c in S:
c_ = int(c)
if hit == 0 and c_ == i:
hit += 1
elif hit == 1 and c_ == j:
hit +... | N = int(input())
S = input()
ans = 0
for i in range(10):
ind_i = S.find(str(i))
if ind_i != -1:
S2 = S[ind_i + 1 :]
for j in range(10):
ind_j = S2.find(str(j))
if ind_j != -1:
S3 = S2[ind_j + 1 :]
for k in range(10):
cn... | replace | 5 | 17 | 5 | 18 | TLE | |
p02844 | Python | Time Limit Exceeded | # 000~999で決め打ちして数える
n = int(input())
s = input()
ans = 0
for i in range(0, 1000):
t = format(i, "0>3")
idx = 0
for c in s:
if c == t[idx]:
idx += 1
if idx == 3:
ans += 1
break
print(ans)
| # 000~999で決め打ちして数える
# TLEになるんだけどこれそんなに重いか?????
n = int(input())
s = input()
ans = 0
for i in range(0, 1000):
t = format(i, "0>3")
idx = 0
for c in s:
if c == t[idx]:
idx += 1
if idx == 3:
ans += 1
break
print(ans)
| insert | 1 | 1 | 1 | 3 | TLE | |
p02844 | Python | Time Limit Exceeded | n = int(input())
s = map(int, input())
dp = tuple([0] * 1000 for _ in range(4))
dp[0][0] = 1
# dp[x][int(str)]:=x文字のstrは構成可能か?0/1
for x in s:
for k in range(2, -1, -1):
for incomplete_key in range(100):
dp[k + 1][incomplete_key * 10 + x] |= dp[k][incomplete_key]
print(sum(dp[3]))
# dp
| n = int(input())
s = map(int, input())
dp = tuple([0] * 1000 for _ in range(4))
dp[0][0] = 1
# dp[x][int(str)]:=x文字のstrは構成可能か?0/1
for x in s:
for incomplete_key in range(100):
dp[3][incomplete_key * 10 + x] |= dp[2][incomplete_key]
for incomplete_key in range(10):
dp[2][incomplete_key * 10 + x... | replace | 8 | 11 | 8 | 13 | TLE | |
p02844 | Python | Time Limit Exceeded | N = int(input())
S = input()
ans = set()
for i in range(N - 2):
for j in range(i + 1, N - 1):
for k in range(j + 1, N):
ans.add(S[i] + S[j] + S[k])
print(len(ans))
| N = int(input())
S = input()
ans = set()
for i in range(10):
i_index = S.find(str(i))
if i_index == -1:
continue
for j in range(10):
j_index = S.find(str(j), i_index + 1)
if j_index == -1:
continue
for k in range(10):
k_index = S.find(str(k), j_index ... | replace | 4 | 8 | 4 | 17 | TLE | |
p02844 | Python | Runtime Error | from sys import stdin
def main():
N = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()
count = 0
for i in range(1000):
left = 0
not_found = False
for c in f"{i:03}":
for j in range(left, N):
if S[j] == c:
left = j + 1
... | from sys import stdin
def main():
N = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()
count = 0
for i in range(1000):
left = 0
not_found = False
for c in "{:03}".format(i):
for j in range(left, N):
if S[j] == c:
left ... | replace | 10 | 11 | 10 | 11 | 0 | |
p02844 | Python | Time Limit Exceeded | from itertools import combinations
N, S = int(input()), input()
result = set()
for indexes in combinations(range(N, 0, -1), N - 3):
tmp = S
for i in indexes:
tmp = tmp[: i - 1] + tmp[i:]
result.add(tmp)
print(len(result))
| N = input()
S = input()
count = 0
for i in range(1000):
n = "{:03d}".format(i)
n1, n2, n3 = n[0], n[1], n[2]
i1 = S.find(n1)
if -1 < i1 < len(S) - 2:
S1 = S[i1 + 1 :]
i2 = S1.find(n2)
if -1 < i2 < len(S1) - 1:
S2 = S1[i2 + 1 :]
i3 = S2.find(n3)
... | replace | 0 | 10 | 0 | 17 | TLE | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n;
string s;
bool dp[30000][4][1000];
int main() {
cin >> n >> s;
dp[0][0][0] = true;
for (int i = 0; i < n; ++i) {
for (int j = 0; j <= 3; ++j) {
for (int k = 0; k <= 999; ++k) {
if (dp[i][j][k] == false)
continue;
dp[i + 1][... | #include <bits/stdc++.h>
using namespace std;
int n;
string s;
bool dp[30009][4][1009];
int main() {
cin >> n >> s;
dp[0][0][0] = true;
for (int i = 0; i < n; ++i) {
for (int j = 0; j <= 3; ++j) {
for (int k = 0; k <= 999; ++k) {
if (dp[i][j][k] == false)
continue;
dp[i + 1][... | replace | 5 | 6 | 5 | 6 | -11 | |
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#ifdef ENABLE_DEBUG_OUTPUT
#define DEBUG_LOG(s) cout << s << endl;
#else
#define DEBUG_LOG(s) void();
#endif
int dp_solve(const int n, const string &s) {
// x : s.size()
// y : use cnt
// z ; lucky number
vector<vector<vector<bool>>> dp(
n + 1, vector<vector<... | #include <bits/stdc++.h>
using namespace std;
#ifdef ENABLE_DEBUG_OUTPUT
#define DEBUG_LOG(s) cout << s << endl;
#else
#define DEBUG_LOG(s) void();
#endif
int dp_solve(const int n, const string &s) {
// x : s.size()
// y : use cnt
// z ; lucky number
vector<vector<vector<bool>>> dp(
n + 1, vector<vector<... | replace | 18 | 19 | 18 | 19 | TLE | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
bool dp[3000][4][1010];
int main() {
int n;
cin >> n;
string s;
cin >> s;
dp[0][0][0] = true;
REP(i, n) REP(j, 4) REP(k, 1000) {
if (dp[i][j][k] == false)
continue;
dp[i + 1][j][k] = true;
if (... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
using namespace std;
bool dp[30001][4][1009];
int main() {
int n;
cin >> n;
string s;
cin >> s;
dp[0][0][0] = true;
REP(i, n) REP(j, 4) REP(k, 1000) {
if (dp[i][j][k] == false)
continue;
dp[i + 1][j][k] = true;
if ... | replace | 4 | 5 | 4 | 5 | 0 | |
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
int main(void) {
using namespace std;
long n;
cin >> n;
string s;
cin >> s;
bitset<1000> st;
long r = 0;
for (int i = 0; i < n; i++)
for (int j = i + 1; j < n; j++)
for (int k = j + 1; k < n; k++) {
long t = 100 * (s[i] - '0') + 10 * (s[j] - '0') + (s[k] -... | #include <bits/stdc++.h>
int main(void) {
using namespace std;
long n;
cin >> n;
string s;
cin >> s;
bitset<1000> st;
long r = 0;
for (int i = 0; i < 1000; i++) {
long a = i / 100;
long b = (i / 10) % 10;
long c = i % 10;
int k = 0;
while (k < n && s[k++] - '0' != a)
;
... | replace | 14 | 21 | 14 | 28 | TLE | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
string s;
cin >> s;
int ans = 0;
for (char i = '0'; i <= '9'; i++) {
for (char j = '0'; j <= '9'; j++) {
for (char k = '0'; k <= '9'; k++) {
for (int a = 0; a < N - 2; a++) {
if (s.at(a) == i) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
cin >> N;
string s;
cin >> s;
int ans = 0;
for (char i = '0'; i <= '9'; i++) {
for (char j = '0'; j <= '9'; j++) {
for (char k = '0'; k <= '9'; k++) {
for (int a = 0; a < N - 2; a++) {
if (s.at(a) == i) {
... | replace | 13 | 14 | 13 | 14 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 4) >= this->size() (which is 4)
|
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int cnt = 0;
string s;
void f(int i) {
int first = i / 100;
int second = (i - first * 100) / 10;
int third = i % 10;
for (int a = 0; a + 2 < s.size(); a++) {
if (s[a] - '0' == first) {
for (int b = a + 1; b + 1 < s.size(); b++) {
if (s[b] - '0' == ... | #include <bits/stdc++.h>
using namespace std;
int cnt = 0;
string s;
void f(int i) {
int first = i / 100;
int second = (i - first * 100) / 10;
int third = i % 10;
int k = 0;
int c[3] = {first, second, third};
for (int a = 0; a < s.size(); a++) {
if (s[a] - '0' == c[k])
k++;
if (k == 3) {
... | replace | 8 | 19 | 8 | 16 | TLE | |
p02844 | C++ | Runtime Error | typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll n;
std::cin >> n;
string s;
std::cin >> s;
vector<vector<vector<bool>>> done(10,
vector<vector<bool>>(10, vector<bool>(10)));
ll res = 0;
vector<ll> dp1(n, 0);
vector<vector<ll>> dp2... | typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll n;
std::cin >> n;
string s;
std::cin >> s;
vector<vector<vector<bool>>> done(10,
vector<vector<bool>>(10, vector<bool>(10)));
ll res = 0;
vector<ll> dp1(10, 0);
vector<vector<ll>> dp... | replace | 13 | 14 | 13 | 14 | 0 | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = int(a); i < int(b); ++i)
#define SIZE 10005
#define INF 1000000005LL
#define MOD 1000000007
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
int n;
string s;
int a[12];
int c[SIZE][12];
int b[11][11][11];
int main() {
cin >> n >> s... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = int(a); i < int(b); ++i)
#define SIZE 30005
#define INF 1000000005LL
#define MOD 1000000007
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;
int n;
string s;
int a[12];
int c[SIZE][12];
int b[11][11][11];
int main() {
cin >> n >> s... | replace | 2 | 3 | 2 | 3 | 0 | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n + 1; i++)
#define all(A) A.begin(), A.end()
typedef long long ll;
int main() {
int n;
cin >> n;
string s;
cin >> s;
bool dp[30001][4][1000] = {};
dp[0][0][0] = 1;
rep(i, n)... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n + 1; i++)
#define all(A) A.begin(), A.end()
typedef long long ll;
int main() {
int n;
cin >> n;
string s;
cin >> s;
bool dp[30010][4][1000] = {};
dp[0][0][0] = 1;
rep(i, n)... | replace | 12 | 13 | 12 | 13 | -11 | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n + 1; i++)
#define all(A) A.begin(), A.end()
typedef long long ll;
int main() {
int n;
cin >> n;
string s;
cin >> s;
bool dp[30002][5][1000] = {};
dp[0][0][0] = 1;
rep(i, n)... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i < n + 1; i++)
#define all(A) A.begin(), A.end()
typedef long long ll;
int main() {
int n;
cin >> n;
string s;
cin >> s;
bool dp[30010][4][1000] = {};
dp[0][0][0] = 1;
rep(i, n)... | replace | 12 | 13 | 12 | 13 | -11 | |
p02844 | C++ | Time Limit Exceeded | // include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<LL, LL> PLL;
// container util
//------------------... | // include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<LL, LL> PLL;
// container util
//------------------... | replace | 121 | 129 | 121 | 127 | TLE | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, n) for (int i = 0; i < n; i++)
#define UNIQUE(v) \
v.erase(unique(v.begin(), v.end()), v.end()) // sortしてから使う
#define INF 2147483647
#define LLINF... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, n) for (int i = 0; i < n; i++)
#define UNIQUE(v) \
v.erase(unique(v.begin(), v.end()), v.end()) // sortしてから使う
#define INF 2147483647
#define LLINF... | replace | 17 | 18 | 17 | 20 | 0 | |
p02844 | C++ | Runtime Error | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<int> key(1000, 0);
int n;
string s;
cin >> n;
cin >> s;
vector<int> si(n);
{
for (int i = 0; i < n; ++i) {
char temp = s[i];
si[i] = atoi(&temp);
}
}
int ret = 0;
int imax = n - 3;
... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<int> key(1000, 0);
int n;
string s;
cin >> n;
cin >> s;
vector<int> si(n);
{
for (int i = 0; i < n; ++i) {
if (s[i] == '0') {
si[i] = 0;
} else if (s[i] == '1') {
si[i] = 1;
... | replace | 14 | 16 | 14 | 35 | 0 | |
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define mod 1000000007
#define inf 1000000000
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define popcount(x) __builtin_popcountll(x)
const long double PI = acos(-1);
ll gcd(ll a, ll b) { return b ? gcd(b, a... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define mod 1000000007
#define inf 1000000000
#define all(x) (x).begin(), (x).end()
#define pb push_back
#define popcount(x) __builtin_popcountll(x)
const long double PI = acos(-1);
ll gcd(ll a, ll b) { return b ? gcd(b, a... | replace | 23 | 32 | 23 | 34 | TLE | |
p02844 | Python | Time Limit Exceeded | n = int(input())
s = input()
pattern = [tuple(s[:3])]
for c in s[3:]:
for i in range(len(pattern)):
p1, p2, p3 = pattern[i]
if (p1, p2, c) not in pattern:
pattern.append((p1, p2, c))
if (p1, p3, c) not in pattern:
pattern.append((p1, p3, c))
if (p2, p3, c) not... | n = int(input())
s = input()
cnt = 0
for i in range(1000):
p = str(i).zfill(3)
p1 = s.find(p[0])
if p1 == -1:
continue
p2 = s.find(p[1], p1 + 1)
if p2 == -1:
continue
p3 = s.find(p[2], p2 + 1)
if p3 == -1:
continue
cnt += 1
print(cnt)
| replace | 2 | 13 | 2 | 17 | TLE | |
p02844 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// C++14 (GCC 5.4.1)
#define LLINF (1LL << 60)
typedef long long ll;
#define mod 1000000007
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define rrepd(i, a, b) for (int i = (a); i >= (b); i--)
template <typename T> inline bool ch... | #include <bits/stdc++.h>
using namespace std;
// C++14 (GCC 5.4.1)
#define LLINF (1LL << 60)
typedef long long ll;
#define mod 1000000007
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define rrepd(i, a, b) for (int i = (a); i >= (b); i--)
template <typename T> inline bool ch... | replace | 71 | 76 | 71 | 84 | TLE | |
p02844 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
void SMTB2019D() {
int N;
cin >> N;
string S;
cin >> S;
vi d1(10, -1);
for (int k = 0; k < N; ++k) {
int i ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
void SMTB2019D() {
int N;
cin >> N;
string S;
cin >> S;
vi d1(10, -1);
for (int k = 0; k < N; ++k) {
int i ... | replace | 21 | 22 | 21 | 22 | 0 | |
p02844 | C++ | Runtime Error | /**
* @brief : c++ code for AtCoder
* @author : rk222
* @created: 2020.03.06 15:01:38
*/
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>... | /**
* @brief : c++ code for AtCoder
* @author : rk222
* @created: 2020.03.06 15:01:38
*/
#define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>... | replace | 184 | 185 | 184 | 185 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.