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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02728 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cstring>
#include <iostream>
// #include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const int MOD = 1e9 + 7;
const int N = 4e5 + 10;
long long dp[N] = {0}, ans[N] = {0};
long long fact_ret[N] = {0};
int tree_size[N] = {0};
int visit[N] = {0};
struct e... | #include <algorithm>
#include <cassert>
#include <cstring>
#include <iostream>
// #include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
const int MOD = 1e9 + 7;
const int N = 4e5 + 10;
long long dp[N] = {0}, ans[N] = {0};
long long fact_ret[N] = {0};
int tree_size[N] = {0};
int visit[N] = {0};
struct e... | replace | 77 | 78 | 77 | 78 | 0 | |
p02728 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#inclu... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#inclu... | replace | 189 | 190 | 189 | 190 | 0 | |
p02728 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long ll;
long long inv(int a, int p) {
return a == 1 ? 1 : (1 - p * inv(p % a, a)) / a + p;
}
static const int MODVAL =... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <vector>
using namespace std;
#define REP(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long ll;
long long inv(int a, int p) {
return a == 1 ? 1 : (1 - p * inv(p % a, a)) / a + p;
}
static const int MODVAL =... | replace | 147 | 165 | 147 | 148 | TLE | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pll = pair<ll, ll>;
constexpr int MOD = 1000000007;
int main() {
int N;
cin >> N;
vector<vector<int>> G(N);
for (int i = 0; i < N - 1; ++i) {
int a, b;
cin >> a >> b;
G[a - 1].push_back(b - 1);
G[b - 1].push_back(a - 1);... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Pll = pair<ll, ll>;
constexpr int MOD = 1000000007;
int main() {
int N;
cin >> N;
vector<vector<int>> G(N);
for (int i = 0; i < N - 1; ++i) {
int a, b;
cin >> a >> b;
G[a - 1].push_back(b - 1);
G[b - 1].push_back(a - 1);... | replace | 67 | 68 | 67 | 68 | TLE | |
p02728 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef long long ll;
typedef vector<ll> vint;
typedef vector<vector<ll>> vvint;
typedef vector<vector<vector<ll>>> vvvint;
typedef vector<string> vstring;
typedef vector<vector<string>> vvstring;
typedef vector<cha... | #include <bits/stdc++.h>
using namespace std;
typedef unsigned long ul;
typedef unsigned long long ull;
typedef long long ll;
typedef vector<ll> vint;
typedef vector<vector<ll>> vvint;
typedef vector<vector<vector<ll>>> vvvint;
typedef vector<string> vstring;
typedef vector<vector<string>> vvstring;
typedef vector<cha... | replace | 236 | 240 | 236 | 254 | TLE | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define F first
#define S second
// #define ONLINE_JUDGE 1
using namespace std;
const int mod = 1e9 + 7;
const int MAX = 200020;
vector<ll> fact(MAX), ifac(MAX);
vector<ll> invs(MAX);
vector<vector<int>> g(MAX);
vector<ll> dp(MAX);
vector<ll> sz(... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define F first
#define S second
#define ONLINE_JUDGE 1
using namespace std;
const int mod = 1e9 + 7;
const int MAX = 200020;
vector<ll> fact(MAX), ifac(MAX);
vector<ll> invs(MAX);
vector<vector<int>> g(MAX);
vector<ll> dp(MAX);
vector<ll> sz(MAX... | replace | 7 | 8 | 7 | 8 | -6 | munmap_chunk(): invalid pointer
|
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define F first
#define S second
// #define ONLINE_JUDGE 1
using namespace std;
const int mod = 1e9 + 7;
const int MAX = 200020;
vector<ll> fact(MAX), ifac(MAX);
vector<ll> invs(MAX);
vector<vector<int>> g(MAX);
vector<ll> dp(MAX);
vector<ll> sz(... | #include <bits/stdc++.h>
#define ll long long
#define ld long double
#define F first
#define S second
#define ONLINE_JUDGE 1
using namespace std;
const int mod = 1e9 + 7;
const int MAX = 200020;
vector<ll> fact(MAX), ifac(MAX);
vector<ll> invs(MAX);
vector<vector<int>> g(MAX);
vector<ll> dp(MAX);
vector<ll> sz(MAX... | replace | 7 | 8 | 7 | 8 | -6 | munmap_chunk(): invalid pointer
|
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int pw(int x, int y) {
int r = 1;
while (y) {
if (y & 1)
r = 1ll * r * x % mod;
x = 1ll * x * x % mod;
y >>= 1;
}
return r;
}
int inv(int x) { return pw(x, mod - 2); }
int n;
vector<int> adj[200005];
int dad[200005];
in... | #include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int pw(int x, int y) {
int r = 1;
while (y) {
if (y & 1)
r = 1ll * r * x % mod;
x = 1ll * x * x % mod;
y >>= 1;
}
return r;
}
int inv(int x) { return pw(x, mod - 2); }
int n;
vector<int> adj[200005];
int dad[200005];
in... | replace | 21 | 22 | 21 | 22 | 0 | |
p02728 | C++ | Runtime Error | // #include "pch.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <algorithm>
#include <bitset>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define ll long long... | // #include "pch.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <algorithm>
#include <bitset>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <utility>
#include <vector>
#define ll long long... | replace | 195 | 197 | 195 | 197 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define per(i, a, b) for (int i = b - 1; i >= a; i--)
#define trav(a, x) for (auto &a : x)
#define allin(a, x) for (auto a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size(... | #include <bits/stdc++.h>
using namespace std;
#define ff first
#define ss second
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define per(i, a, b) for (int i = b - 1; i >= a; i--)
#define trav(a, x) for (auto &a : x)
#define allin(a, x) for (auto a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size(... | replace | 17 | 18 | 17 | 18 | 0 | |
p02728 | C++ | Runtime Error |
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <climits>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#... |
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <climits>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#... | replace | 284 | 285 | 284 | 285 | 0 | |
p02728 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef tree<ll, null_typ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef long double ld;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
typedef tree<ll, null_typ... | replace | 181 | 182 | 181 | 182 | -11 | |
p02728 | C++ | Time Limit Exceeded | #pragma GCC optimize("Ofast")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string... | #pragma GCC optimize("Ofast")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string... | replace | 554 | 555 | 554 | 555 | TLE | |
p02728 | C++ | Runtime Error | // #include <fstream>
#include <cstring>
#include <iostream>
#include <vector>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define MOD 1000000007
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, b) FOR(i, 0, b)
#define RFO(i, a, b) for (int i = (b... | // #include <fstream>
#include <cstring>
#include <iostream>
#include <vector>
// #include <ext/pb_ds/assoc_container.hpp>
// using namespace __gnu_pbds;
using namespace std;
#define MOD 1000000007
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define F0R(i, b) FOR(i, 0, b)
#define RFO(i, a, b) for (int i = (b... | replace | 24 | 25 | 24 | 25 | 0 | |
p02728 | C++ | Runtime Error | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 2e5 + 54;
const long long MOD = 1000000007;
struct point {
int from, to;
} eg[200010];
int front[N], num;
void lian(int x, int b) {
eg[++num].to = b;
eg[num].from = front[x];
front[x] = num;
}
long long ksm(long long x, ... | #include <cstdio>
#include <cstring>
#include <iostream>
using namespace std;
const int N = 2e5 + 54;
const long long MOD = 1000000007;
struct point {
int from, to;
} eg[N << 1];
int front[N], num;
void lian(int x, int b) {
eg[++num].to = b;
eg[num].from = front[x];
front[x] = num;
}
long long ksm(long long x, ... | replace | 8 | 9 | 8 | 9 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(n) begin(n), end(n)
ll factorial(ll x) {
if (x == 1 || x == 0) {
return 1;
} else {
return x * factorial(x - 1);
}
}
ll combination(ll n, ll r) {
return factorial(n) / (factori... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < n; i++)
#define ALL(n) begin(n), end(n)
ll factorial(ll x) {
if (x == 1 || x == 0) {
return 1;
} else {
return x * factorial(x - 1);
}
}
ll combination(ll n, ll r) {
ll tmp = 1;
REP(i, r) {
... | replace | 15 | 16 | 15 | 21 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int64_t x = 1;
int64_t y = 1;
for (int i = 1; i < N + 1; i++) {
x *= i;
}
for (int i = 1; i < N - 1; i++) {
y *= i;
}
int z = x / (2 * y);
int64_t a = 1;
int64_t b = 1;
for (int i = 1; i < M + 1; i++)... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
cout << N * (N - 1) / 2 + M * (M - 1) / 2 << endl;
}
| replace | 6 | 29 | 6 | 7 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAX = 1e5 + 7;
ll fact(ll x) {
ll sum = 1;
for (int i = 2; i <= x; i++) {
sum *= i;
}
return sum;
}
ll p(ll x) { return (fact(x) / (2 * fact(x - 2))); }
int main() {
ll n, m;
cin >> n >> m;
cout << p(n) + p(m);
}
/*
100 100... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAX = 1e5 + 7;
ll p(ll x) { return (x * (x - 1) / 2); }
int main() {
ll n, m;
cin >> n >> m;
cout << p(n) + p(m);
}
/*
100 100
*/
| replace | 4 | 12 | 4 | 6 | 0 | |
p02729 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#include <f... | #include <algorithm>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <utility>
#include <vector>
#include <f... | replace | 63 | 64 | 63 | 64 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
float sumOfAP(float a, float d, float n) {
float sum = (n / 2) * (2 * a + (n - 1) * d);
return sum;
}
void solve() {
int n, m;
cin >> n >> m;
int ans1 = sumOfAP(1, 1, n - 1);
int ans2 = sumOfAP(1, 1, m - ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
float sumOfAP(float a, float d, float n) {
float sum = (n / 2) * (2 * a + (n - 1) * d);
return sum;
}
void solve() {
int n, m;
cin >> n >> m;
int ans1 = sumOfAP(1, 1, n - 1);
int ans2 = sumOfAP(1, 1, m - ... | replace | 22 | 26 | 22 | 26 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int factorial(int n) { // 階乗
long int ans = 0;
long int ansa = 1;
long int answ = 1;
for (int i = 1; i <= n; i++) {
ansa *= i;
}
for (int j = 1; j <= n - 2; j++) {
answ *= j;
}
ans = ansa / (2 * answ);
return ans;
}
int main() {
int N = 0; // 偶... | #include <bits/stdc++.h>
using namespace std;
int factorial(int n) { // 階乗
double ans = 0;
double ansa = 1;
double answ = 1;
for (int i = 1; i <= n; i++) {
ansa *= i;
}
for (int j = 1; j <= n - 2; j++) {
answ *= j;
}
ans = ansa / (2 * answ);
return ans;
}
int main() {
int N = 0; // 偶数の数
... | replace | 4 | 7 | 4 | 7 | 0 | |
p02729 | C++ | Runtime Error |
/*
Author: Shivam Shukla
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vpii;
typedef vector<pair<ll, ll>> vpll;
const int MOD = 1e9 + 7;
const int MAX = 1e5 + 5;
const double PI = acos(-1.0);
const long double EPS =... |
/*
Author: Shivam Shukla
*/
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef vector<pii> vpii;
typedef vector<pair<ll, ll>> vpll;
const int MOD = 1e9 + 7;
const int MAX = 1e5 + 5;
const double PI = acos(-1.0);
const long double EPS =... | replace | 86 | 91 | 86 | 91 | 0 | |
p02729 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = 0;
if (M == 0 || M == 1) {
ans = 0;
} else {
ans = M;
}
if (N == 0 || N == 1) {
ans += 0;
} else {
long f = 1;
for (long i = 1; i <= N; i++)
f *= i;
long n = f;
f = 1;
for... | #include <iostream>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int ans = 0;
ans = N * (N - 1) / 2 + M * (M - 1) / 2;
cout << ans << endl;
}
| replace | 10 | 31 | 10 | 11 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int fact(int n) {
int res = 1;
for (int i = 2; i <= n; i++)
res = res * i;
return res;
}
int nCr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }
int main() {
int n, m;
cin >> n >> m;
cout << nCr(n, 2) + nCr(m, 2);
}
| #include <bits/stdc++.h>
using namespace std;
int fact(int n) {
int res = 1;
for (int i = 2; i <= n; i++)
res = res * i;
return res;
}
int nCr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }
int main() {
int n, m;
cin >> n >> m;
cout << (n * (n - 1)) / 2 + (m * (m - 1)) / 2;
}
| replace | 15 | 16 | 15 | 16 | 0 | |
p02729 | C++ | Runtime Error | #include <iostream>
int main() {
using namespace std;
long N, M;
cin >> N >> M;
int result = N * (N - 1) / 2 + M * (M - 1) / 2;
cout << result << endl;
return 1;
}
| #include <iostream>
int main() {
using namespace std;
long N, M;
cin >> N >> M;
int result = N * (N - 1) / 2 + M * (M - 1) / 2;
cout << result << endl;
return 0;
}
| replace | 11 | 12 | 11 | 12 | 1 | |
p02729 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define ll long long
#define INF 0x3f3f3f3f
#define SIS std::ios::sync_with_stdio(false)
using namespace st... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <list>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define ll long long
#define INF 0x3f3f3f3f
#define SIS std::ios::sync_with_stdio(false)
using namespace st... | replace | 41 | 51 | 41 | 42 | 0 | |
p02729 | C++ | Runtime Error | #include <iostream>
using namespace std;
int fact(int n) {
if (n <= 1)
return 1;
else
return n * fact(n - 1);
}
int result(int e, int o) {
int odd = fact(o) / (2 * fact(o - 2));
int even = fact(e) / (2 * fact(e - 2));
return odd + even;
}
int main() {
int even_no, odd_no;
cin >> even_no >> odd_n... | #include <iostream>
using namespace std;
int fact(int n) {
if (n <= 1)
return 1;
else
return n * fact(n - 1);
}
int result(int e, int o) {
int odd = o * (o - 1) / 2;
int even = e * (e - 1) / 2;
return odd + even;
}
int main() {
int even_no, odd_no;
cin >> even_no >> odd_no;
cout << result(even... | replace | 9 | 11 | 9 | 11 | 0 | |
p02729 | C++ | Time Limit Exceeded | //??????????SM??????????
// -------------Sourav Mondal----------
// _____________________________________"GUN IS ON FIRE~SM"
//..._|.._|___________________, ,) ----) "KILL YOUR headache Shoot iT"
//....../ `---___________----_____|]_____) ********* 2eZ4@SM
//...../_==o;;;;;;;;_______.:/
//.....),... | //??????????SM??????????
// -------------Sourav Mondal----------
// _____________________________________"GUN IS ON FIRE~SM"
//..._|.._|___________________, ,) ----) "KILL YOUR headache Shoot iT"
//....../ `---___________----_____|]_____) ********* 2eZ4@SM
//...../_==o;;;;;;;;_______.:/
//.....),... | insert | 60 | 60 | 60 | 64 | TLE | |
p02729 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
using namespace std;
const int MAX = 1e6;
const int INF = 2e9;
typedef long long ll;
int comb(int n, int r) {
if (n < r) {
return 0;
}
if (n == r || r == 0) {
return 1;
}
int x = 1;
int y = 1;
for (int i = 0; i < n - r; ++i) {
x = x * (n - i);
... | #include <algorithm>
#include <iostream>
using namespace std;
const int MAX = 1e6;
const int INF = 2e9;
typedef long long ll;
int comb(int n, int r) {
if (n < r) {
return 0;
}
if (n == r || r == 0) {
return 1;
}
int x = 1;
int y = 1;
for (int i = 0; i < r; ++i) {
x = x * (n - i);
y =... | replace | 21 | 22 | 21 | 22 | 0 | |
p02729 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, m;
scanf("%d %d", n, m);
printf("%d", n * (n - 1) / 2 + m * (m - 1) / 2);
}
| #include <iostream>
using namespace std;
int main() {
int n, m;
scanf("%d %d", &n, &m);
printf("%d", n * (n - 1) / 2 + m * (m - 1) / 2);
}
| replace | 4 | 5 | 4 | 5 | -11 | |
p02729 | C++ | Runtime Error | /* SANDEEP YADAv*/
#include <bits/stdc++.h>
using namespace std;
#define lld long long int
#define pb push_back
#define mkp make_pair
#define fi first
#define se second
#define mod 1000000007
#define fastio \
ios_base::sync_with_stdio(0); ... | /* SANDEEP YADAv*/
#include <bits/stdc++.h>
using namespace std;
#define lld long long int
#define pb push_back
#define mkp make_pair
#define fi first
#define se second
#define mod 1000000007
#define fastio \
ios_base::sync_with_stdio(0); ... | replace | 47 | 48 | 47 | 48 | 0 | |
p02729 | C++ | Runtime Error | // Template //
#include <bits/stdc++.h>
using namespace std;
// マクロ //
#define rep(i, N) for (int i = 0; i < N; i++)
#define all(x) x.begin(), x.end()
#define sort(x) sort(all(x))
#define uniq(x) x.erase(unique(all(x)), x.end())
#define vsum(x) accumulate(all(x), 0)
#define cou(x) cout << x << endl
#define y() cout <<... | // Template //
#include <bits/stdc++.h>
using namespace std;
// マクロ //
#define rep(i, N) for (int i = 0; i < N; i++)
#define all(x) x.begin(), x.end()
#define sort(x) sort(all(x))
#define uniq(x) x.erase(unique(all(x)), x.end())
#define vsum(x) accumulate(all(x), 0)
#define cou(x) cout << x << endl
#define y() cout <<... | replace | 72 | 73 | 72 | 73 | 0 | |
p02729 | C++ | Runtime Error | // file creato da gio il 2020-03-25 09:50:14.759573
#include <bits/stdc++.h>
#define FAST
#ifdef FAST
#pragma GCC optimize("Ofast")
#pragma GCC target( \
"fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loop... | // file creato da gio il 2020-03-25 09:50:14.759573
#include <bits/stdc++.h>
#define FAST
#ifdef FAST
#pragma GCC optimize("Ofast")
#pragma GCC target( \
"fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
#pragma GCC optimize("unroll-loop... | replace | 17 | 24 | 17 | 18 | 0 | |
p02729 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
long long int i = 1;
long long int j = 1;
long long int p1 = 1;
long long int p2 = 1;
long long int c1 = n - 2;
long long int c2 = m - 2;
if (n + m >= 2) {
while (n > 0) {
i = n * i;
n--;
}
while ... | #include <iostream>
using namespace std;
int main() {
int n, m;
cin >> n >> m;
cout << n * (n - 1) / 2 + m * (m - 1) / 2;
return 0;
} | replace | 5 | 44 | 5 | 6 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
scanf("%d %d", n, m);
printf("%d", n * (n - 1) / 2 + m * (m - 1) / 2);
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, m;
scanf("%d %d", &n, &m);
printf("%d", n * (n - 1) / 2 + m * (m - 1) / 2);
return 0;
} | replace | 6 | 7 | 6 | 7 | -11 | |
p02729 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int kaijou(int a) { return a * kaijou(a - 1); }
int main() {
int N, M;
cin >> N >> M;
N = kaijou(N) / 2;
M = kaijou(M) / 2;
cout << N + M << endl;
} | #include <iostream>
using namespace std;
int kaijou(int a) { return a * (a - 1); }
int main() {
int N, M;
cin >> N >> M;
N = kaijou(N) / 2;
M = kaijou(M) / 2;
cout << N + M << endl;
} | replace | 3 | 4 | 3 | 4 | TLE | |
p02729 | C++ | Runtime Error | // by The_One_Solver
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
long long n, m, f = 1, c = 1, h = 1, odd = 1;
int main() {
cin >> n >> m;
for (int i = 1; i <= n; i++) {
c *= i;
if (i <= (n - 2))
f *= i;
}
for (int i = 1; i <= m; i++) {
odd *= i;
if (i <= m - 2)
... | // by The_One_Solver
#include <bits/stdc++.h>
#include <iostream>
using namespace std;
long long n, m, f = 1, c = 1, h = 1, odd = 1;
int main() {
cin >> n >> m;
cout << (n > 1 ? (n * (n - 1)) / 2 : 0) + (m > 1 ? (m * (m - 1)) / 2 : 0)
<< endl;
}
| replace | 8 | 20 | 8 | 11 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int all = 1;
int A = 1;
for (int i = 1; i <= N + M; i++) {
all *= i;
}
if (N + M == 2) {
A = 1;
} else {
for (int i = 1; i <= N + M - 2; i++) {
A *= i;
}
}
cout << all / 2 / A - N * M << en... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
cout << (N * N + M * M - N - M) / 2 << endl;
} | replace | 6 | 23 | 6 | 7 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define x first
#define y second
#define pb push_back
#define endl "\n"
ll fact(int a) {
if (a == 0)
return 1;
return a * fact(a - 1);
}
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n, m;
cin >> n >> m;
ll ans = 0;
cout << f... | #include <bits/stdc++.h>
#define ll long long
#define x first
#define y second
#define pb push_back
#define endl "\n"
ll fact(int a) {
if (a == 0)
return 1;
return a * fact(a - 1);
}
using namespace std;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
ll n, m;
cin >> n >> m;
cout << (n * (n - 1)) ... | replace | 18 | 20 | 18 | 20 | -11 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define double /*long*/ double
#define endl '\n'
#define vll vector<ll>
#define pll pair<ll, ll>
#define vpll vector<pll>
#define vppll vector<pair<pll, pll>>
#define mp make_pair
#define pb push_back
#define mapll map<ll, ll>
#define fir first
#define sec second
#defin... | #include <bits/stdc++.h>
#define ll long long int
#define double /*long*/ double
#define endl '\n'
#define vll vector<ll>
#define pll pair<ll, ll>
#define vpll vector<pll>
#define vppll vector<pair<pll, pll>>
#define mp make_pair
#define pb push_back
#define mapll map<ll, ll>
#define fir first
#define sec second
#defin... | delete | 55 | 60 | 55 | 55 | 0 | |
p02729 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, m, cnt, a[100];
cin >> n >> m;
for (int i = 0; i < n; i++) {
a[i] = i * 2;
}
for (int j = n; j < n + m; j++) {
a[j] = j * 2 + 1;
}
for (int k = 0; k < n + m; k++) {
for (int l = k + 1; l ... | #include <iostream>
using namespace std;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, m, cnt, a[n + m];
cin >> n >> m;
for (int i = 0; i < n; i++) {
a[i] = i * 2;
}
for (int j = n; j < n + m; j++) {
a[j] = j * 2 + 1;
}
for (int k = 0; k < n + m; k++) {
for (int l = k + 1; ... | replace | 6 | 7 | 6 | 7 | 0 | |
p02729 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
int N; // even
int M; // odd
unsigned sum;
while (scanf("%d%d", &N, &M)) {
sum = (N * N + M * M - M - N) >> 1;
printf("%d\n", sum);
}
} | #include <stdio.h>
int main() {
int N; // even
int M; // odd
unsigned sum;
scanf("%d%d", &N, &M);
sum = (N * N + M * M - M - N) >> 1;
printf("%d\n", sum);
} | replace | 5 | 9 | 5 | 8 | TLE | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
int a = 1, b = 1, c = 1, d = 1;
for (int i = 1; i < N + 1; i++)
a *= i;
for (int i = N; i > 0; i--) {
if (N <= 1)
b = 0;
else
b *= i;
}
for (int j = 1; j < M + 1; j++)
c *= j;
for (int j = M; ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
cout << N * (N - 1) / 2 + M * (M - 1) / 2 << endl;
}
| replace | 5 | 23 | 5 | 6 | 0 | |
p02729 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <vector>
using namespace std;
#define int long long
#define val(x) cout << #x << " equals to " << x << endl
#define F first
... | #include <algorithm>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <unordered_map>
#include <vector>
using namespace std;
#define int long long
#define val(x) cout << #x << " equals to " << x << endl
#define F first
... | replace | 28 | 29 | 28 | 29 | 0 | |
p02729 | Python | Runtime Error | import math
def f(x):
return math.factorial(x)
arr = list(map(int, input().split()))
n = arr[0]
m = arr[1]
cnt = 0
cnt += int(f(n) / (2 * f(n - 2)))
if m > 1:
cnt += int(f(m) / (2 * f(m - 2)))
print(int(cnt))
| n, m = map(int, input().split())
print((n * (n - 1)) // 2 + (m * (m - 1)) // 2)
| replace | 0 | 15 | 0 | 2 | 0 | |
p02729 | Python | Runtime Error | N, M = map(int, input().split())
print(N(N - 1) // 2 + M(M - 1) // 2)
| N, M = map(int, input().split())
print(N * (N - 1) // 2 + M * (M - 1) // 2)
| replace | 2 | 3 | 2 | 3 | TypeError: 'int' object is not callable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02729/Python/s193391695.py", line 3, in <module>
print(N(N - 1) // 2 + M(M - 1) // 2)
TypeError: 'int' object is not callable
|
p02729 | Python | Runtime Error | import math
n, m = map(int, input().split())
def combinations_count(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
ans = combinations_count(m, 2) + combinations_count(n, 2)
print(ans)
| import math
n, m = map(int, input().split())
def combinations_count(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
if n >= 2 and m >= 2:
ans = combinations_count(m, 2) + combinations_count(n, 2)
elif n < 2 and m < 2:
ans = 0
elif n < 2:
ans = combinations_count(m, 2)... | replace | 9 | 10 | 9 | 18 | ValueError: factorial() not defined for negative values | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02729/Python/s072089097.py", line 10, in <module>
ans = combinations_count(m, 2) + combinations_count(n, 2)
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02729/Python/s072089097.py", li... |
p02729 | Python | Runtime Error | from scipy.special import comb
n, m = map(int, input().split())
# nC2+mC2を求めればよい
print(comb(n, 2, exact=True) + comb(m, 2, exact=True))
| from scipy.misc import comb
n, m = map(int, input().split())
# nC2+mC2を求めればよい
print(comb(n, 2, exact=True) + comb(m, 2, exact=True))
| replace | 0 | 1 | 0 | 1 | ModuleNotFoundError: No module named 'scipy' | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02729/Python/s068360143.py", line 1, in <module>
from scipy.special import comb
ModuleNotFoundError: No module named 'scipy'
|
p02729 | Python | Runtime Error | import math
def combinations_count(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def main():
n, m = map(int, input().split())
print(combinations_count(n, 2) + combinations_count(m, 2))
if __name__ == "__main__":
main()
| import math
def combinations_count(n, r):
return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def main():
n, m = map(int, input().split())
if n < 2:
even = 0
else:
even = combinations_count(n, 2)
if m < 2:
odd = 0
else:
odd = combinations_c... | replace | 9 | 10 | 9 | 18 | ValueError: factorial() not defined for negative values | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02729/Python/s584253829.py", line 14, in <module>
main()
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02729/Python/s584253829.py", line 10, in main
print(combinations_count(n, 2) +... |
p02729 | Python | Runtime Error | N, M = list(int, input().split())
print(int(N * (N - 1) / 2 + M * (M - 1) / 2))
| N, M = map(int, input().split())
print(int(N * (N - 1) / 2 + M * (M - 1) / 2))
| replace | 0 | 1 | 0 | 1 | TypeError: list expected at most 1 argument, got 2 | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02729/Python/s321382416.py", line 1, in <module>
N, M = list(int, input().split())
TypeError: list expected at most 1 argument, got 2
|
p02729 | C++ | Runtime Error | /*
Author- Aasav Badera
Time- Sun Mar 22 17:30:45 2020
*/
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define s second
#define mii map<ll, ll>
#define dbg(x) \
{ cerr << #x << ": " << x << endl; }
#define dbg2(x, y) ... | /*
Author- Aasav Badera
Time- Sun Mar 22 17:30:45 2020
*/
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define s second
#define mii map<ll, ll>
#define dbg(x) \
{ cerr << #x << ": " << x << endl; }
#define dbg2(x, y) ... | delete | 35 | 41 | 35 | 35 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
// definitions
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define rep(i, l, r) for (long long i = (l); i < (long long)(r); i++)
#define repb(i, r, l) for (long long i = (r); i > (long long)(l); i--)
#define pb push_back
#define pf ... | #include <bits/stdc++.h>
// definitions
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define clr(x) memset(x, 0, sizeof(x))
#define rep(i, l, r) for (long long i = (l); i < (long long)(r); i++)
#define repb(i, r, l) for (long long i = (r); i > (long long)(l); i--)
#define pb push_back
#define pf ... | delete | 118 | 123 | 118 | 118 | TLE | |
p02729 | C++ | Runtime Error | #include <stdio.h>
int main() {
int N, M;
int Ball[201];
freopen("input.txt", "r", stdin);
scanf("%d %d", &N, &M);
int BallCnt = 0;
for (int n = 1; n <= N; n++) // even
Ball[BallCnt++] = 2 * n;
for (int m = 0; m < M; m++) // odd
Ball[BallCnt++] = 2 * m + 1;
int ResultCnt = 0;
for (int b ... | #include <stdio.h>
int main() {
int N, M;
int Ball[201];
scanf("%d %d", &N, &M);
int BallCnt = 0;
for (int n = 1; n <= N; n++) // even
Ball[BallCnt++] = 2 * n;
for (int m = 0; m < M; m++) // odd
Ball[BallCnt++] = 2 * m + 1;
int ResultCnt = 0;
for (int b = 0; b < BallCnt; b++)
for (int t... | delete | 5 | 7 | 5 | 5 | -11 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
#define rep(i, m, n) for (int i = m; i < n; i++)
#define repr(i, n, m) for (int i = n; i >= m; i--)
#define mod 1000000007
#define float long double
#define pb push_back
#define mp make_pair
using namespace std;
bool sortbysec(const pair<int, int> &a, const pair<int, int>... | #include <bits/stdc++.h>
#define int long long
#define rep(i, m, n) for (int i = m; i < n; i++)
#define repr(i, n, m) for (int i = n; i >= m; i--)
#define mod 1000000007
#define float long double
#define pb push_back
#define mp make_pair
using namespace std;
bool sortbysec(const pair<int, int> &a, const pair<int, int>... | replace | 34 | 41 | 34 | 35 | -11 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
long long int n, m, a, ans;
cin >> n >> m;
if (n == 1 && m == 1)
cout << "0" << endl;
else if ((n + m) % 2 != 0) {
a = n / m + 1;
ans = pow(m, a);
cout << ans << endl;
} else {
a = n / m;
ans = pow(m, a);
cout << ans << end... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, M, ans;
cin >> N >> M;
ans = N * (N - 1) / 2 + M * (M - 1) / 2;
cout << ans << endl;
return 0;
}
| replace | 3 | 16 | 3 | 7 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(p, a, b) for (int p = a; p < b; p++)
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
#define INF 0x3f3f3f3f
int C(int n, int r) {
int ans = 1;
if (r > n - r)
r = n - r;
for (int i = 0; i < r; i++) {
ans ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(p, a, b) for (int p = a; p < b; p++)
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
#define INF 0x3f3f3f3f
int C(int n, int r) {
int ans = 1;
if (r > n - r)
r = n - r;
for (int i = 0; i < r; i++) {
ans ... | delete | 21 | 29 | 21 | 21 | 0 | |
p02729 | Python | Runtime Error | while True:
m, n = list(map(int, input().split()))
print(m * (m - 1) / 2 + n * (n - 1) / 2)
| m, n = list(map(int, input().split()))
print(int(m * (m - 1) / 2 + n * (n - 1) / 2))
| replace | 0 | 3 | 0 | 2 | EOFError: EOF when reading a line | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02729/Python/s164214433.py", line 2, in <module>
m, n = list(map(int, input().split()))
EOFError: EOF when reading a line
|
p02729 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
// Returns value of Binomial Coefficient C(n, k)
int binomialCoeff(int n, int k) {
// Base Cases
if (k == 0 || k == n)
return 1;
// Recur
return binomialCoeff(n - 1, k - 1) + binomialCoeff(n - 1, k);
}
/* Driver code*/
int main() {
int n, m;
cin >> n >> m... | #include <bits/stdc++.h>
using namespace std;
// Returns value of Binomial Coefficient C(n, k)
int binomialCoeff(int n, int k) {
// Base Cases
if (k == 0 || k == n)
return 1;
// Recur
return binomialCoeff(n - 1, k - 1) + binomialCoeff(n - 1, k);
}
/* Driver code*/
int main() {
int n, m;
cin >> n >> m... | replace | 18 | 19 | 18 | 26 | TLE | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
long long fac... | #include <bits/stdc++.h>
using namespace std;
#define fast \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); \
cout.tie(NULL);
long long fac... | replace | 18 | 27 | 18 | 19 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define lh long double
#define f(a, b, i) for (ll i = a; i < b; i++)
int main() {
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n, m... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define lh long double
#define f(a, b, i) for (ll i = a; i < b; i++)
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
ll n, m;
cin >> n >> m;
cout << (n * (n - 1) + m * (m - 1)) / 2;
return 0;
}
| delete | 8 | 12 | 8 | 8 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
/* #include <boost/math/common_factor.hpp>
boost::math::lcm(10,20) ---> use it to find lcm.*/
using namespace std;
#define IO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | #include <bits/stdc++.h>
/* #include <boost/math/common_factor.hpp>
boost::math::lcm(10,20) ---> use it to find lcm.*/
using namespace std;
#define IO \
ios_base::sync_with_stdio(false); \
cin.tie(NULL); ... | replace | 62 | 66 | 62 | 66 | 0 | |
p02729 | C++ | Runtime Error |
// HYSO SERIOUS? WHY SO SERIOUS RIOUS? WHY
//SO SERIOUS? WHYSO SERIO ERIOUS? WHY SO SERIOUS ? WHY WHY SO SERIOUS? WHY
//SOSERIOUSWHYS OSERIOUS? WHY SO SERIOU SERIOUS ERIOUS? WHY SO
//SERIOUS? WHYS WHY SO SERIOUS? WHY SOSERIOUS? WHYSOSERIOUS? WHY SO SER... |
// HYSO SERIOUS? WHY SO SERIOUS RIOUS? WHY
//SO SERIOUS? WHYSO SERIO ERIOUS? WHY SO SERIOUS ? WHY WHY SO SERIOUS? WHY
//SOSERIOUSWHYS OSERIOUS? WHY SO SERIOU SERIOUS ERIOUS? WHY SO
//SERIOUS? WHYS WHY SO SERIOUS? WHY SOSERIOUS? WHYSOSERIOUS? WHY SO SER... | replace | 64 | 68 | 64 | 68 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int m;
cin >> n;
cin >> m;
int res;
res = (n * (n - 1)) / (m * (m - 1));
cout << res << '\n';
} | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main(void) {
int n, m;
cin >> n >> m;
cout << n * (n - 1) / 2 + m * (m - 1) / 2 << endl;
return 0;
} | replace | 2 | 10 | 2 | 9 | -8 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define speedrap \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.ti... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define speedrap \
ios_base::sync_with_stdio(false); \
cin.tie(0); \
cout.ti... | replace | 33 | 38 | 33 | 37 | 0 | |
p02729 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
vector<int> data(n + m);
if (n == 0 & m == 0) {
cout << "0" << endl;
return 0;
}
for (int i = 0; i < n + 1; i++) {
data.at(i) = (... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using P = pair<int, int>;
int main() {
int n, m;
cin >> n >> m;
vector<int> data(n + m);
if (n == 0 & m == 0) {
cout << "0" << endl;
return 0;
}
for (int i = 0; i < n; i++) {
data.at(i) = (i + ... | replace | 16 | 17 | 16 | 17 | 0 | |
p02729 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
#define test \
int t; \
cin >> t; \
while (t--)
#define fast ... | #include "bits/stdc++.h"
using namespace std;
#define test \
int t; \
cin >> t; \
while (t--)
#define fast ... | delete | 28 | 34 | 28 | 28 | 0 | |
p02729 | C++ | Runtime Error | #include <iostream>
#include <string>
using namespace std;
int main() {
string n;
string m;
cin >> n >> m;
int iN = atoi(n.c_str());
int iM = atoi(m.c_str());
int retVal = 0;
// 偶数から2個とる場合の数
if (iN > 1) {
retVal += iN * (iN - 1) / 2;
}
// 奇数から2個とる場合の数
if (iM > 1) {
retVal += iM * (iM ... | #include <iostream>
#include <string>
using namespace std;
int main() {
string n;
string m;
cin >> n >> m;
int iN = atoi(n.c_str());
int iM = atoi(m.c_str());
int retVal = 0;
// 偶数から2個とる場合の数
if (iN > 1) {
retVal += iN * (iN - 1) / 2;
}
// 奇数から2個とる場合の数
if (iM > 1) {
retVal += iM * (iM ... | replace | 24 | 25 | 24 | 27 | 1 | |
p02729 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
long long fun(long long a) {
if (a == 1)
return 1;
return a + fun(a - 1);
}
int main() {
long long n, m;
cin >> n >> m;
cout << fun(n - 1) + fun(m - 1);
return 0;
} | #include <iostream>
using namespace std;
long long fun(long long a) { return (a + 1) * a / 2; }
int main() {
long long n, m;
cin >> n >> m;
cout << fun(n - 1) + fun(m - 1);
return 0;
} | replace | 2 | 7 | 2 | 3 | TLE | |
p02729 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long int f(int num) {
if (num <= 1) {
return 1;
} else {
return (num * f(num - 1));
}
}
int combine(int n, int m) { return f(n) / (2 * f(n - 2)); }
int main() {
ios::sync... | #include <algorithm>
#include <bits/stdc++.h>
#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;
long long int f(int num) {
if (num <= 1) {
return 1;
} else {
return (num * f(num - 1));
}
}
int combine(int n, int m) { return (n * (n - 1)) / 2; }
int main() {
ios::sync_wit... | replace | 17 | 18 | 17 | 18 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define sz size()
#define bgn begin()
#define en end()
#defin... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define double long double
#define fo(a, b) for (int a = 0; a < b; a++)
#define Sort(a) sort(a.begin(), a.end())
#define rev(a) reverse(a.begin(), a.end())
#define fi first
#define se second
#define sz size()
#define bgn begin()
#define en end()
#defin... | replace | 330 | 331 | 330 | 331 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int n = (S.size() - 1) / 2;
bool ans = 1;
for (int i = 0; i < (n + 1) / 2; i++) {
if (S.at(i) != S.at(n - 1 - i) || S.at(i) != S.at(n + 1 + 1) ||
S.at(i) != S.at(S.size() - 1 - i)) {
ans = 0;
break;
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int n = (S.size() - 1) / 2;
bool ans = 1;
for (int i = 0; i < (n + 1) / 2; i++) {
if (S.at(i) != S.at(n - 1 - i) || S.at(i) != S.at(n + 1 + i) ||
S.at(i) != S.at(S.size() - 1 - i)) {
ans = 0;
break;
}
... | replace | 9 | 10 | 9 | 10 | 0 | |
p02730 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <list>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#define rep(i, a, b) for (ll i = a; i < b; i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef unordered_map<string, ll> u... | #include <algorithm>
#include <iostream>
#include <list>
#include <set>
#include <string>
#include <unordered_map>
#include <vector>
#define rep(i, a, b) for (ll i = a; i < b; i++)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll, ll> pll;
typedef unordered_map<string, ll> u... | replace | 96 | 97 | 96 | 97 | 0 | |
p02730 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <functional>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include ... | replace | 47 | 48 | 47 | 48 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
int N;
int M = 0;
cin >> S;
N = S.size();
for (int i = 0; i < (N - 1) / 2; i++) {
if (S.at(i) != S.at((N + 3) / 2 + i)) {
M = 1;
}
}
if (M == 1) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
int N;
int M = 0;
cin >> S;
N = S.size();
for (int i = 0; i < (N - 1) / 2; i++) {
if (S.at(i) != S.at((N - 1) / 2 + 1 + i)) {
M = 1;
}
}
if (M == 1) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
}
| replace | 9 | 10 | 9 | 10 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 7) >= this->size() (which is 7)
|
p02730 | Python | Runtime Error | S = input()
a = len(S)
if S[: (a - 1) / 2] == S[(a + 1) / 2 :]:
print("Yes")
else:
print("No")
| S = input()
n = len(S)
a = S[: int((n - 1) / 2)]
b = S[int((n + 1) / 2) :]
if a == b:
print("Yes")
else:
print("No")
| replace | 1 | 3 | 1 | 5 | TypeError: slice indices must be integers or None or have an __index__ method | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02730/Python/s829977538.py", line 3, in <module>
if S[:(a - 1) / 2] == S[(a + 1) / 2:]:
TypeError: slice indices must be integers or None or have an __index__ method
|
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
#define REP(i, s, N) for (int i = s; i < (N); ++i)
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;
bool judge(string str) {
bool a = true;
int h = str.length() / 2;
if (str.length() == 1) {
a = true;
//}else if(str.length()%2==0){
// a = fa... | #include <bits/stdc++.h>
#define REP(i, s, N) for (int i = s; i < (N); ++i)
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;
bool judge(string str) {
string str1 = str;
reverse(str.begin(), str.end());
return str == str1;
}
int main() {
string S;
cin >> S;
int N = S.length... | replace | 8 | 28 | 8 | 11 | 0 | |
p02730 | C++ | Runtime Error | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char S[100];
char mae[50] = {};
char ato[50] = {};
char mae_mae[25] = {};
char mae_ato[25] = {};
char ato_mae[25] = {};
char ato_ato[25] = {};
scanf("%s", &S);
strncpy(mae, S, (strlen(S) - 1) / 2);
for (int i = 0; i < (strlen... | #include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char S[100];
char mae[50] = {};
char ato[50] = {};
char mae_mae[25] = {};
char mae_ato[25] = {};
char ato_mae[25] = {};
char ato_ato[25] = {};
scanf("%s", &S);
strncpy(mae, S, (strlen(S) - 1) / 2);
for (int i = 0; i < (strlen... | replace | 36 | 38 | 36 | 38 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
const int INF = 2147483647; // int max
const int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
string s;
cin >> s;
string re_s = s;
reverse(re_s.begin(), re_s.end());
if (s == re_s) ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
const int INF = 2147483647; // int max
const int MOD = 1000000007;
using namespace std;
using ll = long long;
using P = pair<int, int>;
int main() {
string s;
cin >> s;
int n = s.length();
string r = "";
for (int i = n - 1; i >= 0; i--)... | replace | 11 | 23 | 11 | 25 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define mod (int)1000000007
#define MOD (int)10000000007
#define X 1001100011100001111ll
#define M 26388279066623ll
#define all(a) a.begin(), a.end()
#define for0(i, n) for (int i = 0; i < n; i++)
#define for0e(i, n) for (int i = 0; i <= n; i++)
#define for1(i, n) for (int ... | #include <bits/stdc++.h>
using namespace std;
#define mod (int)1000000007
#define MOD (int)10000000007
#define X 1001100011100001111ll
#define M 26388279066623ll
#define all(a) a.begin(), a.end()
#define for0(i, n) for (int i = 0; i < n; i++)
#define for0e(i, n) for (int i = 0; i <= n; i++)
#define for1(i, n) for (int ... | delete | 73 | 77 | 73 | 73 | 0 | |
p02730 | C++ | Runtime Error | //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//* vamsicool007 You are never wrong to do the right thing vamsicool007 *
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#include <bits/stdc++.h>
using namespace std;
#define flash ... | //* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//* vamsicool007 You are never wrong to do the right thing vamsicool007 *
//* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#include <bits/stdc++.h>
using namespace std;
#define flash ... | replace | 89 | 90 | 89 | 90 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
string S;
bool check(string str) {
int len = str.length();
int af = len / 2;
for (int i = 0; i < af; i++) {
if (str[i] != str[len - i - 1]) {
return false;
}
}
return true;
}
void Main() {
int len = S.length();
int af = len / 2;
if (check(S)... | #include <bits/stdc++.h>
using namespace std;
string S;
bool check(string str) {
int len = str.length();
int af = len / 2;
for (int i = 0; i < af; i++) {
if (str[i] != str[len - i - 1]) {
return false;
}
}
return true;
}
void Main() {
int len = S.length();
int af = len / 2;
if (check(S)... | replace | 31 | 32 | 31 | 32 | 1 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
bool kaibun(string s) {
int n = s.length();
for (int i = 0; i < n; i++) {
if (s[i] != s[n - i - 1]) {
return false;
}
}
return true;
}
int main() {
string s;
cin >> s;
int n = s.length();
if (kaibun(s) && kaibun(s.substr(0, (n - 1) / 2)) &&
... | #include <bits/stdc++.h>
using namespace std;
bool kaibun(string s) {
int n = s.length();
for (int i = 0; i < n; i++) {
if (s[i] != s[n - i - 1]) {
return false;
}
}
return true;
}
int main() {
string s;
cin >> s;
int n = s.length();
if (kaibun(s) && kaibun(s.substr(0, (n - 1) / 2)) &&
... | replace | 18 | 19 | 18 | 19 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool check(string s) {
bool res = true;
int n = s.size();
for (int i = 0; i < n / 2; ++i) {
if (s[i] != s[n - 1 - i])
res = false;
}
return res;
}
int main() {
string s;
cin >> s;
int n = s.size();
string ans = "No";
if ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
bool check(string s) {
bool res = true;
int n = s.size();
for (int i = 0; i < n / 2; ++i) {
if (s[i] != s[n - 1 - i])
res = false;
}
return res;
}
int main() {
string s;
cin >> s;
int n = s.size();
string ans = "No";
if ... | replace | 19 | 20 | 19 | 20 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
bool round_word(string s) {
int n = s.length();
for (int i = 0; i < n / 2; i++) {
if (s.at(i) != s.at(n - 1 - i)) {
return false;
}
}
return true;
}
int main() {
string s;
cin >> s;
int n = s.leng... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
bool round_word(string s) {
int n = s.length();
for (int i = 0; i < n / 2; i++) {
if (s.at(i) != s.at(n - 1 - i)) {
return false;
}
}
return true;
}
int main() {
string s;
cin >> s;
int n = s.leng... | replace | 19 | 20 | 19 | 20 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
bool judge = true;
for (int i = 0; i < (n - 1) / 2; i++) {
if (s.at(i) != s.at(n - 1 - i)) {
judge = false;
break;
}
}
if (judge) {
for (int i = 0; i < (n - 1) / 4; i++) {
if (... | #include <bits/stdc++.h>
using namespace std;
int main() {
string s;
cin >> s;
int n = s.size();
bool judge = true;
for (int i = 0; i < (n - 1) / 2; i++) {
if (s.at(i) != s.at(n - 1 - i)) {
judge = false;
break;
}
}
if (judge) {
for (int i = 0; i < n / 2; i++) {
if (s.at(i... | replace | 17 | 19 | 17 | 19 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 18446744073709551611) >= this->size() (which is 7)
|
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
bool kaibun(string S, int A, int B) {
// Sの文字数は3以上の奇数
// SのA文字目からB文字目までが回文かどうかを判定する関数
int i = A - 1;
int j = B - 1;
while (i != j) {
if (S.at(i) != S.at(j))
return false;
i += 1;
j += -1;
}
return true;
}
int main() {
string S;
cin >> S... | #include <bits/stdc++.h>
using namespace std;
bool kaibun(string S, int A, int B) {
// Sの文字数は3以上の奇数
// SのA文字目からB文字目までが回文かどうかを判定する関数
int i = A - 1;
int j = B - 1;
while (i <= j) {
if (S.at(i) != S.at(j))
return false;
i += 1;
j += -1;
}
return true;
}
int main() {
string S;
cin >> S... | replace | 8 | 9 | 8 | 9 | 0 | |
p02730 | 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() // 昇順ソート
#define rall(v) (v).rbegin(), (v).rend() // 降順ソート
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
templa... | #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() // 昇順ソート
#define rall(v) (v).rbegin(), (v).rend() // 降順ソート
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
templa... | replace | 21 | 29 | 21 | 24 | 0 | |
p02730 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define N 100005
#define mod 998244353
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(0)
#define... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define N 100005
#define mod 998244353
#define boost \
ios_base::sync_with_stdio(false); \
cin.tie(0)
#define... | insert | 48 | 48 | 48 | 49 | TLE | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int N = S.size();
string ans = "Yes";
for (int i = 0; i <= (N - 3) / 4; i++) {
if (S.at(i) != S.at(N - i) || S.at(i) != S.at((N - 3) / 2)) {
ans = "No";
break;
}
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
string S;
cin >> S;
int N = S.size();
string ans = "Yes";
for (int i = 0; i <= (N - 3) / 2; i++) {
if (S.at(i) != S.at(N - i - 1) || S.at(i) != S.at((N - 3) / 2 - i)) {
ans = "No";
break;
}
}
cout << ans << endl;
return 0;
} | replace | 7 | 9 | 7 | 9 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::at: __n (which is 7) >= this->size() (which is 7)
|
p02730 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define int long long int
signed main() {
string s;
int s_center = (s.length() + 1) / 2;
string mae = s.substr(s_center - 1);
string usiro = s.substr(s_center + 1, (s.length() / 2));
if (mae == usiro) {
cout... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
#define int long long int
signed main() {
string s;
cin >> s;
int s_center = ((s.length() + 1) / 2) - 1;
string mae = s.substr(0, s_center);
string usiro = s.substr(s_center + 1);
if (mae == usiro) {
cout ... | replace | 9 | 12 | 9 | 13 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::substr: __pos (which is 18446744073709551615) > this->size() (which is 0)
|
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(var, begin, end) for (int var = (begin); var <= (end); var++)
#define RFOR(var, begin, end) for (int var = (begin); var >= (end); var--)
#define REP(var, length) FOR(var, 0, length - 1)
#define RREP(var, length) RFOR(var, length - 1, 0)
#de... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(var, begin, end) for (int var = (begin); var <= (end); var++)
#define RFOR(var, begin, end) for (int var = (begin); var >= (end); var--)
#define REP(var, length) FOR(var, 0, length - 1)
#define RREP(var, length) RFOR(var, length - 1, 0)
#de... | replace | 102 | 103 | 102 | 108 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
bool judge(string &s) {
for (int i = 0, j = s.size() - 1; i != j; ++i, --j) {
if (s.at(i) != s.at(j))
return true;
}
return false;
}
int main() {
cin.tie(0), ios::sync_with_stdio(false);
string s;
cin >> s;
bool yes = true;
int n = s.size(), n2;
... | #include <bits/stdc++.h>
using namespace std;
bool judge(string &s) {
string s2 = s;
reverse(s2.begin(), s2.end());
return s != s2;
}
int main() {
cin.tie(0), ios::sync_with_stdio(false);
string s;
cin >> s;
bool yes = true;
int n = s.size(), n2;
if (judge(s))
yes = false;
string s2 = s.substr... | replace | 4 | 9 | 4 | 7 | 0 | |
p02730 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define rep_inv(i, n, m) for (int i = (int)(n); i > (int)(m); i--)
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vc = vector<char>;
using vvl = vector<v... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define rep_inv(i, n, m) for (int i = (int)(n); i > (int)(m); i--)
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vc = vector<char>;
using vvl = vector<v... | insert | 24 | 24 | 24 | 26 | TLE | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, n) for (int i = (a); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define FORD(i, a, n) for (int i = (a); i >= (n); i--)
#define REPD(i, n) FOR(i, n, 0)
#define ALL(o) (o).begin(), (o).end()
template <class T> using V = vector<T>;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, n) for (int i = (a); i < (n); i++)
#define REP(i, n) FOR(i, 0, n)
#define FORD(i, a, n) for (int i = (a); i >= (n); i--)
#define REPD(i, n) FOR(i, n, 0)
#define ALL(o) (o).begin(), (o).end()
template <class T> using V = vector<T>;... | replace | 34 | 35 | 34 | 35 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define double /*long*/ double
#define endl '\n'
#define vll vector<ll>
#define pll pair<ll, ll>
#define vpll vector<pll>
#define vppll vector<pair<pll, pll>>
#define mp make_pair
#define pb push_back
#define mapll map<ll, ll>
#define fir first
#define sec second
#defin... | #include <bits/stdc++.h>
#define ll long long int
#define double /*long*/ double
#define endl '\n'
#define vll vector<ll>
#define pll pair<ll, ll>
#define vpll vector<pll>
#define vppll vector<pair<pll, pll>>
#define mp make_pair
#define pb push_back
#define mapll map<ll, ll>
#define fir first
#define sec second
#defin... | delete | 55 | 60 | 55 | 55 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (ll i = a; (i) < (b); ++(i))
#define RFOR(i, a, b) for (ll i = a; (i) >= (b); --(i))
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, n, 0)
#define ALL(v) v.begin(), v.end()
#define UNIQ(v) ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define FOR(i, a, b) for (ll i = a; (i) < (b); ++(i))
#define RFOR(i, a, b) for (ll i = a; (i) >= (b); --(i))
#define REP(i, n) FOR(i, 0, n)
#define RREP(i, n) RFOR(i, n, 0)
#define ALL(v) v.begin(), v.end()
#define UNIQ(v) ... | replace | 31 | 32 | 31 | 32 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define clean(x, y) memset(x, y, sizeof(x));
#define pb push_back
#define F first
#define S second
#define LB lower_bound
#define UB upper_bound
#define ALL(v) v.begin(), v.end()
#define PI acos(-1.0)
#define EPS 1e-9
#define INF (1 << 30)
#define MOD 1000000007
#define MA... | #include <bits/stdc++.h>
using namespace std;
#define clean(x, y) memset(x, y, sizeof(x));
#define pb push_back
#define F first
#define S second
#define LB lower_bound
#define UB upper_bound
#define ALL(v) v.begin(), v.end()
#define PI acos(-1.0)
#define EPS 1e-9
#define INF (1 << 30)
#define MOD 1000000007
#define MA... | replace | 52 | 53 | 52 | 53 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define INF 1000000007
#define endl "\n"
lli n, m;
string a, a2, a3;
int main() {
#ifndef ONLINE_JUDGE
freopen("zgir.gir", "r", stdin);
freopen("zcik.cik", "w", std... | #include <bits/stdc++.h>
using namespace std;
#define lli long long int
#define st first
#define nd second
#define mp make_pair
#define pb push_back
#define INF 1000000007
#define endl "\n"
lli n, m;
string a, a2, a3;
int main() {
cin >> a;
for (int i = 0; i < a.size(); i++) {
if (a[i] != a[a.size() - i - 1]... | delete | 15 | 19 | 15 | 15 | -11 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define lower(s) transform(s.begin(), s.end(), s.begin(), ::tolower)
using namespace std;
using ll = long long;
int INF = 1001001001;
bool isKaibun(string s) {
int n = s.length();
int l = n / 2;
for (int i = 0; i < l; i++) {
if (s[i] !=... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define lower(s) transform(s.begin(), s.end(), s.begin(), ::tolower)
using namespace std;
using ll = long long;
int INF = 1001001001;
bool isKaibun(string s) {
int n = s.length();
int l = n / 2;
for (int i = 0; i < l; i++) {
if (s[i] !=... | replace | 23 | 24 | 23 | 24 | 0 | |
p02730 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define fastio() ios_base::sync_with_stdio(false)
#define rmod(x, y) ((((x) % (y)) + (y)) % (y))
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
template <typename T, typename R = null_type, typename C = les... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define fastio() ios_base::sync_with_stdio(false)
#define rmod(x, y) ((((x) % (y)) + (y)) % (y))
using namespace std;
using namespace __gnu_pbds;
typedef long long ll;
typedef long double ld;
template <typename T, typename R = null_type, typename C = les... | replace | 18 | 19 | 18 | 19 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.