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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02976 | C++ | Runtime Error | #include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i, N) for (LL i = 0; i < N; ++i)
typedef long long int LL;
std::vector<std::vector<LL>> G1, G2;
std::set<std::pair<LL, LL>> path;
std::vector<bool> vis;
std::vector<LL> outs;
std::vector<std::pair<LL, LL>> ans;
void dfs1(LL v) {
for (LL ... | #include "bits/stdc++.h"
#define in std::cin
#define out std::cout
#define rep(i, N) for (LL i = 0; i < N; ++i)
typedef long long int LL;
std::vector<std::vector<LL>> G1, G2;
std::set<std::pair<LL, LL>> path;
std::vector<bool> vis;
std::vector<LL> outs;
std::vector<std::pair<LL, LL>> ans;
void dfs1(LL v) {
for (LL ... | replace | 28 | 38 | 28 | 35 | 0 | |
p02976 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define start_routine() int begtime = clock();
#define end_routine() ... | #include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define start_routine() int begtime = clock();
#define end_routine() ... | delete | 128 | 132 | 128 | 128 | -11 | |
p02976 | C++ | Runtime Error | // #pragma GCC optimize ("-O3","unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#inclu... | // #pragma GCC optimize ("-O3","unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <complex>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <limits.h>
#include <map>
#include <math.h>
#include <numeric>
#inclu... | insert | 150 | 150 | 150 | 151 | 0 | |
p02976 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#incl... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#incl... | replace | 52 | 53 | 52 | 53 | 0 | |
p02976 | C++ | Runtime Error | #include <bits/stdc++.h>
#ifdef LOCAL_DEBUG
#define DEBUG 1
#define CERR \
if (DEBUG) \
cerr
#define MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, NAME, ...) NAME
#define pr(...) ... | #include <bits/stdc++.h>
#ifdef LOCAL_DEBUG
#define DEBUG 1
#define CERR \
if (DEBUG) \
cerr
#define MACRO(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, NAME, ...) NAME
#define pr(...) ... | replace | 113 | 114 | 113 | 114 | 0 | |
p02976 | C++ | Runtime Error | // #define DEBUGGING
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()
template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
using ll = int64_t;
using ull = uint64_t;
using PLL = pair<ll, ll>;
t... | // #define DEBUGGING
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()
template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
using ll = int64_t;
using ull = uint64_t;
using PLL = pair<ll, ll>;
t... | delete | 153 | 155 | 153 | 153 | 0 | |
p02976 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
pair<int, int> edge[maxn];
int taken[maxn], deg[maxn], ansu[maxn], ansv[maxn], fa[maxn], tot;
vector<int> adj[maxn];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
void dfs(int u, int parent) {
for (auto v : adj[u]) {
i... | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
pair<int, int> edge[maxn];
int taken[maxn], deg[maxn], ansu[maxn], ansv[maxn], fa[maxn], tot;
vector<int> adj[maxn];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
void dfs(int u, int parent) {
for (auto v : adj[u]) {
i... | replace | 41 | 58 | 41 | 53 | 0 | |
p02976 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
using namespace std;
const int MAXN = 1e5 + 5;
#define ii pair<int, int>
int n, m;
int lvl[MAXN], p[MAXN], par[MAXN];
bool visited[MAXN];
vector<int> adj[MAXN];
vector<ii> e;
int getParent(int x) { return (p[x] == x) ? x : getParent(p[x]); }
void conn(int a, int b) {
int pa = getParent(a)... | #include "bits/stdc++.h"
using namespace std;
const int MAXN = 1e5 + 5;
#define ii pair<int, int>
int n, m;
int lvl[MAXN], p[MAXN], par[MAXN];
bool visited[MAXN];
vector<int> adj[MAXN];
vector<ii> e;
int getParent(int x) { return (p[x] == x) ? x : getParent(p[x]); }
void conn(int a, int b) {
int pa = getParent(a)... | replace | 17 | 18 | 17 | 18 | TLE | |
p02976 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <iostream>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_r(i, n) for (int i = n - 1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = 0, ... | #include <bits/stdc++.h>
#include <iostream>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep_r(i, n) for (int i = n - 1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define REP(i, n) for (int i = 0, ... | replace | 115 | 116 | 115 | 116 | 0 | |
p02976 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <vector>
using namespace std;
const int maxn = 2e5 + 7;
vector<int> g[maxn];
int xx[maxn], yy[maxn], len = 0;
int dep[maxn], in[maxn];
void dfs(int u, int pre) {
for (int i = 0; i < g[u].size(); i++) {
int v = g[u][i];
if (v == pre)
continue;
if (dep[v] == 0) {
... | #include <bits/stdc++.h>
#include <vector>
using namespace std;
const int maxn = 2e5 + 7;
vector<int> g[maxn];
int xx[maxn], yy[maxn], len = 0;
int dep[maxn], in[maxn];
void dfs(int u, int pre) {
dep[u] = dep[pre] + 1;
for (int i = 0; i < g[u].size(); i++) {
int v = g[u][i];
if (v == pre)
continue;
... | insert | 10 | 10 | 10 | 11 | -11 | |
p02976 | C++ | Runtime Error | #include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
// vector
template <typename T> ostream &operator<<(ostream &s, const vector<T> &v) {
int len = v.size();
for (int i = 0; i < len; ++i) {
s << v[i];
if (i < len - 1)
s << "\t";
}
return ... | #include <cstring>
#include <iostream>
#include <queue>
#include <set>
#include <vector>
using namespace std;
// vector
template <typename T> ostream &operator<<(ostream &s, const vector<T> &v) {
int len = v.size();
for (int i = 0; i < len; ++i) {
s << v[i];
if (i < len - 1)
s << "\t";
}
return ... | replace | 99 | 100 | 99 | 100 | 0 | |
p02976 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define LL long long
using namespace std;
int read() {
bool f = 0;
int x = 0;
char c = getchar();
... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <vector>
#define LL long long
using namespace std;
int read() {
bool f = 0;
int x = 0;
char c = getchar();
... | replace | 60 | 62 | 60 | 63 | -11 | |
p02976 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define maxs(x, y) x = max(x, y)
#define mins(x, y) x = min(x, y)
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repr(i, n) for (int i = (n)-1; i >= 0; i-... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <vector>
#define maxs(x, y) x = max(x, y)
#define mins(x, y) x = min(x, y)
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define repr(i, n) for (int i = (n)-1; i >= 0; i-... | replace | 57 | 60 | 57 | 61 | -6 | fade01b3-540a-42e3-b647-9489e73370bb.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02976/C++/s381861975.cpp:55: main()::<lambda(int, int)>: Assertion `pr!=-1' failed.
|
p02976 | C++ | Runtime Error | #include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M), B(M);
for (int i = 0; i < M; i++) {
cin >> A[i] >> B[i];
A[i]--;
B[i]--;
}
vector<int> D(N);
vector<vector<int>> E(N);
vector<vector<int>> EI(N);
vecto... | #include <functional>
#include <iostream>
#include <vector>
using namespace std;
int main() {
int N, M;
cin >> N >> M;
vector<int> A(M), B(M);
for (int i = 0; i < M; i++) {
cin >> A[i] >> B[i];
A[i]--;
B[i]--;
}
vector<int> D(M);
vector<vector<int>> E(N);
vector<vector<int>> EI(N);
vecto... | replace | 15 | 16 | 15 | 16 | 0 | |
p02976 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std::literals::string_literals;
using i64 = long long;
using std::cin;
using std::cout;
using std::endl;
template <typename T> std::vector<T> make_v(size_t a) {
return std::vector<T>(a);
}
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return std::... | #include <bits/stdc++.h>
using namespace std::literals::string_literals;
using i64 = long long;
using std::cin;
using std::cout;
using std::endl;
template <typename T> std::vector<T> make_v(size_t a) {
return std::vector<T>(a);
}
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) {
return std::... | replace | 18 | 19 | 18 | 19 | 0 | |
p02976 | C++ | Runtime Error | #pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <iostream>
#include <map>
#include <random>
#include <set>
#include <stdio.h>
#include <time.h>
#include <unordered_set>
#... | // #pragma comment(linker, "/stack:200000000")
// #pragma GCC optimize("Ofast")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,avx,avx2")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <iostream>
#include <map>
#include <random>
#include <set>
#include <stdio.h>
#include <time.h>
#include <unorder... | replace | 0 | 3 | 0 | 3 | 0 | |
p02977 | C++ | Time Limit Exceeded | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
typedef long long ll;
typedef long double ld;
typedef complex<ld... | #pragma GCC optimize("O3")
#pragma GCC target("sse4")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>
using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;
typedef long long ll;
typedef long double ld;
typedef complex<ld... | replace | 269 | 274 | 269 | 273 | TLE | |
p02977 | C++ | Time Limit Exceeded | // #pragma GCC optimize("Ofast")
// #pragma GCC optimize ("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma warning(disable : 4786)
#pragma warning(disable : 4996)
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cmath>
#includ... | // #pragma GCC optimize("Ofast")
// #pragma GCC optimize ("unroll-loops")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma warning(disable : 4786)
#pragma warning(disable : 4996)
#include <algorithm>
#include <array>
#include <assert.h>
#include <bitset>
#include <cmath>
#includ... | delete | 203 | 209 | 203 | 203 | TLE | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define all(c) (c).begin(), (c).end()
#define pb push_back
#define dbg(...) \
do { \
cerr << __LINE__ <<... | replace | 71 | 72 | 71 | 72 | 0 | 58: n= 3 cnt= 5
|
p02977 | C++ | Runtime Error | #include <iostream>
using namespace std;
int n, par[100005];
int find(int x) {
if (par[x] != x)
par[x] = find(par[x]);
return par[x];
}
bool Union(int x, int y) {
x = find(x);
y = find(y);
if (x == y)
return 0;
par[x] = y;
return 1;
}
void add(int x, int y) {
if (Union(x, y))
printf("%d %d\n... | #include <iostream>
using namespace std;
int n, par[200005];
int find(int x) {
if (par[x] != x)
par[x] = find(par[x]);
return par[x];
}
bool Union(int x, int y) {
x = find(x);
y = find(y);
if (x == y)
return 0;
par[x] = y;
return 1;
}
void add(int x, int y) {
if (Union(x, y))
printf("%d %d\n... | replace | 2 | 3 | 2 | 3 | 0 | |
p02977 | C++ | Runtime Error | #include "bits/stdc++.h"
#include <assert.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define int long long
const int inf = 1e17;
const int mod = 1000000007;
typedef pair<int, int> P;
typedef pair<int, P> PP;
int cnt[200006];
int n;
void disp(vector<int> V) {
rep(i, V.size()) {
if (cnt[... | #include "bits/stdc++.h"
#include <assert.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define int long long
const int inf = 1e17;
const int mod = 1000000007;
typedef pair<int, int> P;
typedef pair<int, P> PP;
int cnt[200006];
int n;
void disp(vector<int> V) {
rep(i, V.size()) {
if (cnt[... | replace | 44 | 45 | 44 | 45 | 0 | |
p02977 | C++ | Runtime Error | #include <cstdio>
int main() {
int N;
scanf("%d", &N);
if (!(N & (N - 1)))
return 1;
puts("No");
} | #include <cstdio>
int main() {
int N;
scanf("%d", &N);
if (!(N & (N - 1)))
return puts("No"), 0;
puts("Yes");
printf("%d %d\n", N + 1, 3);
for (int i = 2; i < N; i += 2)
printf("%d %d\n%d %d\n%d %d\n%d %d\n", i + 1, i, i, 1, 1, N + i + 1,
N + i + 1, N + i);
if (N % 2 == 0)
for (int... | replace | 6 | 8 | 6 | 20 | 0 | |
p02977 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
#define prev prev228
#define all(x) (x).begin(), (x).end()
vector<pair<int, int>> edges;
int main() {
int n;
cin >> n;
if (__builtin_popcount(n) == 1) {
cout << "No";
return 0;... | #include <algorithm>
#include <bitset>
#include <iostream>
#include <map>
#include <set>
#include <vector>
using namespace std;
#define prev prev228
#define all(x) (x).begin(), (x).end()
vector<pair<int, int>> edges;
int main() {
int n;
cin >> n;
if (__builtin_popcount(n) == 1) {
cout << "No";
return 0;... | replace | 81 | 83 | 81 | 156 | 0 | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<int, int> pii;
const int INF = 1l << 60;
#define u_b upper_bound
#define l_b lower_bound
signed main() {
int N;
cin >> N;
int a = 1;
rep(i, 20) {
if (N == a) {
cout << "No... | #include <bits/stdc++.h>
#define int long long
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
typedef pair<int, int> pii;
const int INF = 1l << 60;
#define u_b upper_bound
#define l_b lower_bound
signed main() {
int N;
cin >> N;
int a = 1;
rep(i, 20) {
if (N == a) {
cout << "No... | replace | 21 | 22 | 21 | 50 | 1 | |
p02977 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <cstring>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
... | #include <algorithm>
#include <bitset>
#include <climits>
#include <complex>
#include <cstring>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
... | insert | 91 | 91 | 91 | 95 | 0 | |
p02977 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define next Next
#define last Last
const int N = 1e5 + 10;
int n, Low[N];
struct node {
int x, y;
};
vector<node> g;
/*char buf[1<<21],*p1=buf,*p2=buf;
inline int gc(){return
p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++;}*/
#define gc getchar
inline in... | #include <bits/stdc++.h>
using namespace std;
#define next Next
#define last Last
const int N = 1e5 + 10;
int n, Low[N];
struct node {
int x, y;
};
vector<node> g;
/*char buf[1<<21],*p1=buf,*p2=buf;
inline int gc(){return
p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++;}*/
#define gc getchar
inline in... | delete | 31 | 33 | 31 | 31 | TLE | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
#pragma GCC optimize("O2,unroll-loops")
// #pragma GCC optimize("no-stack-protector,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<pii, int>... | #include <bits/stdc++.h>
#pragma GCC optimize("O2,unroll-loops")
// #pragma GCC optimize("no-stack-protector,fast-math")
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<pii, int>... | replace | 58 | 61 | 58 | 61 | 0 | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
ios::sync_with_stdio(false);
cin >> n;
if (__builtin_popcount(n) == 1) {
cout << "No" << endl;
return 0;
}
cout << "Yes" << endl;
cout << 1 << ' ' << 2 << endl;
cout << 2 << ' ' << 3 << endl;
cout << 3 << ' ' << n + 1 << endl;
... | #include <bits/stdc++.h>
using namespace std;
int n;
int main() {
ios::sync_with_stdio(false);
cin >> n;
if (__builtin_popcount(n) == 1) {
cout << "No" << endl;
return 0;
}
cout << "Yes" << endl;
cout << 1 << ' ' << 2 << endl;
cout << 2 << ' ' << 3 << endl;
cout << 3 << ' ' << n + 1 << endl;
... | replace | 26 | 32 | 26 | 36 | 0 | |
p02977 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
const int mod = 1000000007;
typedef long long LL;
int n, m, u[N], v[N], du[N], a[N];
set<int> G[N];
set<pair<int, int>> s;
pair<int, int> ans[N];
int main() {
#ifdef TEST
freopen("input.txt", "r", stdin);
#endif
scanf("%d", &n);
int fst = 1;
wh... | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
const int mod = 1000000007;
typedef long long LL;
int n, m, u[N], v[N], du[N], a[N];
set<int> G[N];
set<pair<int, int>> s;
pair<int, int> ans[N];
int main() {
#ifdef TEST
freopen("input.txt", "r", stdin);
#endif
scanf("%d", &n);
int fst = 1;
wh... | replace | 36 | 37 | 36 | 37 | TLE | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
int main() {
using namespace std;
size_t N;
cin >> N;
if (__builtin_popcountll(N) == 1)
return 0 & puts("No");
puts("Yes\n1 2");
for (unsigned long i = 2; i < N; i += 2)
cout << i << " " << i + 1 << "\n"
<< i + 1 << " " << N + 1 << "\n"
<< N + 1 << " " << ... | #include <bits/stdc++.h>
int main() {
using namespace std;
size_t N;
cin >> N;
if (__builtin_popcountll(N) == 1)
return 0 & puts("No");
puts("Yes\n1 2");
for (unsigned long i = 2; i < N; i += 2)
cout << i << " " << i + 1 << "\n"
<< i + 1 << " " << N + 1 << "\n"
<< N + 1 << " " << ... | replace | 14 | 18 | 14 | 17 | 0 | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x, to) for (x = 0; x < (to); x++)
#define FORR(x, arr) for (auto &x : arr)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define ALL(a) (a.begin()), ... | #include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#undef _P
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x, to) for (x = 0; x < (to); x++)
#define FORR(x, arr) for (auto &x : arr)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define ALL(a) (a.begin()), ... | replace | 16 | 17 | 16 | 17 | 0 | |
p02977 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
void Check(int n, vector<pair<int, int>> sol) {
// return;
assert(sol.size() + 1 == 2 * n);
for (int i = 1; i <= n; ++i) {
vector<int> vis(2 * n + 1, -1);
auto val = [&](int node) {
if (node > n)
return node - n;
else
return node... | #include <bits/stdc++.h>
using namespace std;
void Check(int n, vector<pair<int, int>> sol) {
return;
assert(sol.size() + 1 == 2 * n);
for (int i = 1; i <= n; ++i) {
vector<int> vis(2 * n + 1, -1);
auto val = [&](int node) {
if (node > n)
return node - n;
else
return node;
... | replace | 5 | 6 | 5 | 6 | TLE | |
p02977 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <st... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <sstream>
#include <stack>
#include <st... | replace | 347 | 349 | 347 | 354 | 0 | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define fornum(A, B, C) for (A = B; A < C; A++)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
/////////////////////////////////////////////////////
ll N, n;
vector<pll> vn;
ll mk[100], mk2;
pll ab[100];
pll ans[101010];
ll ... | #include <bits/stdc++.h>
#define ll long long
#define fornum(A, B, C) for (A = B; A < C; A++)
#define mp make_pair
#define pii pair<int, int>
#define pll pair<ll, ll>
using namespace std;
/////////////////////////////////////////////////////
ll N, n;
pll ans[202020];
ll ans2;
ll i, j;
int main() {
scanf("%lld", &... | replace | 12 | 16 | 12 | 13 | 0 | |
p02977 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <vector>
using nam... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string.h>
#include <utility>
#include <vector>
using nam... | replace | 30 | 31 | 30 | 31 | 0 | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
// #define co(x) cout << (x) << "\n"
// #define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
// #define co(x) cout << (x) << "\n"
// #define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb... | replace | 15 | 16 | 15 | 16 | 0 | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
typedef long long ll;
using namespace std;
int used[100010];
int main() {
int N;
cin >> N;
if (N % 2 == 0 && N < 25)
cout << 1 / 0 << endl;
return 0;
}
| #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < int(n); i++)
typedef long long ll;
using namespace std;
int used[100010];
int main() {
int N;
cin >> N;
if (N == 1) {
cout << "No"
<< "\n";
return 0;
}
if (N == 6) {
cout << "Yes"
<< "\n";
cout << 3 << " " << 5 ... | replace | 10 | 12 | 10 | 133 | 0 | |
p02977 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <vector>
using namespace std;
const int MAXN = 100005;
int N, Root = 1;
vector<int> P[MAXN];
int main() {
// freopen("tree.in","r",stdin);
// freopen("tree.out","w",stdout);
scanf("%d", &N);
if (int(log2(N)) == log2(N)) {
printf("No\n");
r... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <vector>
using namespace std;
const int MAXN = 200005;
int N, Root = 1;
vector<int> P[MAXN];
int main() {
// freopen("tree.in","r",stdin);
// freopen("tree.out","w",stdout);
scanf("%d", &N);
if (int(log2(N)) == log2(N)) {
printf("No\n");
r... | replace | 5 | 6 | 5 | 6 | 0 | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (int i ... | #include <bits/stdc++.h>
using namespace std;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (int i ... | replace | 104 | 122 | 104 | 108 | 0 | |
p02977 | C++ | Runtime Error | #include <bits/stdc++.h>
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i <= 30; i++)
if (n == (1 << i)) {
std::cout << "No" << std::endl;
return 0;
}
int nn;
if (n % 4 == 3)
nn = n;
else
nn = n / 4 * 4 - 1;
std::vector<int> all;
for (int i = 1; i <= nn; i++)
all.p... | #include <bits/stdc++.h>
int main() {
int n;
scanf("%d", &n);
for (int i = 0; i <= 30; i++)
if (n == (1 << i)) {
std::cout << "No" << std::endl;
return 0;
}
int nn;
if (n % 4 == 3)
nn = n;
else
nn = n / 4 * 4 - 1;
std::vector<int> all;
for (int i = 1; i <= nn; i++)
all.p... | replace | 43 | 58 | 43 | 46 | 0 | |
p02978 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ri register int
typedef long long ll;
#define rll register ll
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
qu[55];
int f, qr;
// getchar
#define gc() ... | #include <bits/stdc++.h>
using namespace std;
#define ri register int
typedef long long ll;
#define rll register ll
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
qu[55];
int f, qr;
// getchar
#define gc() ... | replace | 69 | 70 | 69 | 70 | TLE | |
p02978 | C++ | Time Limit Exceeded | #include <algorithm>
#include <functional>
#include <iostream>
#include <limits>
#include <tuple>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int64_t> A(N);
for (auto &a : A)
cin >> a;
function<int64_t(vector<int64_t>)> dfs = [&](vector<int64_t> A) {
if (A.size() == 2)... | #include <algorithm>
#include <functional>
#include <iostream>
#include <limits>
#include <tuple>
#include <vector>
using namespace std;
int main() {
int N;
cin >> N;
vector<int64_t> A(N);
for (auto &a : A)
cin >> a;
function<int64_t(int64_t, int64_t, int64_t, int64_t)> rec =
[&](int64_t l, int64_t... | replace | 14 | 31 | 14 | 26 | TLE | |
p02978 | C++ | Runtime Error | #include <bits/stdc++.h>
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#define NDEBUG
#define SHOW(...) static_cast<void>(0)
//!===========================================================!//
//! dP dP dP !//
//! 88 ... | #include <bits/stdc++.h>
#pragma GCC diagnostic ignored "-Wsign-compare"
#pragma GCC diagnostic ignored "-Wsign-conversion"
#define NDEBUG
#define SHOW(...) static_cast<void>(0)
//!===========================================================!//
//! dP dP dP !//
//! 88 ... | replace | 95 | 97 | 95 | 97 | 0 | |
p02978 | C++ | Time Limit Exceeded | // https://atcoder.jp/contests/agc035/tasks/agc035_d
#include <bits/stdc++.h>
#include <sys/types.h>
#include <unistd.h>
#define CIN_ONLY
#define DECIMAL_DIGITS 10
#ifdef BTK
/*<head>*/
#include "Template.hpp"
/*</head>*/
#else
/*<body>*/
/* #region header */
/* #region 1*/
/**
* @file Macro.hpp
* @author btk
* @br... | // https://atcoder.jp/contests/agc035/tasks/agc035_d
#include <bits/stdc++.h>
#include <sys/types.h>
#include <unistd.h>
#define CIN_ONLY
#define DECIMAL_DIGITS 10
#ifdef BTK
/*<head>*/
#include "Template.hpp"
/*</head>*/
#else
/*<body>*/
/* #region header */
/* #region 1*/
/**
* @file Macro.hpp
* @author btk
* @br... | replace | 494 | 495 | 494 | 495 | TLE | |
p02978 | C++ | Time Limit Exceeded | #include <cstdio>
#include <iostream>
#include <map>
using namespace std;
const int N = 25;
const long long INF = 4557430888798830399;
int n;
int a[N];
map<pair<int, int>, long long> f[N][N];
long long dfs(int l, int r, int p, int q) {
if (l > r)
return 0;
if (f[l][r][{p, q}])
return f[l][r][{p, q}];
long... | #include <cstdio>
#include <iostream>
#include <map>
using namespace std;
const int N = 25;
const long long INF = 4557430888798830399;
int n;
int a[N];
map<pair<int, int>, long long> f[N][N];
long long dfs(int l, int r, int p, int q) {
if (l > r)
return 0;
if (f[l][r].count({p, q}))
return f[l][r][{p, q}];
... | replace | 12 | 13 | 12 | 13 | TLE | |
p02978 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using int64 = long long;
template <typename T>
vector<vector<T>> Make2DVector(int d1, int d2, T default_value) {
return vector<vector<T>>(d1, vector<T>(d2, default_value));
}
struct PairHash {
template <class T1, class T2>
std::size_t operator()(const std::pair<T1... | #include <bits/stdc++.h>
using namespace std;
using int64 = long long;
template <typename T>
vector<vector<T>> Make2DVector(int d1, int d2, T default_value) {
return vector<vector<T>>(d1, vector<T>(d2, default_value));
}
struct PairHash {
template <class T1, class T2>
std::size_t operator()(const std::pair<T1... | insert | 64 | 64 | 64 | 74 | MLE | |
p02978 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define PR pair<LL, LL>
const int N = 20;
LL a[N];
vector<PR> vp[N][N];
PR calpr(PR u, PR v, LL t) {
LL num = u.sc + v.fr + t;
return mp(u.fr + num, v.sc + num);
}
LL calva... | #include <bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back
#define mp make_pair
#define fr first
#define sc second
#define PR pair<LL, LL>
const int N = 20;
LL a[N];
vector<PR> vp[N][N];
PR calpr(PR u, PR v, LL t) {
LL num = u.sc + v.fr + t;
return mp(u.fr + num, v.sc + num);
}
LL calva... | insert | 17 | 17 | 17 | 19 | 0 | |
p02978 | C++ | Runtime Error | #include <bits/stdc++.h>
#define meow(args...) fprintf(stderr, args)
template <class T1, class T2> inline bool cmin(T1 &a, const T2 &b) {
return b < a ? (a = b, true) : false;
}
template <class T1, class T2> inline bool cmax(T1 &a, const T2 &b) {
return a < b ? (a = b, true) : false;
}
template <class Type> Type re... | #include <bits/stdc++.h>
#define meow(args...) fprintf(stderr, args)
template <class T1, class T2> inline bool cmin(T1 &a, const T2 &b) {
return b < a ? (a = b, true) : false;
}
template <class T1, class T2> inline bool cmax(T1 &a, const T2 &b) {
return a < b ? (a = b, true) : false;
}
template <class Type> Type re... | replace | 21 | 22 | 21 | 22 | -11 | |
p02978 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) ... | #include <bits/stdc++.h>
using namespace std;
using lint = long long int;
using pint = pair<int, int>;
using plint = pair<lint, lint>;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) ... | replace | 148 | 149 | 148 | 153 | MLE | |
p02978 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define mod 1000000007
#define mod998 998244353
#define sp ' '
#define intmax 2147483647
#define llmax 9223372036854775807
#define mkp make_pair
typedef long long ll;
using namespace std;
int N, A[18];
vector<pair<ll, ll>> DP[18][18];
ll RES;
vector<pair<ll, ll>> f(int l, int r) {
if (DP[l]... | #include <bits/stdc++.h>
#define mod 1000000007
#define mod998 998244353
#define sp ' '
#define intmax 2147483647
#define llmax 9223372036854775807
#define mkp make_pair
typedef long long ll;
using namespace std;
int N, A[18];
vector<pair<ll, ll>> DP[18][18];
ll RES;
vector<pair<ll, ll>> f(int l, int r) {
if (DP[l]... | replace | 30 | 31 | 30 | 32 | TLE | |
p02978 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define range(i, m, n) for (int i = m; i < n; i++)
#define husk(i, m, n) for (int i = m; i > n; i--)
int n;
int main() {
cin >> n;
n -= 2;
long long res;
cin >> res;
vector<int> a(n);
range(i, 0, n) cin >> a[i];
int foo;
cin >> foo;
res += foo;
vecto... | #include <bits/stdc++.h>
using namespace std;
#define range(i, m, n) for (int i = m; i < n; i++)
#define husk(i, m, n) for (int i = m; i > n; i--)
int n;
int main() {
cin >> n;
n -= 2;
long long res;
cin >> res;
vector<int> a(n);
range(i, 0, n) cin >> a[i];
int foo;
cin >> foo;
res += foo;
if (n... | insert | 19 | 19 | 19 | 23 | 0 | |
p02978 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
re... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
re... | replace | 50 | 53 | 50 | 53 | TLE | |
p02979 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
#define LL long long
#define LD long double
using namespace std;
const int NN = 200;
const int MM = +117;
int read() {
int fl = 1, x;
char c;
for (c = getchar(); (c ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
#define LL long long
#define LD long double
using namespace std;
const int NN = 200;
const int MM = +117;
int read() {
int fl = 1, x;
char c;
for (c = getchar(); (c ... | replace | 36 | 37 | 36 | 37 | 0 | |
p02979 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <queue>
using namespace std;
int read() {
char c = getchar();
int res = 0;
while (c < '0' || c > '9')
c = getchar();
while (c >= '0' && c <= '9')
res = (res << 1) + (res << 3) + (c ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <queue>
using namespace std;
int read() {
char c = getchar();
int res = 0;
while (c < '0' || c > '9')
c = getchar();
while (c >= '0' && c <= '9')
res = (res << 1) + (res << 3) + (c ... | replace | 17 | 18 | 17 | 18 | 0 | |
p02979 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld double
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define pb emplace_back
#define X first
#define Y second
const int N = 205;
int mod;
void add(int &a, int b) {
a += b;
if (a >= mod)
a -= mod;
}
void sub(int ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld double
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define pb emplace_back
#define X first
#define Y second
const int N = 305;
int mod;
void add(int &a, int b) {
a += b;
if (a >= mod)
a -= mod;
}
void sub(int ... | replace | 14 | 15 | 14 | 15 | 0 | |
p02979 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(c) c.begin(), c.end()
#define pb push_back
#define fs first
#define sc second
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
using namespace std;
template... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)
#define all(c) c.begin(), c.end()
#define pb push_back
#define fs first
#define sc second
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
using namespace std;
template... | replace | 132 | 136 | 132 | 134 | TLE | |
p02979 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 101;
#define fr(i, a, b) for (int i = a; i <= b; ++i)
#define nfr(i, a, b) for (int i = a; i >= b; --i)
int f[2][N];
int g[2][N][N][N];
int n, K, m;
inline void add(int &x, int y) {
x += y;
if (x >= m)
x -= m;
}
int main() {
scanf("%d%d%d", &n, &K... | #include <bits/stdc++.h>
using namespace std;
const int N = 155;
#define fr(i, a, b) for (int i = a; i <= b; ++i)
#define nfr(i, a, b) for (int i = a; i >= b; --i)
int f[2][N];
int g[2][N][N][N];
int n, K, m;
inline void add(int &x, int y) {
x += y;
if (x >= m)
x -= m;
}
int main() {
scanf("%d%d%d", &n, &K... | replace | 2 | 3 | 2 | 3 | 0 | |
p02979 | C++ | Runtime Error | #include <cstdio>
#include <iostream>
#define RI register int
#define CI const int &
using namespace std;
const int N = 150;
int n, k, mod;
inline void inc(int &x, CI y) {
if ((x += y) >= mod)
x -= mod;
}
namespace Case1 // Even number solver
{
int f[N][N];
inline int calc(CI n, CI k) {
RI i, j;
for (f[0][0] ... | #include <cstdio>
#include <iostream>
#define RI register int
#define CI const int &
using namespace std;
const int N = 155;
int n, k, mod;
inline void inc(int &x, CI y) {
if ((x += y) >= mod)
x -= mod;
}
namespace Case1 // Even number solver
{
int f[N][N];
inline int calc(CI n, CI k) {
RI i, j;
for (f[0][0] ... | replace | 5 | 6 | 5 | 6 | 0 | |
p02980 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
const int mo = 998244353, N = 1e5 + 5;
int ksm(int a, int b) {
int ans = 1;
while (b) {
if (b & 1)
ans = ans * a % mo;
a = a * a % mo;
b >>= 1;
}
return ans;
}
int fac[N], inv[N], f[N];
int C(int a, int b) { return fac[a] * inv[b] % mo * inv[a - ... | #include <bits/stdc++.h>
#define int long long
const int mo = 998244353, N = 1e6 + 5;
int ksm(int a, int b) {
int ans = 1;
while (b) {
if (b & 1)
ans = ans * a % mo;
a = a * a % mo;
b >>= 1;
}
return ans;
}
int fac[N], inv[N], f[N];
int C(int a, int b) { return fac[a] * inv[b] % mo * inv[a - ... | replace | 2 | 3 | 2 | 3 | 0 | |
p02980 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<pint> vpint;
template <typename A, typename B> inline void c... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define all(v) (v).begin(), (v).end()
#define fi first
#define se second
typedef vector<int> vint;
typedef pair<int, int> pint;
typedef vector<pint> vpint;
template <typename A, typename B> inline void c... | replace | 151 | 152 | 151 | 152 | 0 | |
p02981 | C++ | Runtime Error | #include <stdio.h>
#include <stdlib.h>
int main() {
int n, a, b;
scanf("%d %d %d", &n, &a, &b);
if (n * a > b) {
printf("%d", b);
} else {
printf("%d", a * n);
}
return b;
}
| #include <stdio.h>
#include <stdlib.h>
int main() {
int n, a, b;
scanf("%d %d %d", &n, &a, &b);
if (n * a > b) {
printf("%d", b);
} else {
printf("%d", a * n);
}
return 0;
}
| replace | 14 | 15 | 14 | 15 | 9 | |
p02981 | Python | Runtime Error | N, A, B = map(int, input().split())
ans = []
for i in range(1, N):
ans.append(A * i + B / N * (N - i))
print(min(ans))
| N, A, B = map(int, input().split())
if A * N < B:
print(A * N)
else:
print(B)
| replace | 1 | 5 | 1 | 5 | 0 | |
p02981 | C++ | Runtime Error | /*ربى اصلح لى شأنى*/
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define el '\n';
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long fact(long long n) { return !n ? 1 : n * fact(n - 1); }
using namespa... | /*ربى اصلح لى شأنى*/
#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
#define el '\n';
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long fact(long long n) { return !n ? 1 : n * fact(n - 1); }
using namespa... | delete | 16 | 21 | 16 | 16 | 0 | |
p02981 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
#define INF 1001001001
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long... | #include <algorithm>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
#define INF 1001001001
#define rep(i, n) for (int i = 0; i < (n); i++)
typedef long long... | replace | 24 | 25 | 24 | 25 | 8 | |
p02981 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
int N, A, B;
scanf("%d %d %d", N, A, B);
if (A * N >= B)
printf("%d", B);
else
printf("%d", A * N);
return 0;
} | #include <stdio.h>
int main(void) {
int N, A, B;
scanf("%d %d %d", &N, &A, &B);
if (A * N >= B)
printf("%d", B);
else
printf("%d", A * N);
return 0;
} | replace | 3 | 4 | 3 | 4 | -11 | |
p02981 | C++ | Runtime Error | /*
Templatka c++ Kacper Fis
//
*/
#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000001;
const float PI = 3.14;
typedef long long LL;
typedef vector<int> vi;
typedef list<int> li;
typedef queue<int> qi;
typedef pair<int, int> ii;
typedef map<string, int> msi; // np msi['nazwa'] = 'liczba'
typed... | /*
Templatka c++ Kacper Fis
//
*/
#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000001;
const float PI = 3.14;
typedef long long LL;
typedef vector<int> vi;
typedef list<int> li;
typedef queue<int> qi;
typedef pair<int, int> ii;
typedef map<string, int> msi; // np msi['nazwa'] = 'liczba'
typed... | replace | 52 | 84 | 52 | 58 | -11 | |
p02981 | C++ | Runtime Error | #include <stdio.h>
int main() {
int N, A, B;
scanf("%d%d%d", N, A, B);
if (N * A <= B)
printf("%d\n", N * A);
else
printf("%d\n", B);
return 0;
} | #include <stdio.h>
int main() {
int N, A, B;
scanf("%d%d%d", &N, &A, &B);
if (N * A <= B)
printf("%d\n", N * A);
else
printf("%d\n", B);
return 0;
}
| replace | 3 | 4 | 3 | 4 | -11 | |
p02981 | C++ | Runtime Error | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
return min(a * b, c);
} | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << min(a * b, c) << endl;
}
| replace | 6 | 7 | 6 | 7 | 8 | |
p02981 | C++ | Runtime Error | #include <stdio.h>
using namespace std;
int main() {
int N, A, B;
int sc = scanf("%d %d %d", &N, &A, &B);
return A * N < B ? A * N : B;
} | #include <stdio.h>
using namespace std;
int main() {
int N, A, B;
int sc = scanf("%d %d %d", &N, &A, &B);
printf("%d\n", A * N < B ? A * N : B);
} | replace | 5 | 6 | 5 | 6 | 8 | |
p02981 | C++ | Runtime Error | #include <stdio.h>
int main(void) {
int n, a, b, c, d;
scanf("%d", &n);
scanf("%d", &a);
scanf("%d", &b);
d = n * a;
if (d > b) {
c = b;
} else {
c = d;
}
printf("%d\n", c);
return 9;
} | #include <stdio.h>
int main(void) {
int n, a, b, c, d;
scanf("%d", &n);
scanf("%d", &a);
scanf("%d", &b);
d = n * a;
if (d > b) {
c = b;
} else {
c = d;
}
printf("%d\n", c);
return 0;
} | replace | 13 | 14 | 13 | 14 | 9 | |
p02981 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define PI 3.14159265
#define OO 1e9
#define SS second
#define FF first
#define Trace(n) cout << #n << " = " << n << endl;
#define ll long long
#define endl "\n"
//@formatter:off
int dx[] = {0, 0, -1, 1, 1, 1, -1, -1};
int dy[] = {-1, 1, ... | #define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
using namespace std;
#define PI 3.14159265
#define OO 1e9
#define SS second
#define FF first
#define Trace(n) cout << #n << " = " << n << endl;
#define ll long long
#define endl "\n"
//@formatter:off
int dx[] = {0, 0, -1, 1, 1, 1, -1, -1};
int dy[] = {-1, 1, ... | delete | 22 | 27 | 22 | 22 | 0 | |
p02982 | C++ | Runtime Error | #include <assert.h>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char const *argv[]) {
int n, d;
cin >> n >> d;
vector<vector<int>> x(n, vector<int>(4));
for (int i = 0; i < n; i++) {
for (int j = 0; j < d; j++) {
cin >> x.at(i).at(j... | #include <assert.h>
#include <cmath>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(int argc, char const *argv[]) {
int n, d;
cin >> n >> d;
vector<vector<int>> x(n, vector<int>(d));
for (int i = 0; i < n; i++) {
for (int j = 0; j < d; j++) {
cin >> x.at(i).at(j... | replace | 10 | 11 | 10 | 11 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, D;
cin >> N >> D;
vector<vector<int>> X(N, vector<int>(D));
for (int i = 0; i < N; i++) {
for (int j = 0; j < N; j++) {
cin >> X[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, D;
cin >> N >> D;
vector<vector<int>> X(N, vector<int>(D));
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
cin >> X[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
... | replace | 9 | 10 | 9 | 10 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, D;
cin >> N >> D;
vector<vector<double>> Vec(N, vector<double>(4));
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
cin >> Vec.at(i).at(j);
}
}
int count = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, D;
cin >> N >> D;
vector<vector<double>> Vec(N, vector<double>(D));
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
cin >> Vec.at(i).at(j);
}
}
int count = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; ... | replace | 6 | 7 | 6 | 7 | 0 | |
p02982 | Python | Runtime Error | N, D = map(int, input().split())
X = list(map(int, input().split()))
count = 0
for i in range(N - 1):
for j in range(i + 1, N):
r = 0
for k in range(D):
r += (X[i][k] - X[j][k]) ** 2
if r**0.5 % 1 == 0:
count += 1
print(count)
| N, D = map(int, input().split())
X = [list(map(int, input().split())) for _ in range(N)]
count = 0
for i in range(N - 1):
for j in range(i + 1, N):
r = 0
for k in range(D):
r += (X[i][k] - X[j][k]) ** 2
if r**0.5 % 1 == 0:
count += 1
print(count)
| replace | 1 | 2 | 1 | 2 | TypeError: 'int' object is not subscriptable | Traceback (most recent call last):
File "/home/alex/Documents/bug-detection/input/Project_CodeNet/data/p02982/Python/s418821927.py", line 8, in <module>
r += (X[i][k] - X[j][k]) ** 2
TypeError: 'int' object is not subscriptable
|
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define endl '\n'
using namespace std;
const ll mod = (ll)1e9 + 7;
const ll INF = 0x3f3f3f3f;
int a[11][11];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
freopen("A.txt", "r", stdin);
#endif
int n, r, ans = 0;
cin >> n >> r;
for ... | #include <bits/stdc++.h>
#define ll long long
#define endl '\n'
using namespace std;
const ll mod = (ll)1e9 + 7;
const ll INF = 0x3f3f3f3f;
int a[11][11];
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
#ifndef ONLINE_JUDGE
// freopen("A.txt", "r", stdin);
#endif
int n, r, ans = 0;
cin >> n >> r;
for... | replace | 13 | 14 | 13 | 14 | TLE | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, d, a[11][11], i, j, k, count = 0, ans = 0;
double s[50] = {0}, b[i][j];
cin >> n >> d;
for (i = 0; i < n; i++) {
for (j = 0; j < d; j++) {
cin >> a[i][j];
b[i][j] = a[i][j];
}
}
for (i = 0; i < n - 1; i++) {
for (j = ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, d, a[11][11], i, j, k, count = 0, ans = 0;
double s[50] = {0}, b[11][11];
cin >> n >> d;
for (i = 0; i < n; i++) {
for (j = 0; j < d; j++) {
cin >> a[i][j];
b[i][j] = a[i][j];
}
}
for (i = 0; i < n - 1; i++) {
for (j ... | replace | 5 | 6 | 5 | 6 | -11 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;
int main() {
int n, d;
cin >> n >> d;
int x[n][d];
REP(... | #include <bits/stdc++.h>
#include <math.h>
#define REP(i, n) for (int i = 0; i < (n); i++)
#define ALL(v) (v).begin(), (v).end()
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
const int INF = 1001001001;
const int mINF = -1001001001;
int main() {
int n, d;
cin >> n >> d;
int x[n][d];
REP(... | replace | 22 | 25 | 22 | 27 | -8 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, D;
cin >> N >> D;
vector<vector<int>> vec(N, vector<int>(D));
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
cin >> vec.at(i).at(j);
}
}
int count = 0;
double sum = 0;
for (int i = 0; i < N - 1; i++) {
for... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, D;
cin >> N >> D;
vector<vector<int>> vec(N, vector<int>(D));
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
cin >> vec.at(i).at(j);
}
}
int count = 0;
double sum = 0;
for (int i = 0; i < N - 1; i++) {
for... | replace | 16 | 17 | 16 | 17 | 0 | |
p02982 | C++ | Runtime Error | #include "bits/stdc++.h"
#define MOD 1000000007
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rrep(i, n) for (ll i = (n)-1; i >= 0; i--)
#define ALL(v) v.begin(), v.end()
#define rALL(v) v.rbegin(), v.rend()
#define FOR(i, j, k) for (ll i = j; i < k; i++)
#define debug_print(var) cerr << #var << "=" << var <<... | #include "bits/stdc++.h"
#define MOD 1000000007
#define rep(i, n) for (ll i = 0; i < (n); i++)
#define rrep(i, n) for (ll i = (n)-1; i >= 0; i--)
#define ALL(v) v.begin(), v.end()
#define rALL(v) v.rbegin(), v.rend()
#define FOR(i, j, k) for (ll i = j; i < k; i++)
#define debug_print(var) cerr << #var << "=" << var <<... | replace | 162 | 163 | 162 | 163 | 0 | |
p02982 | C++ | Runtime Error | #pragma GCC target("avx512f,avx512dq,avx512cd,avx512bw,avx512vl")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vi2 = vector<vector<int>>;
using vb = vector<bool>;
using vb2 = vector<vector<bool>>;
using ... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using vi2 = vector<vector<int>>;
using vb = vector<bool>;
using vb2 = vector<vector<bool>>;
using vc = vector<char>;
using vc2 = vector<vector<char>>;
using vs = vector<string>;
using vs2 = vector<vector<string>>;
using pii = p... | replace | 0 | 3 | 0 | 1 | -4 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, d;
cin >> n >> d;
vector<vector<int>> x(n, vector<int>(d));
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> x[i][j];
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, d;
cin >> n >> d;
vector<vector<int>> x(n, vector<int>(d));
for (int i = 0; i < n; i++) {
for (int j = 0; j < d; j++) {
cin >> x[i][j];
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
... | replace | 8 | 9 | 8 | 9 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<unsigned long long> next_p_mod(unsigned N,
long long mod) { // next_permutation
vector<unsigned long long> Next_p(N);
unsigned long long Next_p_buff = 1;
for (int i = 0; i < N; i++) {
Next_p_buff ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<unsigned long long> next_p_mod(unsigned N,
long long mod) { // next_permutation
vector<unsigned long long> Next_p(N);
unsigned long long Next_p_buff = 1;
for (int i = 0; i < N; i++) {
Next_p_buff ... | replace | 60 | 62 | 60 | 62 | 0 | |
p02982 | C++ | Runtime Error | // include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<LL, LL> PLL;
// container util
//------------------... | // include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
// typedef
//------------------------------------------
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<LL, LL> PLL;
// container util
//------------------... | replace | 81 | 82 | 81 | 82 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long double dist(int i, int j, vector<vector<int>> p, int d) {
long long sum = 0;
for (int k = 0; i < d; i++)
sum += pow(p.at(i).at(k) - p.at(j).at(k), 2);
return sqrt(sum);
}
int main() {
int n, d;
cin >> n >> d;
vector<vector<int>> p(n, vector<int>(d));
... | #include <bits/stdc++.h>
using namespace std;
long double dist(int i, int j, vector<vector<int>> p, int d) {
long long sum = 0;
for (int k = 0; k < d; k++)
sum += pow(p.at(i).at(k) - p.at(j).at(k), 2);
return sqrt(sum);
}
int main() {
int n, d;
cin >> n >> d;
vector<vector<int>> p(n, vector<int>(d));
... | replace | 5 | 6 | 5 | 6 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, d;
cin >> n >> d;
vector<vector<int>> a(n, vector<int>(d));
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
cin >> a.at(i).at(j);
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < i; j++) {
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, d;
cin >> n >> d;
vector<vector<int>> a(n, vector<int>(d));
for (int i = 0; i < n; i++) {
for (int j = 0; j < d; j++) {
cin >> a.at(i).at(j);
}
}
int ans = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < i; j++) {
... | replace | 8 | 9 | 8 | 9 | -6 | terminate called after throwing an instance of 'std::out_of_range'
what(): vector::_M_range_check: __n (which is 2) >= this->size() (which is 2)
|
p02982 | C++ | Runtime Error | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "string"
#include "un... | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "string"
#include "un... | replace | 36 | 37 | 36 | 37 | -11 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<pair<ll, ll>> vp;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define all(v) v.begin(), v.end()
#define inputv(v, n) \
rep(i, n) { ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef vector<pair<ll, ll>> vp;
#define rep(i, n) for (ll i = 0; i < ll(n); i++)
#define all(v) v.begin(), v.end()
#define inputv(v, n) \
rep(i, n) { ... | replace | 26 | 30 | 26 | 28 | -11 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define ll long long
#define pp pair<int, int>
#define v(T) vector<T>
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
const int INF = 1001001001;
// int ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int i = 1; i <= (n); ++i)
#define ll long long
#define pp pair<int, int>
#define v(T) vector<T>
#define Yes cout << "Yes" << endl
#define No cout << "No" << endl
const int INF = 1001001001;
// int ... | replace | 27 | 35 | 27 | 33 | -11 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repi(i, s, n) for (int i = (s); i < (n); i++)
#ifdef LOCAL
#define INPUT_FILE \
ifstream in("atcoder-problems/abc133_b.txt"); ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repi(i, s, n) for (int i = (s); i < (n); i++)
#ifdef LOCAL
#define INPUT_FILE \
ifstream in("atcoder-problems/abc133_b.txt"); ... | replace | 31 | 32 | 31 | 32 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define Abs(x) ((x) < 0 ? (x) * -1 : (x))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y)-1; 0 <= (x); (x)--)
#define nepi(x, y,... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
#define Abs(x) ((x) < 0 ? (x) * -1 : (x))
#define rep(x, y) for ((x) = 0; (x) < (y); (x)++)
#define repin(x, y) for ((x) = 0; (x) <= (y); (x)++)
#define nep(x, y) for ((x) = (y)-1; 0 <= (x); (x)--)
#define nepi(x, y,... | replace | 98 | 99 | 98 | 99 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define CHAL_BC_APNE_BAAP_KO_MAT_SIKHA \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.ti... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define CHAL_BC_APNE_BAAP_KO_MAT_SIKHA \
ios_base::sync_with_stdio(0); \
cin.tie(0); \
cout.ti... | replace | 12 | 16 | 12 | 13 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define repk(i, k, n) for (ll i = k; i < (ll)(n); ++i)
#define INF 5000000000
#define MOD 1000000007
typedef long long ll;
using namespace std;
int ans;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, D;
cin >> N >> D;
... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); ++i)
#define repk(i, k, n) for (ll i = k; i < (ll)(n); ++i)
#define INF 5000000000
#define MOD 1000000007
typedef long long ll;
using namespace std;
int ans;
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int N, D;
cin >> N >> D;
... | replace | 18 | 19 | 18 | 19 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, D;
cin >> N >> D;
vector<vector<int>> X(N, vector<int>(D));
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
cin >> X[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
in... | #include <bits/stdc++.h>
using namespace std;
int main() {
int N, D;
cin >> N >> D;
vector<vector<int>> X(N, vector<int>(D));
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
cin >> X[i][j];
}
}
int ans = 0;
for (int i = 0; i < N; i++) {
for (int j = i + 1; j < N; j++) {
... | replace | 14 | 15 | 14 | 15 | 0 | |
p02982 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
int main() {
int N, D;
cin >> N >> D;
vector<vector<int>> vec(N, vector<int>(D, 0));
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
cin >> vec[i][j];
}
}
int cnt = 0;
for (int i = 0;... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007;
int main() {
int N, D;
cin >> N >> D;
vector<vector<int>> vec(N, vector<int>(D, 0));
for (int i = 0; i < N; i++) {
for (int j = 0; j < D; j++) {
cin >> vec[i][j];
}
}
int cnt = 0;
for (int i = 0;... | replace | 19 | 20 | 19 | 20 | TLE | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
// const bool debug=true;
const bool debug = false;
#define DEBUG if (debug == true)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const ll MOD = 1000000007;
int main(void) {
int n, d;
cin >> n >> d;
int a;... | #include <bits/stdc++.h>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
// const bool debug=true;
const bool debug = false;
#define DEBUG if (debug == true)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const ll MOD = 1000000007;
int main(void) {
int n, d;
cin >> n >> d;
int a;... | replace | 14 | 16 | 14 | 16 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define forn(i, n) for (ll i = 0; i < n; i++)
#define fore(i, a, b) for (ll i = a; i <= b; i++)
#define ford(i, n) for (ll i = n - 1; i >= 0; i--)
#define fi first
#define se second
#defi... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define forn(i, n) for (ll i = 0; i < n; i++)
#define fore(i, a, b) for (ll i = a; i <= b; i++)
#define ford(i, n) for (ll i = n - 1; i >= 0; i--)
#define fi first
#define se second
#defi... | replace | 44 | 51 | 44 | 47 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MOD 1000000007
#define MAX 10005
#define pb push_back
#define int long long
#define vi vector<int>
#define len(x) (x.size())
#define f(i, a, b) for (int i = a; i < b; i++)
#define debug(x) cerr << #x << ": " << x << endl
#define T ... | #include <bits/stdc++.h>
#define MOD 1000000007
#define MAX 10005
#define pb push_back
#define int long long
#define vi vector<int>
#define len(x) (x.size())
#define f(i, a, b) for (int i = a; i < b; i++)
#define debug(x) cerr << #x << ": " << x << endl
#define T ... | replace | 28 | 32 | 28 | 29 | 0 | |
p02982 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define RITR(x, c) for (__typeof(c.rbegin()) x = c.rbegin(); x != c.rend(); x++)
#define setp(n) fixed << setprecision(n)
#define lf double
#define ll long long
#d... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ITR(x, c) for (__typeof(c.begin()) x = c.begin(); x != c.end(); x++)
#define RITR(x, c) for (__typeof(c.rbegin()) x = c.rbegin(); x != c.rend(); x++)
#define setp(n) fixed << setprecision(n)
#define lf double
#define ll long long
#d... | replace | 29 | 30 | 29 | 30 | 0 | |
p02982 | C++ | Runtime Error | // #define NDEBUG
#include <cstddef>
#include <cstdint>
#include <vector>
namespace n91 {
using i8 = std::int_fast8_t;
using i32 = std::int_fast32_t;
using i64 = std::int_fast64_t;
using u8 = std::uint_fast8_t;
using u32 = std::uint_fast32_t;
using u64 = std::uint_fast64_t;
using isize = std::ptrdiff_t;
using usize =... | // #define NDEBUG
#include <cstddef>
#include <cstdint>
#include <vector>
namespace n91 {
using i8 = std::int_fast8_t;
using i32 = std::int_fast32_t;
using i64 = std::int_fast64_t;
using u8 = std::uint_fast8_t;
using u32 = std::uint_fast32_t;
using u64 = std::uint_fast64_t;
using isize = std::ptrdiff_t;
using usize =... | replace | 79 | 81 | 79 | 81 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.