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
p03250
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> int main() { std::vector<int> vec(3); std::cin >> vec.at(0) >> vec.at(1) >> vec.at(2); std::sort(vec.begin(), vec.end()); std::cout << vec.at(3) * 10 + vec.at(0) + vec.at(1) << std::endl; return 0; }
#include <algorithm> #include <iostream> #include <vector> int main() { std::vector<int> vec(3); std::cin >> vec.at(0) >> vec.at(1) >> vec.at(2); std::sort(vec.begin(), vec.end()); std::cout << vec.at(2) * 10 + vec.at(0) + vec.at(1) << std::endl; return 0; }
replace
9
10
9
10
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 3) >= this->size() (which is 3)
p03250
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { vector<int> A; cin >> A[0] >> A[1] >> A[2]; sort(A.begin(), A.end()); cout << A[0] + A[1] + A[2] * 10 << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { vector<int> A(3); cin >> A[0] >> A[1] >> A[2]; sort(A.begin(), A.end()); cout << A[0] + A[1] + A[2] * 10 << endl; return 0; }
replace
5
6
5
6
-11
p03250
C++
Runtime Error
#include <algorithm> #include <iostream> using namespace std; int main() { int num[3]; for (int i = 0; i < 3; i++) { cin >> num[i]; } sort(num, num + 3, greater<int>()); return (num[0] * 10 + num[1] + num[2]); }
#include <algorithm> #include <iostream> using namespace std; int main() { int num[3]; for (int i = 0; i < 3; i++) { cin >> num[i]; } sort(num, num + 3, greater<int>()); int ret = (num[0] * 10 + num[1] + num[2]); cout << ret << endl; }
replace
11
12
11
14
53
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1000000007; const double PI = 3.14159265358979; const ll INF = pow(10, 18); typedef pair<ll, ll> P; typedef vector<ll> vl; typedef vector<vl> vvl; #define FOR(i, a, b) for (ll i = a; i < b; i++) #define rep(i, n) FOR(i, 0, n) string abc ...
#include <bits/stdc++.h> using namespace std; using ll = long long; const ll MOD = 1000000007; const double PI = 3.14159265358979; const ll INF = pow(10, 18); typedef pair<ll, ll> P; typedef vector<ll> vl; typedef vector<vl> vvl; #define FOR(i, a, b) for (ll i = a; i < b; i++) #define rep(i, n) FOR(i, 0, n) string abc ...
replace
21
22
21
22
-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)
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> a(n + 1), b(n + 1); for (int i = 0; i < n; i++) cin >> a.at(i); for (int i = 0; i < m; i++) cin >> b.at(i); a.at(n) = x; b.at(m) = y; sort(a.begin(), a.end()); sort(b.begin(), b.end(...
#include <bits/stdc++.h> using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> a(n + 1), b(m + 1); for (int i = 0; i < n; i++) cin >> a.at(i); for (int i = 0; i < m; i++) cin >> b.at(i); a.at(n) = x; b.at(m) = y; sort(a.begin(), a.end()); sort(b.begin(), b.end(...
replace
5
6
5
6
0
p03251
C++
Runtime Error
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; using ll = long long; using datas = pair<ll, ll>; using ddatas = pair<double, double>; using tdata = pair<ll, datas>; using vec = vector<ll>; using mat = vector<vec>; using pvec = vector<datas>; using pmat = vector<pvec>; #define For(i, a, b) f...
#pragma GCC optimize("Ofast") #include <bits/stdc++.h> using namespace std; using ll = long long; using datas = pair<ll, ll>; using ddatas = pair<double, double>; using tdata = pair<ll, datas>; using vec = vector<ll>; using mat = vector<vec>; using pvec = vector<datas>; using pmat = vector<pvec>; #define For(i, a, b) f...
insert
143
143
143
146
-11
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef long long ll; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> a(n), b(m); a[0] = x; b[0] = y; int t; rep(i, n) cin >> a[i + 1]; rep(i, m) cin >> b[i + 1]; sort(a.begin(), a.end()); ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); ++i) typedef long long ll; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> a(n + 1), b(m + 1); a[0] = x; b[0] = y; int t; rep(i, n) cin >> a[i + 1]; rep(i, m) cin >> b[i + 1]; sort(a.begin(), a....
replace
8
9
8
9
0
p03251
C++
Runtime Error
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; // const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1}; // co...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; // const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1}; // co...
replace
17
18
17
18
0
p03251
C++
Runtime Error
#include <algorithm> #include <iostream> #include <math.h> #include <numeric> #include <string> #include <vector> using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef vector<LL> VLL; typedef vector<ULL> VULL; class MYCP { public: // 数値を区切って文字列にする static string MakeString_LongLong(ve...
#include <algorithm> #include <iostream> #include <math.h> #include <numeric> #include <string> #include <vector> using namespace std; typedef long long LL; typedef unsigned long long ULL; typedef vector<LL> VLL; typedef vector<ULL> VULL; class MYCP { public: // 数値を区切って文字列にする static string MakeString_LongLong(ve...
replace
218
219
218
219
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 3) >= this->size() (which is 3)
p03251
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; string res = "War"; vector<int> x(n), y(m); cin >> x[0] >> y[0]; for (int i = 1; i < n + 1; i++) { cin >> x[i]; } for (int i = 1; i < m + 1; i++) { cin >> y[i]; } int mx = ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n, m; cin >> n >> m; string res = "War"; vector<int> x(n + 1), y(m + 1); cin >> x[0] >> y[0]; for (int i = 1; i < n + 1; i++) { cin >> x[i]; } for (int i = 1; i < m + 1; i++) { cin >> y[i]; } i...
replace
9
10
9
10
0
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> x(N); vector<int> y(N); for (int i = 0; i < N; i++) { cin >> x.at(i); } for (int i = 0; i < M; i++) { cin >> y.at(i); } int maxx = -101, miny = 101; for (int i = 0; i < N; i++) { ...
#include <bits/stdc++.h> using namespace std; int main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> x(N); vector<int> y(M); for (int i = 0; i < N; i++) { cin >> x.at(i); } for (int i = 0; i < M; i++) { cin >> y.at(i); } int maxx = -101, miny = 101; for (int i = 0; i < N; i++) { ...
replace
6
7
6
7
0
p03251
C++
Runtime Error
#include <algorithm> #include <array> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define loop(i, ...
#include <algorithm> #include <array> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdlib.h> #include <string> #include <vector> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define loop(i, ...
replace
43
44
43
44
0
p03251
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <set> #include <string> #include <vector> #pragma region Macros #define int long long #define double long double constexpr int MOD = 1000000007; constexpr double PI = 3.1415926535897...
#include <algorithm> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <set> #include <string> #include <vector> #pragma region Macros #define int long long #define double long double constexpr int MOD = 1000000007; constexpr double PI = 3.1415926535897...
replace
181
182
181
182
0
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, g; cin >> a >> b >> c >> d; vector<int> e(a); vector<int> f(b); for (int i = 0; i < a; i++) cin >> e.at(i); for (int i = 0; i < b; i++) cin >> f.at(i); sort(e.begin(), e.end()); sort(f.begin(), f.end()); /*if(e.at(a)<g...
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d, g; cin >> a >> b >> c >> d; vector<int> e(a); vector<int> f(b); for (int i = 0; i < a; i++) cin >> e.at(i); for (int i = 0; i < b; i++) cin >> f.at(i); sort(e.begin(), e.end()); sort(f.begin(), f.end()); /*if(e.at(a)<g...
replace
19
20
19
20
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 3) >= this->size() (which is 3)
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> kuni_x(N); vector<int> kuni_y(N); for (int i = 0; i < N; i++) { cin >> kuni_x.at(i); } for (int i = 0; i < M; i++) { cin >> kuni_y.at(i); } int max_x = kuni_x.at(0); for (int i = ...
#include <bits/stdc++.h> using namespace std; int main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> kuni_x(N); vector<int> kuni_y(M); for (int i = 0; i < N; i++) { cin >> kuni_x.at(i); } for (int i = 0; i < M; i++) { cin >> kuni_y.at(i); } int max_x = kuni_x.at(0); for (int i = ...
replace
7
8
7
8
0
p03251
C++
Runtime Error
#include "algorithm" #include "bitset" #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 "unordered_map" #inclu...
#include "algorithm" #include "bitset" #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 "unordered_map" #inclu...
replace
29
30
29
30
0
p03251
C++
Runtime Error
#include <algorithm> #include <climits> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define P pair<int, int> #define debug(x)...
#include <algorithm> #include <climits> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define P pair<int, int> #define debug(x)...
replace
35
36
35
36
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 3) >= this->size() (which is 3)
p03251
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> A(n); rep(i, n) cin >> A[i]; A.push_back(x); sort(A.rbegin(), A.rend()); int AMax = A[0]; vector<int> B(n); rep(i, m) cin >> B[i]; B.push_b...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> A(n); rep(i, n) cin >> A[i]; A.push_back(x); sort(A.rbegin(), A.rend()); int AMax = A[0]; vector<int> B(m); rep(i, m) cin >> B[i]; B.push_b...
replace
14
15
14
15
0
p03251
C++
Runtime Error
#include <bits/stdc++.h> typedef long long ll; using namespace std; // for(int i = 0; i<n; i++) int main() { int n, m; cin >> n >> m; vector<int> a(n + 1), b(n + 1); cin >> a[0] >> b[0]; int amax = a[0]; int bmin = b[0]; for (int i = 1; i <= n; i++) { cin >> a[i]; amax = max(amax, a[i]); } fo...
#include <bits/stdc++.h> typedef long long ll; using namespace std; // for(int i = 0; i<n; i++) int main() { int n, m; cin >> n >> m; int a[105], b[105]; cin >> a[0] >> b[0]; int amax = a[0]; int bmin = b[0]; for (int i = 1; i <= n; i++) { cin >> a[i]; amax = max(amax, a[i]); } for (int i = 1...
replace
8
9
8
9
0
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() typedef long long ll; const int INF = 1000000000; const long INF64 = 9223372036854775807; const int MOD = 1000000007; int main() { int n, m, xx, yy; std::cin >> n >> m >> xx >> ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(x) (x).begin(), (x).end() typedef long long ll; const int INF = 1000000000; const long INF64 = 9223372036854775807; const int MOD = 1000000007; int main() { int n, m, xx, yy; std::cin >> n >> m >> xx >> ...
replace
15
16
15
16
0
p03251
C++
Runtime Error
#include <algorithm> #include <cstdio> #include <vector> int main() { int N, M, X, Y; scanf("%d %d %d %d", &N, &M, &X, &Y); std::vector<int> x(N); std::vector<int> y(N); int xmax = -100; int ymin = 100; for (int i = 0; i < N; i++) { scanf("%d", &x[i]); if (x[i] > xmax) xmax = x[i]; } fo...
#include <algorithm> #include <cstdio> #include <vector> int main() { int N, M, X, Y; scanf("%d %d %d %d", &N, &M, &X, &Y); std::vector<int> x(N); std::vector<int> y(M); int xmax = -100; int ymin = 100; for (int i = 0; i < N; i++) { scanf("%d", &x[i]); if (x[i] > xmax) xmax = x[i]; } fo...
replace
8
9
8
9
0
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> x(N + 1); vector<int> y(M + 1); x[N] = X; y[M] = Y; for (int i = 0; i < N; i++) { cin >> x[i] >> y[i]; } sort(x.begin(), x.end()); sort(y.begin(), y.end()); if (x[N] < y[0]) cou...
#include <bits/stdc++.h> using namespace std; int main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> x(N + 1); vector<int> y(M + 1); x[N] = X; y[M] = Y; for (int i = 0; i < N; i++) cin >> x[i]; for (int i = 0; i < M; i++) cin >> y[i]; sort(x.begin(), x.end()); sort(y.begin(), y.e...
replace
10
13
10
14
0
p03251
C++
Runtime Error
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define repe(i, n) for (int i = 0; i <= n; ++i) #define repr(i, n) for (int i = n - 1; i > 0; --i) #define all(x) (x).begin(), (x).end() #define pb(x) push_back(x) using namespace std; template <class T> bool chmax(T &a, const T &b) { if (a < b) {...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; ++i) #define repe(i, n) for (int i = 0; i <= n; ++i) #define repr(i, n) for (int i = n - 1; i > 0; --i) #define all(x) (x).begin(), (x).end() #define pb(x) push_back(x) using namespace std; template <class T> bool chmax(T &a, const T &b) { if (a < b) {...
replace
58
59
58
59
0
p03251
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> v(n); vector<int> w(m); for (int i = 0; i < n; i++) { cin >> v[i]; } for (int i = 0; i < m; i++) { cin >> w[i]; } sort(v.begin(), v.end()); sort(...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> v(n); vector<int> w(m); for (int i = 0; i < n; i++) { cin >> v[i]; } for (int i = 0; i < m; i++) { cin >> w[i]; } sort(v.begin(), v.end()); sort(...
replace
17
19
17
19
-11
p03251
C++
Runtime Error
#include <algorithm> #include <iostream> #include <map> #include <string> #include <tuple> #include <vector> using namespace std; // #define int long signed main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> x(N), y(N); for (int i = 0; i < N; i++) cin >> x[i]; for (int i = 0; i < M; i++) c...
#include <algorithm> #include <iostream> #include <map> #include <string> #include <tuple> #include <vector> using namespace std; // #define int long signed main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> x(N), y(M); for (int i = 0; i < N; i++) cin >> x[i]; for (int i = 0; i < M; i++) c...
replace
12
13
12
13
0
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> x(N), y(N); for (int i = 0; i < N; i++) { cin >> x.at(i); } for (int i = 0; i < M; i++) { cin >> y.at(i); } int count = 0; for (int i = X + 1; i <= Y; i++) { for (int j = 0; j < ...
#include <bits/stdc++.h> using namespace std; int main() { int N, M, X, Y; cin >> N >> M >> X >> Y; vector<int> x(N), y(M); for (int i = 0; i < N; i++) { cin >> x.at(i); } for (int i = 0; i < M; i++) { cin >> y.at(i); } int count = 0; for (int i = X + 1; i <= Y; i++) { for (int j = 0; j < ...
replace
5
6
5
6
0
p03251
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cmath> #include <cstdlib> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long int; const ll mod = 1e9 ...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdlib> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; using ll = long long int; const ll mod = 1e9 ...
replace
25
26
25
26
0
p03251
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <set> #include <s...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <climits> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <fstream> #include <iomanip> #include <iostream> #include <iterator> #include <list> #include <map> #include <set> #include <s...
replace
58
59
58
59
0
p03251
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { int x, y, n, m; cin >> x >> y >> n >> m; vector<int> vecx(n + 1), vecy(m + 1); vecx.at(0) = x; vecy.at(0) = y; for (int i = 0; i < n; i++) { cin >> vecx.at(i + 1); } for (int i = 0; i < m; i++) { cin >> vecy.at(i + 1); } sort(vecx.b...
#include <bits/stdc++.h> using namespace std; int main() { int x, y, n, m; cin >> n >> m >> x >> y; vector<int> vecx(n + 1), vecy(m + 1); vecx.at(0) = x; vecy.at(0) = y; for (int i = 0; i < n; i++) { cin >> vecx.at(i + 1); } for (int i = 0; i < m; i++) { cin >> vecy.at(i + 1); } sort(vecx.b...
replace
5
6
5
6
0
p03251
C++
Time Limit Exceeded
#include <bits/stdc++.h> #include <stdio.h> #define INF 1e18 #define REP(i, n) for (int i = 0; i < n; i++) #define print(x) cout << x << endl #define debug(x) cout << #x << " = " << x << endl const double PI = 3.141592653589793238462643383279502884197169399375105820974944; typedef long long ll; using namespace ...
#include <bits/stdc++.h> #include <stdio.h> #define INF 1e18 #define REP(i, n) for (int i = 0; i < n; i++) #define print(x) cout << x << endl #define debug(x) cout << #x << " = " << x << endl const double PI = 3.141592653589793238462643383279502884197169399375105820974944; typedef long long ll; using namespace ...
insert
45
45
45
46
TLE
p03251
Python
Runtime Error
n, m, X, Y = map(int, input().split()) x = list(map(int, input().split())) y = list(map(int, input().split())) if max(x, X) < min(y, Y): print("No War") else: print("War")
n, m, X, Y = map(int, input().split()) x = list(map(int, input().split())) y = list(map(int, input().split())) if max(x + [X]) < min(y + [Y]): print("No War") else: print("War")
replace
4
5
4
5
TypeError: '>' not supported between instances of 'int' and 'list'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03251/Python/s487114190.py", line 5, in <module> if max(x, X) < min(y, Y): TypeError: '>' not supported between instances of 'int' and 'list'
p03251
Python
Runtime Error
#!/usr/bin/env python3 import sys try: from typing import List except ImportError: pass def solve(N: int, M: int, X: int, Y: int, x: "List[int]", y: "List[int]"): xs = {X, *x} ys = {Y, *y} x1 = min(xs) x2 = max(xs) y1 = min(ys) y2 = max(ys) print("No War" if (x2 < y1 or y2 < x1) e...
#!/usr/bin/env python3 import sys try: from typing import List except ImportError: pass def solve(N: int, M: int, X: int, Y: int, x: "List[int]", y: "List[int]"): xs = set(x) xs.add(X) ys = set(y) ys.add(Y) x1 = min(xs) x2 = max(xs) y1 = min(ys) y2 = max(ys) print("No War"...
replace
10
12
10
14
0
p03251
Python
Runtime Error
# max min n, m, x, y = map(int, input().split()) xs = max(list(map(int, input().split()))) ys = min(list(map(int, input().split()))) print("No War" if xs + 1 < ys else "War") # max min n, m, x, y = map(int, input().split()) xs = max(list(map(int, input().split()))) ys = min(list(map(int, input().split()))) print("No Wa...
# max min n, m, x, y = map(int, input().split()) xs = max(list(map(int, input().split()))) ys = min(list(map(int, input().split()))) print("No War" if xs < ys and x <= xs and ys <= y else "War")
replace
4
10
4
6
EOFError: EOF when reading a line
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03251/Python/s312526263.py", line 7, in <module> n, m, x, y = map(int, input().split()) EOFError: EOF when reading a line
p03251
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> X(n), Y(n); for (int i = 0; i < n; i++) cin >> X[i]; for (int i = 0; i < m; i++) cin >> Y[i]; int xmax = x, ymin = y; for (int i = 0; i < n; i++) { ...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int n, m, x, y; cin >> n >> m >> x >> y; vector<int> X(n), Y(m); for (int i = 0; i < n; i++) cin >> X[i]; for (int i = 0; i < m; i++) cin >> Y[i]; int xmax = x, ymin = y; for (int i = 0; i < n; i++) { ...
replace
8
9
8
9
0
p03251
C++
Runtime Error
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int N, M; cin >> N >> M; int X, Y; cin >> X >> Y; vector<int> x(N); vector<int> y(N); for (int n = 0; n < N; n++) { cin >> x[n]; } for (int m = 0; m < M; m++) { cin >> y[m]; } sort(x.begin(), x.e...
#include <algorithm> #include <iostream> #include <vector> using namespace std; int main() { int N, M; cin >> N >> M; int X, Y; cin >> X >> Y; vector<int> x(N); vector<int> y(M); for (int n = 0; n < N; n++) { cin >> x[n]; } for (int m = 0; m < M; m++) { cin >> y[m]; } sort(x.begin(), x.e...
replace
12
13
12
13
0
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define fastio() ios::sync_with_stdio(0), cin.tie(0); #define REP(i, n) for (int i = 0; i < (n); i++) int main() { fastio(); string S, T; cin >> S >> T; int a[26] = { 0, }, b[26] = { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; #define fastio() ios::sync_with_stdio(0), cin.tie(0); #define REP(i, n) for (int i = 0; i < (n); i++) int main() { fastio(); string S, T; cin >> S >> T; int a[26] = { 0, }, b[26] = { ...
replace
21
22
21
24
0
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; int main() { string S[2]; cin >> S[1] >> S[2]; int S_[2][200001]; int N = (int)S[1].size(); for (int i = 0; i < 2; i++) { string a = ""; for (int j = 0; j < N; j++) { int n = a.size(); int p = 0; while (p < n && a[p] != S[i][j]) p...
#include <bits/stdc++.h> using namespace std; int main() { string S[2]; cin >> S[0] >> S[1]; int S_[2][200001]; int N = (int)S[1].size(); for (int i = 0; i < 2; i++) { string a = ""; for (int j = 0; j < N; j++) { int n = a.size(); int p = 0; while (p < n && a[p] != S[i][j]) p...
replace
4
5
4
5
-11
p03252
C++
Runtime Error
#include <algorithm> #include <iostream> #include <string.h> #include <vector> using namespace std; const int MAXN = (int)1e5 + 1; struct Node { vector<int> node; }; bool cmp(Node x, Node y) { if (x.node.size() != y.node.size()) return x.node.size() < y.node.size(); else { for (int i = 0; i < x.node.s...
#include <algorithm> #include <iostream> #include <string.h> #include <vector> using namespace std; const int MAXN = (int)2e5 + 1; struct Node { vector<int> node; }; bool cmp(Node x, Node y) { if (x.node.size() != y.node.size()) return x.node.size() < y.node.size(); else { for (int i = 0; i < x.node.s...
replace
7
8
7
8
0
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; map<char, int> s; char s1[505], s2[505]; int main() { scanf("%s", s1); scanf("%s", s2); int t = strlen(s1); for (register int i = 0; i < t; i++) if (s[s1[i]] == 0) s[s1[i]] = s2[i] - 'a' + 1; else if (s[s1[i]] != s2[i] - 'a' + 1) { printf("No\n")...
#include <bits/stdc++.h> using namespace std; map<char, int> s; char s1[200005], s2[200005]; int main() { scanf("%s", s1); scanf("%s", s2); int t = strlen(s1); for (register int i = 0; i < t; i++) if (s[s1[i]] == 0) s[s1[i]] = s2[i] - 'a' + 1; else if (s[s1[i]] != s2[i] - 'a' + 1) { printf("...
replace
3
4
3
4
0
p03252
C++
Runtime Error
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { string s, t; cin >> s >> t; int n = s.size(); if (n == 1) { cout << "Yes" << e...
#include <algorithm> #include <iostream> #include <queue> #include <set> #include <stack> #include <string> #include <vector> #define ll long long #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { string s, t; cin >> s >> t; int n = s.size(); if (n == 1) { cout << "Yes" << e...
replace
19
21
19
21
0
p03252
C++
Time Limit Exceeded
//============================================================================ // Name : abc110c.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <a...
//============================================================================ // Name : abc110c.cpp // Author : // Version : // Copyright : Your copyright notice // Description : Hello World in C++, Ansi-style //============================================================================ #include <a...
replace
54
55
54
55
TLE
p03252
C++
Time Limit Exceeded
#pragma region header #pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define int long long #define ll long long #define ld long double #define vi vector<int> #define vvi vector<vector<int>> #define vvvi vector<vector<vector<int>>> #define vs vector<string> #define vvs vector<vector<string>> #define vvvs vector<...
#pragma region header #pragma GCC optimize("Ofast") #include <bits/stdc++.h> #define int long long #define ll long long #define ld long double #define vi vector<int> #define vvi vector<vector<int>> #define vvvi vector<vector<vector<int>>> #define vs vector<string> #define vvs vector<vector<string>> #define vvvs vector<...
replace
245
246
245
247
TLE
p03252
C++
Runtime Error
#include <cstdio> #include <cstring> #include <vector> using namespace std; int n, box[30]; char s[100010], t[100010]; int main() { vector<int> vs[30]; vector<int> vt[30]; scanf("%s", s); scanf("%s", t); n = strlen(s); for (int i = 0; i < n; i++) { vs[s[i] - 'a'].push_back(i); vt[t[i] - 'a'].push_b...
#include <cstdio> #include <cstring> #include <vector> using namespace std; int n, box[30]; char s[200010], t[200010]; int main() { vector<int> vs[30]; vector<int> vt[30]; scanf("%s", s); scanf("%s", t); n = strlen(s); for (int i = 0; i < n; i++) { vs[s[i] - 'a'].push_back(i); vt[t[i] - 'a'].push_b...
replace
5
6
5
6
0
p03252
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main(void) { string s, t; char c1 = -1, c2 = -1; bool fail = false; int find_pos = -1; cin >> s >> t; while (s != t) { c1 = c2 = -1; find_pos = -1; for (int i = 0; i < s.length(); i++) { char ch = s[i] - 'a'; char ch_t = t[i] - 'a...
#include <bits/stdc++.h> using namespace std; int main(void) { string s, t; char c1 = -1, c2 = -1; bool fail = false; int find_pos = -1; cin >> s >> t; while (s != t) { c1 = c2 = -1; find_pos = -1; for (int i = 0; i < s.length(); i++) { char ch = s[i] - 'a'; char ch_t = t[i] - 'a...
insert
29
29
29
34
TLE
p03252
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; #define SIZE 100005 char S[SIZE], T[SIZE]; int int_S[SIZE], int_T[SIZE]; int table_S[26], table_T[2...
#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; #define SIZE 200005 char S[SIZE], T[SIZE]; int int_S[SIZE], int_T[SIZE]; int table_S[26], table_T[2...
replace
9
10
9
10
0
p03252
C++
Time Limit Exceeded
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; // const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1}; // co...
#include <bits/stdc++.h> #define REP(i, n) for (int i = 0; i < n; i++) #define REPR(i, n) for (int i = n; i >= 0; i--) #define FOR(i, m, n) for (int i = m; i < n; i++) #define INF 2e9 #define ALL(v) (v).begin(), (v).end() using namespace std; typedef long long ll; // const int dx[] = {1, 0, -1, 0, 1, -1, -1, 1}; // co...
insert
27
27
27
29
TLE
p03252
Python
Runtime Error
import sys import socket hostname = socket.gethostname() if hostname == "F551C": sys.stdin = open("c1.in") def read_int_list(): return list(map(int, input().split())) def read_str_list(): return input().split() def read_int(): return int(input()) def read_str(): return input() def main()...
import sys import socket hostname = socket.gethostname() if hostname == "F551C": sys.stdin = open("c1.in") def read_int_list(): return list(map(int, input().split())) def read_str_list(): return input().split() def read_int(): return int(input()) def read_str(): return input() def main()...
replace
43
44
43
44
TypeError: 'str' object does not support item assignment
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03252/Python/s038216513.py", line 61, in <module> main() File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03252/Python/s038216513.py", line 44, in main T[i] = vu[T[i]] TypeError: 'str'...
p03252
Python
Time Limit Exceeded
S = input() T = input() N = len(S) pos_S = {c: set() for c in "abcdefghijklmnopqrstuvwxyz"} [pos_S[S[i]].add(i) for i in range(N)] pos_T = {c: set() for c in "abcdefghijklmnopqrstuvwxyz"} [pos_T[T[i]].add(i) for i in range(N)] if all(pos_S[S[i]] == pos_T[T[i]] for i in range(N)): print("Yes") else: print("No")
S = input() T = input() S_cnt = sorted(S.count(c) for c in set(S)) T_cnt = sorted(T.count(c) for c in set(T)) print("Yes") if S_cnt == T_cnt else print("No")
replace
2
11
2
5
TLE
p03252
Python
Runtime Error
ch_S = input() ch_T = input() ind_S = [] ind_T = [] for i in list("abcdefghijklmnopqrstuvwxyz"): L = [ch_S.find(i)] ind_S.append( L, ) R = [ch_T.find(i)] ind_T.append( R, ) if set(ind_S) == set(ind_T): print("Yes") else: print("No")
S = input() T = input() ls = [0] * 26 lt = [0] * 26 al = [chr(ord("a") + i) for i in range(26)] for i in range(S.__len__()): si = al.index(S[i]) ti = al.index(T[i]) ls[si] += 1 lt[ti] += 1 ls.sort() lt.sort() if ls == lt: print("Yes") else: print("No")
replace
0
16
0
13
TypeError: unhashable type: 'list'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03252/Python/s461485349.py", line 12, in <module> if set(ind_S) == set(ind_T): TypeError: unhashable type: 'list'
p03252
Python
Runtime Error
S = input() T = input() dic = {} dic_rev = {} def solve(): for s, t in zip(S, T): if t in dic.keys(): if s != dic[t]: print("No") return else: dic[t] = s for s, t in zip(S, T): if t in dic_rev.keys(): if t != dic_rev[...
S = input() T = input() dic = {} dic_rev = {} def solve(): for s, t in zip(S, T): if t in dic.keys(): if s != dic[t]: print("No") return else: dic[t] = s for s, t in zip(S, T): if s in dic_rev.keys(): if t != dic_rev[...
replace
16
17
16
17
KeyError: 'l'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03252/Python/s641749726.py", line 27, in <module> solve() File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03252/Python/s641749726.py", line 18, in solve if t != dic_rev[s]: KeyError: ...
p03252
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define countof(a) (sizeof(a) / sizeof(*a)) #define vi vector<int> #define vvi vector<vector<int>> #define vpi vector<pi> #define pi pair<int, int> #define fi first #define se second #define all(n) n.begin(), n.end() #define FOR(var, to) for (register s64 var = 0; var <...
#include <bits/stdc++.h> using namespace std; #define countof(a) (sizeof(a) / sizeof(*a)) #define vi vector<int> #define vvi vector<vector<int>> #define vpi vector<pi> #define pi pair<int, int> #define fi first #define se second #define all(n) n.begin(), n.end() #define FOR(var, to) for (register s64 var = 0; var <...
replace
219
228
219
240
TLE
p03252
C++
Runtime Error
#include <cstring> #include <iostream> using namespace std; int main() { int arr[26][26]; for (int i = 0; i < 26; i++) for (int j = 0; j < 26; j++) arr[i][j] = 0; char s[20001], t[20001]; cin >> s >> t; int length = strlen(s); for (int i = 0; i < length; i++) { int x = s[i] - 'a', y = t[i] - ...
#include <cstring> #include <iostream> using namespace std; int main() { int arr[26][26]; for (int i = 0; i < 26; i++) for (int j = 0; j < 26; j++) arr[i][j] = 0; char s[200001], t[200001]; cin >> s >> t; int length = strlen(s); for (int i = 0; i < length; i++) { int x = s[i] - 'a', y = t[i] ...
replace
9
10
9
10
0
p03252
C++
Runtime Error
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> using namespace std; const int MAXN = 100000; char a[MAXN + 5], b[MAXN + 5]; int cnt1[30], cnt2[30], num1[MAXN + 5], num2[MAXN + 5]; int alen, blen, Max; int main() { scanf("%s%s", a, b); alen = strlen(a); blen = strlen...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <iostream> using namespace std; const int MAXN = 200000; char a[MAXN + 5], b[MAXN + 5]; int cnt1[30], cnt2[30], num1[MAXN + 5], num2[MAXN + 5]; int alen, blen, Max; int main() { scanf("%s%s", a, b); alen = strlen(a); blen = strlen...
replace
6
7
6
7
0
p03252
C++
Time Limit Exceeded
#include <iostream> #include <string.h> #include <vector> using namespace std; int main() { string s, t; cin >> s >> t; int alphabet[26]; for (int i = 0; i < 26; i++) { alphabet[i] = -1; } vector<vector<int>> all(26, vector<int>()); for (int i = 0; i < s.size(); i++) { all[s[i] - 97].push_back(i)...
#include <iostream> #include <string.h> #include <vector> using namespace std; int main() { string s, t; cin >> s >> t; int alphabet[26]; for (int i = 0; i < 26; i++) { alphabet[i] = -1; } vector<vector<int>> all(26, vector<int>()); for (int i = 0; i < s.size(); i++) { all[s[i] - 97].push_back(i)...
insert
34
34
34
38
TLE
p03252
C++
Time Limit Exceeded
#include <iostream> using namespace std; int main(void) { string s, t; cin >> s >> t; int n = s.size(); bool a[n]; char c1[26] = {}, c2[26] = {}; bool ans = true; for (int i = 0; i < n; i++) { c1[s.at(i) - 'a']++; } for (int i = 0; i < n; i++) { c2[t.at(i) - 'a']++; } int n1 = 0, n2 = 0; ...
#include <iostream> using namespace std; int main(void) { string s, t; cin >> s >> t; int n = s.size(); bool a[n]; char c1[26] = {}, c2[26] = {}; bool ans = true; for (int i = 0; i < n; i++) { c1[s.at(i) - 'a']++; } for (int i = 0; i < n; i++) { c2[t.at(i) - 'a']++; } int n1 = 0, n2 = 0; ...
replace
29
35
29
34
TLE
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define nl cout << "\n" #define dbg(x) cout << x << " "; #define fi(a, b) for (int i = a; i < b; i++) #define fj(a, b) for (int j = a; j < b; j++) #define UM unordered_map<char, int> #define ULL unordered_map<ll, int> void fun() {...
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define nl cout << "\n" #define dbg(x) cout << x << " "; #define fi(a, b) for (int i = a; i < b; i++) #define fj(a, b) for (int j = a; j < b; j++) #define UM unordered_map<char, int> #define ULL unordered_map<ll, int> void fun() {...
delete
35
39
35
35
0
p03252
C++
Runtime Error
#include <cstdio> #include <cstring> #include <iostream> using namespace std; char s[100005], t[100005]; int main() { cin >> s >> t; int fs[26], ft[26]; memset(fs, -1, sizeof(fs)); memset(ft, -1, sizeof(ft)); int l = strlen(s); int flag = 0; for (int i = 0; i < l; i++) { if (fs[s[i] - 'a'] == -1) { ...
#include <cstdio> #include <cstring> #include <iostream> using namespace std; char s[200005], t[200005]; int main() { cin >> s >> t; int fs[26], ft[26]; memset(fs, -1, sizeof(fs)); memset(ft, -1, sizeof(ft)); int l = strlen(s); int flag = 0; for (int i = 0; i < l; i++) { if (fs[s[i] - 'a'] == -1) { ...
replace
4
5
4
5
0
p03252
Python
Runtime Error
def solve(string): s, t = map(int, string.split()) c_s = sorted([s.count(_c) for _c in set(s)]) c_t = sorted([t.count(_c) for _c in set(t)]) if c_s == c_t: return "Yes" else: return "No" if __name__ == "__main__": print(solve("\n".join([input(), input()])))
def solve(string): s, t = string.split() c_s = sorted([s.count(_c) for _c in set(s)]) c_t = sorted([t.count(_c) for _c in set(t)]) if c_s == c_t: return "Yes" else: return "No" if __name__ == "__main__": print(solve("\n".join([input(), input()])))
replace
1
2
1
2
ValueError: invalid literal for int() with base 10: 'azzel'
Traceback (most recent call last): File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03252/Python/s340167344.py", line 14, in <module> print(solve('\n'.join([input(), input()]))) File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03252/Python/s340167344.py", line 2, in solve...
p03252
Python
Time Limit Exceeded
S = input() T = input() n = len(S) for i in range(n): s = S[i] t = T[i] S = S.translate(str.maketrans({s: t, t: s})) if S == T: print("Yes") else: print("No")
S = input() T = input() st = {} ts = {} for s, t in zip(S, T): if s in st and st[s] != t: print("No") exit() if t in ts and ts[t] != s: print("No") exit() st[s] = t ts[t] = s print("Yes")
replace
2
11
2
14
TLE
p03252
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { char c = s[i]; for (int j = 0; j < s.size(); j++) { if (s[j] == c) { s[j] = t[i]; } else if (s[j] == t[i]) { s[j] = c;...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; for (int i = 0; i < s.size(); i++) { if (s[i] != t[i]) { char c = s[i]; for (int j = 0; j < s.size(); j++) { if (j < i) { if (t[i] == s[j]) { cout << "No"; return 0; ...
insert
9
9
9
15
TLE
p03252
C++
Runtime Error
/* URL_HERE */ /* */ #ifdef _WIN32 #pragma warning(disable : 4996) #endif #include <algorithm> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> using namespace std; FILE *_fin = stdin; FILE *_fout = stdout; #define PI 3.141592653589793238462643383279502884197169399...
/* URL_HERE */ /* */ #ifdef _WIN32 #pragma warning(disable : 4996) #endif #include <algorithm> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unordered_map> using namespace std; FILE *_fin = stdin; FILE *_fout = stdout; #define PI 3.141592653589793238462643383279502884197169399...
replace
228
246
228
232
0
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; char ss[111111]; void gen(vector<vector<int>> &s) { scanf("%s", ss); for (int i = 0; ss[i]; i++) { s[ss[i] - 'a'].push_back(i); } sort(s.begin(), s.end()); } int main() { vector<vector<int>> s1(26), s2(26); gen(s1); gen(s2); puts(s1 == s2 ? "Yes" : "No")...
#include <bits/stdc++.h> using namespace std; char ss[222222]; void gen(vector<vector<int>> &s) { scanf("%s", ss); for (int i = 0; ss[i]; i++) { s[ss[i] - 'a'].push_back(i); } sort(s.begin(), s.end()); } int main() { vector<vector<int>> s1(26), s2(26); gen(s1); gen(s2); puts(s1 == s2 ? "Yes" : "No")...
replace
2
3
2
3
0
p03252
C++
Runtime Error
#include <bits/stdc++.h> #define f(i, n) for (int i = 0; i < (n); i++) #define ll long long using namespace std; int nums[100004], numt[100004]; string s, t; int mojis[40], mojit[40]; int main() { cin >> s >> t; int c = 1; for (int i = 0; i < s.size(); i++) { if (!mojis[s[i] - 'a']) { mojis[s[i] - 'a'] ...
#include <bits/stdc++.h> #define f(i, n) for (int i = 0; i < (n); i++) #define ll long long using namespace std; int nums[200004], numt[200004]; string s, t; int mojis[40], mojit[40]; int main() { cin >> s >> t; int c = 1; for (int i = 0; i < s.size(); i++) { if (!mojis[s[i] - 'a']) { mojis[s[i] - 'a'] ...
replace
4
5
4
5
0
p03252
C++
Runtime Error
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; using namespace std; void solve() {} int ma...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <cstdio> #include <functional> #include <iostream> #include <map> #include <queue> #include <stack> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; using namespace std; void solve() {} int ma...
replace
23
25
23
25
0
p03252
C++
Time Limit Exceeded
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int L[30][30] = {0}; char *S1 = (char *)calloc(3 * 100000, sizeof(char)); char *S2 = (char *)calloc(3 * 100000, sizeof(char)); scanf("%s %s", S1, S2); for (int i = 0; i < strlen(S1); i++) { L[S1[i] - 'a'][S2[i] ...
#include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { int L[30][30] = {0}; char *S1 = (char *)calloc(3 * 100000, sizeof(char)); char *S2 = (char *)calloc(3 * 100000, sizeof(char)); scanf("%s %s", S1, S2); int n = strlen(S1); for (int i = 0; i < n; i++) { L[S1[i] ...
replace
10
11
10
12
TLE
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define For(i, a, b) for (int i = (a); i < (b); i++) #define Rep(i, n) For(i, 0, (n)) #define Rrep(i, n) for (int i = (n - 1); i >= 0; i--) #define Itr(i, c) for (typeof(c.begin()) i = c.begin(); i != c.end(); i++) #define p...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; #define For(i, a, b) for (int i = (a); i < (b); i++) #define Rep(i, n) For(i, 0, (n)) #define Rrep(i, n) for (int i = (n - 1); i >= 0; i--) #define Itr(i, c) for (typeof(c.begin()) i = c.begin(); i != c.end(); i++) #define p...
replace
31
32
31
32
0
p03252
C++
Runtime Error
#include <iostream> #include <string> using namespace std; int main() { string S, T; cin >> S >> T; string begin(26, -1); string end(26, -1); bool flag = true; for (int i = 0; i < S.size(); i++) { int a = S[i] - 'a'; int b = T[i] - 'a'; if (begin[i] != -1 || end[i] != -1) { if (begin[...
#include <iostream> #include <string> using namespace std; int main() { string S, T; cin >> S >> T; string begin(26, -1); string end(26, -1); bool flag = true; for (int i = 0; i < S.size(); i++) { int a = S[i] - 'a'; int b = T[i] - 'a'; if (begin[a] != -1 || end[b] != -1) { if (begin[...
replace
17
18
17
18
0
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; using vec = vector<ll>; using mat = vector<vec>; using pll = pair<ll, ll>; #define INF (1LL << 60) #define MOD 1000000007 #define PI 3.14159265358979323846 #define REP(i, m, n) for (ll(i) = (m), (i_len) = (n); (i) < (i_len); ++(i)) #define FORR(i, v...
#include <bits/stdc++.h> using namespace std; using ll = long long; using vec = vector<ll>; using mat = vector<vec>; using pll = pair<ll, ll>; #define INF (1LL << 60) #define MOD 1000000007 #define PI 3.14159265358979323846 #define REP(i, m, n) for (ll(i) = (m), (i_len) = (n); (i) < (i_len); ++(i)) #define FORR(i, v...
replace
38
39
38
39
0
p03252
C++
Runtime Error
#include <algorithm> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long int ll; #def...
#include <algorithm> #include <complex> #include <cstdio> #include <cstdlib> #include <cstring> #include <deque> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <vector> using namespace std; typedef long long int ll; #def...
replace
27
29
27
29
0
p03252
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int size = S.size(); for (int i = 0; i < size; i++) { if (S[i] != T[i]) { char cs = S[i], ct = T[i]; for (int j = 0; j < size; j++) { if (S[j] == cs) S[j] = ct; else if (S[j] == ct)...
#include <bits/stdc++.h> using namespace std; int main() { string S, T; cin >> S >> T; int size = S.size(); vector<int> ss = {1}, tt = {1}; for (int i = 1; i < size; i++) { if (S.at(i - 1) == S.at(i)) ss.back()++; else ss.push_back(1); if (T.at(i - 1) == T.at(i)) tt.back()++; ...
insert
7
7
7
23
TLE
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < n; i++) #define repl(i, l, r) for (ll i = (l); i < (r); i++) #define per(i, n) for (ll i = n - 1; i >= 0; i--) #define perl(i, r, l) for (ll i = r - 1; i >= l; i--) #define fi first #define se second #define pb push...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (ll i = 0; i < n; i++) #define repl(i, l, r) for (ll i = (l); i < (r); i++) #define per(i, n) for (ll i = n - 1; i >= 0; i--) #define perl(i, r, l) for (ll i = r - 1; i >= l; i--) #define fi first #define se second #define pb push...
replace
41
42
41
42
0
p03252
C++
Time Limit Exceeded
#include <assert.h> #include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; int size = s.length(); for (int i = 0; i < size; i++) if (s[i] != t[i]) { char ts = s[i], tt = t[i]; for (int i = 0; i < size; i++) if (s[i] == ts) s[i] = tt; el...
#include <assert.h> #include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; bool ok = true; map<char, char> st, tt; int size = s.size(); for (int i = 0; i < size; i++) { if (0 < st.count(s[i]) && st[s[i]] != t[i]) ok = false; if (0 < tt.count(t[i]) && tt[t[i]] ...
replace
8
22
8
20
TLE
p03252
Python
Time Limit Exceeded
S = list(input()) T = list(input()) S2, T2 = [], [] for i in S: S2.append(S.count(i)) for i in T: T2.append(T.count(i)) if S2 != T2: print("No") else: print("Yes")
S = list(input()) T = list(input()) S2, T2 = [], [] St, Tt = [], [] for i in range(26): s = chr(ord("a") + i) St.append(S.count(s)) Tt.append(T.count(s)) for i in range(len(S)): S2.append(St[ord(S[i]) - ord("a")]) T2.append(Tt[ord(T[i]) - ord("a")]) if S2 != T2: print("No") else: print("Yes"...
replace
3
7
3
11
TLE
p03252
C++
Runtime Error
#include <cstring> #include <iostream> using namespace std; char a[100000 + 5], b[100000 + 5]; int map1[30], map2[30]; int main() { scanf("%s", a); scanf("%s", b); int n = strlen(a); for (int i = 0; i < n; i++) if (map1[a[i] - 'a' + 1] == 0 && map2[b[i] - 'a' + 1] == 0) map1[a[i] - 'a' + 1] = b[i] - '...
#include <cstring> #include <iostream> using namespace std; char a[200000 + 5], b[200000 + 5]; int map1[30], map2[30]; int main() { scanf("%s", a); scanf("%s", b); int n = strlen(a); for (int i = 0; i < n; i++) if (map1[a[i] - 'a' + 1] == 0 && map2[b[i] - 'a' + 1] == 0) map1[a[i] - 'a' + 1] = b[i] - '...
replace
3
4
3
4
0
p03252
C++
Runtime Error
#include <algorithm> #include <bitset> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) repr(i, 0, n) #define INF 2e9 #define ...
#include <algorithm> #include <bitset> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; #define repr(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) repr(i, 0, n) #define INF 2e9 #define ...
replace
22
23
22
23
-11
p03252
C++
Runtime Error
#include <bits/stdc++.h> class kin { public: inline void open(FILE *, int); inline void close(void); inline void scan(void); inline kin &operator>(char &); inline kin &operator>(int &); inline kin &operator>(long long &); inline kin &operator>(double &); inline kin &operator>(long double &); inline ...
#include <bits/stdc++.h> class kin { public: inline void open(FILE *, int); inline void close(void); inline void scan(void); inline kin &operator>(char &); inline kin &operator>(int &); inline kin &operator>(long long &); inline kin &operator>(double &); inline kin &operator>(long double &); inline ...
replace
47
48
47
48
0
p03252
C++
Time Limit Exceeded
#include <algorithm> #include <functional> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string str1, str2; cin >> str1 >> str2; bool flag = true; for (int i = 0; i < str1.size(); ++i) { // str1[0] for (int ii = i; ii < str1.size(); ++ii) { if (str1[i] ...
#include <algorithm> #include <functional> #include <iostream> #include <string> #include <vector> using namespace std; int main() { string str1, str2; cin >> str1 >> str2; bool flag = true; vector<vector<int>> c1, c2; for (char a = 'a'; a <= 'z'; ++a) { vector<int> tmp1, tmp2; std::string::iterator ...
replace
11
24
11
34
TLE
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG_MODE #define DBG(n) n; #else #define DBG(n) ; #endif #define REP(i, n) for (ll(i) = (0); (i) < (n); ++i) #define PB push_back #define MP make_pair #define FI first #define SE second #define SHOW1d(v, n) ...
#include <bits/stdc++.h> using namespace std; #ifdef DEBUG_MODE #define DBG(n) n; #else #define DBG(n) ; #endif #define REP(i, n) for (ll(i) = (0); (i) < (n); ++i) #define PB push_back #define MP make_pair #define FI first #define SE second #define SHOW1d(v, n) ...
replace
61
62
61
62
-11
p03252
C++
Runtime Error
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> #define ll long long #define rep(i, s, n) for (int i = s; i < n; i++) using namespace std; int main() { string s, t; cin >> s >> t; vector<int> s_count(s.size(), 0); vector<int> t_count(t.size(), 0); rep(i, 0, s.siz...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> #define ll long long #define rep(i, s, n) for (int i = s; i < n; i++) using namespace std; int main() { string s, t; cin >> s >> t; vector<int> s_count(26, 0); vector<int> t_count(26, 0); rep(i, 0, s.size()) { s...
replace
12
14
12
14
0
p03252
C++
Time Limit Exceeded
#include <iostream> #include <string> #include <vector> using namespace std; string get_format(string s) { vector<char> v; string f; for (int i = 0; i < s.size(); i++) { int j; for (j = 0; j < v.size(); j++) { if (s[i] == v[j]) { // 大文字で表す f.push_back('A' + j); } } i...
#include <iostream> #include <string> #include <vector> using namespace std; string get_format(string s) { vector<char> v; string f; for (int i = 0; i < s.size(); i++) { int j; for (j = 0; j < v.size(); j++) { if (s[i] == v[j]) { // 大文字で表す f.push_back('A' + j); break; ...
insert
16
16
16
17
TLE
p03252
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; vector<bool> used(s.size(), false); for (int i = 0; i < t.size(); i++) { if (!used[i]) { for (int j = i + 1; j < t.size(); j++) { if (s[i] == s[j] && t[i] == t[j]) used[i] = true; else if (...
#include <bits/stdc++.h> using namespace std; int main() { string s, t; cin >> s >> t; vector<bool> used(s.size(), false); for (int i = 0; i < t.size(); i++) { if (!used[i]) { for (int j = i + 1; j < t.size(); j++) { if (s[i] == s[j] && t[i] == t[j]) used[j] = true; else if (...
replace
10
11
10
11
TLE
p03252
C++
Runtime Error
#include <algorithm> #include <climits> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define P pair<int, int> #define debug(x)...
#include <algorithm> #include <climits> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <unordered_map> #include <utility> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define P pair<int, int> #define debug(x)...
replace
36
37
36
37
-6
terminate called after throwing an instance of 'std::out_of_range' what(): vector::_M_range_check: __n (which is 97) >= this->size() (which is 26)
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define rep(i, x) for (__typeof(x) i = 0; i < x; i++) #define mp make_pair #define pb push_back #define fi first #define se second #define sz(x) (int)((x).size()) #define all(x) (x).begin(), (x).end() #define sci(x) ...
#include <bits/stdc++.h> using namespace std; #define rep(i, x) for (__typeof(x) i = 0; i < x; i++) #define mp make_pair #define pb push_back #define fi first #define se second #define sz(x) (int)((x).size()) #define all(x) (x).begin(), (x).end() #define sci(x) ...
replace
75
76
75
76
-11
p03252
C++
Time Limit Exceeded
#include <iostream> #include <map> #include <string> int main() { std::string S, T; std::map<char, char> m, mr; std::cin >> S >> T; for (int i = 0; i < S.size(); ++i) { if (S[i] == T[i]) continue; auto s = S[i]; auto t = T[i]; for (auto it = S.begin(), end = S.end(); it != end; ++it) { ...
#include <iostream> #include <map> #include <string> int main() { std::string S, T; std::map<char, char> m, mr; std::cin >> S >> T; for (int i = 0; i < T.size(); ++i) { auto t = T[i]; auto s = S[i]; auto it = m.find(t); if (it != m.end() && it->second != s) { std::cout << "No\n"; e...
insert
8
8
8
31
TLE
p03252
C++
Time Limit Exceeded
#include <iostream> #include <stdio.h> // #include <bits/stdc++.h> #include <algorithm> #include <cassert> #include <cmath> #include <cmath> #include <cstdint> #include <cstring> #include <float.h> #include <iomanip> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <string> #...
#include <iostream> #include <stdio.h> // #include <bits/stdc++.h> #include <algorithm> #include <cassert> #include <cmath> #include <cmath> #include <cstdint> #include <cstring> #include <float.h> #include <iomanip> #include <map> #include <math.h> #include <queue> #include <set> #include <sstream> #include <string> #...
replace
53
54
53
54
TLE
p03252
C++
Runtime Error
/** * File : C.cpp * Author : Kazune Takahashi * Created : 2018-9-23 21:07:54 * Powered by Visual Studio Code */ #include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ; #include <chrono> // std::chrono::system_clock::time_point start_time, end_time; #include <complex> #include <functional> #incl...
/** * File : C.cpp * Author : Kazune Takahashi * Created : 2018-9-23 21:07:54 * Powered by Visual Studio Code */ #include <algorithm> // do { } while ( next_permutation(A, A+xxx) ) ; #include <chrono> // std::chrono::system_clock::time_point start_time, end_time; #include <complex> #include <functional> #incl...
replace
54
55
54
55
0
p03252
C++
Runtime Error
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <...
#include <algorithm> #include <bitset> #include <cassert> #include <cctype> #include <cfloat> #include <climits> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #include <...
replace
98
99
98
99
0
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 // #define INF 10000000000000009 #define INF 9223372036854775807 typedef long long ll; #define REP(i, n) for (int i = 0; i < (n); ++i) #define OREP(i, n) for (int i = 1; i <= (n); ++i) #define ORREP(i, n) for (int i = (n); i >= 1; --i) #define ZREP(i,...
#include <bits/stdc++.h> using namespace std; #define MOD 1000000007 // #define INF 10000000000000009 #define INF 9223372036854775807 typedef long long ll; #define REP(i, n) for (int i = 0; i < (n); ++i) #define OREP(i, n) for (int i = 1; i <= (n); ++i) #define ORREP(i, n) for (int i = (n); i >= 1; --i) #define ZREP(i,...
replace
19
21
19
21
0
p03252
C++
Time Limit Exceeded
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef map<int, int> mii; typedef map<char, int> mci; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<pair<int, int>> vii; typedef vector<char> vc; typedef vector<bool> vb; typedef vecto...
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; typedef long long ll; typedef map<int, int> mii; typedef map<char, int> mci; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<pair<int, int>> vii; typedef vector<char> vc; typedef vector<bool> vb; typedef vecto...
replace
29
30
29
30
TLE
p03252
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; #define dump(x) cout << (x) << endl typedef long long ll; typedef vector<int> V; int main() { string s, t; cin >> s >> t; int a = 1; map<char, int> mps, mpt; int sx[200] = {}, tx[200] = {}; for (int i = 0; i < (int)s.size(); i++) { bool ex = false; for ...
#include <bits/stdc++.h> using namespace std; #define dump(x) cout << (x) << endl typedef long long ll; typedef vector<int> V; int main() { string s, t; cin >> s >> t; int a = 1; map<char, int> mps, mpt; int sx[200005] = {}, tx[200005] = {}; for (int i = 0; i < (int)s.size(); i++) { bool ex = false; ...
replace
11
12
11
12
0
p03252
C++
Runtime Error
#include <cmath> #include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; int a[1 << 17], b[1 << 17], l = s.size(), aa[30], bb[30], c = 0, d = 0; for (int i = 0; i < 28; i++) aa[i] = bb[i] = -1; for (int i = 0; i < l; i++) { if (aa[s[i] - 97] < 0) a[i] = ++c, aa[s[i] - 9...
#include <cmath> #include <iostream> using namespace std; int main() { string s, t; cin >> s >> t; int a[1 << 18], b[1 << 18], l = s.size(), aa[30], bb[30], c = 0, d = 0; for (int i = 0; i < 28; i++) aa[i] = bb[i] = -1; for (int i = 0; i < l; i++) { if (aa[s[i] - 97] < 0) a[i] = ++c, aa[s[i] - 9...
replace
6
7
6
7
0
p03252
C++
Runtime Error
#include <cstdio> #include <cstring> using namespace std; char s[100001] = {0}; char sout[100001] = {0}; char t[100001] = {0}; char tout[100001] = {0}; void normalize(char *str, char *strout) { char d[300] = {0}; char current = 'a'; for (int i = 0; str[i] != '\0'; i++) { if (d[str[i]] == 0) { d[str[i...
#include <cstdio> #include <cstring> using namespace std; char s[1000001] = {0}; char sout[1000001] = {0}; char t[1000001] = {0}; char tout[1000001] = {0}; void normalize(char *str, char *strout) { char d[300] = {0}; char current = 'a'; for (int i = 0; str[i] != '\0'; i++) { if (d[str[i]] == 0) { d[s...
replace
5
9
5
9
0
p03252
Python
Time Limit Exceeded
S = input() T = input() # 例abcdefg...のように文字列が1対1の矢印関係の場合は、 # どのような場合でも置き換えできる。問題は同じ文字が複数現れる場合 # S上に同じ文字sのある場所には # T上にも同じ文字tがなくてはならない # つまり、同じ値になっているインデックスの集合を取れば # 全部同じになっているはず # 文字種ごとにインデックスの集合を求める ns = len(S) indexS = {} for i in range(ns): s = S[i] if s in indexS: indexS[s].append(i) else: ...
S = input() T = input() # 例abcdefg...のように文字列が1対1の矢印関係の場合は、 # どのような場合でも置き換えできる。問題は同じ文字が複数現れる場合 # S上に同じ文字sのある場所には # T上にも同じ文字tがなくてはならない # つまり、同じ値になっているインデックスの集合を取れば # 全部同じになっているはず # 文字種ごとにインデックスの集合を求める ns = len(S) indexS = {} for i in range(ns): s = S[i] if s in indexS: indexS[s].append(i) else: ...
replace
28
31
28
33
TLE
p03252
C++
Runtime Error
#include "bits/stdc++.h" using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP0(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define REP1(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i) #define RREP0(i, n) for (int i = n - 1; i >= 0; --i) #define RREP1(i, n) for (int i...
#include "bits/stdc++.h" using namespace std; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP0(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define REP1(i, n) for (int i = 1, i##_len = (n); i <= i##_len; ++i) #define RREP0(i, n) for (int i = n - 1; i >= 0; --i) #define RREP1(i, n) for (int i...
replace
52
53
52
53
0
p03253
C++
Time Limit Exceeded
#include <bits/stdc++.h> using namespace std; #define rep(i, m, n) for (int i = m; i < n; ++i) typedef long long ll; #define mod 1000000007 ll mod_pow(ll x, ll n) { ll res = 1; while (n != 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n = n >> 1; } return res; } ll mod_fact(ll x) { ...
#include <bits/stdc++.h> using namespace std; #define rep(i, m, n) for (int i = m; i < n; ++i) typedef long long ll; #define mod 1000000007 ll mod_pow(ll x, ll n) { ll res = 1; while (n != 0) { if (n & 1) res = res * x % mod; x = x * x % mod; n = n >> 1; } return res; } ll mod_fact(ll x) { ...
replace
40
41
40
42
TLE
p03253
C++
Runtime Error
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) #define int long long using namespace std; typedef pair<int, int> P; typedef pair<int, P> P2; #define fi first #define se second int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0}; typedef long long ll; struct NT { ll m; // mod vector<bool> ismr...
#include <bits/stdc++.h> #define r(i, n) for (int i = 0; i < n; i++) #define int long long using namespace std; typedef pair<int, int> P; typedef pair<int, P> P2; #define fi first #define se second int dx[] = {0, 1, 0, -1}; int dy[] = {1, 0, -1, 0}; typedef long long ll; struct NT { ll m; // mod vector<bool> ismr...
replace
292
293
292
293
-11
p03253
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl const int maxn = 1e6 + 5; const ll mod = 1e9 + 7; ll fac[maxn], ifac[maxn]; ll modpow(ll, ll); ll inv(ll); ll nck(ll, ll...
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <typename T> void out(T x) { cout << x << endl; exit(0); } #define watch(x) cout << (#x) << " is " << (x) << endl const int maxn = 1e6 + 5; const ll mod = 1e9 + 7; ll fac[maxn], ifac[maxn]; ll modpow(ll, ll); ll inv(ll); ll nck(ll, ll...
replace
23
25
23
25
0
p03253
C++
Runtime Error
#include <cstdio> const int MOD = static_cast<int>(1e9 + 7); const int MAXARRAY = 10; const long long MULTILIMIT = MOD; int Combination(int n, int k) { int i, j, index = 1; long long comb[MAXARRAY] = {1}; for (i = 0; i < k; i++) { for (j = 0; j < index; j++) comb[j] *= n - i; for (j = 0; j < ind...
#include <cstdio> const int MOD = static_cast<int>(1e9 + 7); const int MAXARRAY = 100; const long long MULTILIMIT = MOD; int Combination(int n, int k) { int i, j, index = 1; long long comb[MAXARRAY] = {1}; for (i = 0; i < k; i++) { for (j = 0; j < index; j++) comb[j] *= n - i; for (j = 0; j < in...
replace
3
4
3
4
0
p03253
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i)) #define all(x) (x).begin(), (x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout << #x " = " << ((x)) << endl template <class T, class U> ostream &operator<<(ost...
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i)) #define all(x) (x).begin(), (x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout << #x " = " << ((x)) << endl template <class T, class U> ostream &operator<<(ost...
replace
65
66
65
66
0
p03253
C++
Runtime Error
#include <bits/stdc++.h> using namespace std; using Int = long long; // BEGIN CUT HERE template <typename T, T MOD = 1000000007> struct Mint { T v; Mint() : v(0) {} Mint(signed v) : v(v) {} Mint(long long t) { v = t % MOD; if (v < 0) v += MOD; } Mint pow(int k) { Mint res(1), tmp(v); ...
#include <bits/stdc++.h> using namespace std; using Int = long long; // BEGIN CUT HERE template <typename T, T MOD = 1000000007> struct Mint { T v; Mint() : v(0) {} Mint(signed v) : v(v) {} Mint(long long t) { v = t % MOD; if (v < 0) v += MOD; } Mint pow(int k) { Mint res(1), tmp(v); ...
replace
193
195
193
195
0