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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
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 | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 6;
int tree[26][N];
int n;
void add(int type, int id, int val) {
while (id <= n) {
tree[type][id] += val;
id += (id & -id);
}
}
int qu(int type, int till) {
int ans = 0;
while (till >= 1) {
ans += tree[type][till];
till -= (till &... | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5 + 6;
int tree[26][N];
int n;
void add(int type, int id, int val) {
while (id <= n) {
tree[type][id] += val;
id += (id & -id);
}
}
int qu(int type, int till) {
int ans = 0;
while (till >= 1) {
ans += tree[type][till];
till -= (till &... | replace | 2 | 3 | 2 | 3 | 0 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, n) for... | #include <algorithm>
#include <cmath>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
#define REP(i, n) for... | replace | 33 | 34 | 33 | 34 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// 定数
const long long MOD1 = 1000000007;
const long long MOD2 = 998244353;
const long double PI = 3.1415926535897932;
const long long MAXLL = 9223372036854775807;
const long long INF = 2305843009213693951;
const long long dx[] = {0, 1, 0, -1, 1, -1, 1, -1};
const long long... | #include <bits/stdc++.h>
using namespace std;
// 定数
const long long MOD1 = 1000000007;
const long long MOD2 = 998244353;
const long double PI = 3.1415926535897932;
const long long MAXLL = 9223372036854775807;
const long long INF = 2305843009213693951;
const long long dx[] = {0, 1, 0, -1, 1, -1, 1, -1};
const long long... | replace | 137 | 138 | 137 | 138 | TLE | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include... | replace | 115 | 116 | 115 | 116 | 0 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
// info[i] := 文字 ('a' + i) がどの位置にあるか
// これを各文字について、二分木で持っておく
vector<set<int>> info(26);
for (int i = 0; i < n; ++i) {
int id = s[i] - 'a';
... | #include <algorithm>
#include <iostream>
#include <set>
#include <string>
#include <vector>
using namespace std;
int main() {
int n;
string s;
cin >> n >> s;
// info[i] := 文字 ('a' + i) がどの位置にあるか
// これを各文字について、二分木で持っておく
vector<set<int>> info(26);
for (int i = 0; i < n; ++i) {
int id = s[i] - 'a';
... | replace | 32 | 33 | 32 | 33 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, f, n) for (ll i = (f); (i) < (n); i++)
#define repe(i, f, n) for (ll i = (f); (i) <= (n); i++)
using namespace std;
using ll = long long;
ll INF = 1e+18;
using G = vector<map<int, int>>;
int main() {
int N;
cin >> N;
vector<char> ori(N);
rep(i, 0, N) cin >> ori[i];
ma... | #include <bits/stdc++.h>
#define rep(i, f, n) for (ll i = (f); (i) < (n); i++)
#define repe(i, f, n) for (ll i = (f); (i) <= (n); i++)
using namespace std;
using ll = long long;
ll INF = 1e+18;
using G = vector<map<int, int>>;
int main() {
int N;
cin >> N;
vector<char> ori(N);
rep(i, 0, N) cin >> ori[i];
ma... | replace | 27 | 30 | 27 | 31 | 0 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <queue>
#include <vector>
#define REP(i, x, n) for (int i = x; i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
typedef long long int lli;
typedef pair<lli, lli> Pii;
const int INF = 10 ^ 9 + 11555;
int mai... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <iostream>
#include <queue>
#include <vector>
#define REP(i, x, n) for (int i = x; i < (int)(n); i++)
#define rep(i, n) REP(i, 0, n)
using namespace std;
typedef long long int lli;
typedef pair<lli, lli> Pii;
const int INF = 10 ^ 9 + 11555;
int mai... | replace | 41 | 42 | 41 | 42 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
template <typename T> using V = std::vector<T>;
using Vi = V<int>;
using VVi = V<V<int>>;
using Vl = V<ll>;
using VVl = V<V<ll>>;
using Vs = V<string>;
template <typename T1, typename T2> using P = std::pair<T1, T2>;
using Pii = P<int, int>;
using ... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
template <typename T> using V = std::vector<T>;
using Vi = V<int>;
using VVi = V<V<int>>;
using Vl = V<ll>;
using VVl = V<V<ll>>;
using Vs = V<string>;
template <typename T1, typename T2> using P = std::pair<T1, T2>;
using Pii = P<int, int>;
using ... | replace | 60 | 63 | 60 | 62 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
struct BIT {
vector<int> node;
int sz;
BIT(int sz) : sz(sz) { node.resize(sz, 0); }
int sum(int i) {
int res = 0;
for (i--; i >= 0; i = (i & (i + 1)) - 1)
res += node[i];
return res;
}
void add(int i, int x) {
for (; i < sz; i |= i + 1)
... | #include <bits/stdc++.h>
using namespace std;
struct BIT {
vector<int> node;
int sz;
BIT(int sz) : sz(sz) { node.resize(sz, 0); }
int sum(int i) {
int res = 0;
for (i--; i >= 0; i = (i & (i + 1)) - 1)
res += node[i];
return res;
}
void add(int i, int x) {
for (; i < sz; i |= i + 1)
... | replace | 50 | 51 | 50 | 51 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define int long long
typedef long long ll;
using namespace std;
ll N, Q;
vector<char> vch;
set<ll> S[26];
signed main() {
cin >> N;
vch.resize(N);
for (int i = 0; i < N; i++) {
cin >> vch[i];
S[vch[i] - 'a'].insert(i);
}
/*
for(int i=0;i<26;i++) {
for(set<ll>::itera... | #include <bits/stdc++.h>
#define int long long
typedef long long ll;
using namespace std;
ll N, Q;
vector<char> vch;
set<ll> S[26];
signed main() {
cin >> N;
vch.resize(N);
for (int i = 0; i < N; i++) {
cin >> vch[i];
S[vch[i] - 'a'].insert(i);
}
/*
for(int i=0;i<26;i++) {
for(set<ll>::itera... | replace | 43 | 46 | 43 | 46 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#include "math.h"
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<int> vin;
typedef pair<ll, ll> P;
typedef vector<P> vp;
#define rep(i, a, b) for (ll i = (a); i < (b); ++i)
#define dre... | #include "bits/stdc++.h"
#include "math.h"
using namespace std;
typedef long long ll;
typedef vector<ll> vll;
typedef vector<vll> vvll;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef vector<int> vin;
typedef pair<ll, ll> P;
typedef vector<P> vp;
#define rep(i, a, b) for (ll i = (a); i < (b); ++i)
#define dre... | replace | 67 | 69 | 67 | 69 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;
int main()... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;
int main()... | replace | 42 | 43 | 42 | 43 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;
int main()... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define whole(x) (x).begin(), (x).end()
#define UNIQUE(v) v.erase(unique(v.begin(), v.end()), v.end())
using ll = long long;
using P = pair<int, int>;
const int mod = 1000000007;
int main()... | insert | 33 | 33 | 33 | 34 | 0 | |
p02763 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <limits>
#include <map>
#inclu... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <fstream>
#include <iostream>
#include <limits>
#include <map>
#inclu... | replace | 131 | 132 | 131 | 132 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll read() {
ll a = 0, b = getchar(), c = 1;
while (!isdigit(b))
c = b == '-' ? -1 : 1, b = getchar();
while (isdigit(b))
a = a * 10 + b - '0', b = getchar();
return a * c;
}
int n, m, a[500005], b[500005], sum[500005];
string s;
void bu... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll read() {
ll a = 0, b = getchar(), c = 1;
while (!isdigit(b))
c = b == '-' ? -1 : 1, b = getchar();
while (isdigit(b))
a = a * 10 + b - '0', b = getchar();
return a * c;
}
int n, m, a[1000005], b[1000005], sum[1000005];
string s;
void... | replace | 11 | 12 | 11 | 12 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
const int N = 5e5 + 54;
int n, q, type, x, k, s[N << 2][30], seg[N << 2], pre[N];
char S[N];
int ans, A;
void pushup(int x) {
for (int i = 0; i < 26; ++i)
s[x][i] = s[x << 1][i] + s[x << 1 | 1][i];
seg[x] = seg[x << 1] | seg[x << 1 | 1];
}
void build(int l, int r, int x) {
if (l == r)... | #include <bits/stdc++.h>
const int N = 5e5 + 54;
int n, q, type, x, k, s[N << 2][30], seg[N << 2], pre[N << 2];
char S[N];
int ans, A;
void pushup(int x) {
for (int i = 0; i < 26; ++i)
s[x][i] = s[x << 1][i] + s[x << 1 | 1][i];
seg[x] = seg[x << 1] | seg[x << 1 | 1];
}
void build(int l, int r, int x) {
if (l ... | replace | 2 | 3 | 2 | 3 | -11 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define MAX 25 * 1e13
#define N 200010
using namespace std;
int MOD = 1000000007;
#define MAX_Q 1001000
using namespace std;
int max_int = 1e9;
... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <vector>
#define ll long long
#define MAX 25 * 1e13
#define N 200010
using namespace std;
int MOD = 1000000007;
#define MAX_Q 2001000
using namespace std;
int max_int = 1e9;
... | replace | 16 | 17 | 16 | 17 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define M 1000000007
#define pi ld(acos(-1.0))
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Rep(i, n) for (int i = 1; i < (int)(n); i++)
#define repp(i, a, b) for (int i = a; i <= (int)(b); i++)
#define Repp(i, a, b) for (int i = a; i >= (int)(b); i--)
#define cs ... | #include <bits/stdc++.h>
#define M 1000000007
#define pi ld(acos(-1.0))
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define Rep(i, n) for (int i = 1; i < (int)(n); i++)
#define repp(i, a, b) for (int i = a; i <= (int)(b); i++)
#define Repp(i, a, b) for (int i = a; i >= (int)(b); i--)
#define cs ... | replace | 47 | 48 | 47 | 49 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 7;
const int mod = 1e9 + 7;
typedef long long ll;
int n, m, k;
set<int> s[30];
set<int>::iterator it1, it2;
char ch[maxn];
int main() {
scanf("%d", &n);
scanf("%s", ch + 1);
for (int i = 1; i <= n; i++)
s[int(ch[i] - 'a')].insert(i);
int ... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 7;
const int mod = 1e9 + 7;
typedef long long ll;
int n, m, k;
set<int> s[30];
set<int>::iterator it1, it2;
char ch[maxn];
int main() {
scanf("%d", &n);
scanf("%s", ch + 1);
for (int i = 1; i <= n; i++)
s[int(ch[i] - 'a')].insert(i);
int ... | replace | 2 | 3 | 2 | 3 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
template <typename T> struct BIT {
int n;
vector<T> f;
BIT(int n = 200000) : n(n), f(n + 1) {}
T getsum(int p) {
T ret = 0;
for (++p; p > 0; p -= p & -p) {
ret += f[p];
}
return ret;
}
void add(int p, T x) {
for (++p; p <= n; p += p &... | #include <bits/stdc++.h>
using namespace std;
template <typename T> struct BIT {
int n;
vector<T> f;
BIT(int n = 500002) : n(n), f(n + 1) {}
T getsum(int p) {
T ret = 0;
for (++p; p > 0; p -= p & -p) {
ret += f[p];
}
return ret;
}
void add(int p, T x) {
for (++p; p <= n; p += p &... | replace | 6 | 7 | 6 | 7 | 0 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <climits>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include ... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <climits>
#include <deque>
#include <functional>
#include <iostream>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include ... | replace | 54 | 55 | 54 | 55 | 0 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namesp... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
using namesp... | replace | 655 | 656 | 655 | 656 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
class fenwick {
vector<int> t;
public:
fenwick() { t.resize(20001); }
void add(int p, int v) {
for (; p < (int)t.size(); p += p & -p) {
t[p] += v;
}
}
int query(int p) {
int ret = 0;
if (p < 0) {
return 0;
}
for (; p; p -= p & ... | #include <bits/stdc++.h>
using namespace std;
class fenwick {
vector<int> t;
public:
fenwick() { t.resize(500001); }
void add(int p, int v) {
for (; p < (int)t.size(); p += p & -p) {
t[p] += v;
}
}
int query(int p) {
int ret = 0;
if (p < 0) {
return 0;
}
for (; p; p -= p &... | replace | 6 | 7 | 6 | 7 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
const int INT_INF = 2147483647;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
const int INT_INF = 2147483647;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {... | replace | 20 | 21 | 20 | 21 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef vector<VVLL> VVVLL;
typedef pair<LL, L... | #include "bits/stdc++.h"
using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<VVI> VVVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef vector<VVLL> VVVLL;
typedef pair<LL, L... | replace | 223 | 224 | 223 | 224 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define all(x) (x).begin(), (x).end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chma... | #include <bits/stdc++.h>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define all(x) (x).begin(), (x).end()
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chma... | replace | 40 | 41 | 40 | 41 | 0 | |
p02763 | C++ | Runtime Error | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define debug(x) cerr << #x << ": " << x << endl;
#define debug2(x, y) debug(x) debug(y);
#define repn(i, a, b) for (int i ... | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef pair<int, int> pi;
#define debug(x) cerr << #x << ": " << x << endl;
#define debug2(x, y) debug(x) debug(y);
#define repn(i, a, b) for (int i ... | replace | 20 | 21 | 20 | 21 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int N, Q;
string s;
set<int> v[26];
int main() {
cin >> N;
cin >> s;
cin >> Q;
for (int i = 0; i < N; i++)
v[s[i] - 'a'].insert(i);
for (int i = 0; i < 26; i++)
v[i].insert(N + 1);
vector<int> ans;
for (int i = 0; i < Q; i++) {
int C = 0;
in... | #include <bits/stdc++.h>
using namespace std;
int N, Q;
string s;
set<int> v[26];
int main() {
cin >> N;
cin >> s;
cin >> Q;
for (int i = 0; i < N; i++)
v[s[i] - 'a'].insert(i);
for (int i = 0; i < 26; i++)
v[i].insert(N + 1);
vector<int> ans;
for (int i = 0; i < Q; i++) {
int C = 0;
in... | replace | 32 | 33 | 32 | 33 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
template <typename Monoid, typename OperatorMonoid = Monoid>
struct LazySegmentTree {
using F = function<Monoid(Monoid, Monoid)>;
using G = function<Monoid(Monoid, OperatorMonoid)>;
using H = function<OperatorMonoid(OperatorMonoid, OperatorMono... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
template <typename Monoid, typename OperatorMonoid = Monoid>
struct LazySegmentTree {
using F = function<Monoid(Monoid, Monoid)>;
using G = function<Monoid(Monoid, OperatorMonoid)>;
using H = function<OperatorMonoid(OperatorMonoid, OperatorMono... | delete | 112 | 113 | 112 | 112 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
template <typename T> class BinaryIndexedTree {
vector<T> arr;
T initial_value;
long long size;
function<T(T, T)> operation;
public:
BinaryIndexedTree(const long long N, function<T(T, T)> func, T init) {
set_size(N);
set_initial_value(init);
initiali... | #include <bits/stdc++.h>
using namespace std;
template <typename T> class BinaryIndexedTree {
vector<T> arr;
T initial_value;
long long size;
function<T(T, T)> operation;
public:
BinaryIndexedTree(const long long N, function<T(T, T)> func, T init) {
set_size(N);
set_initial_value(init);
initiali... | replace | 79 | 80 | 79 | 80 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
template <typename T> class BinaryIndexedTree {
vector<T> arr;
T initial_value;
long long size;
function<T(T, T)> operation;
public:
BinaryIndexedTree(const long long N, function<T(T, T)> func, T init) {
set_size(N);
set_initial_value(init);
initiali... | #include <bits/stdc++.h>
using namespace std;
template <typename T> class BinaryIndexedTree {
vector<T> arr;
T initial_value;
long long size;
function<T(T, T)> operation;
public:
BinaryIndexedTree(const long long N, function<T(T, T)> func, T init) {
set_size(N);
set_initial_value(init);
initiali... | replace | 79 | 81 | 79 | 81 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
... | replace | 53 | 54 | 53 | 54 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define countof(array) (sizeof(array) / sizeof(array[0]))
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = (n)-1; i >= 0; --i)
#define rep2(i, n) for (int i = 1; i <= (n); ++i)
#define rrep2(i, n) for (int i ... | #include <bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define countof(array) (sizeof(array) / sizeof(array[0]))
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = (n)-1; i >= 0; --i)
#define rep2(i, n) for (int i = 1; i <= (n); ++i)
#define rrep2(i, n) for (int i ... | replace | 95 | 98 | 95 | 102 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define exrep(i, a, b) for (long long i = a; i <= b; i++)
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
ty... | #include <bits/stdc++.h>
#define exrep(i, a, b) for (long long i = a; i <= b; i++)
#define rep(i, n) for (long long i = 0; i < (long long)(n); i++)
#define all(a) a.begin(), a.end()
#define rall(a) a.rbegin(), a.rend()
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
ty... | replace | 66 | 68 | 66 | 68 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)
templ... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
#define rep(i, begin, n) for (int i = begin; i < n; i++)
#define repe(i, begin, n) for (int i = begin; i <= n; i++)
#define repr(i, begin, n) for (int i = begin; i > begin - n; i--)
#define repre(i, begin, end) for (int i = begin; i >= end; i--)
templ... | replace | 65 | 68 | 65 | 67 | TLE | |
p02763 | C++ | Runtime Error | #pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include... | #pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include... | replace | 96 | 97 | 96 | 97 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define X first
#define Y second
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define ini(x, y) memset(x, y, sizeof(x))
#define endl '\n'
#define fastio \
cin.sync_with_stdio(false); ... | #include <bits/stdc++.h>
#define X first
#define Y second
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define ini(x, y) memset(x, y, sizeof(x))
#define endl '\n'
#define fastio \
cin.sync_with_stdio(false); ... | replace | 18 | 19 | 18 | 19 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
void textIO() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
}
void fastIO() {
ios_base::sync_with_stdio(0);
cin.tie(0);
}
#define mx 500005
int tree[mx];
string str;
void build(int node, int s, int e) {
if ... | #include <bits/stdc++.h>
using namespace std;
void textIO() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
}
void fastIO() {
ios_base::sync_with_stdio(0);
cin.tie(0);
}
#define mx 500005
int tree[4 * mx];
string str;
void build(int node, int s, int e) {
... | replace | 16 | 17 | 16 | 17 | 0 | |
p02763 | C++ | Runtime Error | #include "bits/stdc++.h"
#include <regex>
#define FOR(i, s, e) for (int i = int(s); i < int(e); ++i)
#define REP(i, e) FOR(i, 0, e)
#define INF (INT_MAX / 2)
#define LINF (LLONG_MAX / 2)
#define EPS (1.0e-8)
#define mkpr make_pair
const int MGN = 10;
const int ARY_SZ_MAX = (int)1e7;
using namespace std;
using ll = long... | #include "bits/stdc++.h"
#include <regex>
#define FOR(i, s, e) for (int i = int(s); i < int(e); ++i)
#define REP(i, e) FOR(i, 0, e)
#define INF (INT_MAX / 2)
#define LINF (LLONG_MAX / 2)
#define EPS (1.0e-8)
#define mkpr make_pair
const int MGN = 10;
const int ARY_SZ_MAX = (int)1e7;
using namespace std;
using ll = long... | replace | 79 | 80 | 79 | 80 | 0 | |
p02763 | C++ | Runtime Error | // Md.Fahd
// HSTU CSE18
#include <bits/stdc++.h>
#define READ_IN freopen("Input.txt", "r", stdin);
using namespace std;
const int maxe = 100005;
struct can {
int aa[26];
} tree[maxe * 3];
char ar[maxe];
void make(int node, int b, int e) {
if (b == e) {
tree[node].aa[ar[b] - 'a']++;
return;
}
int l... | // Md.Fahd
// HSTU CSE18
#include <bits/stdc++.h>
#define READ_IN freopen("Input.txt", "r", stdin);
using namespace std;
const int maxe = 500005;
struct can {
int aa[26];
} tree[maxe * 3];
char ar[maxe];
void make(int node, int b, int e) {
if (b == e) {
tree[node].aa[ar[b] - 'a']++;
return;
}
int l... | replace | 6 | 7 | 6 | 7 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
const ll MOD = 1000000007;
const ll INF = 1e18;
#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
struct segtree {
int N;
vector<int> dat;
s... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
const ll MOD = 1000000007;
const ll INF = 1e18;
#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
struct segtree {
int N;
vector<int> dat;
s... | replace | 14 | 15 | 14 | 15 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, q;
const int maxn = 5e5 + 5;
int lt[maxn];
set<int> a[26];
bool check(int k, int l, int r) {
int b;
if (a[k].lower_bound(l) == a[k].end())
return false;
b = *a[k].lower_bound(l);
// cout << "csy" << ' ' << k << ' ' << b << endl;
i... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int n, q;
const int maxn = 5e5 + 5;
int lt[maxn];
set<int> a[26];
bool check(int k, int l, int r) {
int b;
if (a[k].lower_bound(l) == a[k].end())
return false;
b = *a[k].lower_bound(l);
// cout << "csy" << ' ' << k << ' ' << b << endl;
i... | insert | 52 | 52 | 52 | 53 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <cmath>
#include <numeric>
using namespace std;
#define rep(i, a, b) for (int64_t i = (a); i < (b); ++i) // a ≦ i < b
#define Rrep(i, a, b) \
for (int64_t i = (a); i >= (b); --i) // reverse repeat. a から b まで減少.
#define ALL(a) (... | #include <bits/stdc++.h>
#include <cmath>
#include <numeric>
using namespace std;
#define rep(i, a, b) for (int64_t i = (a); i < (b); ++i) // a ≦ i < b
#define Rrep(i, a, b) \
for (int64_t i = (a); i >= (b); --i) // reverse repeat. a から b まで減少.
#define ALL(a) (... | replace | 48 | 52 | 48 | 54 | 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 P = pair<int, int>;
typedef long long ll;
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) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using P = pair<int, int>;
typedef long long ll;
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) {
... | replace | 276 | 277 | 276 | 277 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
typedef long long LL;
const int N = 1e6 + 50;
int node[N][28], num[N], u, v, type, ql, qr, p, n, q;
int alpha[30];
char s[N], ch;
void update(int o, int L, int R) {
int M = L + (R - L) / 2;
if (L == R) {
node[o][u]--;
node[o][v]++;
} el... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 50;
int node[N][28], num[N], u, v, type, ql, qr, p, n, q;
int alpha[30];
char s[N], ch;
void update(int o, int L, int R) {
int M = L + (R - L) / 2;
if (L == R) {
node[o][u]--;
node[o][v]++;
} else {
// int cnt = 0;
if (p <= M)
... | replace | 2 | 5 | 2 | 3 | -11 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const i64 MOD = 1e9 + 7;
const i64 INF = i64(1e18) + 7;
template <typename T> bool chmin(T &x, T y) {
if (x > y) {
x = y;
return true;
}
return false;
}
template <typename T> bool chmax(T &x, T y) {
if (x < y) {
x = y;
ret... | #include <bits/stdc++.h>
using namespace std;
using i64 = long long;
const i64 MOD = 1e9 + 7;
const i64 INF = i64(1e18) + 7;
template <typename T> bool chmin(T &x, T y) {
if (x > y) {
x = y;
return true;
}
return false;
}
template <typename T> bool chmax(T &x, T y) {
if (x < y) {
x = y;
ret... | replace | 40 | 41 | 40 | 41 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
using Graph = vector<vector<int>>;
typedef long long ll;
typedef pair<int, int> P;
const int MOD = 1000000007;
const int... | #include <bits/stdc++.h>
#include <math.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
typedef long long ll;
using Graph = vector<vector<int>>;
typedef long long ll;
typedef pair<int, int> P;
const int MOD = 1000000007;
const int... | replace | 48 | 50 | 48 | 50 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int n;
string s;
int q;
set<int> occ[26];
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);
cin >> n >> s >> q;
for (int i = 0; i < n; i++)
occ[(int)s[i] - (int)'a'].insert(i + 1);
for (int _ = 0; _ < q; _++) {
int type;
cin ... | #include <bits/stdc++.h>
using namespace std;
int n;
string s;
int q;
set<int> occ[26];
int main() {
std::ios_base::sync_with_stdio(false);
std::cin.tie(NULL);
cin >> n >> s >> q;
for (int i = 0; i < n; i++)
occ[(int)s[i] - (int)'a'].insert(i + 1);
for (int _ = 0; _ < q; _++) {
int type;
cin ... | replace | 35 | 36 | 35 | 36 | TLE | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <chrono>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <time.h>
#include <tuple>
#include <vector>
#ifdef _MSC_VER
#include <intrin... | #include <algorithm>
#include <chrono>
#include <cstdio>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <time.h>
#include <tuple>
#include <vector>
#ifdef _MSC_VER
#include <intrin... | replace | 61 | 62 | 61 | 62 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
// BIT
template <typename T> struct BIT {
int N;
int max_2beki;
vector<T> data;
// 初期化 1-indexedでデータを管理する 0で初期化
BIT(int size) {
N = ++size;
data.assign(N, 0);
max_2beki = 1;
while (max_2beki * 2 <= N)
max_2beki *= 2;
}
// [0,k](閉区間)の総和 ... | #include <bits/stdc++.h>
using namespace std;
// BIT
template <typename T> struct BIT {
int N;
int max_2beki;
vector<T> data;
// 初期化 1-indexedでデータを管理する 0で初期化
BIT(int size) {
N = ++size;
data.assign(N, 0);
max_2beki = 1;
while (max_2beki * 2 <= N)
max_2beki *= 2;
}
// [0,k](閉区間)の総和 ... | replace | 96 | 97 | 96 | 97 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define mp make_pair
#define pb push_back
#define F first
#define S second
const int N = 500005;
#define M 1000000007
#define double long double
#define BINF 1000000000000001
#define init(arr, val) memset(arr, val, sizeof(arr))
#define MAXN 5000004... | #include <bits/stdc++.h>
using namespace std;
#define int long long int
#define mp make_pair
#define pb push_back
#define F first
#define S second
const int N = 500005;
#define M 1000000007
#define double long double
#define BINF 1000000000000001
#define init(arr, val) memset(arr, val, sizeof(arr))
#define MAXN 5000004... | delete | 49 | 54 | 49 | 49 | -11 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main(void) {
int n, q;
string s;
cin >> n >> s >> q;
vector<set<int>> is(26);
rep(i, s.size()) { is[s[i] - 'a'].insert(i); }
rep(qi, q) {
int t;
cin >> t;
if (t == 1) {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main(void) {
int n, q;
string s;
cin >> n >> s >> q;
vector<set<int>> is(26);
rep(i, s.size()) { is[s[i] - 'a'].insert(i); }
rep(qi, q) {
int t;
cin >> t;
if (t == 1) {
... | replace | 29 | 30 | 29 | 30 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#define F first
#define S second
#define MP make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
#define lcm(a, b) (a) / __gcd((a), (b)) * (b)
#define endl '\n'
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
typedef pair<LL, LL> LP;
static const int INF = I... | #include <bits/stdc++.h>
#define F first
#define S second
#define MP make_pair
#define pb push_back
#define all(a) a.begin(), a.end()
#define lcm(a, b) (a) / __gcd((a), (b)) * (b)
#define endl '\n'
using namespace std;
typedef long long LL;
typedef pair<int, int> P;
typedef pair<LL, LL> LP;
static const int INF = I... | replace | 60 | 61 | 60 | 61 | -11 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include <debug.h>
#else
#define db(...) 21
#endif
#define debug(x) cout << #x << " = " << x << endl;
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define FOR(it, b, e) for (typeof(b) it = (b); it != (e)... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#ifdef LOCAL
#include <debug.h>
#else
#define db(...) 21
#endif
#define debug(x) cout << #x << " = " << x << endl;
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define FOR(it, b, e) for (typeof(b) it = (b); it != (e)... | replace | 39 | 40 | 39 | 40 | 0 | |
p02763 | C++ | Time Limit Exceeded | /********************************
* AUTHOR: ARNAB SEN *
* NICK : arnab1729 *
* INSTITUTION: IIEST, SHIBPUR *
********************************/
#include <bits/stdc++.h>
using namespace std;
typedef string STR;
typedef long long LL;
typedef long double LD;
typedef unsigned long long U... | /********************************
* AUTHOR: ARNAB SEN *
* NICK : arnab1729 *
* INSTITUTION: IIEST, SHIBPUR *
********************************/
#include <bits/stdc++.h>
using namespace std;
typedef string STR;
typedef long long LL;
typedef long double LD;
typedef unsigned long long U... | replace | 134 | 135 | 134 | 135 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define maxs(a, b) a = max(a, b)
#define mins(a, b) a = min(a, b)
using namespace std;
typedef long long ll;
typedef pa... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(i, n) for (int i = 1; i < (n); ++i)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin(), (a).rend()
#define maxs(a, b) a = max(a, b)
#define mins(a, b) a = min(a, b)
using namespace std;
typedef long long ll;
typedef pa... | replace | 43 | 44 | 43 | 44 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
const long long INF = 1LL << 60;
const long long MOD = 1000000007;
const double PI = acos(-1.0);
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define rep1(i, n) for (ll i = 1; i <= (n); ++i)
#define rrep(i, n) for (ll i = (n - 1); i >= 0; --i)
#define perm(c) ... | #include <bits/stdc++.h>
const long long INF = 1LL << 60;
const long long MOD = 1000000007;
const double PI = acos(-1.0);
#define rep(i, n) for (ll i = 0; i < (n); ++i)
#define rep1(i, n) for (ll i = 1; i <= (n); ++i)
#define rrep(i, n) for (ll i = (n - 1); i >= 0; --i)
#define perm(c) ... | replace | 201 | 202 | 201 | 202 | 0 | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <deque>
#include <fstream>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>... | #include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdlib>
#include <deque>
#include <fstream>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <tuple>... | insert | 45 | 45 | 45 | 46 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define REP(a, b) for (int a = 0; a < (b); ++a)
#define REP1(i, n) for (int i = 1; i <= (n); ++i)
#define debug(x) cerr << #x << ": " << x << '\n'
#define all(x) (x).begin(), (x).end()
#define YES() printf("YES\n")
#define NO() printf("NO\n")
... | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define REP(a, b) for (int a = 0; a < (b); ++a)
#define REP1(i, n) for (int i = 1; i <= (n); ++i)
#define debug(x) cerr << #x << ": " << x << '\n'
#define all(x) (x).begin(), (x).end()
#define YES() printf("YES\n")
#define NO() printf("NO\n")
... | replace | 162 | 164 | 162 | 164 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string t;
cin >> t;
char s[n];
for (int i = 0; i < n; i++)
s[i] = t[i];
int q;
cin >> q;
set<int> m[26];
for (int i = 0; i < n; i++) {
m[s[i] - 'a'].insert(i);
}
for (int _ = 0; _ < q; _++) {
int type;
c... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string t;
cin >> t;
char s[n];
for (int i = 0; i < n; i++)
s[i] = t[i];
int q;
cin >> q;
set<int> m[26];
for (int i = 0; i < n; i++) {
m[s[i] - 'a'].insert(i);
}
for (int _ = 0; _ < q; _++) {
int type;
c... | replace | 38 | 39 | 38 | 39 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5;
inline int tog_bit(int x, int mask) { return (1 << x) ^ mask; }
int n, q;
char s[N + 5];
int ST[N + 5];
void build(int node, int l, int r) {
if (l == r) {
ST[node] = tog_bit(s[l - 1] - 'a', 0);
return;
}
int mid = (l + r) / 2;
build(n... | #include <bits/stdc++.h>
using namespace std;
const int N = 5e5;
inline int tog_bit(int x, int mask) { return (1 << x) ^ mask; }
int n, q;
char s[N + 5];
int ST[4 * N + 5];
void build(int node, int l, int r) {
if (l == r) {
ST[node] = tog_bit(s[l - 1] - 'a', 0);
return;
}
int mid = (l + r) / 2;
bui... | replace | 10 | 11 | 10 | 11 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
#define debug(x) cout << #x << " = " << x << '\n'
#define debug_arr(a, n) \
for (int i = 0; i < n; i++) ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
#define debug(x) cout << #x << " = " << x << '\n'
#define debug_arr(a, n) \
for (int i = 0; i < n; i++) ... | replace | 35 | 36 | 35 | 36 | 0 | |
p02763 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
const int N = 1e5 + 20, C = 26;
char a[N];
int n, q, type, pos, l, r;
char c;
set<int> s[C];
int main() {
scanf("%d %s%d", &n, a + 1, &q);
for (int i = 1; i <= n; i++)
s[a[i] - 'a'].insert(i);
while (q--) {
scanf("%d", &type);
if (type == 1) {
scanf... | #include "bits/stdc++.h"
using namespace std;
const int N = 5e5 + 20, C = 26;
char a[N];
int n, q, type, pos, l, r;
char c;
set<int> s[C];
int main() {
scanf("%d %s%d", &n, a + 1, &q);
for (int i = 1; i <= n; i++)
s[a[i] - 'a'].insert(i);
while (q--) {
scanf("%d", &type);
if (type == 1) {
scanf... | replace | 2 | 3 | 2 | 3 | 0 | |
p02763 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <random>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#defin... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#include <random>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#defin... | replace | 34 | 35 | 34 | 35 | 0 | |
p02763 | C++ | Runtime Error | // In the name of GOD
#include <bits/stdc++.h>
using namespace std;
#define debug(x) cout << #x << " :: " << x << "\n";
#define debug2(x, y) \
cout << #x << " :: " << x << "\t" << #y << " :: " << y << "\n";
#define debug3(x, y, z) ... | // In the name of GOD
#include <bits/stdc++.h>
using namespace std;
#define debug(x) cout << #x << " :: " << x << "\n";
#define debug2(x, y) \
cout << #x << " :: " << x << "\t" << #y << " :: " << y << "\n";
#define debug3(x, y, z) ... | replace | 52 | 53 | 52 | 53 | -11 | |
p02763 | C++ | Runtime Error | #include <iostream>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, Q, qi;
string S;
char c;
cin >> N;
cin >> S;
cin >> Q;
vector<set<int>> is(26);
for (int i = 0; i < N; i++) {
is[S[i] - 'a'].insert(i); // Sのi番目の文字の欄に何番目に出たかを記録
}
i... | #include <iostream>
#include <set>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int main() {
int N, Q, qi;
string S;
char c;
cin >> N;
cin >> S;
cin >> Q;
vector<set<int>> is(26);
for (int i = 0; i < N; i++) {
is[S[i] - 'a'].insert(i); // Sのi番目の文字の欄に何番目に出たかを記録
}
i... | replace | 27 | 28 | 27 | 28 | 0 | |
p02763 | C++ | Runtime Error | #pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pp pair<pair<ll, ll>, pair<ll, ll>>
#define pll pair<ll, ll>
#define pdd pair<double, double>
#defin... | #pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define pii pair<int, int>
#define pp pair<pair<ll, ll>, pair<ll, ll>>
#define pll pair<ll, ll>
#define pdd pair<double, double>
#defin... | replace | 67 | 68 | 67 | 68 | 0 | |
p02763 | C++ | Time Limit Exceeded | #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;
int main() {
int n;
cin >> n;
string s;
cin >> s;
int q;
cin >> q;
vector<set<int>> count(26);
rep(i, n) { count[s[i] - 'a'].inse... | #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;
int main() {
int n;
cin >> n;
string s;
cin >> s;
int q;
cin >> q;
vector<set<int>> count(26);
rep(i, n) { count[s[i] - 'a'].inse... | replace | 34 | 35 | 34 | 35 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, s, n) for (int i = (s); i <= (n); i++)
#define repr(i, n) for (int i = n - 1; i >= 0; i--)
#define REPR(i, s, n) for (int i = (s); i >= (n); i--)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin()... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, s, n) for (int i = (s); i <= (n); i++)
#define repr(i, n) for (int i = n - 1; i >= 0; i--)
#define REPR(i, s, n) for (int i = (s); i >= (n); i--)
#define all(a) (a).begin(), (a).end()
#define rall(a) (a).rbegin()... | replace | 141 | 142 | 141 | 142 | TLE | |
p02763 | C++ | Runtime Error | #define _DEBUG
#include "bits/stdc++.h"
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0, a1, a2, a3, a4, x, ...) x
#define debug_1(x1) cout << #x1 << ": " << x1 << endl
#define debug_2(x1, x2) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << endl
#define d... | #define _DEBUG
#include "bits/stdc++.h"
#define CHOOSE(a) CHOOSE2 a
#define CHOOSE2(a0, a1, a2, a3, a4, x, ...) x
#define debug_1(x1) cout << #x1 << ": " << x1 << endl
#define debug_2(x1, x2) \
cout << #x1 << ": " << x1 << ", " #x2 << ": " << x2 << endl
#define d... | replace | 119 | 120 | 119 | 120 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ok() puts(ok ? "Yes" : "No");
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef set<int> s... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ok() puts(ok ? "Yes" : "No");
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<bool> vb;
typedef vector<vb> vvb;
typedef set<int> s... | replace | 47 | 50 | 47 | 49 | TLE | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#define RREP(i, a, b) for (int i = a; i < b; ++i)
... | #include <algorithm>
#include <bitset>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <set>
#include <string>
#include <tuple>
#include <vector>
#define RREP(i, a, b) for (int i = a; i < b; ++i)
... | replace | 108 | 109 | 108 | 109 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(v) (v).begin(), (v).end()
#define debug(x) cerr << #x << ": " << (x) << endl
#define INF (int)1e9
#define EPS (double)1e-9
#define MOD ((int)1e9 + 7)
using namespace std;
typedef long long llong;
typedef vector<int> vi;
typedef vector<... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define ALL(v) (v).begin(), (v).end()
#define debug(x) cerr << #x << ": " << (x) << endl
#define INF (int)1e9
#define EPS (double)1e-9
#define MOD ((int)1e9 + 7)
using namespace std;
typedef long long llong;
typedef vector<int> vi;
typedef vector<... | replace | 57 | 58 | 57 | 58 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll modulo = 1000000007ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
string str;
cin >> str;
int q;
cin >> q;
vector<set<int>> vec(26, set<int>());
for (int i = 0; i < n; ++i) {... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll modulo = 1000000007ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n;
cin >> n;
string str;
cin >> str;
int q;
cin >> q;
vector<set<int>> vec(26, set<int>());
for (int i = 0; i < n; ++i) {... | replace | 40 | 41 | 40 | 41 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5;
int n;
string s;
int seg[4 * MAXN + 20];
int q;
void build(int pos, int l, int r) {
if (l == r) {
seg[pos] = 1 << (s[l] - 'a');
} else {
build(pos << 1, l, (l + r) >> 1);
build((pos << 1) + 1, ((l + r) >> 1) + 1, r);
seg[pos] = s... | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 5e5;
int n;
string s;
int seg[4 * MAXN + 20];
int q;
void build(int pos, int l, int r) {
if (l == r) {
seg[pos] = 1 << (s[l] - 'a');
} else {
build(pos << 1, l, (l + r) >> 1);
build((pos << 1) + 1, ((l + r) >> 1) + 1, r);
seg[pos] = s... | replace | 3 | 4 | 3 | 4 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); +... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define rep1(i, n) for (int i = 1; i <= (int)(n); ++i)
#define rep11(i, n) for (int i = 1; i < (int)(n); ++i)
#define repo(i, o, n) for (int i = o; i < (int)(n); +... | replace | 19 | 20 | 19 | 20 | -11 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vpii> vvpii;
#define mt make_tuple
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(x) (x).b... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int, int> pii;
typedef vector<pii> vpii;
typedef vector<vpii> vvpii;
#define mt make_tuple
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(x) (x).b... | insert | 21 | 21 | 21 | 23 | -11 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
int q;
cin >> q;
vector<set<int>> sevec(26);
for (int i = 0; i < n; ++i) {
int now = s[i] - 'a';
sevec[now].insert(i);
}
for (int i = 0; i < q; ++i) {
int kind;
cin >> kind;
if (kind... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
int q;
cin >> q;
vector<set<int>> sevec(26);
for (int i = 0; i < n; ++i) {
int now = s[i] - 'a';
sevec[now].insert(i);
}
for (int i = 0; i < q; ++i) {
int kind;
cin >> kind;
if (kind... | replace | 35 | 36 | 35 | 36 | TLE | |
p02763 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
#define sim template <class c
#define ris... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <unordered_map>
#include <vector>
using namespace std;
#define sim template <class c
#define ris... | replace | 70 | 71 | 70 | 71 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(ri, n) for (int ri = (int)(n - 1); ri >= 0; ri--)
#define rep2(i, x, n) for (int i = (int)(x); i < (int)(n); i++)
#define repit(itr, x) for (auto itr = x.begin(); itr != x.end(); itr++)
#define rrepit(ritr, x) for (auto ritr = x.... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(ri, n) for (int ri = (int)(n - 1); ri >= 0; ri--)
#define rep2(i, x, n) for (int i = (int)(x); i < (int)(n); i++)
#define repit(itr, x) for (auto itr = x.begin(); itr != x.end(); itr++)
#define rrepit(ritr, x) for (auto ritr = x.... | replace | 43 | 44 | 43 | 44 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
int i, j;
int q;
cin >> q;
vector<set<int>> sets(26);
for (i = 0; i < n; i++) {
sets.at(s.at(i) - 'a').insert(i);
}
for (i = 0; i < q; i++) {
int num;
cin >> num;
if (num == 1) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
string s;
cin >> s;
int i, j;
int q;
cin >> q;
vector<set<int>> sets(26);
for (i = 0; i < n; i++) {
sets.at(s.at(i) - 'a').insert(i);
}
for (i = 0; i < q; i++) {
int num;
cin >> num;
if (num == 1) {
... | replace | 30 | 31 | 30 | 31 | TLE | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
const ll LINF = 1LL << 50;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
vector<set<int>... | #include <bits/stdc++.h>
using namespace std;
/* typedef */
typedef long long ll;
typedef pair<int, int> pii;
/* constant */
const int INF = 1 << 30;
const ll LINF = 1LL << 50;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
/* global variables */
vector<set<int>... | replace | 24 | 25 | 24 | 25 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int MAXN = 1e5 + 10, curr = 0;
int t[26][4 * 100000], a[100000];
;
void build(int v, int tl, int tr) {
if (tl == tr) {
t[curr][v] = (a[tl] == curr);
} else {
int tm = (tl + tr) / 2;
build(v * 2, tl, tm);
build(v * 2 + 1, tm + 1, tr);
t[curr][v] = t... | #include <bits/stdc++.h>
using namespace std;
int MAXN = 1e9 + 7, curr = 0;
int t[26][4 * 500100], a[4 * 500100];
;
void build(int v, int tl, int tr) {
if (tl == tr) {
t[curr][v] = (a[tl] == curr);
} else {
int tm = (tl + tr) / 2;
build(v * 2, tl, tm);
build(v * 2 + 1, tm + 1, tr);
t[curr][v] ... | replace | 3 | 5 | 3 | 5 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define N 500000
set<int> s[26];
signed main() {
int n;
cin >> n;
for (int i = 0; i <= 26; i++)
s[i].insert(n);
string str;
cin >> str;
for (int i = 0; i < str.size(); i++)
s[str[i] - 'a'].insert(i);
int m;
cin >> m;
for (int ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define N 500000
set<int> s[26];
signed main() {
int n;
cin >> n;
for (int i = 0; i < 26; i++)
s[i].insert(n);
string str;
cin >> str;
for (int i = 0; i < str.size(); i++)
s[str[i] - 'a'].insert(i);
int m;
cin >> m;
for (int i... | replace | 8 | 9 | 8 | 9 | -11 | |
p02763 | C++ | Time Limit Exceeded | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <bits/stdc++.h>
#define f(i, n) for (int i = 0; i < (n); i++)
#define inf (int)(3e18)
#define int long long
#define mod (int)(1000000007)
#define intt long long
#define P pair<int, int>
#define rep(i,... | /*
* じょえチャンネル
* 高評価・チャンネル登録よろしくおねがいします!
* https://www.youtube.com/channel/UCRXsI3FL_kvaVL9zoolBfbQ
*/
#include <bits/stdc++.h>
#define f(i, n) for (int i = 0; i < (n); i++)
#define inf (int)(3e18)
#define int long long
#define mod (int)(1000000007)
#define intt long long
#define P pair<int, int>
#define rep(i,... | replace | 159 | 160 | 159 | 160 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define frw(i, a, b) for (int i = a; i < b; i++)
#define fi first
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
using namespace std;
#define ll long long
#define vi vector<int>
#define vll vector<ll>
#define frw(i, a, b) for (int i = a; i < b; i++)
#define fi first
... | replace | 65 | 67 | 65 | 67 | -11 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void query1(const int &p, const char &c, vector<set<int>> &a) {
for (int i = 0; i < 26; i++) {
if (a[i].count(p)) {
a[i].erase(p);
break;
}
}
a[c - 'a'].insert(p);
}
void query2(const int &l, const int &r, const vector<set<int>> &a) {
int cnt = 0... | #include <bits/stdc++.h>
using namespace std;
void query1(const int &p, const char &c, vector<set<int>> &a) {
for (int i = 0; i < 26; i++) {
if (a[i].count(p)) {
a[i].erase(p);
break;
}
}
a[c - 'a'].insert(p);
}
void query2(const int &l, const int &r, const vector<set<int>> &a) {
int cnt = 0... | replace | 14 | 16 | 14 | 15 | 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())
#define show(x) \
{ \
for (auto i : x) { ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define show(x) \
{ \
for (auto i : x) { ... | replace | 40 | 41 | 40 | 41 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int n;
cin >> n;
string s;
cin >> s;
int q;
cin >> q;
vector<set<int>> is(26);
rep(i, n) { is[s[i] - 'a'].insert(i); }
rep(qi, n) {
int ty;
cin >>... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll mod = 1e9 + 7;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
int n;
cin >> n;
string s;
cin >> s;
int q;
cin >> q;
vector<set<int>> is(26);
rep(i, n) { is[s[i] - 'a'].insert(i); }
rep(qi, q) {
int ty;
cin >>... | replace | 15 | 16 | 15 | 16 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef vector<lint> vlint;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int popcount(int n) {
int res = 0;
for (int i = 0; i < 32; ++i) {
if (n & (1 << i))
res++;
}
return res;
};
int bit_length(int n) {
for (int i = 3... | #include <bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef vector<lint> vlint;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int popcount(int n) {
int res = 0;
for (int i = 0; i < 32; ++i) {
if (n & (1 << i))
res++;
}
return res;
};
int bit_length(int n) {
for (int i = 3... | replace | 28 | 29 | 28 | 29 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> Vec;
typedef vector<int> Vi;
typedef vector<string> Vs;
typedef vector<P> VP;
typedef vector<vector<ll>> VV;
typedef vector<vector<int>> VVi;
typedef vector<vector<vector<ll>>> VVV... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
typedef vector<ll> Vec;
typedef vector<int> Vi;
typedef vector<string> Vs;
typedef vector<P> VP;
typedef vector<vector<ll>> VV;
typedef vector<vector<int>> VVi;
typedef vector<vector<vector<ll>>> VVV... | replace | 293 | 297 | 293 | 295 | 0 | |
p02763 | C++ | Runtime Error | /**
* created: 22.09.2020 01:48:16
**/
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using bint = boost::multiprecision::cpp_int;
using namespace std;
// #define endl '\n'
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n - ... | /**
* created: 22.09.2020 01:48:16
**/
#include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// using bint = boost::multiprecision::cpp_int;
using namespace std;
// #define endl '\n'
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = (int)(n - ... | replace | 119 | 120 | 119 | 120 | 0 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define ll long long
#define P pair<int, int>
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define ll long long
#define P pair<int, int>
#define fast_io \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | replace | 38 | 39 | 38 | 39 | TLE | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
/*
* coder :: ATUL_PANDEY_2608
* >>> INDIA <<<
*/
using namespace std;
using namespace __gn... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update
/*
* coder :: ATUL_PANDEY_2608
* >>> INDIA <<<
*/
using namespace std;
using namespace __gn... | replace | 34 | 35 | 34 | 35 | 0 | |
p02763 | C++ | Runtime Error | // review
#include <algorithm>
#include <iostream>
#include <set>
using namespace std;
typedef long long ll;
struct Query {
ll type, i, l, r;
char c;
};
const int MAXQ = 20010;
ll n;
ll q;
string s;
Query queries[MAXQ];
void solve() {
set<int> positions[26];
for (int i = 0; i < n; i++) {
positions[s[i... | // review
#include <algorithm>
#include <iostream>
#include <set>
using namespace std;
typedef long long ll;
struct Query {
ll type, i, l, r;
char c;
};
const int MAXQ = 20010;
ll n;
ll q;
string s;
Query queries[MAXQ];
void solve() {
set<int> positions[26];
for (int i = 0; i < n; i++) {
positions[s[i... | replace | 29 | 30 | 29 | 30 | 0 | |
p02763 | C++ | Runtime Error | #pragma region template
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
/*
const long long MOD = 1e9 + 7, MAX = 1e18, larg = 1e5, INF = -1e9;
long long max_value = INF, max_index = -1;
long long min_value = MAX, min_index = -1;*/
long long A, B, C, D, E, F, G, H, I, J,... | #pragma region template
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
/*
const long long MOD = 1e9 + 7, MAX = 1e18, larg = 1e5, INF = -1e9;
long long max_value = INF, max_index = -1;
long long min_value = MAX, min_index = -1;*/
long long A, B, C, D, E, F, G, H, I, J,... | replace | 95 | 98 | 95 | 98 | 0 | |
p02763 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <cmath>
const double PI = 3.14159265358979323846;
// using namespace boost::multiprecision;
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<ll, ll> P;
const ll INF = 1e15;
#define cmin(x, y) x = min(x, y)... | #include <bits/stdc++.h>
#include <cmath>
const double PI = 3.14159265358979323846;
// using namespace boost::multiprecision;
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<ll, ll> P;
const ll INF = 1e15;
#define cmin(x, y) x = min(x, y)... | replace | 86 | 87 | 86 | 87 | -11 | |
p02763 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef int _loop_int;
#define REP(i, n) for (_loop_int i = 0; i < (_loop_int)(n); ++i)
#define FOR(i, a, b) for (_loop_int i = (_loop_int)(a); i < (_loop_int)(b); ++i)
#defi... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef int _loop_int;
#define REP(i, n) for (_loop_int i = 0; i < (_loop_int)(n); ++i)
#define FOR(i, a, b) for (_loop_int i = (_loop_int)(a); i < (_loop_int)(b); ++i)
#defi... | replace | 93 | 94 | 93 | 94 | TLE | |
p02763 | C++ | Runtime Error | // https://atcoder.jp/contests/abc157/tasks/abc157_e
/*
* Author : MaxSally
*/
/******** All Required Header Files ********/
#include <bits/stdc++.h>
using namespace std;
/******* All Required define Pre-Processors and typedef Constants *******/
#define SCD(t) scanf("%d", &t)
#define SCLD(t) scanf("%ld", &t)
#defi... | // https://atcoder.jp/contests/abc157/tasks/abc157_e
/*
* Author : MaxSally
*/
/******** All Required Header Files ********/
#include <bits/stdc++.h>
using namespace std;
/******* All Required define Pre-Processors and typedef Constants *******/
#define SCD(t) scanf("%d", &t)
#define SCLD(t) scanf("%ld", &t)
#defi... | replace | 113 | 114 | 113 | 114 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.