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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02762 | C++ | Time Limit Exceeded | #include <iostream>
#include <vector>
using namespace std;
int belong_group_num[100001] = {0};
int group_member_cnt[100001] = {0};
vector<vector<int>> frineds_group;
void make_group(const int person, const int group_num,
vector<vector<int>> friends_link) {
if (belong_group_num[person] != 0)
ret... | #include <iostream>
#include <vector>
using namespace std;
int belong_group_num[100001] = {0};
int group_member_cnt[100001] = {0};
vector<vector<int>> frineds_group;
void make_group(const int person, const int group_num,
const vector<vector<int>> &friends_link) {
if (belong_group_num[person] != 0)
... | replace | 10 | 11 | 10 | 11 | TLE | |
p02762 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define P pair<int, int>
using ll = int64_t;
using namespace std;
struct unionfind { // 構造体の定義
vector<int> d; // メンバ変数
unionfind(int n = 0)
: d(n, -1) {
} // コンストラクタ(構造体が呼ばれたときにすぐに実行される処理)
int find(int x) {
if (d[x] < 0)
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define P pair<int, int>
using ll = int64_t;
using namespace std;
struct unionfind { // 構造体の定義
vector<int> d; // メンバ変数
unionfind(int n = 0)
: d(n, -1) {
} // コンストラクタ(構造体が呼ばれたときにすぐに実行される処理)
int find(int x) {
if (d[x] < 0)
... | replace | 34 | 36 | 34 | 36 | 0 | |
p02762 | C++ | Runtime Error | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
typedef long long ll;
const ll MOD = 1e9 + 7;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REP(i, num, n) for (int i = num, i##_len = (... | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
typedef long long ll;
const ll MOD = 1e9 + 7;
#define rep(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define REP(i, num, n) for (int i = num, i##_len = (... | replace | 164 | 165 | 164 | 165 | 0 | |
p02762 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define all(x) (x).begin(), (x).end()
ll inf = LLONG_MAX;
long double pi = M_PI;
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }
void YES() { cout << "YES" << endl; }
void NO() { cout << "NO" << endl; }... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define all(x) (x).begin(), (x).end()
ll inf = LLONG_MAX;
long double pi = M_PI;
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }
void YES() { cout << "YES" << endl; }
void NO() { cout << "NO" << endl; }... | replace | 57 | 58 | 57 | 58 | 0 | |
p02762 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, N) for (ll(i) = 0; (i) < (N); (i)++)
const int mod = 1000000007;
struct UnionFind {
vector<int> d;
UnionFind(int n = 0) : d(n, -1) {}
int find(int x) {
if (d[x] < 0)
return x;
return d[x] = ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
#define rep(i, N) for (ll(i) = 0; (i) < (N); (i)++)
const int mod = 1000000007;
struct UnionFind {
vector<int> d;
UnionFind(int n = 0) : d(n, -1) {}
int find(int x) {
if (d[x] < 0)
return x;
return d[x] = ... | replace | 33 | 34 | 33 | 34 | 0 | |
p02762 | C++ | Time Limit Exceeded | #pragma GCC optimize("O3")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#includ... | #pragma GCC optimize("O3")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#includ... | replace | 72 | 74 | 72 | 74 | TLE | |
p02762 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#include <iomanip>
#include <math.h>
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const int INF = 10010... | #include <bits/stdc++.h>
using namespace std;
#include <iomanip>
#include <math.h>
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
const int INF = 10010... | replace | 52 | 53 | 52 | 53 | 0 | |
p02762 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
struct UnionFind {
vector<int> p;
UnionFind(int n) : p(n, 1) {}
int root(int x) {
if (p.at(x) < 0)
return x;
return p.at(x) = root(p.at(x));
}
bool issame(int x, int y) { return root(x) == root(y); }... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
struct UnionFind {
vector<int> p;
UnionFind(int n) : p(n, -1) {}
int root(int x) {
if (p.at(x) < 0)
return x;
return p.at(x) = root(p.at(x));
}
bool issame(int x, int y) { return root(x) == root(y); ... | replace | 6 | 7 | 6 | 7 | -11 | |
p02762 | C++ | Time Limit Exceeded | #include <algorithm>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#pragma warning(disable : 4996)
#define N_MAX 100001
#define M_MAX 100001
#define K_MAX 100001
int N, M, K;
struct NodeInfo {
int index;
int dec;
int size;
int rank;
NodeInfo *p;
NodeInfo() : index(-1), dec(1), size(1), rank(... | #include <algorithm>
#include <assert.h>
#include <stdio.h>
#include <string.h>
#pragma warning(disable : 4996)
#define N_MAX 100001
#define M_MAX 100001
#define K_MAX 100001
int N, M, K;
struct NodeInfo {
int index;
int dec;
int size;
int rank;
NodeInfo *p;
NodeInfo() : index(-1), dec(1), size(1), rank(... | replace | 33 | 34 | 33 | 34 | TLE | |
p02762 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int par[100003], sz[100003];
int find(int v) {
if (par[v] == v)
return v;
return par[v] = find(par[v]);
}
void union_set(int u, int v) {
u = find(u);
v = find(v);
if (u != v) {
if (sz[u] < sz[v])
swap(u, v);
par[v] = u;
sz[u] += sz[v];
}
}
... | #include <bits/stdc++.h>
using namespace std;
int par[100003], sz[100003];
int find(int v) {
if (par[v] == v)
return v;
return par[v] = find(par[v]);
}
void union_set(int u, int v) {
u = find(u);
v = find(v);
if (u != v) {
if (sz[u] < sz[v])
swap(u, v);
par[v] = u;
sz[u] += sz[v];
}
}
... | replace | 36 | 37 | 36 | 37 | 0 | |
p02762 | C++ | Runtime Error | #include <iostream>
#include <queue>
#include <set>
#include <vector>
struct Person {
unsigned int index;
unsigned int candidates;
std::set<int> friends, blocked;
bool operator<(const Person &other) const { return index < other.index; }
};
typedef std::vector<Person> Graph;
typedef std::vector<std::set<int>> ... | #include <iostream>
#include <queue>
#include <set>
#include <vector>
struct Person {
unsigned int index;
unsigned int candidates;
std::set<int> friends, blocked;
bool operator<(const Person &other) const { return index < other.index; }
};
typedef std::vector<Person> Graph;
typedef std::vector<std::set<int>> ... | replace | 62 | 63 | 62 | 63 | 0 | |
p02762 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
using block = vector<vector<int>>;
vector<int> num;
vector<int> seen;
int groupsize[50001];
int group = 1; // グループ番号
void dfs(const Graph &G, int v) {
seen[v] = group; // v を訪問済にする
groupsize[group]++;
// v から行ける各頂点 next_v について
for... | #include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
using block = vector<vector<int>>;
vector<int> num;
vector<int> seen;
int groupsize[100001];
int group = 1; // グループ番号
void dfs(const Graph &G, int v) {
seen[v] = group; // v を訪問済にする
groupsize[group]++;
// v から行ける各頂点 next_v について
fo... | replace | 7 | 8 | 7 | 8 | 0 | |
p02762 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
const int INF = 0x7fffffff;
us... | #include <algorithm>
#include <bitset>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <limits.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
const int INF = 0x7fffffff;
us... | replace | 54 | 55 | 54 | 55 | TLE | |
p02762 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<int> friends[100000];
unordered_set<int> blocks[100000];
bool visited[100000];
unordered_set<int> comp;
int ans[100000];
void dfs(int v) {
visited[v - 1] = 1;
comp.insert(v);
for (auto a : friends[v - 1]) {
if (!visited[a - 1])
dfs(a)... | #include <bits/stdc++.h>
using namespace std;
int n, m, k;
vector<int> friends[100000];
unordered_set<int> blocks[100000];
bool visited[100000];
unordered_set<int> comp;
int ans[100000];
void dfs(int v) {
visited[v - 1] = 1;
comp.insert(v);
for (auto a : friends[v - 1]) {
if (!visited[a - 1])
dfs(a)... | replace | 47 | 48 | 47 | 49 | TLE | |
p02762 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int64_t> par(100000);
vector<int64_t> r(100000);
int find(int64_t n) {
if (par.at(n) == n) {
return n;
} else {
return par.at(n) = find(par.at(n));
}
}
void unite(int64_t a, int64_t b) {
int64_t x = find(a);
int64_t y = find(b);
if (x == y) {
... | #include <bits/stdc++.h>
using namespace std;
vector<int64_t> par(100000);
vector<int64_t> r(100000);
int find(int64_t n) {
if (par.at(n) == n) {
return n;
} else {
return par.at(n) = find(par.at(n));
}
}
void unite(int64_t a, int64_t b) {
int64_t x = find(a);
int64_t y = find(b);
if (x == y) {
... | replace | 46 | 47 | 46 | 47 | 0 | |
p02762 | C++ | Runtime Error | #include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
struct UnionFind {
vector<int> d;
UnionFind(int n) : d(n, -1) {}
int find(int x) {
if (d[x] < 0)
return x;
return d[x] = find(d[x]);
}
bool ... | #include <iostream>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
struct UnionFind {
vector<int> d;
UnionFind(int n) : d(n, -1) {}
int find(int x) {
if (d[x] < 0)
return x;
return d[x] = find(d[x]);
}
bool ... | replace | 30 | 32 | 30 | 32 | 0 | |
p02762 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
struct UnionFind {
vector<int> d;
UnionFind(int n = 0) : d(n, -1) {}
int find(int x) {
if (d[x] < 0)
return x;
return d[x] = find(d[x]);
}
bool unite(int... | #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>;
struct UnionFind {
vector<int> d;
UnionFind(int n = 0) : d(n, -1) {}
int find(int x) {
if (d[x] < 0)
return x;
return d[x] = find(d[x]);
}
bool unite(int... | replace | 3 | 5 | 3 | 5 | TLE | |
p02763 | C++ | Time Limit Exceeded | #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() {
int n;
cin >> n;
string s;
cin >> s;
int q;
cin >> q;
vector<int> tp(q), p1(q), p2(q);
vector<char> p3(q);
rep(i, q) {
cin >> tp.at(i) >> p1.at(i);
if (tp.at(i... | #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() {
int n;
cin >> n;
string s;
cin >> s;
int q;
cin >> q;
vector<int> tp(q), p1(q), p2(q);
vector<char> p3(q);
rep(i, q) {
cin >> tp.at(i) >> p1.at(i);
if (tp.at(i... | replace | 31 | 32 | 31 | 32 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
template <typename Monoid = ll> class SegmentTree {
public:
using Monoid_func = function<Monoid(Monoid, Monoid)>;
ll size;
std::vector<Monoid> segment; // 1-indexed 葉ノードは size ~ 2*size-1
Mon... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
template <typename Monoid = ll> class SegmentTree {
public:
using Monoid_func = function<Monoid(Monoid, Monoid)>;
ll size;
std::vector<Monoid> segment; // 1-indexed 葉ノードは size ~ 2*size-1
Mon... | replace | 78 | 79 | 78 | 82 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define pii pair<int, int>
#define pll pair<long long, long long>
using namespace std;
int BIT[300010][30], n, q, t, l, r, pos, ans;
char ch;
string s;
void updateBIT(int pos, int f, int val) {... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define fi first
#define se second
#define pb push_back
#define pii pair<int, int>
#define pll pair<long long, long long>
using namespace std;
int BIT[500010][30], n, q, t, l, r, pos, ans;
char ch;
string s;
void updateBIT(int pos, int f, int val) {... | replace | 10 | 11 | 10 | 11 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define all(x) (x).begin(), (x).end()
ll inf = LLONG_MAX;
long double pi = M_PI;
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }
void YES() { cout << "YES" << endl; }
void NO() { cout << "NO" << endl; }... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
#define all(x) (x).begin(), (x).end()
ll inf = LLONG_MAX;
long double pi = M_PI;
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }
void YES() { cout << "YES" << endl; }
void NO() { cout << "NO" << endl; }... | replace | 53 | 54 | 53 | 54 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define Int int64_t
using namespace std;
int main() {
int N, Q;
string s;
cin >> N >> s >> Q;
vector<set<int>> st(26);
for (int i = 0; i < N; ++i) {
st[(int)(s[i] - 'a')].insert(i);
}
for (int i = 0; i < 26; ++i) {
st[i].insert(N);
}
vector<int> ans;
for (int q = ... | #include <bits/stdc++.h>
#define Int int64_t
using namespace std;
int main() {
int N, Q;
string s;
cin >> N >> s >> Q;
vector<set<int>> st(26);
for (int i = 0; i < N; ++i) {
st[(int)(s[i] - 'a')].insert(i);
}
for (int i = 0; i < 26; ++i) {
st[i].insert(N);
}
vector<int> ans;
for (int q = ... | replace | 40 | 41 | 40 | 41 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <utility>
#include <vector>
using namespace std;
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i =... | #include <algorithm>
#include <climits>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <utility>
#include <vector>
using namespace std;
template <class T> ostream &operator<<(ostream &o, const vector<T> &v) {
o << "{";
for (int i =... | replace | 54 | 55 | 54 | 55 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define int lon... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#define int lon... | replace | 64 | 68 | 64 | 65 | 127 | /tmp/bd3b8006-6182-4af6-ab8e-9bea20318a86.out: error while loading shared libraries: libstdc++.so.6: failed to map segment from shared object
|
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define sz(x) (int)x.size()
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
string a;
cin >> a;
set<int> s[26];
for (int i = 0; i < sz(a); i++)
a[i] -= 'a', s[a[i]].insert(i);
int q;
cin >> q;
for (int t, l; q--;) {
cin >> t >> ... | #include <bits/stdc++.h>
#define sz(x) (int)x.size()
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
string a;
cin >> a;
set<int> s[26];
for (int i = 0; i < sz(a); i++)
a[i] -= 'a', s[a[i]].insert(i);
int q;
cin >> q;
for (int t, l; q--... | insert | 9 | 9 | 9 | 11 | -11 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define PI 3.14159265359
#define INF 1000100100
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define P pair<ll, ll>
#define PP pair<P, P>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
int Q;
cin >... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define PI 3.14159265359
#define INF 1000100100
#define all(x) (x).begin(), (x).end()
typedef long long ll;
#define P pair<ll, ll>
#define PP pair<P, P>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
int Q;
cin >... | replace | 33 | 34 | 33 | 34 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repo(i, n) for (int i = 1; i <= n; i++)
#define INF 1001001001
#define INFll 100100100100100
// debug用
#define PrintVec(x) \
for (auto elementPrintVec : x) { ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define repo(i, n) for (int i = 1; i <= n; i++)
#define INF 1001001001
#define INFll 100100100100100
// debug用
#define PrintVec(x) \
for (auto elementPrintVec : x) { ... | replace | 53 | 54 | 53 | 55 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const ll mod = 1e9 + 7;
const ll MAXN = 5e5 + 5;
vector<vector<ll>> t(MAXN, vector<ll>(26, 0));
ll n;
string s;
void build(ll v, ll tl, ll tr) {
if (tl == tr) {
t[v][s[tl] - 'a']++;
} else {
ll tm = (tr - tl) / 2 + tl;
build(2 ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
const ll mod = 1e9 + 7;
const ll MAXN = 5e5 + 5;
vector<vector<ll>> t(4 * MAXN, vector<ll>(26, 0));
ll n;
string s;
void build(ll v, ll tl, ll tr) {
if (tl == tr) {
t[v][s[tl] - 'a']++;
} else {
ll tm = (tr - tl) / 2 + tl;
buil... | replace | 9 | 10 | 9 | 10 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define mod 1000000007
#define lim 1000000000000000007
#define lim1 18446744073709551615 // Unsigned
#define sq(a) ((a) * (a))
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define mms(v, i) memset(v, ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
#define mod 1000000007
#define lim 1000000000000000007
#define lim1 18446744073709551615 // Unsigned
#define sq(a) ((a) * (a))
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define mms(v, i) memset(v, ... | replace | 91 | 92 | 91 | 93 | 0 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
using namespace std;
typedef long long ll;
#define _ << " " <<
#define all(X) (X).begi... | #include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <ctime>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
using namespace std;
typedef long long ll;
#define _ << " " <<
#define all(X) (X).begi... | delete | 29 | 30 | 29 | 29 | -11 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long lli;
// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You
// use the default template now. You can remove this line by using your custom
// template)
int main() {
lli N;
cin >> N;
vector<char> S(N);
set<lli> position... | #include <bits/stdc++.h>
using namespace std;
typedef long long lli;
// Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools (tips: You
// use the default template now. You can remove this line by using your custom
// template)
int main() {
lli N;
cin >> N;
vector<char> S(N);
set<lli> position... | replace | 51 | 59 | 51 | 54 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
struct SegTree {
int N;
vector<vector<int>> seg;
void init(int n) {
N = 1;
while (N < n)
N <<= 1;
seg = vector<vector<int>>(2 * N, vector<int>(26, 0));
}
void gather(int u) {
for (int i = 0; i < 26; i++)
seg[u][i] = seg[u * 2 + 1][i]... | #include <bits/stdc++.h>
using namespace std;
struct SegTree {
int N;
vector<vector<int>> seg;
void init(int n) {
N = 1;
while (N < n)
N <<= 1;
seg = vector<vector<int>>(2 * N, vector<int>(26, 0));
}
void gather(int u) {
for (int i = 0; i < 26; i++)
seg[u][i] = seg[u * 2 + 1][i]... | insert | 34 | 34 | 34 | 36 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, i, j;
string S;
cin >> N >> S;
vector<set<int>> al(26);
for (i = 0; i < 26; i++) {
al[i] = {N};
}
for (i = 0; i < N; i++) {
al[S[i] - 'a'].insert(i);
}
int Q;
cin >> Q;
for (i = 0; i < Q; i++) {
int a;
cin >> a;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, i, j;
string S;
cin >> N >> S;
vector<set<int>> al(26);
for (i = 0; i < 26; i++) {
al[i] = {N};
}
for (i = 0; i < N; i++) {
al[S[i] - 'a'].insert(i);
}
int Q;
cin >> Q;
for (i = 0; i < Q; i++) {
int a;
cin >> a;
... | replace | 34 | 35 | 34 | 35 | TLE | |
p02763 | C++ | Runtime Error | // #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define N 1000000007
#define N2 998244353
#define Nmax 100005
#define INF (ll)1e18
#define pll pair<ll, ll>
#define mp make_pair
#define fi first
#define se second
#define vv vector
#define rep(i, n) re... | // #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define N 1000000007
#define N2 998244353
#define Nmax 500005
#define INF (ll)1e18
#define pll pair<ll, ll>
#define mp make_pair
#define fi first
#define se second
#define vv vector
#define rep(i, n) re... | replace | 7 | 8 | 7 | 8 | 0 | |
p02763 | C++ | Time Limit Exceeded | // SmartCoder
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;
using namespace std;
#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(), (c).... | // SmartCoder
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace __gnu_pbds;
using namespace std;
#define sz(a) int((a).size())
#define pb push_back
#define mp make_pair
#define all(c) (c).begin(), (c).... | replace | 68 | 71 | 68 | 71 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N;
... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
int main() {
int N;
... | replace | 49 | 50 | 49 | 53 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
// const int INF = 1e8;
const ll INF = 1LL << 60;
typedef pair<int, int> P;
ll N, Q;
string S;
int main() {
cin >> N >> S >> Q;
vector<set<int>> is(26);
rep(i, N) is[S... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
// const int INF = 1e8;
const ll INF = 1LL << 60;
typedef pair<int, int> P;
ll N, Q;
string S;
int main() {
cin >> N >> S >> Q;
vector<set<int>> is(26);
rep(i, N) is[S... | replace | 37 | 38 | 37 | 39 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
int ri() {
int n;
scanf("%d", &n);
return n;
}
int main() {
int n = ri();
std::string s;
std::cin >> s;
for (auto &i : s)
i -= 'a';
int q = ri();
std::set<int> pos[26];
for (int i = 0; i < n; i++)
pos[s[i]].insert(i);
for (int i = 0; i < q; i++) {
if (ri() =... | #include <bits/stdc++.h>
int ri() {
int n;
scanf("%d", &n);
return n;
}
int main() {
int n = ri();
std::string s;
std::cin >> s;
for (auto &i : s)
i -= 'a';
int q = ri();
std::set<int> pos[26];
for (int i = 0; i < n; i++)
pos[s[i]].insert(i);
for (int i = 0; i < q; i++) {
if (ri() =... | replace | 22 | 25 | 22 | 25 | 0 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// マクロ&定数&関数 ===========... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// マクロ&定数&関数 ===========... | insert | 467 | 467 | 467 | 469 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
int n, Q;
char s[N];
class BIT {
public:
vector<int> sum;
void init(int SIZE) { sum.resize(SIZE, 0); }
void ins(const int &x, const int &v) {
for (int i = x; i <= n; i += i & -i)
sum[i] += v;
}
int ask(const int &x) const {
int... | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 5;
int n, Q;
char s[N];
class BIT {
public:
vector<int> sum;
void init(int SIZE) { sum.resize(SIZE, 0); }
void ins(const int &x, const int &v) {
for (int i = x; i <= n; i += i & -i)
sum[i] += v;
}
int ask(const int &x) const {
int... | replace | 24 | 25 | 24 | 25 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define MOD (1000000007LL)
using namespace std;
const int denom = 100;
int cntt[500000 / denom][26];
string S;
bool hoge(int n, int l, int r) {
int L = (l + denom) / denom;
int R = (r + 1) / denom;
// cout << L << " " << R << endl;
for (int I = L; I < R; I++) {
if (cntt[I][n] >... | #include <bits/stdc++.h>
#define MOD (1000000007LL)
using namespace std;
const int denom = 1000;
int cntt[500000 / denom][26];
string S;
bool hoge(int n, int l, int r) {
int L = (l + denom) / denom;
int R = (r + 1) / denom;
// cout << L << " " << R << endl;
for (int I = L; I < R; I++) {
if (cntt[I][n] ... | replace | 6 | 7 | 6 | 7 | TLE | |
p02763 | C++ | Time Limit Exceeded | //----AUTHOR:kkdrummer----/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>
using namespace __gnu_cxx;
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> P;
#define X real()
#define Y imag()
ld restant(P p) { return ab... | //----AUTHOR:kkdrummer----/
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>
using namespace __gnu_cxx;
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef long double ld;
typedef complex<ld> P;
#define X real()
#define Y imag()
ld restant(P p) { return ab... | replace | 148 | 150 | 148 | 149 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
int main() {
ll i, j;
ll n;
string s;
cin >> n >> s;
vector<set<ll>> vs(26);
for (i = 0; i < n; ++i) {
char tmp = s.at(i);
vs.at(tmp - 'a').insert(i);
}... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (i = 0; i < n; ++i)
#define all(v) v.begin(), v.end()
using ll = long long;
int main() {
ll i, j;
ll n;
string s;
cin >> n >> s;
vector<set<ll>> vs(26);
for (i = 0; i < n; ++i) {
char tmp = s.at(i);
vs.at(tmp - 'a').insert(i);
}... | replace | 44 | 46 | 44 | 46 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll INF = 1LL << 60;
ll N, Q;
string S;
// map<int, set<ll>> mp;
vector<set<int>> mp(26);
int main() {
// set<ll> v = {2, 4, 5, 7};
// au... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const ll INF = 1LL << 60;
ll N, Q;
string S;
// map<int, set<ll>> mp;
vector<set<int>> mp(26);
int main() {
// set<ll> v = {2, 4, 5, 7};
// au... | replace | 74 | 77 | 74 | 76 | TLE | |
p02763 | C++ | Runtime Error | // 失敗するからこそ
// そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#ifdef DAIJOBU
#include "/home/v-o_o-v/deb.h"
#define deb(x...) \
cerr << "[" << #x << "] = ["; \
_print(x)
#else
#include <bits/stdc++.h>
#define deb(x...... | // 失敗するからこそ
// そこから立ち向かって行く強さがあってそんな強さが本当の強さだと私は思うから
#ifdef DAIJOBU
#include "/home/v-o_o-v/deb.h"
#define deb(x...) \
cerr << "[" << #x << "] = ["; \
_print(x)
#else
#include <bits/stdc++.h>
#define deb(x...... | replace | 34 | 35 | 34 | 35 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using Graph = vector<vector<int>>;
const int MOD = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, Q;
strin... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pli = pair<ll, int>;
using Graph = vector<vector<int>>;
const int MOD = 1e9 + 7;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, Q;
strin... | replace | 39 | 40 | 39 | 40 | TLE | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define all(x) (x).begin(), (x).end()
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
string S;
cin >> S;
vector<vector<int>> v(26);
for (int i = 0; i < N; i++) {
v[S[i] - 'a'].... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define all(x) (x).begin(), (x).end()
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N;
cin >> N;
string S;
cin >> S;
vector<vector<int>> v(26);
for (int i = 0; i < N; i++) {
v[S[i] - 'a'].... | insert | 34 | 34 | 34 | 35 | 0 | |
p02763 | C++ | Memory Limit Exceeded | // g++ -Wall -Wextra -pedantic -std=c++17 -O3 -Wshadow -Wformat=2 -Wfloat-equal
// -Wconversion -Wlogical-op -Wcast-qual -Wcast-align -D_GLIBCXX_DEBUG
// -D_GLIBCXX_DEBUG_PEDANTIC contest.cpp
#include <bits/stdc++.h>
// #define _GLIBCXX_DEBUG 1
// #define _GLIBCXX_DEBUG_PEDANTIC 1
// #define _FORTIFY_SOURCE 2
using ... | // g++ -Wall -Wextra -pedantic -std=c++17 -O3 -Wshadow -Wformat=2 -Wfloat-equal
// -Wconversion -Wlogical-op -Wcast-qual -Wcast-align -D_GLIBCXX_DEBUG
// -D_GLIBCXX_DEBUG_PEDANTIC contest.cpp
#include <bits/stdc++.h>
// #define _GLIBCXX_DEBUG 1
// #define _GLIBCXX_DEBUG_PEDANTIC 1
// #define _FORTIFY_SOURCE 2
using ... | replace | 11 | 12 | 11 | 12 | MLE | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
long long n;
vector<vector<long ... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
long long n;
vector<vector<long ... | replace | 17 | 18 | 17 | 18 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int INF = 1001001001;
int main() {
int n, q;
string s;
cin >> n >> q >> s;
vector<set<int>> is(26);
rep(i, n) is[s[i] - 'a'].insert(i);
rep(qi, q) {
int t... | #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>;
const int INF = 1001001001;
int main() {
int n, q;
string s;
cin >> n >> s >> q;
vector<set<int>> is(26);
rep(i, n) is[s[i] - 'a'].insert(i);
rep(qi, q) {
int t... | replace | 11 | 12 | 11 | 12 | -11 | |
p02763 | C++ | Time Limit Exceeded | #include <algorithm>
#include <complex>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <... | #include <algorithm>
#include <complex>
#include <cstdint>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <regex>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <... | replace | 126 | 127 | 126 | 127 | TLE | |
p02763 | C++ | Runtime Error | // fahadmd16
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pf push_front
#define eb emplace_back
#define mp make_pair
#define ff first
#define ss second
#define db double
#define pll pair<ll, ll>
#define pdb pair<db, db>
#define ALL(a) (a).begin(),... | // fahadmd16
#include <algorithm>
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pf push_front
#define eb emplace_back
#define mp make_pair
#define ff first
#define ss second
#define db double
#define pll pair<ll, ll>
#define pdb pair<db, db>
#define ALL(a) (a).begin(),... | replace | 81 | 85 | 81 | 85 | 127 | /tmp/e1e6d343-11b0-4821-94a9-11faa618277b.out: error while loading shared libraries: libstdc++.so.6: failed to map segment from shared object
|
p02763 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <vector>
#define int long long
#define REP(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define MOD 1000000007
#define IDE 0
using namespace std;
const int MAX_N = 1 << 17;
int segtr_size, dat[2 * MAX_N - 1];
void init(int ... | #include <algorithm>
#include <cmath>
#include <iostream>
#include <queue>
#include <vector>
#define int long long
#define REP(i, n) for (int i = 0; i < n; i++)
#define pb push_back
#define MOD 1000000007
#define IDE 0
using namespace std;
const int MAX_N = 1 << 20;
int segtr_size, dat[2 * MAX_N - 1];
void init(int ... | replace | 13 | 14 | 13 | 14 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
int main() {
int n, q;
string s;
cin >> n >> s >> q;
vector<set<int>> S(26);
rep(i, n) { S[s[i] - 'a'].insert(i); }
rep(iq, q) {
int q;
ci... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, n) for (int i = 1; i <= n; i++)
typedef long long ll;
int main() {
int n, q;
string s;
cin >> n >> s >> q;
vector<set<int>> S(26);
rep(i, n) { S[s[i] - 'a'].insert(i); }
rep(iq, q) {
int q;
ci... | replace | 22 | 23 | 22 | 23 | -11 | |
p02763 | C++ | Time Limit Exceeded | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author champon
*/
#include <fstream>
#include <iostream>
#include <bits/stdc++.h>
#define se cout << "test ok" << endl;
#define sp << " " <<
using namespace std;
using ll = long long;
using ld = long double;
const ll mod = l... | /**
* code generated by JHelper
* More info: https://github.com/AlexeyDmitriev/JHelper
* @author champon
*/
#include <fstream>
#include <iostream>
#include <bits/stdc++.h>
#define se cout << "test ok" << endl;
#define sp << " " <<
using namespace std;
using ll = long long;
using ld = long double;
const ll mod = l... | replace | 135 | 136 | 135 | 136 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
set<int> st[30];
vector<char> s(n + 3);
for (int i = 1; i <= n; i++) {
cin >> s[i];
st[s[i] - 'a'].insert(i);
}
int q;
cin >> q;
for (int i = 1; i <= q; i++) {
int t;
cin >> t;
if (t == 1) {
int x;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
set<int> st[30];
vector<char> s(n + 3);
for (int i = 1; i <= n; i++) {
cin >> s[i];
st[s[i] - 'a'].insert(i);
}
int q;
cin >> q;
for (int i = 1; i <= q; i++) {
int t;
cin >> t;
if (t == 1) {
int x;
... | replace | 20 | 21 | 20 | 21 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include ... | #include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include ... | replace | 248 | 249 | 248 | 249 | TLE | |
p02763 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <ctype.h>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <istream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <ctype.h>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iostream>
#include <istream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack... | replace | 27 | 28 | 27 | 28 | MLE | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <forward_list>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#define rep(i, s, g) for ((i) = (s); (i) < (g); ++(i))
using namespace std;
using ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <forward_list>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#define rep(i, s, g) for ((i) = (s); (i) < (g); ++(i))
using namespace std;
using ... | replace | 21 | 22 | 21 | 22 | 0 | |
p02763 | C++ | Runtime Error | // 目標:セグメント木でACしたい
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int VAL = 'z' - 'a' + 1;
const int MAX_N = 100100;
set<int> st[VAL];
char S[MAX_N];
int N, Q;
vector<int> res;
int main() {
scanf("%d", &N);
scanf("%s", S);
for (int i = 0; i < VAL; ++i) {
st[i].clear();
st[i].i... | // 目標:セグメント木でACしたい
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int VAL = 'z' - 'a' + 1;
const int MAX_N = 500100;
set<int> st[VAL];
char S[MAX_N];
int N, Q;
vector<int> res;
int main() {
scanf("%d", &N);
scanf("%s", S);
for (int i = 0; i < VAL; ++i) {
st[i].clear();
st[i].i... | replace | 6 | 7 | 6 | 7 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, q;
string s;
vector<set<int>> A(26);
cin >> n >> s >> q;
for (int i = 0; i < n; i++) {
A[s[i] - 'a'].insert(i);
}
for (int i = 0; i < q; i++) {
int x;
cin >... | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n, q;
string s;
vector<set<int>> A(26);
cin >> n >> s >> q;
for (int i = 0; i < n; i++) {
A[s[i] - 'a'].insert(i);
}
for (int i = 0; i < q; i++) {
int x;
cin >... | replace | 37 | 38 | 37 | 38 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define DEBUG if (0)
#define lli long long int
#define ldouble long double
using namespace std;
const int maxN = 5e5;
int n;
char s[maxN + 1];
int segtree[26][maxN];
void build(int k, int i = 1, int lo = 0, int hi = n - 1) {
if (lo == hi) {
segtree[k][i] = (s[lo] - 'a') == k;
return... | #include <bits/stdc++.h>
#define DEBUG if (0)
#define lli long long int
#define ldouble long double
using namespace std;
const int maxN = 5e5;
int n;
char s[maxN + 1];
int segtree[26][4 * maxN];
void build(int k, int i = 1, int lo = 0, int hi = n - 1) {
if (lo == hi) {
segtree[k][i] = (s[lo] - 'a') == k;
re... | replace | 10 | 11 | 10 | 11 | 0 | |
p02763 | C++ | Runtime Error | /**
* author: zjsdut
* created: 2020/03/29 21:58:23
**/
#include <bits/stdc++.h>
using namespace std;
struct fast_ios {
fast_ios() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
};
} fast_ios_;
template <typename A, typename B> bool chkmin(A &a, const B ... | /**
* author: zjsdut
* created: 2020/03/29 21:58:23
**/
#include <bits/stdc++.h>
using namespace std;
struct fast_ios {
fast_ios() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(10);
};
} fast_ios_;
template <typename A, typename B> bool chkmin(A &a, const B ... | replace | 204 | 205 | 204 | 205 | 0 | |
p02763 | C++ | Runtime Error | #define fast ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#include <bits/stdc++.h>
#define pll pair<ll, ll>
#define vi vector<int>
#define ld long double
#define ll long long
#define pb push_back
#define mid (l + r) / 2
#define S second
#define F first
using namespace std;
int n, q;
string s;
vi tree[500009];
... | #define fast ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0)
#include <bits/stdc++.h>
#define pll pair<ll, ll>
#define vi vector<int>
#define ld long double
#define ll long long
#define pb push_back
#define mid (l + r) / 2
#define S second
#define F first
using namespace std;
int n, q;
string s;
vi tree[2000009];... | replace | 13 | 14 | 13 | 14 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define pb push_back
#define ff first
#define ss second
#define assign(x, val) memset(x, val, sizeof(x))
#define motherfucker \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define all... | #include <bits/stdc++.h>
#define pb push_back
#define ff first
#define ss second
#define assign(x, val) memset(x, val, sizeof(x))
#define motherfucker \
ios_base::sync_with_stdio(false); \
cin.tie(NULL);
#define all... | replace | 50 | 51 | 50 | 51 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// https://atcoder.jp/contests/abc157/submissions/10486180
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, Q;
string S;
cin >> N >> S >> Q;
vector<int> A(N);
for (int i = 0; i < N; ++i) {
A[i] = 1 << (S[i] - 'a');
}
int x, l, r, i;
cha... | #include <iostream>
#include <vector>
using namespace std;
// https://atcoder.jp/contests/abc157/submissions/10486180
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N, Q;
string S;
cin >> N >> S >> Q;
vector<int> A(N);
for (int i = 0; i < N; ++i) {
A[i] = 1 << (S[i] - 'a');
}
int x, l... | replace | 0 | 1 | 0 | 2 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
typedef pair<int, pii> p;
typedef long long ll;
typedef pai... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
typedef pair<int, int> pii;
typedef pair<int, pii> p;
typedef long long ll;
typedef pai... | replace | 59 | 60 | 59 | 60 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N, Q;
char S[500010];
set<int> s[26];
set<int>::iterator v[500010];
int main() {
scanf("%d%s%d", &N, S, &Q);
for (int i = 0; i < N; i++) {
v[i] = s[S[i] - 'a'].insert(i).first;
}
for (; Q; Q--) {
int a;
scanf("%d", &a);
if (... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int N, Q;
char S[500010];
set<int> s[26];
set<int>::iterator v[500010];
int main() {
scanf("%d%s%d", &N, S, &Q);
for (int i = 0; i < N; i++) {
v[i] = s[S[i] - 'a'].insert(i).first;
}
for (; Q; Q--) {
int a;
scanf("%d", &a);
if (... | replace | 29 | 30 | 29 | 30 | TLE | |
p02763 | 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;
int main() {
int n, q;
string s;
cin >> n >> s >> q;
vector<set<int>> se(26);
rep(i, n) se[s[i] - 'a'].insert(i);
rep(i, q) {
int a, b;
cin >> a >> b;
b--;
if (a == 1) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
int main() {
int n, q;
string s;
cin >> n >> s >> q;
vector<set<int>> se(26);
rep(i, n) se[s[i] - 'a'].insert(i);
rep(i, q) {
int a, b;
cin >> a >> b;
b--;
if (a == 1) {
... | replace | 27 | 30 | 27 | 29 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define ar array
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using oset =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_no... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define ar array
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using oset =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_no... | replace | 184 | 185 | 184 | 185 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define sz(x) int(x.size())
#define ALL(c) (c).begin(), (c).end()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.b... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < n; ++i)
#define sz(x) int(x.size())
#define ALL(c) (c).begin(), (c).end()
#define SUM(x) std::accumulate(ALL(x), 0LL)
#define MIN(v) *std::min_element(v.begin(), v.end())
#define MAX(v) *std::max_element(v.begin(), v.end())
#define EXIST(v, x) (std::find(v.b... | replace | 66 | 67 | 66 | 67 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define pb push_back
#define fi first
#define se second
#define rep(i, n) for (ll i = 0; i < n; i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define rep1(i, n) for (ll i = 1; i <= n; i++)
#define per1(i, n) for (ll i = n; i >... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define endl "\n"
#define pb push_back
#define fi first
#define se second
#define rep(i, n) for (ll i = 0; i < n; i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define rep1(i, n) for (ll i = 1; i <= n; i++)
#define per1(i, n) for (ll i = n; i >... | replace | 11 | 12 | 11 | 12 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i ... | #include <bits/stdc++.h>
using ll = long long;
using namespace std;
#define rep(i, n) for (int i = 0, i##_len = (int)(n); i < i##_len; i++)
#define reps(i, n) for (int i = 1, i##_len = (int)(n); i <= i##_len; i++)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define rreps(i, n) for (int i = ((int)(n)); i ... | replace | 115 | 116 | 115 | 116 | -11 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
int main() {
ll n;
string s;
vector<set<ll>> a(26);
cin >> n >> s;
ll m;
cin >> m;
for (ll i = 0; i < n; i++) {
ll now = s[i] - 'a';
a[now].insert(i);
// cout <<now<< " "<<i<<endl... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1LL << 62
#define inf 1000000007
int main() {
ll n;
string s;
vector<set<ll>> a(26);
cin >> n >> s;
ll m;
cin >> m;
for (ll i = 0; i < n; i++) {
ll now = s[i] - 'a';
a[now].insert(i);
// cout <<now<< " "<<i<<endl... | replace | 29 | 30 | 29 | 30 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int tree[1000001];
string s;
void build(int node, int start, int end) {
if (start == end) {
int r;
r = s[start - 1] - 'a';
tree[node] = 1 << r;
} else {
int mid;
mid = (start + end) / 2;
build(2 * node, start, mid);
build(2 * node + 1, mid + ... | #include <bits/stdc++.h>
using namespace std;
int tree[3000000];
string s;
void build(int node, int start, int end) {
if (start == end) {
int r;
r = s[start - 1] - 'a';
tree[node] = 1 << r;
} else {
int mid;
mid = (start + end) / 2;
build(2 * node, start, mid);
build(2 * node + 1, mid + ... | replace | 2 | 3 | 2 | 3 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int NEUTRO = 0;
struct segmentTree {
const int NEUTRO = 0;
int n;
vector<int> st;
void init(int _) {
n = 5 * _;
st.resize(n + 1000);
for (int i = 0; i < n; ++i)
st[i] = 0;
}
void update(int pos, int value) {
for (st[pos += n] = va... | #include <bits/stdc++.h>
using namespace std;
const int NEUTRO = 0;
struct segmentTree {
const int NEUTRO = 0;
int n;
vector<int> st;
void init(int _) {
n = _;
st.resize(5 * n);
}
void update(int pos, int value) {
for (st[pos += n] = value; pos > 1; pos >>= 1)
st[pos >> 1] = st[pos] + s... | replace | 10 | 15 | 10 | 12 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
... | replace | 44 | 46 | 44 | 45 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define repl(i, l, r) for (ll i = (l); i < (r); i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define perl(i, r, l) for (ll i = r - 1; i >= l; i--)
#define fi first
#define se second
#define mp make_pair
#define pb push_... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define repl(i, l, r) for (ll i = (l); i < (r); i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define perl(i, r, l) for (ll i = r - 1; i >= l; i--)
#define fi first
#define se second
#define mp make_pair
#define pb push_... | replace | 73 | 74 | 73 | 74 | TLE | |
p02763 | C++ | Time Limit Exceeded |
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const ll MOD_CO... |
#include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const ll MOD_CO... | replace | 60 | 61 | 60 | 61 | TLE | |
p02763 | C++ | Runtime Error | // #include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18) + 1;
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1},
Dy[8] = {-1, -... | // #include <tourist>
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1e9;
const ll LINF = ll(1e18) + 1;
const int MOD = 1000000007;
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1},
Dy[8] = {-1, -... | replace | 133 | 134 | 133 | 134 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using namespace std;
// segtree code from : https://codeforces.com/blog/entry/18051
const int N = 1e5 + 5; // limit for array size
const int AL = 26; // alphabet size
int n; // array size
int t[AL][2 * N];
void build() { // build the tree
for (int ... | #include <bits/stdc++.h>
using namespace std;
using namespace std;
// segtree code from : https://codeforces.com/blog/entry/18051
const int N = 5e5 + 5; // limit for array size
const int AL = 26; // alphabet size
int n; // array size
int t[AL][2 * N];
void build() { // build the tree
for (int ... | replace | 7 | 8 | 7 | 8 | 0 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
ll intpow(int n, int m) {
if (m == 0)
return 1;
return n * int... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <utility>
#include <vector>
typedef long long ll;
#define rep(i, n) for (int i = 0; i < n; i++)
using namespace std;
ll intpow(int n, int m) {
if (m == 0)
return 1;
return n * int... | replace | 27 | 28 | 27 | 28 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define BIT(n) (1LL << (n))
#define BITF(n, i) (((n) >> (i)) & 1)
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define REPI(i, x) for (int i = 1; i <= x; i++)
#define FORI(i, m, n) for (int i = m; i <= n; i++)
#define REPR(i... | #include <bits/stdc++.h>
using namespace std;
#define BIT(n) (1LL << (n))
#define BITF(n, i) (((n) >> (i)) & 1)
#define REP(i, n) for (int i = 0; i < n; i++)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define REPI(i, x) for (int i = 1; i <= x; i++)
#define FORI(i, m, n) for (int i = m; i <= n; i++)
#define REPR(i... | replace | 236 | 237 | 236 | 237 | 0 | |
p02763 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
set<int> tp[26];
void rem(int a, int pos) {
assert(tp[a].find(pos) != tp[a].end());
tp[a].erase(pos);
}
void add(int a, int pos) { tp[a].insert(pos); }
int cdis(int l, int r) {
int c = 0;
for (int i = 0; i < 26; i++) {
set<int>::iterator e = tp[i].lower_boun... | #include "bits/stdc++.h"
using namespace std;
set<int> tp[26];
void rem(int a, int pos) {
assert(tp[a].find(pos) != tp[a].end());
tp[a].erase(pos);
}
void add(int a, int pos) { tp[a].insert(pos); }
int cdis(int l, int r) {
int c = 0;
for (int i = 0; i < 26; i++) {
set<int>::iterator e = tp[i].lower_boun... | insert | 49 | 49 | 49 | 51 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define ll long long
#define fi first
#define se second
using namespace std;
typedef pair<int, int> ii;
const ll siz = 1e5 + 10;
const ll SIZ = 1e6 + 10;
const ll mod = 1e9 + 7;
const ll maxx = 2e9;
const ll MAXX = 1e18;
int n, q, t;
string s;
int tree[26][siz];
void up... | #include <bits/stdc++.h>
#define int long long
#define ll long long
#define fi first
#define se second
using namespace std;
typedef pair<int, int> ii;
const ll siz = 5e5 + 10;
const ll SIZ = 1e6 + 10;
const ll mod = 1e9 + 7;
const ll maxx = 2e9;
const ll MAXX = 1e18;
int n, q, t;
string s;
int tree[26][siz];
void up... | replace | 8 | 9 | 8 | 9 | 0 | |
p02763 | C++ | Runtime Error |
#include <algorithm>
#include <functional>
#include <iomanip> //! for setprecision(10)
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <utility>
using namespace std;
typedef long long LL;
#define dump(c) ... |
#include <algorithm>
#include <functional>
#include <iomanip> //! for setprecision(10)
#include <iostream>
#include <math.h>
#include <string>
#include <vector>
#include <cstring>
#include <map>
#include <queue>
#include <set>
#include <utility>
using namespace std;
typedef long long LL;
#define dump(c) ... | replace | 84 | 86 | 84 | 89 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int N, Q;
string S;
cin >> N >> S >> Q;
vector<set<int>> vsi(26);
for (int i = 0; i < S.size(); ++i) {
vsi[S[i] - 'a'].insert(i);
}
for (int i = 0; i < Q; ++i) {
in... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int N, Q;
string S;
cin >> N >> S >> Q;
vector<set<int>> vsi(26);
for (int i = 0; i < S.size(); ++i) {
vsi[S[i] - 'a'].insert(i);
}
for (int i = 0; i < Q; ++i) {
in... | replace | 34 | 38 | 34 | 38 | TLE | |
p02763 | C++ | Runtime Error | /**
* author : 𝒌𝒚𝒐𝒎𝒖𝒌𝒚𝒐𝒎𝒖𝒑𝒖𝒓𝒊𝒏
* created : 2020-03-02 04:41:18
**/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#includ... | /**
* author : 𝒌𝒚𝒐𝒎𝒖𝒌𝒚𝒐𝒎𝒖𝒑𝒖𝒓𝒊𝒏
* created : 2020-03-02 04:41:18
**/
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#includ... | replace | 123 | 124 | 123 | 124 | 0 | |
p02763 | C++ | Runtime Error | #pragma GCC optimize("O3")
#pragma GCC target("avx")
// #include<bits/stdc++.h>
#include <cstdio>
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... | #pragma GCC optimize("O3")
#pragma GCC target("avx")
// #include<bits/stdc++.h>
#include <cstdio>
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... | replace | 20 | 21 | 20 | 21 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <string>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORR(i, a, b) for (ll i = (a); i <= (b); ... | #include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <string>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define ll long long
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define FORR(i, a, b) for (ll i = (a); i <= (b); ... | replace | 66 | 67 | 66 | 67 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0), ios::sync_with_stdio(false);
int n, Q;
string s;
cin >> n >> s >> Q;
vector<set<int>> st(26);
for (int i = 0; i < n; ++i) {
st.at(s.at(i) - 'a').insert(i);
}
for (int i = 0; i < Q; ++i) {
int q;
cin >> q;
if (q == 1)... | #include <bits/stdc++.h>
using namespace std;
int main() {
cin.tie(0), ios::sync_with_stdio(false);
int n, Q;
string s;
cin >> n >> s >> Q;
vector<set<int>> st(26);
for (int i = 0; i < n; ++i) {
st.at(s.at(i) - 'a').insert(i);
}
for (int i = 0; i < Q; ++i) {
int q;
cin >> q;
if (q == 1)... | replace | 31 | 32 | 31 | 32 | TLE | |
p02763 | C++ | Time Limit Exceeded | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vb = vector<bool>;
using vvb = vector<vb>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, s, n) for (int ... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vl = vector<ll>;
using vvl = vector<vl>;
using vb = vector<bool>;
using vvb = vector<vb>;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define rep(i, s, n) for (int ... | replace | 41 | 42 | 41 | 42 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n, m;
int f[26][500001];
char a[500001];
int lowbit(int x) { return x & (-x); }
void build() {
for (int i = 0; i < 26; i++)
for (int j = 1; j <= n; j++)
if (lowbit(j) <= n)
f[i][j + lowbit(j)] += f[i][j];
}
void change(int x, int y, int z) {
while ... | #include <bits/stdc++.h>
using namespace std;
int n, m;
int f[26][5000001];
char a[5000001];
int lowbit(int x) { return x & (-x); }
void build() {
for (int i = 0; i < 26; i++)
for (int j = 1; j <= n; j++)
if (lowbit(j) <= n)
f[i][j + lowbit(j)] += f[i][j];
}
void change(int x, int y, int z) {
whil... | replace | 3 | 5 | 3 | 5 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
const lint mod = 1e9 + 7;
#define all(x) (x).begin(), (x).end()
#define bitcount(n) __builtin_popcountl((lint)(n))
#define fcout cout << fixed << setprecision(15)
#define highest(x) (63 - __builtin_clzl(x))
template <class T> inline void YES(T condit... | #include <bits/stdc++.h>
using namespace std;
using lint = long long;
const lint mod = 1e9 + 7;
#define all(x) (x).begin(), (x).end()
#define bitcount(n) __builtin_popcountl((lint)(n))
#define fcout cout << fixed << setprecision(15)
#define highest(x) (63 - __builtin_clzl(x))
template <class T> inline void YES(T condit... | replace | 174 | 175 | 174 | 175 | 0 | |
p02763 | C++ | Runtime Error | #pragma region template
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vld = vector<l... | #pragma region template
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vld = vector<l... | insert | 181 | 181 | 181 | 182 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define NL endl
#define pi 2.0 * acos(0.0)
#define mod 1e9 + 7
#define FOR(i, j, n) for (ll i = j; i < n; i++)
#define RFOR(i, j, n) for (ll i = j; i >= n; i--)
#define fastIO \
ios_bas... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define NL endl
#define pi 2.0 * acos(0.0)
#define mod 1e9 + 7
#define FOR(i, j, n) for (ll i = j; i < n; i++)
#define RFOR(i, j, n) for (ll i = j; i >= n; i--)
#define fastIO \
ios_bas... | replace | 42 | 43 | 42 | 43 | TLE | |
p02763 | C++ | Time Limit Exceeded | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <functional>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <bitset>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#in... | #define _CRT_SECURE_NO_WARNINGS
#include <algorithm>
#include <functional>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <bitset>
#include <deque>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#in... | replace | 93 | 94 | 93 | 94 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RNG(i, from, to) for (int i = (from); i < (int)(to); i++)
#define gcd(i, j) __gcd((i), (j))
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<ll> vecll;
template <typename S, typename T> string to_s... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); i++)
#define RNG(i, from, to) for (int i = (from); i < (int)(to); i++)
#define gcd(i, j) __gcd((i), (j))
typedef long long ll;
typedef pair<int, int> pii;
typedef vector<ll> vecll;
template <typename S, typename T> string to_s... | replace | 74 | 77 | 74 | 77 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define _LL long long
#define rep(i, n) for (_LL i = 0; i < (_LL)(n); i++)
int main() {
int n;
cin >> n;
string s;
cin >> s;
set<int> *pos = new set<int>[26];
rep(i, n) pos[s[i] - 'a'].insert(i);
int q;
cin >> q;
rep(k, q) {
int t;... | #include <bits/stdc++.h>
#include <iostream>
using namespace std;
#define _LL long long
#define rep(i, n) for (_LL i = 0; i < (_LL)(n); i++)
int main() {
int n;
cin >> n;
string s;
cin >> s;
set<int> *pos = new set<int>[26];
rep(i, n) pos[s[i] - 'a'].insert(i);
int q;
cin >> q;
rep(k, q) {
int t;... | insert | 26 | 26 | 26 | 27 | 0 | |
p02763 | C++ | Runtime Error | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
const int MAX = 1 << 17;
int N, dat[2 * MAX - 1];
// 初期化
void init(int n) {
N = 1;
while (N < n)
N *= 2;
for (int i = 0; i < 2 * N - 1; i++)
dat[i] ... | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
const int MAX = 1 << 20;
int N, dat[2 * MAX - 1];
// 初期化
void init(int n) {
N = 1;
while (N < n)
N *= 2;
for (int i = 0; i < 2 * N - 1; i++)
dat[i] ... | replace | 7 | 8 | 7 | 8 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.