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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02913 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
#define rep(i, n) for (ll i = 0; i < n; i++)... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vector<ll>> vvl;
#define rep(i, n) for (ll i = 0; i < n; i++)... | replace | 33 | 34 | 33 | 35 | -11 | |
p02913 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
typedef char SINT8;
typedef short SINT16;
typedef int SINT32;
typedef long long SINT64;
typedef double DOUBLE;
#define MAX(a, b) ((a) > (b) ? ... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
typedef char SINT8;
typedef short SINT16;
typedef int SINT32;
typedef long long SINT64;
typedef double DOUBLE;
#define MAX(a, b) ((a) > (b) ? ... | replace | 144 | 146 | 144 | 146 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
const ll MOD = 1e9 + 7;
const ll inf = (LLONG_MAX >> 2);
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
string s;
cin >> n >> s;
ll ans = 0;
for (ll l = n / 2; l > 0; --l) {
if (l <= ans)
break;
for (ll i = 0; i < n; ... | #include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
const ll MOD = 1e9 + 7;
const ll inf = (LLONG_MAX >> 2);
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
string s;
cin >> n >> s;
ll ans = 0;
for (ll l = n - 1; l > 0; --l) {
ll crt = 0;
for (ll i = 0; i + l < n; ++i) {
... | replace | 12 | 23 | 12 | 20 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<int> z_algorithm(string s) {
vector<int> a(s.size());
int c = 0;
for (int i = 1; i < s.size(); i++) {
if (i + a[i - c] < c + a[c]) {
a[i] = a[i - c];
} else {
int j = max(0, c + a[c] - i);
while (i + j ... | #include <iostream>
#include <string>
#include <vector>
using namespace std;
vector<int> z_algorithm(string s) {
vector<int> a(s.size());
int c = 0;
for (int i = 1; i < s.size(); i++) {
if (i + a[i - c] < c + a[c]) {
a[i] = a[i - c];
} else {
int j = max(0, c + a[c] - i);
while (i + j ... | insert | 17 | 17 | 17 | 18 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef u... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef u... | replace | 44 | 51 | 44 | 52 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "../../dump.hpp"
#else
#define dump(...)
#endif
#define int ll
#define rep(i, n) for (int i = 0, i##_cond = (n); i < i##_cond; ++i)
#define FOR(i, a, b) for (int i = (a), i##_cond = (b); i < i##_cond; ++i)
#define ROF(i, a, b) ... | #include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "../../dump.hpp"
#else
#define dump(...)
#endif
#define int ll
#define rep(i, n) for (int i = 0, i##_cond = (n); i < i##_cond; ++i)
#define FOR(i, a, b) for (int i = (a), i##_cond = (b); i < i##_cond; ++i)
#define ROF(i, a, b) ... | replace | 102 | 104 | 102 | 103 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define vi vector<int>
#define br cout << "\n";
#define all(x) (x).begin(), (x).end()
#define tr(c, i) for (auto i : c)
#define pii pair<int, int>
#define fast_io() ... | #include <bits/stdc++.h>
#define ll long long int
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define vi vector<int>
#define br cout << "\n";
#define all(x) (x).begin(), (x).end()
#define tr(c, i) for (auto i : c)
#define pii pair<int, int>
#define fast_io() ... | replace | 28 | 29 | 28 | 29 | 127 | /tmp/39d3ed9e-dd4c-4b99-85ab-b18a4b004228.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
|
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m, i, j, k, l, ma, res = 0;
vector<int> v[26];
string s;
cin >> n;
cin >> s;
for (i = n - 1; i >= 0; i--)
v[(int)(s[i] - 'a')].push_back(i);
for (i = 0; i < n - 1; i++) {
m = (int)... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, m, i, j, k, l, ma, res = 0;
vector<int> v[26];
string s;
cin >> n;
cin >> s;
for (i = n - 1; i >= 0; i--)
v[(int)(s[i] - 'a')].push_back(i);
for (i = 0; i < n - 1; i++) {
m = (int)... | replace | 28 | 32 | 28 | 31 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// debug
#define d(x) cerr << #x ":" << x << endl;
#define dd(x, y) cerr << "(" #x "," #y "):(" << x << "," << y << ")" << endl;
#define ddd(x, y, z) \
cerr << "(" #x "," #y "," #z "):(" << x << "," << y << "," << z << ")" \
... | #include <bits/stdc++.h>
// debug
#define d(x) cerr << #x ":" << x << endl;
#define dd(x, y) cerr << "(" #x "," #y "):(" << x << "," << y << ")" << endl;
#define ddd(x, y, z) \
cerr << "(" #x "," #y "," #z "):(" << x << "," << y << "," << z << ")" \
... | replace | 66 | 67 | 66 | 67 | TLE | |
p02913 | Python | Runtime Error | N = int(input())
S = input()
ans = 0
# 2文字以上
for i in range(0, N - 3):
for j in range(i + 2, N):
if S[i : i + 1] == S[j : j + 1]:
length, max_length = 2, j
i, j = i + 1, j + 1
while True:
if i + 1 == max_length or j + 1 == N:
break
... | N = int(input())
S = input()
ans = 0
left, right = 0, 1
while right < N:
s = S[left:right]
if s in S[right:]:
ans = max(ans, len(s))
right += 1
else:
left += 1
print(ans)
| replace | 4 | 31 | 4 | 12 | 0 | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1000000007;
// const ll MOD = 998244353;
const ll INF = MOD * MOD;
const long double EPS = 1e-12;
struct mint {
ll x;
mint(ll x = 0) : x((x % MOD + MOD) % MOD) {}
mint operator-() const { return mint(-x); }... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ll MOD = 1000000007;
// const ll MOD = 998244353;
const ll INF = MOD * MOD;
const long double EPS = 1e-12;
struct mint {
ll x;
mint(ll x = 0) : x((x % MOD + MOD) % MOD) {}
mint operator-() const { return mint(-x); }... | replace | 2,218 | 2,219 | 2,218 | 2,219 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int n;
string str;
bool check(int mid) {
for (int i = 0; i < n - mid; i++) {
for (int j = i + mid; j < n; j++) {
if (str[i] != str[j])
continue;
if (str.substr(i, mid) == str.substr(j, mid)) {
return true;
}
}
}
... | #include <iostream>
#include <string>
using namespace std;
int n;
string str;
bool check(int mid) {
for (int i = 0; i < n - mid; i++) {
if (string(str.begin() + i + mid, str.end()).find(str.substr(i, mid)) !=
string::npos) {
return true;
}
}
return false;
}
int main() {
cin >> n;
cin... | replace | 10 | 16 | 10 | 13 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T>... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T>... | replace | 25 | 26 | 25 | 26 | 0 | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define fi first
#define sc second
#define ALL(x) x.begin(), x.end()
#define RALL(X) x.begin(), x.end()
#define FOR(i, n, k) for (i = 0; i < n; i += k)
#define FO(i, n, k) for (i = 1; i <= n; i += k)
#define CLEAR(a, b) memset... | #include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define pii pair<int, int>
#define fi first
#define sc second
#define ALL(x) x.begin(), x.end()
#define RALL(X) x.begin(), x.end()
#define FOR(i, n, k) for (i = 0; i < n; i += k)
#define FO(i, n, k) for (i = 1; i <= n; i += k)
#define CLEAR(a, b) memset... | replace | 20 | 21 | 20 | 21 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<ll>;
template <class T> using vc = vector<T>;
template <class T> using vvc = vector<vector<T>>;
#define eb emplace_back
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (ll i = 0; i < (n); i++)
#def... | replace | 66 | 74 | 66 | 71 | TLE | |
p02913 | C++ | Runtime Error | #include <iostream>
using namespace std;
int table[5001][5001];
int main() {
int N;
cin >> N;
char S[5001];
cin >> S;
for (int diff = 1; diff < N; diff++) {
for (int i2 = N - 1; i2 >= 0; i2--) {
int i1 = i2 - diff;
if (i2 < 0)
break;
if (S[i1] == S[i2]) {
if (i2 == N -... | #include <iostream>
using namespace std;
int table[5001][5001];
int main() {
int N;
cin >> N;
char S[5001];
cin >> S;
for (int diff = 1; diff < N; diff++) {
for (int i2 = N - 1; i2 >= 0; i2--) {
int i1 = i2 - diff;
if (i1 < 0)
break;
if (S[i1] == S[i2]) {
if (i2 == N -... | replace | 14 | 15 | 14 | 15 | 127 | /tmp/f4245b20-8c0c-486c-83b1-3064a1f2fcd0.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
|
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, P> P1;
typedef pair<P, P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i, x) for ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<int, P> P1;
typedef pair<P, P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define mod 1000000007
#define fi first
#define sc second
#define rep(i, x) for ... | insert | 46 | 46 | 46 | 48 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <array>
#include <iostream>
#include <vector>
int main() {
int N;
std::cin >> N;
std::string S;
std::cin >> S;
// 各アルファベットの登場箇所
std::array<std::vector<short>, 26 * 26> top;
for (int i = 0; i < (N - 1); ++i) {
top[(((size_t)S[i] - 'a') * 26) + (size_t)S[(size_t)i + 1] - 'a'].push_back(
... | #include <array>
#include <iostream>
#include <vector>
int main() {
int N;
std::cin >> N;
std::string S;
std::cin >> S;
// 各アルファベットの登場箇所
std::array<std::vector<short>, 26 * 26> top;
for (int i = 0; i < (N - 1); ++i) {
top[(((size_t)S[i] - 'a') * 26) + (size_t)S[(size_t)i + 1] - 'a'].push_back(
... | insert | 26 | 26 | 26 | 30 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vvi vector<vi>
#define DBG_N(hoge) cerr << " " << (hoge) << endl;
#define DBG ce... | #include <bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define ull unsigned long long
#define vi vector<ll>
#define vvi vector<vi>
#define DBG_N(hoge) cerr << " " << (hoge) << endl;
#define DBG ce... | replace | 45 | 46 | 45 | 46 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 6) > this->size() (which is 5)
|
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
void Main();
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout << std::fixed << std::setprecision(15);
Main();
}
void Main() {
auto &fin = cin;
int64_t n;
string s;
fin >> n >> s;
auto max_length_of_true_seq = [](const... | #include <bits/stdc++.h>
using namespace std;
void Main();
int main() {
std::cin.tie(nullptr);
std::ios_base::sync_with_stdio(false);
std::cout << std::fixed << std::setprecision(15);
Main();
}
void Main() {
auto &fin = cin;
int64_t n;
string s;
fin >> n >> s;
auto max_length_of_true_seq = [](const... | replace | 34 | 35 | 34 | 35 | 0 | |
p02913 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace... | replace | 41 | 42 | 41 | 42 | -11 | |
p02913 | Python | Time Limit Exceeded | n = int(input())
s = input()
dp = [[0] * (n + 1) for _ in range(n + 1)]
res = 0
for i in range(n - 1, -1, -1):
for j in range(n - 1, i, -1):
if s[i] == s[j]:
dp[i][j] = max(dp[i][j], dp[i + 1][j + 1] + 1)
res = max(res, min(dp[i][j], j - i))
print(res)
| n = int(input())
s = input()
dp = [[0] * (n + 1) for _ in range(n + 1)]
res = 0
for i in range(n - 1, -1, -1):
for j in range(n - 1, i, -1):
if s[i] == s[j]:
dp[i][j] = dp[i + 1][j + 1] + 1
# dp[i][j] = max(dp[i][j], dp[i + 1][j + 1] + 1)
res = max(res, min(dp[i][j], j - i)... | replace | 9 | 10 | 9 | 11 | TLE | |
p02913 | Python | Runtime Error | from sys import stdin
N = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()
dp = [[0] * (N + 1) for _ in range(N + 1)]
res = 0
for i in range(N - 1, -1, -1):
for j in range(N - 1, i, -1):
if S[i] == S[j]:
dp[i][j] = dp[i + 1][j + 1] + 1, dp[i][j]
res = max(res, min(j - i, dp... | from sys import stdin
N = int(stdin.readline().rstrip())
S = stdin.readline().rstrip()
dp = [[0] * (N + 1) for _ in range(N + 1)]
res = 0
for i in range(N - 1, -1, -1):
for j in range(N - 1, i, -1):
if S[i] == S[j]:
dp[i][j] = dp[i + 1][j + 1] + 1
res = max(res, min(j - i, dp[i][j]))
... | replace | 10 | 11 | 10 | 11 | TypeError: '<' not supported between instances of 'tuple' and 'int' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02913/Python/s512048354.py", line 12, in <module>
res = max(res, min(j - i, dp[i][j]))
TypeError: '<' not supported between instances of 'tuple' and 'int'
|
p02913 | Python | Time Limit Exceeded | def z_algorithm(s):
n = len(s)
prefix = [0] * n
j = 0
ret = 0
for i in range(1, n):
if i + prefix[i - j] < j + prefix[j]:
prefix[i] = prefix[i - j]
else:
k = max(0, j + prefix[j] - i)
while i + k < n and s[k] == s[i + k]:
k += 1
... | def z_algorithm(s):
n = len(s)
prefix = [0] * n
j = 0
ret = 0
for i in range(1, n):
if i + prefix[i - j] < j + prefix[j]:
prefix[i] = prefix[i - j]
else:
k = max(0, j + prefix[j] - i)
while i + k < n and s[k] == s[i + k]:
k += 1
... | replace | 13 | 14 | 13 | 14 | TLE | |
p02913 | Python | Time Limit Exceeded | import sys
input = sys.stdin.readline
class AtCoder:
def main(self):
N = int(input())
S = input().rstrip()
half = N // 2
for length in range(1, half + 1)[::-1]:
i = 0
already = set()
while i + length < N:
v = S[i : i + length]
... | import sys
input = sys.stdin.readline
class AtCoder:
def main(self):
N = int(input())
S = input().rstrip()
dp = [[0 for i in range(N + 1)] for j in range(N + 1)]
ans = 0
for i in range(N)[::-1]:
for j in range(N)[::-1]:
if S[i] == S[j]:
... | replace | 10 | 27 | 10 | 18 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define fornum(A, B, C) for (A = B; A < C; A++)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
/////////////////////////////////////////////////////
ll N;
char S[5050];
ll ln[5050];
ll i, j, k, ans;
ll calc(ll b) {
ll i... | #include <bits/stdc++.h>
#define ll long long
#define fornum(A, B, C) for (A = B; A < C; A++)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
/////////////////////////////////////////////////////
ll N;
char S[5050];
ll ln[5050];
ll i, j, k, ans;
ll calc(ll b) {
ll i... | replace | 51 | 52 | 51 | 52 | TLE | |
p02913 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
// s[i:], s[j:] が何文字目まで一致するか
// 0 <= i < j < |S|
int solve(string &s, vector<vector<int>> memo, int i, int j) {
if (i >= s.size() || j >= s.size() || s[i] != s[j]) {
return 0;
}
if (memo[i][j] < 0) {
memo[... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
// s[i:], s[j:] が何文字目まで一致するか
// 0 <= i < j < |S|
int solve(string &s, vector<vector<int>> &memo, int i, int j) {
if (i >= s.size() || j >= s.size() || s[i] != s[j]) {
return 0;
}
if (memo[i][j] < 0) {
memo... | replace | 9 | 10 | 9 | 10 | 0 | |
p02913 | C++ | Runtime Error |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int dp[5001][5001];
int main() {
int N;
cin >> N;
string S;
cin >> S;
for (int i = N - 1; i >= 0; i--) {
for (int j = N - 1; j >= 0; j--) {
if (S[i] != S[j]) {
dp[i][j] = 0;
} else {
... |
#include <algorithm>
#include <cmath>
#include <iostream>
#include <vector>
using namespace std;
int dp[5001][5001];
int main() {
int N;
cin >> N;
string S;
cin >> S;
for (int i = N - 1; i >= 0; i--) {
for (int j = N - 1; j >= 0; j--) {
if (S[i] != S[j]) {
dp[i][j] = 0;
} else {
... | replace | 21 | 22 | 21 | 22 | 127 | /tmp/a1688baa-538c-460c-a959-effa66210d5f.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
|
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ALL(a) (a).begin(), (a).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<long long, long long> Pll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<long long> vll;
typedef vector<vector<long long>> vvll;
template <typename T... | #include <bits/stdc++.h>
#define ALL(a) (a).begin(), (a).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<long long, long long> Pll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef vector<long long> vll;
typedef vector<vector<long long>> vvll;
template <typename T... | insert | 47 | 47 | 47 | 49 | TLE | |
p02913 | C++ | Time Limit Exceeded | #pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
#include <bits/stdc++.h>
constexpr int INF = 2147483647;
constexpr long long int INF_LL = 9223372036854775807;
constexpr int MOD = 1000000007;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
// ... | #pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("avx")
#include <bits/stdc++.h>
constexpr int INF = 2147483647;
constexpr long long int INF_LL = 9223372036854775807;
constexpr int MOD = 1000000007;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
// ... | replace | 114 | 116 | 114 | 117 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#include <unordered_map>
#include <vector>
using namespace std;
#define COUT(x) cout << #x << " = " << (x) << " (L"... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string.h>
#include <unordered_map>
#include <vector>
using namespace std;
#define COUT(x) cout << #x << " = " << (x) << " (L"... | replace | 135 | 173 | 135 | 140 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
#define FOR(i, s, n) for (int i = s; i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(n) (... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(false); \
cin.tie(0);
#define FOR(i, s, n) for (int i = s; i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define ALL(n) (... | replace | 22 | 23 | 22 | 23 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <time.h>
#include <vector>
using... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stdio.h>
#include <string.h>
#include <string>
#include <time.h>
#include <vector>
using... | replace | 256 | 257 | 256 | 257 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS)
#pragma comment(linker... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS)
#pragma comment(linker... | insert | 37 | 37 | 37 | 43 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#includ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#includ... | replace | 1,499 | 1,514 | 1,499 | 1,514 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// Define
using ll = long long;
using ull = unsigned long long;
using ld = long double;
template <class T> using pvector = vector<pair<T, T>>;
template <class T>
using rpriority_queue = priority_queue<T, vector<T>, greater<T>>;
constexpr const ll dx[4] = {1, 0, -1, 0};
con... | #include <bits/stdc++.h>
using namespace std;
// Define
using ll = long long;
using ull = unsigned long long;
using ld = long double;
template <class T> using pvector = vector<pair<T, T>>;
template <class T>
using rpriority_queue = priority_queue<T, vector<T>, greater<T>>;
constexpr const ll dx[4] = {1, 0, -1, 0};
con... | replace | 245 | 261 | 245 | 247 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
#define TYPE(c) remove_reference_t<decltype(c)>
#define REP(i, n) for (TYPE(n) i = 0; i < n; i++)
#define FOR(v, c) for (TYPE(c.begin()) v = c.begin(); v != c.end(); v++)
#define ALL(c) c.begin(), c.end()
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(ALL(c), greater<TYPE(c)::value_type>()... | #include <bits/stdc++.h>
#define TYPE(c) remove_reference_t<decltype(c)>
#define REP(i, n) for (TYPE(n) i = 0; i < n; i++)
#define FOR(v, c) for (TYPE(c.begin()) v = c.begin(); v != c.end(); v++)
#define ALL(c) c.begin(), c.end()
#define SORT(c) sort(ALL(c))
#define RSORT(c) sort(ALL(c), greater<TYPE(c)::value_type>()... | replace | 62 | 63 | 62 | 63 | 0 | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define REP(i, n) for (int _n = n, i = 0; i < _n; ++i)
#define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i)
#define FORD(i, a, b) for (int i = (a), _b = (b); i >= _b; --i)
... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define REP(i, n) for (int _n = n, i = 0; i < _n; ++i)
#define FOR(i, a, b) for (int i = (a), _b = (b); i <= _b; ++i)
#define FORD(i, a, b) for (int i = (a), _b = (b); i >= _b; --i)
... | replace | 43 | 44 | 43 | 44 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
typedef long long LL;
typedef long double LD;
void func() {
LL N, K;
cin >> N;
string S;
cin >> S;
LL counter_max = 0;
for (LL i = 0; i < N; ++i) { // 部分文字列1の先頭
for (LL j = i + counter_max + 1; j < N; ++j) { // 部分文字列2の先頭
LL coun... | #include "bits/stdc++.h"
using namespace std;
typedef long long LL;
typedef long double LD;
void func() {
LL N, K;
cin >> N;
string S;
cin >> S;
LL counter_max = 0;
for (LL i = 0; i < N; ++i) { // 部分文字列1の先頭
for (LL j = i + counter_max + 1; j < N; ++j) { // 部分文字列2の先頭
if (i >... | insert | 16 | 16 | 16 | 19 | TLE | |
p02913 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#define MOD 1000000007
#define MOD2 998244353
#define INF 100000000
// #define MOD 922337203685419LL
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
... | #define _CRT_SECURE_NO_WARNINGS
#define MOD 1000000007
#define MOD2 998244353
#define INF 100000000
// #define MOD 922337203685419LL
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <cstdio>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <list>
... | replace | 150 | 151 | 150 | 151 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, a, b) for (int i = a; i <= (b); ++i)
#define repr(i, a, b) for (int i = a; i >= (b); --i)
#define bit(n) (1LL << (n)... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define repp(i, a, b) for (int i = a; i <= (b); ++i)
#define repr(i, a, b) for (int i = a; i >= (b); --i)
#define bit(n) (1LL << (n)... | replace | 93 | 103 | 93 | 98 | TLE | |
p02913 | C++ | Runtime Error | // #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
// 区間削除は出来ない
templat... | // #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
// 区間削除は出来ない
templat... | replace | 3,778 | 3,780 | 3,778 | 3,780 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(x) x.begin(), x.e... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(x) x.begin(), x.e... | insert | 29 | 29 | 29 | 31 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
#define EPS (1e-10)
#define rep(i, a, b) for (int i = a; i < (int)(b); ++i)
#define rrep(i, a, b) for (int i = b - 1; i >= (int)(a); --i)
#define all(a) a.begin(), a.end()
using namespace std;
using ll = long long;
using vi = vector<int>;
using vb = vector<bool>;
using vll = vector<ll>;
using... | #include <bits/stdc++.h>
#define EPS (1e-10)
#define rep(i, a, b) for (int i = a; i < (int)(b); ++i)
#define rrep(i, a, b) for (int i = b - 1; i >= (int)(a); --i)
#define all(a) a.begin(), a.end()
using namespace std;
using ll = long long;
using vi = vector<int>;
using vb = vector<bool>;
using vll = vector<ll>;
using... | replace | 25 | 26 | 25 | 26 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
vector<vector<int>> cnt(26);
int main() {
int n, f, a, b, t;
cin >> n;
string s;
cin >> s;
for (int i = 0; i < s.length(); i++) {
cnt[s[i] - 'a'].push_back(i);
}
int ans = 0;
for (int i = 0; i < 26; ... | #include <algorithm>
#include <iostream>
#include <math.h>
#include <vector>
using namespace std;
vector<vector<int>> cnt(26);
int main() {
int n, f, a, b, t;
cin >> n;
string s;
cin >> s;
for (int i = 0; i < s.length(); i++) {
cnt[s[i] - 'a'].push_back(i);
}
int ans = 0;
for (int i = 0; i < 26; ... | insert | 24 | 24 | 24 | 26 | TLE | |
p02913 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <ve... | #include <algorithm>
#include <bitset>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <ve... | replace | 20 | 21 | 20 | 21 | -11 | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
typedef long long ll;
typedef vector<int> vi;
const ll M = 1e9 + 7;
template <typename T> vi z_algorithm(T &s, ll n) {
vi res(n);
res[0] = n;
ll i1 ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
typedef long long ll;
typedef vector<int> vi;
const ll M = 1e9 + 7;
template <typename T> vi z_algorithm(T &s, ll n) {
vi res(n);
res[0] = n;
ll i1 ... | replace | 38 | 39 | 38 | 39 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <cstdio>
#include <queue>
using namespace std;
char S[6000];
int main() {
int N;
int ret = 0;
scanf("%d%s", &N, &S);
for (int i = 0; i < N; ++i) {
for (int j = i + 1; j < N; ++j) {
for (int k = 0; k < j - i && j + k < N && S[i + k] == S[j + k]; ++k) {
if (ret < k + 1) {
r... | #include <cstdio>
#include <queue>
using namespace std;
char S[6000];
int main() {
int N;
int ret = 0;
scanf("%d%s", &N, &S);
for (int i = 0; i < N; ++i) {
for (int j = i + ret + 1; j + ret < N; ++j) {
if (i + ret < j && S[i + ret] == S[j + ret]) {
int k;
for (k = 0; k < ret && S[i ... | replace | 12 | 16 | 12 | 20 | TLE | |
p02913 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
const int M = 3005;
char s[M];
int nxt[M];
int get_nxt(char p[], int m, int nxt[]) {
nxt[0] = m;
int j = -1, a, l;
int ans = 0;
for (int i = 1; i < m; i++, j--) {
if (j == -1 || i + nxt[i - a] >= l) {
... | #include <algorithm>
#include <iostream>
#include <stdio.h>
#include <string.h>
using namespace std;
const int M = 5005;
char s[M];
int nxt[M];
int get_nxt(char p[], int m, int nxt[]) {
nxt[0] = m;
int j = -1, a, l;
int ans = 0;
for (int i = 1; i < m; i++, j--) {
if (j == -1 || i + nxt[i - a] >= l) {
... | replace | 6 | 7 | 6 | 7 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define for0(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int n, ans;
string s;
int main() {
cin >> n >> s;
for0(i, n) for0(j, i) {
if (i - j < ans)
continue;
int p = j, q = i;
while (s[p] == s[q]) {
p++;
q++;
if (p == i)
break;
... | #include <bits/stdc++.h>
#define for0(i, n) for (int i = 0; i < (n); i++)
using namespace std;
int n, ans;
string s;
int main() {
cin >> n >> s;
for0(i, n) for0(j, i) {
if (i - j < ans)
continue;
if (j > 0 && s[i - 1] == s[j - 1])
continue;
int p = j, q = i;
while (s[p] == s[q]) {
... | insert | 9 | 9 | 9 | 11 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define int long long
#define mod (int)(1e9 + 7)
#define inf (int)(3e18)
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i < n; i++)
#define P std::pair<int, int>
#define PiP std::pair<int, std::pair<int, int>>
#define all(v) v.begin(), v.end()
#define mkp std::m... | #include <bits/stdc++.h>
#define int long long
#define mod (int)(1e9 + 7)
#define inf (int)(3e18)
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i < n; i++)
#define P std::pair<int, int>
#define PiP std::pair<int, std::pair<int, int>>
#define all(v) v.begin(), v.end()
#define mkp std::m... | replace | 224 | 232 | 224 | 243 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
struct RollingHash {
ll base1 = 1009;
ll base2 = 2009;
ll mod1 = 1000000007;
ll mod2 = 1000000009;
vector<ll> hash1, hash2, pow1, pow2;
RollingHash(const string &S) {
int n = (int)S... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
using ll = long long;
struct RollingHash {
static const ll base1 = 1009;
static const ll base2 = 2009;
static const ll mod1 = 1000000007;
static const ll mod2 = 1000000009;
vector<ll> hash1, hash2, pow1, pow2;
... | replace | 9 | 13 | 9 | 13 | TLE | |
p02913 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include ... | replace | 116 | 117 | 116 | 118 | -6 | f08cf1f9-5e18-4e8d-b79e-8e021f779f58.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02913/C++/s286766008.cpp:79: ull rollinghash<T>::hash(ll, ll, ll) [with T = std::__cxx11::basic_string<char>; ull = long long unsigned int; ll = long long int]: Assertion `l < r && 0 <= l && l < length && 0 < r && r... |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
// typedef
//-------------------------#include <bits/stdc++.h>
const double pi = 3.141592653589793238462643383279;
using namespace std;
template <typename T = int> inline T readT() {
char c = getchar_unlocked();
bool neg = (c == '-');
T res = neg ? 0 : c - '0';
while (isdigit(c = get... | #include <bits/stdc++.h>
// typedef
//-------------------------#include <bits/stdc++.h>
const double pi = 3.141592653589793238462643383279;
using namespace std;
template <typename T = int> inline T readT() {
char c = getchar_unlocked();
bool neg = (c == '-');
T res = neg ? 0 : c - '0';
while (isdigit(c = get... | replace | 372 | 382 | 372 | 394 | TLE | |
p02913 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define REP(i, n) for (ll i = 0; i < n; i++)
#define REPR(i, n) for (ll i = n; i >... | replace | 27 | 28 | 27 | 28 | -11 | |
p02913 | C++ | Time Limit Exceeded | #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 | 1,168 | 1,170 | 1,168 | 1,171 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#define _USE_MATH_DEFINES
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#define _USE_MATH_DEFINES
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <map>
#include <numeric>
#include <queue>... | replace | 101 | 104 | 101 | 120 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long INF = 1e15;
#include <math.h>
#define PI 3.14159265358979323846264338327950L
int Z_algo(string s, int k) {
int n = s.length();
vector<int> z(n);
int L = 0, R = 0;
for (int i = 1; i < n; i++) {
if (i > R) {
L = R =... | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long INF = 1e15;
#include <math.h>
#define PI 3.14159265358979323846264338327950L
int Z_algo(string s, int k) {
int n = s.length();
vector<int> z(n);
int L = 0, R = 0;
for (int i = 1; i < n; i++) {
if (i > R) {
L = R =... | replace | 44 | 48 | 44 | 46 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXLEN = 5 * 1e3 + 5;
int n;
string s;
int dp[MAXLEN][MAXLEN];
int solve(int i, int j, int lim) {
if (i >= n || j >= n)
return 0;
if (i >= lim)
return 0;
if (dp[i][j] >= 0)
return dp[i][j];
if (s[i] != s[j])
retu... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXLEN = 5 * 1e3 + 5;
int n;
string s;
int dp[MAXLEN][MAXLEN];
int solve(int i, int j, int lim) {
if (i >= n || j >= n)
return 0;
if (i >= lim)
return 0;
if (dp[i][j] >= 0)
return dp[i][j];
if (s[i] != s[j])
retu... | replace | 23 | 24 | 23 | 25 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctype.h>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stac... | #include <algorithm>
#include <array>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <ctype.h>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <stac... | replace | 1,066 | 1,067 | 1,066 | 1,067 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, N) for (int i = 0; i < (int)N; i++)
#define FORIN(i, a, b) for (int i = a; i < (int)b; i++)
#define ALL(x) (x).begin(), (x).end()
#define MOD 1000000007
#define INF (1 << 29)
#define LLINF (1LL << 60)
#define DEBUG(...) debug(__LINE__, ":" __VA_ARGS__)
usi... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, N) for (int i = 0; i < (int)N; i++)
#define FORIN(i, a, b) for (int i = a; i < (int)b; i++)
#define ALL(x) (x).begin(), (x).end()
#define MOD 1000000007
#define INF (1 << 29)
#define LLINF (1LL << 60)
#define DEBUG(...) debug(__LINE__, ":" __VA_ARGS__)
usi... | replace | 80 | 84 | 80 | 88 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef pair<ii, int> ri3;
#define mp make_pair
#define pb push_back
#define fi first
#define sc second
#define SZ(x) (int)(x).size()
#define ALL(x) begin(x), end(x)
#define... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> ii;
typedef pair<int, ii> iii;
typedef pair<ii, int> ri3;
#define mp make_pair
#define pb push_back
#define fi first
#define sc second
#define SZ(x) (int)(x).size()
#define ALL(x) begin(x), end(x)
#define... | replace | 21 | 22 | 21 | 22 | TLE | |
p02913 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
const int MAXN = 5005;
int M[MAXN][MAXN];
int main() {
std::ios_base::sync_with_stdio(0);
int n;
std::string s;
std::cin >> n >> s;
int result = 0;
for (int i = 0; i < n; ++i) {
for (int j = i + 1; j < n; ++j) {
if (s[i] == s[j]) {
M[i][j] = std:... | #include <algorithm>
#include <iostream>
const int MAXN = 5005;
int M[MAXN][MAXN];
int main() {
std::ios_base::sync_with_stdio(0);
int n;
std::string s;
std::cin >> n >> s;
int result = 0;
for (int i = 0; i < n; ++i) {
for (int j = i + 1; j < n; ++j) {
if (s[i] == s[j]) {
if (i == 0 || ... | replace | 16 | 17 | 16 | 20 | 127 | /tmp/c92a5eae-e661-47b3-bdce-682002154420.out: error while loading shared libraries: libc.so.6: failed to map segment from shared object
|
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); i++)
using... | replace | 38 | 47 | 38 | 46 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int z[5001];
int res = 0;
int n;
string s;
void solve() {
for (int i = 0; i < n; i++)
z[i] = 0;
int l = 0, r = 0;
for (int i = 0; i < n; i++) {
if (i <= r) {
z[i] = min(r - i + 1, z[i - l]);
}
while (i + z[i] < n && s[z[i]] == s[i + z[i]])
... | #include <bits/stdc++.h>
using namespace std;
int z[5001];
int res = 0;
int n;
string s;
void solve() {
for (int i = 0; i < n; i++)
z[i] = 0;
int l = 0, r = 0;
for (int i = 1; i < n; i++) {
if (i <= r) {
z[i] = min(r - i + 1, z[i - l]);
}
while (i + z[i] < n && s[z[i]] == s[i + z[i]])
... | replace | 12 | 13 | 12 | 13 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
using vec = vector<ll>;
using vect = vector<double>;
using Graph = vector<vector<ll>>;
#define loop(i, n) for (ll i = 0; i < n; i++)
#define Loop(i, m, n) for (ll i = m; i < n; i++)
#define pool(i, n) for (ll i = n; i >= 0; i--)
... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
using ll = long long;
using vec = vector<ll>;
using vect = vector<double>;
using Graph = vector<vector<ll>>;
#define loop(i, n) for (ll i = 0; i < n; i++)
#define Loop(i, m, n) for (ll i = m; i < n; i++)
#define pool(i, n) for (ll i = n; i >= 0; i--)
... | insert | 83 | 83 | 83 | 85 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
#define loop(n, i) for (int i = 0; i < n; i++)
#define loop1(n, i) for (int i = 1; i <= n; i++)
#define rloop(n, i) for (int i = n; i; i++)
#define HERE cout << "HERE: " << __LINE__ << endl;
#define INSP(v) cout << v << " at " << __LINE__ << endl;
using namespace std;
using ll = long long;
temp... | #include <bits/stdc++.h>
#define loop(n, i) for (int i = 0; i < n; i++)
#define loop1(n, i) for (int i = 1; i <= n; i++)
#define rloop(n, i) for (int i = n; i; i++)
#define HERE cout << "HERE: " << __LINE__ << endl;
#define INSP(v) cout << v << " at " << __LINE__ << endl;
using namespace std;
using ll = long long;
temp... | replace | 36 | 37 | 36 | 37 | -6 | malloc(): corrupted top size
|
p02913 | C++ | Time Limit Exceeded | /*!enjoy karo yaar!*/
// CF,CC,AtC,SPOJ: hp1999
// HE: hemant269
// HR: hemant2132
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define fast() \
ios::sync_with_stdio(0); \
... | /*!enjoy karo yaar!*/
// CF,CC,AtC,SPOJ: hp1999
// HE: hemant269
// HR: hemant2132
#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define fast() \
ios::sync_with_stdio(0); \
... | replace | 118 | 126 | 118 | 134 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
#define int long long int
#define rep(i, n) for (int i = 0; i < (n)... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <tuple>
#include <utility>
#include <vector>
#define int long long int
#define rep(i, n) for (int i = 0; i < (n)... | replace | 79 | 83 | 79 | 81 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
#define N_MAX 5000
int dp[N_MAX + 1][N_MAX + 1];
// n次元配列の初期化。第2引数の型のサイズごとに初期化していく。
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
std::fill((T *)array, (T *)(array + N), val);
}
int main() {
int N;
string s;
cin >> N;
cin >>... | #include <iostream>
using namespace std;
#define N_MAX 5000
int dp[N_MAX + 1][N_MAX + 1];
// n次元配列の初期化。第2引数の型のサイズごとに初期化していく。
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val) {
std::fill((T *)array, (T *)(array + N), val);
}
int main() {
int N;
string s;
cin >> N;
cin >>... | replace | 24 | 25 | 24 | 26 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#define FOR0(var, max) for (ul(var) = 0; (var) < (max); ++(var))
#define FORi(var, min, max) for (ul(var) = (min); (var) < (max); ++(var)... | #include <algorithm>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#define FOR0(var, max) for (ul(var) = 0; (var) < (max); ++(var))
#define FORi(var, min, max) for (ul(var) = (min); (var) < (max); ++(var)... | replace | 68 | 69 | 68 | 69 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <iostream>
#include <queue>
#include <string>
using namespace std;
const int N_MAX = 5 * 1e3 + 10;
typedef struct cover {
int first;
int second;
int len;
} Cover;
int checked[N_MAX][N_MAX] = {0};
int main() {
int N;
string S;
cin >> N >> S;
queue<Cover> que;
for (int i = 0; i < S.length... | #include <iostream>
#include <queue>
#include <string>
using namespace std;
const int N_MAX = 5 * 1e3 + 10;
typedef struct cover {
int first;
int second;
int len;
} Cover;
int checked[N_MAX][N_MAX] = {0};
int main() {
int N;
string S;
cin >> N >> S;
queue<Cover> que;
for (int i = 0; i < S.length... | replace | 27 | 28 | 27 | 30 | TLE | |
p02913 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define chmax(x, y) x = max(x, y)
using namespace std;
int mx = 0;
int n;
string s;
int nextfree = 1;
class trie {
uint32_t d[20] = {0};
public:
int first;
int depth;
int nxt(int i) {
int s = i * 24, t = s + 24;
int sa = s / 32, ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define chmax(x, y) x = max(x, y)
using namespace std;
int mx = 0;
int n;
string s;
int nextfree = 1;
class trie {
uint32_t d[20] = {0};
public:
int first;
int depth;
int nxt(int i) {
int s = i * 24, t = s + 24;
int sa = s / 32, ... | replace | 38 | 39 | 38 | 39 | MLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 5e3 + 100;
int dp[maxn][maxn];
string str;
int main() {
int N;
cin >> N;
cin >> str;
for (int j = 1; j < N; ++j)
dp[0][j] = (str[j] == str[0]);
for (int i = 0; i < N; ++i) {
for (int j = i + 1; j < N; ++j) {
dp[i][j] =
min(... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 5e3 + 100;
int dp[maxn][maxn];
string str;
int main() {
int N;
cin >> N;
cin >> str;
for (int j = 1; j < N; ++j)
dp[0][j] = (str[j] == str[0]);
for (int i = 1; i < N; ++i) {
for (int j = i + 1; j < N; ++j) {
dp[i][j] =
min(... | replace | 11 | 12 | 11 | 12 | 127 | /tmp/99f271c9-4e3e-4570-acbe-132dff48ac76.out: error while loading shared libraries: libstdc++.so.6: failed to map segment from shared object
|
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MAX = 2500;
const int INF = 1e6;
int n;
string s;
bool C(int x) {
string M[MAX];
if (x > n / 2)
return false;
for (int i = 0; i + x <= n; i++) {
M[i] = s.substr(i, x);
}
for (int i = 0; i + x + x <= n; i++) {
for (int j = i + x; j + x <= n... | #include <bits/stdc++.h>
using namespace std;
const int MAX = 5000;
const int INF = 1e6;
int n;
string s;
bool C(int x) {
string M[MAX];
if (x > n / 2)
return false;
for (int i = 0; i + x <= n; i++) {
M[i] = s.substr(i, x);
}
for (int i = 0; i + x + x <= n; i++) {
for (int j = i + x; j + x <= n... | replace | 3 | 4 | 3 | 4 | 0 | |
p02913 | C++ | Runtime Error | // #include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <cstring>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#inclu... | // #include <bits/stdc++.h>
#include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <cstring>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#inclu... | replace | 40 | 42 | 40 | 41 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <complex>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i = int(m); i < int... | #include <algorithm>
#include <complex>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define REP(i, m, n) for (int i = int(m); i < int... | replace | 88 | 92 | 88 | 113 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, ans = 0;
cin >> n;
string s;
cin >> s;
vector<vector<int>> dp(n, vector<int>(n));
for (int i = 0; i <= n; i++) {
for (int j = i + 1; j <= n; j++) {
if (s[i - 1] == s[j - 1]) {
if (j - dp[i - 1][j - 1] != i)
dp[i][j... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, ans = 0;
cin >> n;
string s;
cin >> s;
vector<vector<int>> dp(n + 1, vector<int>(n + 1));
for (int i = 0; i <= n; i++) {
for (int j = i + 1; j <= n; j++) {
if (s[i - 1] == s[j - 1]) {
if (j - dp[i - 1][j - 1] != i)
... | replace | 7 | 8 | 7 | 8 | 0 | |
p02913 | Python | Time Limit Exceeded | N = int(input())
S = input()
ans = 0
left, right = 0, 1
while right < N:
s = S[left:right]
if s in S[right:]:
right += 1
ans = max(ans, len(s))
else:
left = right - 1
print(ans)
| N = int(input())
S = input()
ans = 0
left, right = 0, 1
while right < N:
s = S[left:right]
if s in S[right:]:
right += 1
ans = max(ans, len(s))
else:
left += 1
print(ans)
| replace | 12 | 13 | 12 | 13 | TLE | |
p02913 | C++ | Time Limit Exceeded | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace s... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <vector>
using namespace s... | replace | 564 | 581 | 564 | 577 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
/*{{{*/ // template
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long LINF = numeric_limits<long long>::max() / 3;
#define pb push_back
#define eb ... | #include <bits/stdc++.h>
using namespace std;
/*{{{*/ // template
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
constexpr int INF = numeric_limits<int>::max() / 2;
constexpr long long LINF = numeric_limits<long long>::max() / 3;
#define pb push_back
#define eb ... | insert | 139 | 139 | 139 | 141 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define Rep(i, n) for (int i = 0; i < (int)(n); i++)
#define For(i, n1, n2) for (int i = (int)(n1); i < (int)(n2); i++)
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define RREP(i, n) for (ll i = ((ll)(n)-1); i >= 0; i--)
#define FOR(i, n1, n2) for (ll i = (ll)(n1); i... | #include <bits/stdc++.h>
using namespace std;
#define Rep(i, n) for (int i = 0; i < (int)(n); i++)
#define For(i, n1, n2) for (int i = (int)(n1); i < (int)(n2); i++)
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define RREP(i, n) for (ll i = ((ll)(n)-1); i >= 0; i--)
#define FOR(i, n1, n2) for (ll i = (ll)(n1); i... | replace | 189 | 190 | 189 | 190 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// FILE *fi=freopen("1.txt","r",stdin);
int n;
char ch[5001];
string s, sam;
bool check(int k) {
int dem = 1, vt = 0;
vector<pair<string, int>> a;
string s1;
for (int i = 1; i <= k; ++i) {
char c = ch[i];
s1.push_back(ch[i]);
}
a.push_back({s1, 1});
... | #include <bits/stdc++.h>
using namespace std;
// FILE *fi=freopen("1.txt","r",stdin);
int n;
char ch[5001];
string s, sam;
bool check(int k) {
int dem = 1, vt = 0;
vector<pair<string, int>> a;
string s1;
for (int i = 1; i <= k; ++i) {
char c = ch[i];
s1.push_back(ch[i]);
}
a.push_back({s1, 1});
... | replace | 39 | 40 | 39 | 40 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define debug(x) cerr << #x << " " << x << '\n'
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pli = pair<ll, int>;
const int INF = 0x3f3f3f3f, N = 5e3 + 5;
const ... | #include <bits/stdc++.h>
#define mp make_pair
#define pb push_back
#define sz(x) (int)x.size()
#define all(x) begin(x), end(x)
#define debug(x) cerr << #x << " " << x << '\n'
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pli = pair<ll, int>;
const int INF = 0x3f3f3f3f, N = 5e3 + 5;
const ... | replace | 38 | 41 | 38 | 40 | TLE | |
p02913 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define loop(it, v) for (auto it = v.begin(); it != v.end(); it++)
#define cont(i, x) for (int i = head[x]; i; i = e[i].nxt)
#define clr(a) m... | #include <bits/stdc++.h>
using namespace std;
// #define int long long
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define loop(it, v) for (auto it = v.begin(); it != v.end(); it++)
#define cont(i, x) for (int i = head[x]; i; i = e[i].nxt)
#define clr(a) m... | replace | 103 | 104 | 103 | 104 | TLE | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
int main() {
ll n, len = 0, start = 0, tmp = 1;
string s, t;
cin >> n >> s;
while (len < 2 / n || start < n - 1) {
t = s.substr(start, tmp);
for (ll i = start + tmp; i < n; i++) {
if (t == s.substr(i, t... | #include <bits/stdc++.h>
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
int main() {
ll n, len = 0, start = 0, tmp = 1;
string s, t;
cin >> n >> s;
while (len < n / 2 && start < n - 1) {
t = s.substr(start, tmp);
for (ll i = start + tmp; i < n; i++) {
if (t == s.substr(i, t... | replace | 8 | 9 | 8 | 9 | 0 | |
p02913 | C++ | Runtime Error | #include <bits/stdc++.h>
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define popcnt(x) __builtin_popcount(x)
#define inf 0x3f3f3f3f
#define watch(x) cout << (#x) << " is " << (x) << endl
#define rand() (rand() << 15 | rand())
using namespace std;
typedef long long ll;
#define EPS 1e-9
#define PI acos(-1.... | #include <bits/stdc++.h>
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define popcnt(x) __builtin_popcount(x)
#define inf 0x3f3f3f3f
#define watch(x) cout << (#x) << " is " << (x) << endl
#define rand() (rand() << 15 | rand())
using namespace std;
typedef long long ll;
#define EPS 1e-9
#define PI acos(-1.... | delete | 68 | 71 | 68 | 68 | 0 | |
p02913 | 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++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_... | replace | 27 | 28 | 27 | 28 | 0 | |
p02913 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define EPS (1e-7)
#define INF (3e9)
using namespace std;
typedef long long int ll;
int N;... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define EPS (1e-7)
#define INF (3e9)
using namespace std;
typedef long long int ll;
int N;... | replace | 28 | 33 | 28 | 31 | TLE | |
p02914 | C++ | Runtime Error | /*
source: ABC 141 F Xor Sum 3
*/
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int MXN = 10005;
int main() {
int n;
LL a[MXN], b[MXN], sum = 0;
memset(a, 0, sizeof(a));
memset(b, 0, sizeof(b));
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a[i];
sum ^= a[i];
}
for ... | /*
source: ABC 141 F Xor Sum 3
*/
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int MXN = 100005;
int main() {
int n;
LL a[MXN], b[MXN], sum = 0;
memset(a, 0, sizeof(a));
memset(b, 0, sizeof(b));
cin >> n;
for (int i = 0; i < n; ++i) {
cin >> a[i];
sum ^= a[i];
}
for... | replace | 6 | 7 | 6 | 7 | 0 | |
p02914 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll lon... | #include <algorithm>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
#define MOD (long long int)(1e9 + 7)
#define ll lon... | replace | 119 | 123 | 119 | 125 | TLE | |
p02914 | C++ | Runtime Error | // #include "bits/stdc++.h"
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#incl... | // #include "bits/stdc++.h"
#define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#incl... | replace | 65 | 67 | 65 | 67 | 0 | |
p02914 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define per(i, a, b) for (ll i = (b)-1; i >= (a); i--)
#define pb push_back
#define mp ma... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, a, b) for (ll i = (a); i < (b); i++)
#define per(i, a, b) for (ll i = (b)-1; i >= (a); i--)
#define pb push_back
#define mp ma... | replace | 31 | 33 | 31 | 33 | 0 | |
p02914 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define SZ(x) (int)(x.size())
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const double eps = 1e-10;
const int MOD = 1000000007;
c... | #include <bits/stdc++.h>
using namespace std;
#define SZ(x) (int)(x.size())
using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const double eps = 1e-10;
const int MOD = 1000000007;
c... | replace | 30 | 31 | 30 | 31 | -11 | |
p02914 | C++ | Runtime Error | #include <bits/stdc++.h>
#define lsb(x) (x & (-x))
#define ll long long
#define ull unsigned long long
#if 0
const int MOD = ;
inline int lgput(int a, int b) {
int ans = 1;
while(b > 0) {
if(b & 1) ans = (1LL * ans * a) % MOD;
b >>= 1;
a = (1LL * a * a) % MOD;
}
return ans;
}
... | #include <bits/stdc++.h>
#define lsb(x) (x & (-x))
#define ll long long
#define ull unsigned long long
#if 0
const int MOD = ;
inline int lgput(int a, int b) {
int ans = 1;
while(b > 0) {
if(b & 1) ans = (1LL * ans * a) % MOD;
b >>= 1;
a = (1LL * a * a) % MOD;
}
return ans;
}
... | replace | 121 | 126 | 121 | 128 | 0 | |
p02914 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int64_t i = 0; i < (int64_t)(n); ++i)
#define endl '\n'
template <typename T> void _dbg(const char *_s, T _h) {
cerr << _s << " = " << _h << "\n";
}
template <typename T, typename... Ts>
void _dbg(const char *_s, T _h, Ts... _t) {
for (int _b... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int64_t i = 0; i < (int64_t)(n); ++i)
#define endl '\n'
template <typename T> void _dbg(const char *_s, T _h) {
cerr << _s << " = " << _h << "\n";
}
template <typename T, typename... Ts>
void _dbg(const char *_s, T _... | insert | 0 | 0 | 0 | 2 | TLE | |
p02914 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long mask = 0;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
long long arr[n];
for (auto &i : arr)
cin >> i;
for (auto i : arr)
mask ^= i;
mask = ~mask;
sort(arr, arr + ... | #include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
long long mask = 0;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
long long arr[n];
for (auto &i : arr)
cin >> i;
for (auto i : arr)
mask ^= i;
mask = ~mask;
sort(arr, arr + ... | replace | 28 | 29 | 28 | 29 | TLE | |
p02914 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using vvi = vector<vi>;
using vvl = vector<vl>;
const ll INF = 1LL << 60;
const ll MOD = 1000000007;
template <class T> bool chmax(T &a, const T &b) {
... | replace | 35 | 36 | 35 | 36 | 0 | |
p02914 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double db;
typedef pair<int, int> pii;
const int N = 10000;
const db pi = acos(-1.0);
#define lowbit(x) (x) & (-x)
#define sqr(x) (x) * (x)
#define rep(i, a, b) for (register int i = a; i <= b; i++)
#define per(i, a, b) for (register int i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double db;
typedef pair<int, int> pii;
const int N = 10000;
const db pi = acos(-1.0);
#define lowbit(x) (x) & (-x)
#define sqr(x) (x) * (x)
#define rep(i, a, b) for (register int i = a; i <= b; i++)
#define per(i, a, b) for (register int i... | replace | 83 | 84 | 83 | 84 | 12 | |
p02915 | Python | Runtime Error | N = int(input().split())
print(N * N * N)
| N = int(input())
print(N * N * N)
| replace | 0 | 1 | 0 | 1 | TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02915/Python/s074412118.py", line 1, in <module>
N = int(input().split())
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'list'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.