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
p02986
C++
Runtime Error
// need #include <algorithm> #include <iostream> // data structure #include <bitset> #include <complex> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> // #include <deque> #include <array> #include <unordered_map> #include <unordered_set> #include <...
// need #include <algorithm> #include <iostream> // data structure #include <bitset> #include <complex> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> // #include <deque> #include <array> #include <unordered_map> #include <unordered_set> #include <...
replace
312
332
312
329
0
p02986
C++
Time Limit Exceeded
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; const int MAXN = 1e5 + 5; map<int, pair<int, int>> curColours; vector<map<int, pair<int, int>>> colourData; vector<pair<int, int>> v1[MAXN]; int level[MAXN]; int parent[MAXN]; int parentedge[MAXN]; int dist[...
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <vector> using namespace std; const int MAXN = 1e5 + 5; map<int, pair<int, int>> curColours; vector<map<int, pair<int, int>>> colourData; vector<pair<int, int>> v1[MAXN]; int level[MAXN]; int parent[MAXN]; int parentedge[MAXN]; int dist[...
replace
165
166
165
166
TLE
p02986
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <cstdio> #include <queue> using namespace std; #define N 100005 int st[N], nd[N], a[N]; int pos[N], dfn[2 * N], cnt, sum[N][2], s1; int fa[N][20], dep[N], ans[N], n, m, an; int g1[N][2]; bool f[N]; struct mzls { int l, r, id, aa, bb; bool p; } a1[N]; struct node { in...
#include <algorithm> #include <cmath> #include <cstdio> #include <queue> using namespace std; #define N 100005 int st[N], nd[N], a[N]; int pos[N], dfn[2 * N], cnt, sum[N][2], s1; int fa[N][20], dep[N], ans[N], n, m, an; int g1[N][2]; bool f[N]; struct mzls { int l, r, id, aa, bb; bool p; } a1[N]; struct node { in...
replace
80
81
80
81
TLE
p02986
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; struct disjoint_set { vector<int> p; disjoint_set(int n) : p(n, -1) {} int root(int u) { return p[u] < 0 ? u : p[u] = root(p[u]); } bool merge(int u, int v) { if ((u = root(u)) == (v = root(v))) return false; if (p[u] > p[v]) swap(u, v); ...
#include <bits/stdc++.h> using namespace std; struct disjoint_set { vector<int> p; disjoint_set(int n) : p(n, -1) {} int root(int u) { return p[u] < 0 ? u : p[u] = root(p[u]); } bool merge(int u, int v) { if ((u = root(u)) == (v = root(v))) return false; if (p[u] > p[v]) swap(u, v); ...
replace
110
111
110
111
0
p02986
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #incl...
#include <algorithm> #include <bitset> #include <cassert> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #include <ctime> #include <fstream> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #incl...
replace
23
24
23
24
0
p02986
C++
Runtime Error
#include <iostream> #include <map> #include <set> #include <vector> using namespace std; class Edge { public: explicit Edge(int src, int dst, int color, int len) : src(src), dst(dst), color(color), len(len) {} int src, dst, color, len; }; class Query { public: explicit Query(int x, int y, int u, int v) ...
#include <iostream> #include <map> #include <set> #include <vector> using namespace std; class Edge { public: explicit Edge(int src, int dst, int color, int len) : src(src), dst(dst), color(color), len(len) {} int src, dst, color, len; }; class Query { public: explicit Query(int x, int y, int u, int v) ...
replace
55
56
55
56
0
p02986
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define repr(i, n) for (int i = (n)-1; i >= 0; i--) using namespace std; using ll = long long; struct HLD { const vector<vector<int>> &g; vector<int> size, label, parent, head; int k; HLD(const vector<vector<int>> &g_) : g(g_), s...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define repr(i, n) for (int i = (n)-1; i >= 0; i--) using namespace std; using ll = long long; struct HLD { const vector<vector<int>> &g; vector<int> size, label, parent, head; int k; HLD(const vector<vector<int>> &g_) : g(g_), s...
insert
16
16
16
17
-11
p02986
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long // #define double long double #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORR(i, a, b) for (int i = (a); i > (b); --i) #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOREACH(x...
#include <bits/stdc++.h> using namespace std; #define int long long // #define double long double #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define FORR(i, a, b) for (int i = (a); i > (b); --i) #define REP(i, n) for (int i = 0; i < (n); ++i) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOREACH(x...
replace
189
190
189
190
0
p02986
C++
Runtime Error
#include <algorithm> #include <array> #include <assert.h> #include <bitset> #include <cctype> #include <chrono> #include <cmath> #include <complex> #include <cstdlib> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #inclu...
#include <algorithm> #include <array> #include <assert.h> #include <bitset> #include <cctype> #include <chrono> #include <cmath> #include <complex> #include <cstdlib> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #inclu...
replace
188
189
188
189
0
p02986
C++
Time Limit Exceeded
#include <algorithm> #include <cassert> #include <cstdio> #include <functional> #include <tuple> #include <vector> using namespace std; using int64 = long long int; struct UnionFind { vector<int> node, anc, color; UnionFind(int n) : node(n, -1), anc(n), color(n) {} int find(int k) { return node[k] < 0 ? k : find...
#include <algorithm> #include <cassert> #include <cstdio> #include <functional> #include <tuple> #include <vector> using namespace std; using int64 = long long int; struct UnionFind { vector<int> node, anc, color; UnionFind(int n) : node(n, -1), anc(n), color(n) {} int find(int k) { return node[k] < 0 ? k : find...
replace
18
19
18
19
TLE
p02986
C++
Runtime Error
#include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> #include <vector> using namespace std; const int M = 1e5 + 5; const int MB = 19; int n, q; struct TN { int ls, rs; int cnt, sum; TN(int ls = 0, int rs = 0, int cnt = 0, int sum = 0) : ls(ls), rs(rs), cnt(cnt), sum(sum) {} }; ...
#include <algorithm> #include <iostream> #include <stdio.h> #include <string.h> #include <vector> using namespace std; const int M = 1e5 + 5; const int MB = 20; int n, q; struct TN { int ls, rs; int cnt, sum; TN(int ls = 0, int rs = 0, int cnt = 0, int sum = 0) : ls(ls), rs(rs), cnt(cnt), sum(sum) {} }; ...
replace
8
9
8
9
0
p02986
C++
Runtime Error
#include <cstdio> #include <vector> // CONSTRAINTS const int MN = 1e5 + 100; const int MS = 2e6; int N, Q; struct node { public: int l, r; int c, d; }; node seg[MS]; int X = MN; void upd(int n, int l, int r, int ql, int qr, int xd) { if (ql <= l && r <= qr) ++seg[n].c, seg[n].d += xd; else { int m = l...
#include <cstdio> #include <vector> // CONSTRAINTS const int MN = 1e5 + 100; const int MS = 4e6; int N, Q; struct node { public: int l, r; int c, d; }; node seg[MS]; int X = MN; void upd(int n, int l, int r, int ql, int qr, int xd) { if (ql <= l && r <= qr) ++seg[n].c, seg[n].d += xd; else { int m = l...
replace
5
6
5
6
0
p02986
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; const int N = 100 * 1000 + 17; const int MOD = 1000 * 1000 * 1000 + 7; const int MAGIC = 512; struct edge { int u, v, col, len; edge() = default; edge(int u, int v, int c, int l) : u(u), v(v), col(c), len(l) {} }; int n, q, t = 0; int L[N], R[N]; int up[20][N]; ve...
#include <bits/stdc++.h> using namespace std; const int N = 100 * 1000 + 17; const int MOD = 1000 * 1000 * 1000 + 7; const int MAGIC = 512; struct edge { int u, v, col, len; edge() = default; edge(int u, int v, int c, int l) : u(u), v(v), col(c), len(l) {} }; int n, q, t = 0; int L[N], R[N]; int up[N][20]; ve...
replace
16
17
16
17
0
p02986
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define IO_OP \ std::ios::sync_with_stdio(0); \ std::cin.tie(0); #define F first #define S second #define PB push_back #define MP make_pair #define EB emplace_back #define endl '\...
#include <bits/stdc++.h> #define IO_OP \ std::ios::sync_with_stdio(0); \ std::cin.tie(0); #define F first #define S second #define PB push_back #define MP make_pair #define EB emplace_back #define endl '\...
replace
17
18
17
18
TLE
p02986
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define fastIO ios_base::sync_with_stdio(false), cin.tie(NULL) struct LCA { vector<int> height, euler, first, logs; vector<bool> visited; vector<vector<int>> st; int min_height(int a, int b) { if (height[a] < height[b]) return a; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define fastIO ios_base::sync_with_stdio(false), cin.tie(NULL) struct LCA { vector<int> height, euler, first, logs; vector<bool> visited; vector<vector<int>> st; int min_height(int a, int b) { if (height[a] < height[b]) return a; ...
replace
29
30
29
30
0
p02986
C++
Runtime Error
#include <bits/stdc++.h> // #define endl "\n" typedef long long ll; using namespace std; const int N = 2e5 + 10; int n; vector<int> g[N]; vector<int> e[N]; int sz[N], in[N], out[N], top[N], t, son[N]; ; int dep[N], par[N]; struct { int u, v, w, c; } edge[N]; int val[N]; // 本来是记录点权,此处改为记录点对应的边的编号 int wei[N]; int col[...
#include <bits/stdc++.h> // #define endl "\n" typedef long long ll; using namespace std; const int N = 2e5 + 10; int n; vector<int> g[N]; vector<int> e[N]; int sz[N], in[N], out[N], top[N], t, son[N]; ; int dep[N], par[N]; struct { int u, v, w, c; } edge[N]; int val[N]; // 本来是记录点权,此处改为记录点对应的边的编号 int wei[N]; int col[...
replace
22
23
22
23
0
p02986
C++
Runtime Error
#include "algorithm" #include "bitset" #include "cassert" #include "climits" #include "cmath" #include "cstdio" #include "functional" #include "iomanip" #include "iostream" #include "list" #include "map" #include "numeric" #include "queue" #include "random" #include "set" #include "stack" #include "string" #include "un...
#include "algorithm" #include "bitset" #include "cassert" #include "climits" #include "cmath" #include "cstdio" #include "functional" #include "iomanip" #include "iostream" #include "list" #include "map" #include "numeric" #include "queue" #include "random" #include "set" #include "stack" #include "string" #include "un...
replace
141
142
141
142
-11
p02986
C++
Runtime Error
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<in...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; typedef long long ll; typedef long double ld; typedef complex<ld> cd; typedef pair<int, int> pi; typedef pair<ll, ll> pl; typedef pair<ld, ld> pd; typedef vector<in...
replace
199
200
199
200
-6
32ba53b0-8e6c-4e32-b74e-cc0b76de43d8.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02986/C++/s466543180.cpp:185: int main(): Assertion `level[cur] <= pq.top().f' failed.
p02986
C++
Runtime Error
/* luogu AT4809 */ #include <bits/stdc++.h> using namespace std; #define int long long #define mid (l + r >> 1) int n, q; int ee, h[100005], nex[100005 << 1], to[100005 << 1], val[100005 << 1], col[100005 << 1]; int dis[100005], v[100005], c[100005]; int dfn, mark[100005], fa[100005], son[100005], dep[100005], to...
/* luogu AT4809 */ #include <bits/stdc++.h> using namespace std; #define int long long #define mid (l + r >> 1) int n, q; int ee, h[100005], nex[100005 << 1], to[100005 << 1], val[100005 << 1], col[100005 << 1]; int dis[100005], v[100005], c[100005]; int dfn, mark[100005], fa[100005], son[100005], dep[100005], to...
replace
26
27
26
27
0
p02986
C++
Runtime Error
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author tatsumack */ #include <fstream> #include <iostream> #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #...
/** * code generated by JHelper * More info: https://github.com/AlexeyDmitriev/JHelper * @author tatsumack */ #include <fstream> #include <iostream> #include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <deque> #...
replace
144
152
144
152
0
p02986
C++
Runtime Error
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <vector> // #include<unordered_set> using namespace std; /* #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; tree<int, null_ty...
#include <algorithm> #include <iostream> #include <map> #include <queue> #include <random> #include <set> #include <string> #include <vector> // #include<unordered_set> using namespace std; /* #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; tree<int, null_ty...
replace
39
40
39
40
0
p02986
C++
Time Limit Exceeded
#include <algorithm> #include <cstdio> using namespace std; int n, T, num, tot; int rdt[200300], rd[200300], rdc[200300], rdl[200300], wz[200300], ans[200300]; int dad[200300], hvdad[200300], hvson[200300], dep[200300], sz[200300], dadlen[200300]; int trtoli[200300], litotr[200300]; int a[400300], sum[400300], L[40...
#include <algorithm> #include <cstdio> using namespace std; int n, T, num, tot; int rdt[200300], rd[200300], rdc[200300], rdl[200300], wz[200300], ans[200300]; int dad[200300], hvdad[200300], hvson[200300], dep[200300], sz[200300], dadlen[200300]; int trtoli[200300], litotr[200300]; int a[400300], sum[400300], L[40...
replace
96
97
96
97
TLE
p02986
C++
Runtime Error
// #pragma GCC optimize("Ofast") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace std::chrono; #define int long long #define ll long long auto start_time = system_clock::now(); //@formatter:off #ifdef _DEBUG // 区間削除は出来ない templat...
// #pragma GCC optimize("Ofast") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace std::chrono; #define int long long #define ll long long auto start_time = system_clock::now(); //@formatter:off #ifdef _DEBUG // 区間削除は出来ない templat...
replace
5,238
5,239
5,238
5,239
-11
p02986
C++
Time Limit Exceeded
#include <algorithm> #include <assert.h> #include <complex> #include <cstring> #include <functional> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <unordered_map> #include <unordered_set> #include <vect...
#include <algorithm> #include <assert.h> #include <complex> #include <cstring> #include <functional> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <stack> #include <stdio.h> #include <string> #include <unordered_map> #include <unordered_set> #include <vect...
replace
61
62
61
62
TLE
p02987
C++
Runtime Error
// Keep Working hard #include <bits/stdc++.h> using namespace std; #define int long long #define IOS \ ios::sync_with_stdio(false); \ cin.tie(nullptr); ...
// Keep Working hard #include <bits/stdc++.h> using namespace std; #define int long long #define IOS \ ios::sync_with_stdio(false); \ cin.tie(nullptr); ...
replace
37
38
37
38
0
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1) && s.at(2) == s.at(3) || s.at(1) == s.at(2) && s.at(0) == s.at(3) || s.at(1) == s.at(3) && s.at(2) == s.at(4)) { cout << "Yes" << endl; } else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1) && s.at(2) == s.at(3) && s.at(1) != s.at(2) || s.at(1) == s.at(2) && s.at(0) == s.at(3) && s.at(0) != s.at(1) || s.at(1) == s.at(3) && s.at(2) == s.at(0) && s.at(1) != s.at(2)) { cout << "Yes" <<...
replace
6
9
6
9
0
p02987
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main() { int seged = 0; string S = "ASSA"; cin >> S; for (int i = 0; i < S.length() - 1; i++) { for (int j = i + 1; S.length(); j++) { if (S[i] == S[j]) { seged += 1; } } } if (seged == 2) { cout << "Yes"; } else { cout << "...
#include <iostream> using namespace std; int main() { int seged = 0; string S = "ASSA"; cin >> S; for (int i = 0; i < S.length() - 1; i++) { for (int j = i + 1; j < S.length(); j++) { if (S[i] == S[j]) { seged += 1; } } } if (seged == 2) { cout << "Yes"; } else { cout ...
replace
8
9
8
9
TLE
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; char c[4]; strcpy(c, str.c_str()); sort(c, c + 4); if (c[0] == c[1] && c[2] == c[3] && c[1] != c[2]) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { string str; cin >> str; char c[10]; strcpy(c, str.c_str()); sort(c, c + 4); if (c[0] == c[1] && c[2] == c[3] && c[1] != c[2]) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
replace
6
7
6
7
0
p02987
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>; int main() { string s; cin >> s; vector<int> cnt(26); int ans = 0; rep(i, 4) { int t; t = s[i] - 'a'; if (cnt[t] == 1) { ans++; } cnt[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>; int main() { string s; cin >> s; vector<int> cnt(26); int ans = 0; rep(i, 4) { int t; t = s[i] - 'A'; if (cnt[t] == 1) { ans++; } cnt[t]++; ...
replace
13
14
13
14
0
p02987
C++
Runtime Error
#include <bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define HUGE_NUM 1000000000000000000 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; int table[26]; char S[5]; int main() { for (int i = 0; i < 26; i++) { table[i] = 0; } ...
#include <bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define HUGE_NUM 1000000000000000000 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; int table[26]; char S[5]; int main() { for (int i = 0; i < 26; i++) { table[i] = 0; } ...
replace
23
24
23
24
-11
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string S; sort(S.begin(), S.end()); if (S.at(0) == S.at(1) && S.at(2) == S.at(3) && S.at(0) != S.at(2)) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { string S; cin >> S; sort(S.begin(), S.end()); if (S.at(0) == S.at(1) && S.at(2) == S.at(3) && S.at(0) != S.at(2)) cout << "Yes" << endl; else cout << "No" << endl; }
insert
5
5
5
6
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
p02987
C++
Runtime Error
#include <iostream> #include <string> using namespace std; int main() { string a[2] = {"", ""}; int count1 = 0; int count2 = 0; string S; cin >> S; for (int i = 1; i < 4; i++) { if (S[0] == S[i]) { count1++; } else { a[count2] = S[i]; count2++; } } if (count1 == 1 and a[0...
#include <iostream> #include <string> using namespace std; int main() { string a[4]; int count1 = 0; int count2 = 0; string S; cin >> S; for (int i = 1; i < 4; i++) { if (S[0] == S[i]) { count1++; } else { a[count2] = S[i]; count2++; } } if (count1 == 1 and a[0] == a[1]) ...
replace
6
7
6
7
0
p02987
C++
Runtime Error
#include <bits/stdc++.h> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #define endl "\n" #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector<vi> #define pii pair<int, int> #define pll pair<long long, long long> #define mod 1000000007 #de...
#include <bits/stdc++.h> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #define endl "\n" #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector<vi> #define pii pair<int, int> #define pll pair<long long, long long> #define mod 1000000007 #de...
delete
39
44
39
39
0
p02987
C++
Runtime Error
#include <iostream> using namespace std; int main() { char *s; cin >> s; int count = 0; int elc = 0; char tmp1, tmp2; tmp1 = *s; tmp2 = *s; s++; count++; for (int i = 0; i < 3; i++) { if (*s != tmp1 && elc == 0) { tmp2 = *s; elc = 1; } if (*s == tmp1) count++; if (*...
#include <iostream> using namespace std; int main() { char *s = (char *)malloc(sizeof(char) * 5); s[4] = 0; cin >> s; int count = 0; int elc = 0; char tmp1, tmp2; tmp1 = *s; tmp2 = *s; s++; count++; for (int i = 0; i < 3; i++) { if (*s != tmp1 && elc == 0) { tmp2 = *s; elc = 1; ...
replace
3
4
3
5
-11
p02987
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using lli = long long int; int inf = 1000000007; using namespace std; int NextInt() { int x; cin >> x; return x; } int main() { vec...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <utility> #include <vector> using lli = long long int; int inf = 1000000007; using namespace std; int NextInt() { int x; cin >> x; return x; } int main() { vec...
replace
21
22
21
22
-11
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout); #endif int ar[10000]; memset(ar, 0, sizeof(ar)); string s; cin >> s; for (int i = 0; i < 4; i++) { ar[(int)(s.at(i) - 'A')]++...
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { int ar[10000]; memset(ar, 0, sizeof(ar)); string s; cin >> s; for (int i = 0; i < 4; i++) { ar[(int)(s.at(i) - 'A')]++; } for (int i = 0; i < 100; i++) { if (ar[i] == 1 || ar[i] == 4) { cout << "No" << end...
replace
6
10
6
7
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { #ifndef ONLINE_JUDGE // for getting input from input.txt freopen("input.txt", "r", stdin); // for writing output to output.txt freopen("output.txt", "w", stdout); #endif string s; cin >> s; if (count(s.begin(), s.end()...
#include <bits/stdc++.h> using namespace std; int main(int argc, char const *argv[]) { // #ifndef ONLINE_JUDGE // // for getting input from input.txt // freopen("input.txt", "r", stdin); // // for writing output to output.txt // freopen("output.txt", "w", stdout); // #endif string s; cin >> s; i...
replace
3
9
3
9
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
p02987
C++
Runtime Error
#include <stdio.h> int main(void) { char *S; scanf("%s", S); int cnt = 0; for (int j = 0; j < 4; j++) { for (int i = 0; i < 4; i++) { if (S[j] == S[i]) { cnt++; } } if (cnt != 2) { printf("No"); return 0; } cnt = 0; } printf("Yes"); return 0; }
#include <stdio.h> int main(void) { char S[4]; scanf("%s", S); int cnt = 0; for (int j = 0; j < 4; j++) { for (int i = 0; i < 4; i++) { if (S[j] == S[i]) { cnt++; } } if (cnt != 2) { printf("No"); return 0; } cnt = 0; } printf("Yes"); return 0; }
replace
3
4
3
4
0
p02987
C++
Runtime Error
#include <bits/stdc++.h> #define inf 2147483647 #define llinf 9223372036854775807 #define ll long long using namespace std; const int maxn = 1e5 + 10; char s[5]; int cnt = 0, vis[26]; int main() { scanf("%s", s); for (int i = 0; i < 4; i++) { if (vis[s[i] - 'A'] != 0) continue; vis[s[i] - 'a'] = 1; ...
#include <bits/stdc++.h> #define inf 2147483647 #define llinf 9223372036854775807 #define ll long long using namespace std; const int maxn = 1e5 + 10; char s[5]; int cnt = 0, vis[26]; int main() { scanf("%s", s); for (int i = 0; i < 4; i++) { if (vis[s[i] - 'A'] != 0) continue; vis[s[i] - 'A'] = 1; ...
replace
15
16
15
16
-11
p02987
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define DEBUG 1 #define fi first #define se second #define pb push_back #define fore(...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define DEBUG 1 #define fi first #define se second #define pb push_back #define fore(...
delete
36
37
36
36
0
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long // A int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s; cin >> s; map<char, ll> m; ll i; for (i = 0; i < s.length(); i++) { m[s[i...
#include <bits/stdc++.h> using namespace std; #define ll long long // A int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s; cin >> s; map<char, ll> m; ll i; for (i = 0; i < s.length(); i++) { m[s[i]]++; } if (m.size() != 2) { cout << "No"; } else { ...
delete
6
9
6
6
0
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s; cin >> s; sort(s.begin(), s.end()); int cnt = 0; rep(i, 4) { if (s.at(i) != s.at(i + 1)) cnt++; } if (cnt == 1) cout << "Yes" << endl; else cout << "No" << endl;...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { string s; cin >> s; map<char, int> mp; rep(i, s.size()) { mp[s.at(i)]++; } if (mp.size() == 2 && mp[s.at(0)] == 2) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
replace
8
16
8
11
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 4) >= this->size() (which is 4)
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { vector<char> s; for (int i = 0; i < 4; i++) { cin >> s.at(i); } sort(s.begin(), s.end()); if (s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3)) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { vector<char> s(4); for (int i = 0; i <= 3; i++) { cin >> s.at(i); } sort(s.begin(), s.end()); if (s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3)) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
replace
4
6
4
6
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 0) >= this->size() (which is 0)
p02987
C++
Runtime Error
// gauravsinghh #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ll long long int #define ld long double #define db double #define pii pair<int, int> #define pll pair<long long, long long> #define sii set<int>...
// gauravsinghh #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; #define ll long long int #define ld long double #define db double #define pii pair<int, int> #define pll pair<long long, long long> #define sii set<int>...
replace
81
83
81
84
0
p02987
C++
Runtime Error
#pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2") #include <algorithm> #include <bitset> #include <cassert> #include <iostream> #include <map> #include <random> #include <set> #include <stdio.h> #include <time.h> #include <unordered_set> #...
#pragma comment(linker, "/stack:200000000") #pragma GCC optimize("Ofast") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2") #include <algorithm> #include <bitset> #include <cassert> #include <iostream> #include <map> #include <random> #include <set> #include <stdio.h> #include <time.h> #include <unordered_set> #...
replace
40
41
40
41
0
p02987
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; int main() { string s; cin >> s; sort(&s, &s + 4); if (s[0] == s[1] && s[2] == s[3]) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <algorithm> #include <iostream> using namespace std; int main() { string s; cin >> s; sort(s.begin(), s.end()); if (s.at(0) == s.at(1) && s.at(1) != s.at(2) && s.at(2) == s.at(3)) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
replace
6
8
6
8
-11
p02987
C++
Runtime Error
#include <iostream> int main(int argc, char *argv[]) { if ((argv[1][0] == argv[1][1] && argv[1][2] == argv[1][3]) || (argv[1][0] == argv[1][2] && argv[1][1] == argv[1][3]) || (argv[1][0] == argv[1][3] && argv[1][1] == argv[1][2])) { std::cout << "Yes" << std::endl; } else { std::cout << "No" <<...
#include <iostream> int main(int argc, char *argv[]) { char c[5]; std::cin >> c; if ((c[0] == c[1] && c[2] == c[3] && c[0] != c[2]) || (c[0] == c[2] && c[1] == c[3] && c[0] != c[1]) || (c[0] == c[3] && c[1] == c[2] && c[0] != c[1])) { std::cout << "Yes" << std::endl; } else { std::cout << "...
replace
3
6
3
8
-11
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1) && s.at(2) == s.at(3) && s.at(0) != s.at(2) || s.at(0) == s.at(2) && s.at(1) == s.at(3) && s.at(0) != s.at(1) || s.at(0) == s.at(4) && s.at(1) == s.at(3) && s.at(0) != s.at(1)) cout << "Yes" <...
#include <bits/stdc++.h> using namespace std; int main() { string s; cin >> s; if (s.at(0) == s.at(1) && s.at(2) == s.at(3) && s.at(0) != s.at(2) || s.at(0) == s.at(2) && s.at(1) == s.at(3) && s.at(0) != s.at(1) || s.at(0) == s.at(3) && s.at(1) == s.at(2) && s.at(0) != s.at(1)) cout << "Yes" <...
replace
10
11
10
11
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 4) >= this->size() (which is 4)
p02987
C++
Runtime Error
#include <bits/stdc++.h> #define db(x) cout << #x << "=" << x << endl; using namespace std; char a[10]; int cnt[27]; int main() { scanf("%s", a); for (int i = 0; i < 4; i++) cnt[a[i] - 'a']++; bool flg = 0; for (int i = 0; i < 26; i++) if (cnt[i] && cnt[i] != 2) flg = 1; puts(flg ? "No" : "Yes")...
#include <bits/stdc++.h> #define db(x) cout << #x << "=" << x << endl; using namespace std; char a[10]; int cnt[27]; int main() { scanf("%s", a); for (int i = 0; i < 4; i++) cnt[a[i] - 'A']++; bool flg = 0; for (int i = 0; i < 26; i++) if (cnt[i] && cnt[i] != 2) flg = 1; puts(flg ? "No" : "Yes")...
replace
8
9
8
9
-11
p02987
Python
Runtime Error
S = input() print("Yes" if all(S.count(s) == 2 for s in input()) else "No")
S = input() print("Yes" if all(S.count(s) == 2 for s in S) else "No")
replace
2
3
2
3
EOFError: EOF when reading a line
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02987/Python/s449749875.py", line 3, in <module> print('Yes' if all(S.count(s) == 2 for s in input()) else 'No') EOFError: EOF when reading a line
p02987
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string S; sort(S.begin(), S.end()); if (S.at(0) == S.at(1) && S.at(1) != S.at(2) && S.at(2) == S.at(3)) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { vector<char> S(4); for (int i = 0; i < 4; i++) cin >> S.at(i); sort(S.begin(), S.end()); if (S.at(0) == S.at(1) && S.at(1) != S.at(2) && S.at(2) == S.at(3)) cout << "Yes" << endl; else cout << "No" << endl; }
replace
4
5
4
7
-6
terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::at: __n (which is 0) >= this->size() (which is 0)
p02987
Python
Runtime Error
from collections import defaultdict S = defaultdict(int) for i in input(): S[i] += 1 a, b, *_ = S.values() if a == b == 2: print("Yes") else: print("No")
from collections import defaultdict S = defaultdict(int) for i in input(): S[i] += 1 if len(S.values()) == 2: a, b = S.values() if a == b == 2: print("Yes") exit() print("No")
replace
6
11
6
12
0
p02987
Python
Runtime Error
S = input() if S[0] == S[1] and S[2] == S[3] and len(set(S)) == 2: print("Yes") elif S[0] == S[2] and S[1] == S[4] and len(set(S)) == 2: print("Yes") elif S[0] == S[3] and S[1] == S[2] and len(set(S)) == 2: print("Yes") else: print("No")
S = input() if S[0] == S[1] and S[2] == S[3] and len(set(S)) == 2: print("Yes") elif S[0] == S[2] and S[1] == S[3] and len(set(S)) == 2: print("Yes") elif S[0] == S[3] and S[1] == S[2] and len(set(S)) == 2: print("Yes") else: print("No")
replace
3
4
3
4
0
p02987
Python
Runtime Error
s = list(input()) t = set[s] if len(t) == 2 and s.count(t[0]) == 2: print("Yes") else: print("No")
s = list(input()) t = list(set(s)) if len(t) == 2 and s.count(t[0]) == 2: print("Yes") else: print("No")
replace
1
2
1
2
TypeError: object of type 'types.GenericAlias' has no len()
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02987/Python/s708958303.py", line 3, in <module> if len(t) == 2 and s.count(t[0]) == 2 : TypeError: object of type 'types.GenericAlias' has no len()
p02987
Python
Runtime Error
S = input() S = S.strip(S[0]) if len(S[0]) > 0: S = S.strip(S[0]) if len(S) == 0: print("Yes") else: print("No") else: print("No")
S = input() S = S.replace(S[0], "") if len(S) > 0: S = S.replace(S[0], "") if len(S) == 0: print("Yes") else: print("No") else: print("No")
replace
1
5
1
4
0
p02987
Python
Runtime Error
s = input() s.sort() ans = "No" if s[0] == s[1] and s[2] == s[3]: if s[1] != s[2]: ans = "Yes" print(ans)
s = list(input()) s.sort() ans = "No" if s[0] == s[1] and s[2] == s[3]: if s[1] != s[2]: ans = "Yes" print(ans)
replace
0
1
0
1
AttributeError: 'str' object has no attribute 'sort'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02987/Python/s791520641.py", line 2, in <module> s.sort() AttributeError: 'str' object has no attribute 'sort'
p02987
Python
Runtime Error
S = input() S2 = set(list(S)) print("Yes") if len(S2) == 2 and S.count(S2[0]) == S.count(S2[1]) else print("No")
S = input() S2 = list(set(S)) print("Yes") if len(S2) == 2 and S.count(S2[0]) == S.count(S2[1]) else print("No")
replace
1
2
1
2
TypeError: 'set' object is not subscriptable
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02987/Python/s874997723.py", line 3, in <module> print('Yes') if len(S2) == 2 and S.count(S2[0]) == S.count(S2[1]) else print('No') TypeError: 'set' object is not subscriptable
p02987
Python
Runtime Error
from collections import Counter s = input() c = Counter(s) if len(c) == 2 and c.most_common(1)[1] == 2: print("Yes") else: print("No")
from collections import Counter s = input() c = Counter(s) if len(c) == 2 and c.most_common(1)[0][1] == 2: print("Yes") else: print("No")
replace
5
6
5
6
IndexError: list index out of range
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02987/Python/s756840059.py", line 6, in <module> if len(c) == 2 and c.most_common(1)[1] == 2: IndexError: list index out of range
p02987
Python
Runtime Error
import sys s = sys.argv[1] if len(s) == 4: if s.count(s[0]) == 2: if s.count(s[1]) == 2: if s.count(s[2]) == 2: if s.count(s[3]) == 2: print("Yes") exit() print("No") exit()
import sys # s = sys.argv[1] s = input() if len(s) == 4: if s.count(s[0]) == 2: if s.count(s[1]) == 2: if s.count(s[2]) == 2: if s.count(s[3]) == 2: print("Yes") exit() print("No") exit()
replace
3
5
3
5
IndexError: list index out of range
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02987/Python/s870683023.py", line 4, in <module> s = sys.argv[1] IndexError: list index out of range
p02988
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define repm(i, m, n) for (int i = m; i < (n); i++) using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using pii = pair<int, int>; int main() { int n; c...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define repm(i, m, n) for (int i = m; i < (n); i++) using namespace std; using ll = long long; using vi = vector<int>; using vvi = vector<vi>; using pii = pair<int, int>; int main() { int n; c...
replace
18
19
18
19
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
p02988
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main(void) { int n; vector<int> p; cin >> n; for (int i = 0; i < n; i++) { cin >> p[i]; } int cnt = 0; for (int i = 1; i < n - 1; i++) { if (p[i - 1] < p[i] && p[i] < p[i + 1]) cnt++; else if (p[i - 1] > p[i] && p[i] > p[i + 1]) ...
#include <bits/stdc++.h> using namespace std; int main(void) { int n; vector<int> p; cin >> n; p.resize(n + 1); for (int i = 0; i < n; i++) { cin >> p[i]; } int cnt = 0; for (int i = 1; i < n - 1; i++) { if (p[i - 1] < p[i] && p[i] < p[i + 1]) cnt++; else if (p[i - 1] > p[i] && p...
insert
9
9
9
11
-11
p02988
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> P(N); for (int i = 0; i < N; i++) { cin >> P.at(i); } int count = 0; for (int k = 0; k < N - 1; k++) { if ((P.at(k) - P.at(k - 1)) * (P.at(k + 1) - P.at(k)) > 0) { count++; } } cout << count << ...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> P(N); for (int i = 0; i < N; i++) { cin >> P.at(i); } int count = 0; for (int k = 1; k < N - 1; k++) { if ((P.at(k) - P.at(k - 1)) * (P.at(k + 1) - P.at(k)) > 0) { count++; } } cout << count << ...
replace
11
12
11
12
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 5)
p02988
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> data(n); for (int i = 0; i < n; i++) { cin >> data.at(i); } int count = 0; for (int i = 1; i < n - 1; i++) { if (data.at(i + 1) < max(data.at(i - 1), data.at(i + 2)) && data.at(i + 1) > min(data.at(i ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> data(n); for (int i = 0; i < n; i++) { cin >> data.at(i); } int count = 0; for (int i = 0; i < n - 2; i++) { int a = max(data.at(i), data.at(i + 2)); int b = min(data.at(i), data.at(i + 2)); if (data...
replace
12
15
12
17
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 5) >= this->size() (which is 5)
p02988
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long // B int main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll n; cin >> n; ll i; ll a[n]; for (i = 0; i < n; i++) { cin >> a[i]; } ll c = 0...
#include <bits/stdc++.h> using namespace std; #define ll long long // B int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); ll n; cin >> n; ll i; ll a[n]; for (i = 0; i < n; i++) { cin >> a[i]; } ll c = 0; for (i = 1; i < n - 1; i++) { if ((a[i] > a[i - 1] && a[...
delete
6
9
6
6
-11
p02988
C++
Runtime Error
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int n, ans; ans = 0; cin >> n; vector<int> P(n); rep(i, n) cin >> P[i]; rep(i, n - 1) if (P[i] < P[i + 1] && P[i + 1] < P[i + 2]) ans += 1; cout << ans << endl; }
#define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main() { int n, ans; ans = 0; cin >> n; vector<int> P(n); rep(i, n) cin >> P[i]; rep(i, n - 2) if (P[i] < P[i + 1] && P[i + 1] < P[i + 2]) ans++; else if ((P[i] > P[i + 1]) && (P[...
replace
11
12
11
13
0
p02988
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define DEBUG 1 #define fi first #define se second #define pb push_back #define fore(...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstring> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <sstream> #include <string> #include <vector> #define DEBUG 1 #define fi first #define se second #define pb push_back #define fore(...
replace
36
37
36
37
0
p02988
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int num; int i; int pn[4]; int count = 0; cin >> num; for (i = 0; i < num; i++) cin >> pn[i]; for (i = 1; i < num - 1; i++) { if (pn[i - 1] < pn[i] && pn[i] < pn[i + 1]) count++; else if (pn[i + 1] < pn[i] && pn[i] < pn[i - 1]...
#include <bits/stdc++.h> using namespace std; int main() { int num; int i; int pn[20]; int count = 0; cin >> num; for (i = 0; i < num; i++) cin >> pn[i]; for (i = 1; i < num - 1; i++) { if (pn[i - 1] < pn[i] && pn[i] < pn[i + 1]) count++; else if (pn[i + 1] < pn[i] && pn[i] < pn[i - 1...
replace
6
7
6
7
0
p02988
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int ans = 0; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); if (i > 1) { if (((vec.at(i) < vec.at(i - 1)) && (vec.at(i - 1) < vec.at(i - 2)) || ((vec.at(i) > vec.at(i - 1))) && (vec.at(i -...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int ans = 0; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); if (i > 1) { if (((vec.at(i) < vec.at(i - 1)) && (vec.at(i - 1) < vec.at(i - 2)) || ((vec.at(i) > vec.at(i - 1))) && (vec.at(i -...
replace
11
12
11
12
0
p02988
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> p(n); for (int i = 0; i < n; i++) cin >> p.at(i); int k = 0; for (int i = 0; i < n - 2; i++) { if (p.at(i - 1) < p.at(i) && p.at(i) < p.at(i + 1)) k++; else if (p.at(i + 1) < p.at(i) && p.at(i) < p.a...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; vector<int> p(n); for (int i = 0; i < n; i++) cin >> p.at(i); int k = 0; for (int i = 1; i < n - 1; i++) { if (p.at(i - 1) < p.at(i) && p.at(i) < p.at(i + 1)) k++; else if (p.at(i + 1) < p.at(i) && p.at(i) < p.a...
replace
12
13
12
13
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 18446744073709551615) >= this->size() (which is 5)
p02988
C++
Time Limit Exceeded
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> p(n); for (int i = 0; i < n; i++) { cin >> p[i]; } int ans = 0; for (int i = 0; i < n - 2; i) { if (p[i] < p[i + 1] < p[i + 2]) { ans++; } } cout << ans << endl; return 0; }
#include <iostream> #include <vector> using namespace std; int main() { int n; cin >> n; vector<int> p(n); for (int i = 0; i < n; i++) { cin >> p[i]; } int ans = 0; for (int i = 0; i < n - 2; i++) { if (p[i] < p[i + 1] && p[i + 1] < p[i + 2]) { ans++; } else if (p[i] > p[i + 1] && p[i +...
replace
12
14
12
16
TLE
p02988
C++
Runtime Error
#include <stdio.h> #define max(a, b) (a < b ? b : a) #define min(a, b) (a < b ? a : b) int main(void) { int N; scanf("%d", &N); int p[20]; for (int i = 0; i < N; i++) { scanf("%d", p[i]); } int cnt = 0; for (int i = 1; i < N - 1; i++) { int ma = max(max(p[i - 1], p[i]), p[i + 1]); int mi =...
#include <stdio.h> #define max(a, b) (a < b ? b : a) #define min(a, b) (a < b ? a : b) int main(void) { int N; scanf("%d", &N); int p[20]; for (int i = 0; i < N; i++) { scanf("%d", &p[i]); } int cnt = 0; for (int i = 1; i < N - 1; i++) { int ma = max(max(p[i - 1], p[i]), p[i + 1]); int mi ...
replace
11
12
11
12
-11
p02988
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define int long long typedef long long li; typedef long double ld; void solve(); int32_t main() { #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); #endif cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); int t = 1; // cin >> t; while (t--) {...
#include <bits/stdc++.h> using namespace std; #define int long long typedef long long li; typedef long double ld; void solve(); int32_t main() { #ifndef ONLINE_JUDGE // freopen("input.txt", "r", stdin); #endif cin.tie(0); cout.tie(0); ios_base::sync_with_stdio(false); int t = 1; // cin >> t; while (t-...
replace
11
12
11
12
0
p02988
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n; vector<int> s(n); cin >> n; for (int i = 0; i < n; i++) { cin >> s[i]; } int ans = 0; for (int i = 1; i < n - 1; i++) { if (s[i] < s[i + 1] || s[i] < s[i - 1]) { if (s[i] > s[i + 1] || s[i] > s[i - 1]) { ++ans; ...
#include <bits/stdc++.h> using namespace std; int main() { int n; vector<int> s(30); cin >> n; for (int i = 0; i < n; i++) { cin >> s[i]; } int ans = 0; for (int i = 1; i < n - 1; i++) { if (s[i] < s[i + 1] || s[i] < s[i - 1]) { if (s[i] > s[i + 1] || s[i] > s[i - 1]) { ++ans; ...
replace
5
6
5
6
-6
terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc
p02989
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 index(vector<int> d, int x) { rep(i, d.size()) { if (d[i] >= x) return i; } return -1; } int main() { int n, ans = 0; cin >> n; vector<int> d(n); int halfn = n / 2; rep(i,...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) using namespace std; using ll = long long; int index(vector<int> d, int x) { rep(i, d.size()) { if (d[i] >= x) return i; } return -1; } int main() { int n, ans = 0; cin >> n; vector<int> d(n); int halfn = n / 2; rep(i,...
replace
23
34
23
24
TLE
p02989
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); #ifndef ONLINE_JUDGE freopen("input.txt", "r", stdin); freopen("out.txt", "w", stdout); #endif int n, i; cin >> n; int a[n]; for (i = 0; i < n; i++) cin...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n, i; cin >> n; int a[n]; for (i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); cout << a[n / 2] - a[(n / 2) - 1]; }
delete
7
11
7
7
-11
p02989
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(a, b, c) for (int a = b, a##end = c; a <= a##end; ++a) #define drep(a, b, c) for (int a = b, a##end = c; a >= a##end; --a) char IO; int rd() { int s = 0, f = 0; while (IO = getchar(), IO < '0' || IO > '9') if (IO == '-') f ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(a, b, c) for (int a = b, a##end = c; a <= a##end; ++a) #define drep(a, b, c) for (int a = b, a##end = c; a >= a##end; --a) char IO; int rd() { int s = 0, f = 0; while (IO = getchar(), IO < '0' || IO > '9') if (IO == '-') f ...
replace
20
21
20
21
0
p02989
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #includ...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <ctime> #include <fstream> #include <functional> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #includ...
replace
30
31
30
31
0
p02989
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <cstring> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define int long long int #define rep(i, n) for (int i = 0; i < n; i++) #define INF 1001001001 #define LLINF 1001001001001001001 #define mp make_pair #def...
#include <algorithm> #include <cstdio> #include <cstring> #include <math.h> #include <queue> #include <set> #include <string> #include <vector> using namespace std; #define int long long int #define rep(i, n) for (int i = 0; i < n; i++) #define INF 1001001001 #define LLINF 1001001001001001001 #define mp make_pair #def...
replace
17
18
17
18
0
p02989
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) cin >> d.at(i); int count = 0; sort(d.begin(), d.end()); for (int i = d.at(N / 2 - 1); i < d.at(N / 2); i++) { int r = 0, b = 0; for (int j = 0; j < N; j++) { if (...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> d(N); for (int i = 0; i < N; i++) cin >> d.at(i); int count = 0; sort(d.begin(), d.end()); count = d.at(N / 2) - d.at(N / 2 - 1); cout << count << endl; }
replace
13
24
13
15
TLE
p02989
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); #ifndef ONLINE_JUDGE // for getting input from input.txt freopen("input.txt", "r", stdin); // for writing output to output.txt freopen("output.txt", "w", stdout); #endif ll n; ...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll n; cin >> n; ll d[n]; for (ll i = 0; i < n; i++) cin >> d[i]; sort(d, d + n); cout << d[n / 2] - d[n / 2 - 1]; }
delete
6
12
6
6
-11
p02989
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int arr[N]; int temp; for (int i = 0; i < N; i++) { cin >> arr[i]; } int length = sizeof(arr) / sizeof(arr[0]); for (int i = 0; i < length; i++) { for (int j = i + 1; j < length; j++) { if (arr[i] > arr[j]) { ...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int arr[N]; int temp; for (int i = 0; i < N; i++) { cin >> arr[i]; } int length = sizeof(arr) / sizeof(arr[0]); sort(arr, arr + length); int mid = length / 2; int result; if (arr[mid - 1] == arr[mid]) { result = 0...
replace
12
21
12
13
TLE
p02989
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; template <class T> ostream &operator<<(ostream &o, const vector<T> &v) { o << "{"; for (int i = 0; i < (int)v.size(); i++) o << (i > 0 ? ", " : "") << v[i]; o << "}"; return o; } int main(void) { int n; cin >> n; vector<int> d(n); for (auto &i : d) ...
#include <bits/stdc++.h> using namespace std; template <class T> ostream &operator<<(ostream &o, const vector<T> &v) { o << "{"; for (int i = 0; i < (int)v.size(); i++) o << (i > 0 ? ", " : "") << v[i]; o << "}"; return o; } int main(void) { int n; cin >> n; vector<int> d(n); for (auto &i : d) ...
replace
18
19
18
19
0
p02989
C++
Runtime Error
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> v(N); for (int i = 0; i < N; i++) cin >> v[N]; sort(v.begin(), v.end()); int answer = v[v.size() / 2] - v[v.size() / 2 - 1]; cout << answer << endl; }
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; int main() { int N; cin >> N; vector<int> v(N); for (int i = 0; i < N; i++) cin >> v[i]; sort(v.begin(), v.end()); int answer = v[v.size() / 2] - v[v.size() / 2 - 1]; cout << answer << endl; }
replace
11
12
11
12
-6
Fatal glibc error: malloc assertion failure in sysmalloc: (old_top == initial_top (av) && old_size == 0) || ((unsigned long) (old_size) >= MINSIZE && prev_inuse (old_top) && ((unsigned long) old_end & (pagesize - 1)) == 0)
p02989
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int X = 0; X < N; X++) { cin >> vec.at(N); } sort(vec.begin(), vec.end()); cout << vec.at(N / 2) - vec.at(N / 2 - 1) << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int X = 0; X < N; X++) { cin >> vec.at(X); } sort(vec.begin(), vec.end()); cout << vec.at(N / 2) - vec.at(N / 2 - 1) << endl; }
replace
8
9
8
9
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 6) >= this->size() (which is 6)
p02989
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; inline int read() { int x = 0; char c = getchar(); while (c < '0' || c > '9') c = getchar(); while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + (c ^ 48), c = getchar(); return x; } const int N = 1e5 + 9; int a[25], n, ans; int main() { n = read(); ...
#include <bits/stdc++.h> using namespace std; inline int read() { int x = 0; char c = getchar(); while (c < '0' || c > '9') c = getchar(); while (c >= '0' && c <= '9') x = (x << 3) + (x << 1) + (c ^ 48), c = getchar(); return x; } const int N = 1e5 + 9; int a[N], n, ans; int main() { n = read(); f...
replace
12
13
12
13
0
p02989
C++
Time Limit Exceeded
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <string> #include <vector> #define pi 3.14159265358979323846264338327950 int main() { int N; std::cin >> N; std::vector<int> D(N); for (auto &r : D) std::cin >> r; int ans = 0; for (int i = 1; i <= 100000; ++i) { ...
#include <algorithm> #include <cmath> #include <functional> #include <iostream> #include <string> #include <vector> #define pi 3.14159265358979323846264338327950 int main() { int N; std::cin >> N; std::vector<int> D(N); for (auto &r : D) std::cin >> r; std::sort(D.begin(), D.end()); std::cout << D[N / ...
replace
14
28
14
16
TLE
p02989
C++
Time Limit Exceeded
#include "bits/stdc++.h" using namespace std; using ll = long long; using ld = long double; const double PI = 3.1415926535897932384626433832795; const ll MOD = 1000000007; const int dx[] = {0, 1, 0, -1}; const int dy[] = {-1, 0, 1, 0}; int gcd(int x, int y) { return y ? gcd(y, x % y) : abs(x); } ll gcd(ll x, ll y)...
#include "bits/stdc++.h" using namespace std; using ll = long long; using ld = long double; const double PI = 3.1415926535897932384626433832795; const ll MOD = 1000000007; const int dx[] = {0, 1, 0, -1}; const int dy[] = {-1, 0, 1, 0}; int gcd(int x, int y) { return y ? gcd(y, x % y) : abs(x); } ll gcd(ll x, ll y)...
replace
45
65
45
46
TLE
p02989
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define ll long long #defi...
#include <algorithm> #include <bitset> #include <cctype> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define ll long long #defi...
replace
23
24
23
24
0
p02989
Python
Time Limit Exceeded
n = int(input()) p = list(map(int, input().split())) ans = 0 for k in range(1, max(p) + 1): abc = 0 arc = 0 for i in p: if i < k: abc += 1 else: arc += 1 if abc == arc: ans += 1 print(ans)
n = int(input()) p = sorted(list(map(int, input().split()))) a = int(len(p) / 2) if p[a - 1] == p[a]: print(0) else: print(p[a] - p[a - 1])
replace
1
14
1
7
TLE
p02989
C++
Runtime Error
/*------------------------------------ ........Bismillahir Rahmanir Rahim.... ..........created by Abdul Aziz....... ------------------------------------*/ #include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stdio.h> #include <unordered_m...
/*------------------------------------ ........Bismillahir Rahmanir Rahim.... ..........created by Abdul Aziz....... ------------------------------------*/ #include <algorithm> #include <cmath> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <stdio.h> #include <unordered_m...
replace
29
30
29
30
0
p02989
Python
Runtime Error
N = input() D = sorted([int(v) for v in input().split()]) arc = N // 2 abc = arc - 1 print(D[arc] - D[abc])
N = int(input()) D = sorted([int(v) for v in input().split()]) arc = N // 2 abc = arc - 1 print(D[arc] - D[abc])
replace
0
1
0
1
TypeError: unsupported operand type(s) for //: 'str' and 'int'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02989/Python/s961124695.py", line 4, in <module> arc = N // 2 TypeError: unsupported operand type(s) for //: 'str' and 'int'
p02989
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; int main(void) { int d[10000], n; cin >> n; for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d, d + n); cout << abs(d[n / 2 - 1] - d[n / 2]) << endl; return 0; }
#include <algorithm> #include <iostream> using namespace std; int main(void) { int d[100000], n; cin >> n; for (int i = 0; i < n; i++) { cin >> d[i]; } sort(d, d + n); cout << abs(d[n / 2 - 1] - d[n / 2]) << endl; return 0; }
replace
6
7
6
7
0
p02989
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); int c = 0, cR, cB; for (int i = vec.at(0); i <= vec.at(N - 1); i++) { cR = 0; cB = 0; for (int j = 0; j < N; j+...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; vector<int> vec(N); for (int i = 0; i < N; i++) { cin >> vec.at(i); } sort(vec.begin(), vec.end()); cout << vec.at(N / 2) - vec.at(N / 2 - 1); }
replace
11
25
11
12
TLE
p02989
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; int n, arr[10000]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> arr[i]; } sort(arr, arr + n); int sum = arr[n / 2] - arr[n / 2 - 1]; cout << sum; return 0; }
#include <algorithm> #include <iostream> using namespace std; int n, arr[100000]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> arr[i]; } sort(arr, arr + n); int sum = arr[n / 2] - arr[n / 2 - 1]; cout << sum; return 0; }
replace
4
5
4
5
0
p02989
Python
Runtime Error
N = int(input()) D = list(map(int, input().split())) D.sort() count = 0 cur = 0 for i in range(10**5 + 1): if cur == N / 2: count += 1 if cur > N / 2: break if D[cur] < i and cur < N: cur += 1 while D[cur - 1] == D[cur]: cur += 1 print(count)
N = int(input()) D = list(map(int, input().split())) D.sort() ans = D[int(N / 2)] - D[int((N / 2) - 1)] print(ans)
replace
4
16
4
6
0
p02989
Python
Runtime Error
# coding: utf-8 def main(): N = int(input()) d = sorted(list(map(int, input().split()))) ans = 0 if d[N / 2] != d[N / 2 - 1]: ans = d[N / 2] - d[N / 2 - 1] print(ans) if __name__ == "__main__": main()
# coding: utf-8 def main(): N = int(input()) d = sorted(list(map(int, input().split()))) ans = 0 if d[N // 2] != d[N // 2 - 1]: ans = d[N // 2] - d[N // 2 - 1] print(ans) if __name__ == "__main__": main()
replace
7
9
7
9
TypeError: list indices must be integers or slices, not float
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02989/Python/s312181382.py", line 14, in <module> main() File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02989/Python/s312181382.py", line 7, in main if d[N / 2] != d[N / 2 - 1]: Type...
p02989
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long ll n, a[200]; int main() { cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; sort(a + 1, a + 1 + n); int l = a[n / 2]; int r = a[n / 2 + 1]; // cout<<l<<" "<<r<<endl; cout << r - l; }
#include <bits/stdc++.h> using namespace std; #define ll long long ll n, a[100005]; int main() { cin >> n; for (int i = 1; i <= n; i++) cin >> a[i]; sort(a + 1, a + 1 + n); int l = a[n / 2]; int r = a[n / 2 + 1]; // cout<<l<<" "<<r<<endl; cout << r - l; }
replace
3
4
3
4
0
p02989
Python
Runtime Error
N = int(input()) D = list(map(int, input().split())).sort() print(D[N // 2] - D[(N // 2) - 1])
N = int(input()) D = sorted(list(map(int, input().split()))) print(D[N // 2] - D[(N // 2) - 1])
replace
1
2
1
2
TypeError: 'NoneType' object is not subscriptable
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02989/Python/s599840912.py", line 3, in <module> print(D[N // 2] - D[(N // 2) - 1]) TypeError: 'NoneType' object is not subscriptable
p02989
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; int main() { int N; int d[30]; // 最大 100 個ですが余裕をもたせます cin >> N; for (int i = 0; i < N; ++i) cin >> d[i]; sort(d, d + N); cout << d[N / 2] - d[N / 2 - 1] << endl; }
#include <algorithm> #include <iostream> using namespace std; int main() { int N; int d[100100]; // 最大 100 個ですが余裕をもたせます cin >> N; for (int i = 0; i < N; ++i) cin >> d[i]; sort(d, d + N); cout << d[N / 2] - d[N / 2 - 1] << endl; }
replace
6
7
6
7
0
p02989
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <utility> #include <vector> const int N = 1e6 + 5; const int mod = 1e9 + 7; const int INF = ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <ctime> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <utility> #include <vector> const int N = 1e6 + 5; const int mod = 1e9 + 7; const int INF = ...
replace
26
27
26
27
0