text stringlengths 10 22.5k | status stringclasses 2
values | name stringlengths 9 26 |
|---|---|---|
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#inclu... | failed | 46_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fi first
#define se second
typedef pair<int, int> ii;
typedef pair<ii, int> iii;
const int oo = 1e18 + 7;
const int N = 2e6 + 5;
int n, m, q;
bool vis[N][2], ck[N];
int num[N][2];
vector<ii> Adj[N];
vector<int> visited;
bool final[N];
... | failed | 89_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
int t, n;
string str[500010];
vector<vector<int>> b(500001);
int last[500001];
struct node {
int cnt;
int child[27];
} tree[1000010];
int cnt = 1, ans = 0;
void insert(string w) {
int now = 0;
for (int i = 0; i < w.size(); i++) {
int ch = w[i] - 'a';
if (tre... | failed | 40_3_wrong.cpp |
#pragma GCC optimize("Ofast,unroll-loops")
// #pragma GCC target("avx,avx2,tune=native")
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <q... | failed | 99_1_wrong.cpp |
#include <bits/stdc++.h>
using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;
using i128 = __int128;
template <class T> struct MinCostFlow {
struct _Edge {
int to;
T cap;
T cost;
_Edge(int to_, T cap_, T cost_) : to(to_), cap(cap_), cost(cost_) ... | failed | 76_3_wrong.cpp |
#include <iostream>
#include <unordered_set>
#include <vector>
using namespace std;
struct Problem {
int i_low, i_high, t_low, t_high;
};
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n, i_initial, t_initial;
cin >> n >> i_initial >> t_initial;
vector<Problem> problems(n);
for ... | failed | 110_3_wrong.cpp |
#include <bits/stdc++.h>
using ll = long long;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
std::cout.tie(0);
int r, c, p;
std::cin >> r >> c >> p;
std::vector dp(r, std::vector<double>(c, 1e9));
dp[0][0] = 0;
for (int i = 0; i < r; i++) {
for (int j = 0; j ... | failed | 105_1_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
signed n;
int k;
string s;
unordered_map<string, int> vis;
unordered_map<string, string> nxt;
string ans;
void dfs(const string &stat, int steps) {
if (steps == k + 1) {
cout << stat << '\n';
exit(0);
}
vis[stat] = steps;
string r;
... | failed | 61_1_wrong.cpp |
#include<bits/stdc++.h>
using namespace std;
const int N=505;
const int pre[]={2,3,5,7,11,
13,17,19,23,29,
31,37,41,43,47,
53,59,61,67,71,
73,79,83,89,97,
101,103,107,109,113,
127,131,137,139,149,
151,157,163,167,173,
179,181,191,193,197,
199,211,223,227,229,
233,239,241,251,257,
263,269,271,277,281,
283,293,307,311,31... | failed | 115_3_wrong.cpp |
#include <iostream>
#include <vector>
#include <string>
#include <tuple>
using namespace std;
typedef tuple<string, string, string> State;
State apply_c1(const State& s) {
string u = get<0>(s);
string ll = get<1>(s);
string lr = get<2>(s);
string new_u = ll.substr(0, 3) + u.substr(3);
string new_... | failed | 104_1_wrong.cpp |
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define mk make_pair
#define MID int mid = (l + r) >> 1;
#define ll long long
#define endl '\n'
#define siz(a) int(a.size())
int a[2001000], n;
const int p = 998244353;
void solveclr() {}
void solve() {
solve... | failed | 84_1_wrong.cpp |
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define mk make_pair
#define MID int mid = (l + r) >> 1;
#define ll long long
#define endl '\n'
#define siz(a) int(a.size())
int a[2001000], n;
const int p = 998244353;
void solveclr() {}
void solve() {
solve... | failed | 84_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
string s, t;
void solve() {
int n;
cin >> n;
s = to_string(n);
sort(s.begin(), s.end());
int ans = 0;
for (int i = 2; i <= 9; ++i) {
if (n % i == 0) {
int m = n / i;
t = to_string(m);
sort(t.begin(), t.end());
if (s == t)
++... | failed | 92_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
mt19937 rnd;
#define app push_back
#define all(x) (x).begin(), (x).end()
#ifdef LOCAL
#define debug(...) \
[](auto... a) { ((cout << a << ' '), ...) << endl; }(#__VA_ARGS__, ":", \
... | failed | 21_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, a, n) for (int i = a; i < n; i++)
#define per(i, a, n) for (int i = n - 1; i >= a; i--)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define all(x) (x).begin(), (x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
... | failed | 111_1_wrong.cpp |
#include <bits/stdc++.h>
// #define int long long
#define inf 0x3f3f3f3f
#define INF 0x3f3f3f3f3f3f3f3f
#define fr first
#define se second
#define endl '\n'
#define pb push_back
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
const int N = 2e5 + 10;
int n, k;
vo... | failed | 97_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define endl "\n"
int n;
void solve() {
cin >> n;
if (n == 1) {
cout << "Yes\n";
cout << 0 << '\n' << 0 << '\n';
return;
}
if (n == 2) {
cout << "No\n";
return;
}
if ((1 << __lg(n)) != n) {
cout << "No\n";
re... | failed | 56_1_wrong.cpp |
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <deque>
#include <functional>
#include <iostream>
#include <limits>
#inclu... | failed | 46_1_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define all(v) v.begin(), v.end()
#define sz(s) (int)s.size()
#define int ll
#define pii pair<int, int>
const int MAX = (int)1e6 + 12;
int n, m, k;
void solve() {
cin >> n >> m >> k;
vector<int> f(k + 10, 0);
vector<int> ... | failed | 55_1_wrong.cpp |
#include <bits/stdc++.h>
using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;
constexpr int N = 1E6;
std::vector<int> primes;
i64 f[N + 1][10];
i64 ans[N + 1];
int minp[N + 1];
int fp[20][10][10];
void solve() {
i64 n;
std::cin >> n;
i64 s = st... | failed | 64_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define forn(i, n) for (int i = 0; i < (n); i++)
#define pb push_back
#define mp make_pair
#define MOD 1000000007
#define f first
#define s second
#define rand(i, j) uniform_int_distribution<ll>((ll)(i), (ll)(j))(rng)
mt19937 rng(std::chrono::steady_clock::now().time_since... | failed | 94_2_wrong.cpp |
#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target( \
"sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
uint64_t gcd_stein_impl(uint64_t x, uint64_t y) {
if (x == y) {
return x;... | failed | 42_3_wrong.cpp |
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using i128 = __int128;
using u128 = __uint128_t;
template <class T> using V = vector<T>;
using vi = V<int>;
using vll = V<ll>;
using vd = V<double>;
using vs = V<string>;
using vb = V<bool>;... | failed | 106_1_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define MP make_pair
mt19937 rnd(time(0));
const int MAXN = 5e5 + 5;
const ll inf = 1e18;
int n, m, c, stk[MAXN], hd, tl;
ll a[MAXN], b[MAXN], f[MAXN];
inline ll F(ll x) { return upper_bound(b, b + m + 1, x) - b - 1; }
inline int w(int l, int r) { retur... | failed | 32_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define ull unsigned long long
#define int long long
#define pii pair<int, int>
struct P {
array<int, 8> c;
P() {
for (auto &x : c) {
x = 0;
}
}
int val() {
int ans = 0;
int k = 1;
for (int i = 0; i < 8; i++) {
ans += k * c[i];
... | failed | 41_3_wrong.cpp |
#ifdef LOCAL
#define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#define all(v) v.begin(), v.end()
#define app push_back
#define int long long
#ifdef LOCAL
#define debug(...) \
[](auto... a) { ((cout << a << ' '), ...) << endl; }(#__VA_ARGS__, ":", ... | failed | 15_1_wrong.cpp |
template = """// 错误代码模板\n#include <iostream>\nint main() {\n // TODO: 填写错误实现\n return 1;\n}\n"""
import os
for i in range(92, 99):
for j in range(1, 4):
filename = f"{i}_{j}_wrong.cpp"
filepath = os.path.join(os.path.dirname(__file__), filename)
with open(filepath, "w", encoding="utf-8")... | failed | batch_create_wrong_code.py |
#include<bits/stdc++.h>
using namespace std;
const int N=5010;
int n,a[N],ans[N],f[N],g[N];
void sol(){
scanf("%d",&n);for(int i=1;i<=n;i++)scanf("%d",&a[i]);
f[0]=1;for(int i=1;i<=n;i++)f[i]=0;
for(int t=0;t<=n;t++){
int mi=1e9;
if(f[n]){
cout<<t<<endl;
for(int j=1;j<=t;j++)cout<<ans[j]<<" ";
cout<<end... | failed | 27_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define PII pair<int, int>
#define ai4 array<int, 4>
#define ai3 array<int, 3>
const int N = 200010, mod = 1e9 + 7, inf = 1e9;
int tr[N << 2];
vector<int> ans(N);
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void pushup(int u) { tr[u] = g... | failed | 8_2_wrong.cpp |
#include <iostream>
#include <queue>
#include <unordered_set>
#include <vector>
using namespace std;
int main() {
int n;
cin >> n;
vector<int> a(n);
for (int i = 0; i < n; ++i) {
cin >> a[i];
}
// Use a set to track all unique values
unordered_set<int> uniqueValues(a.begin(), a.end());
// Use a ... | failed | 6_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = a; i <= b; ++i)
#define FORD(i, a, b) for (int i = a; i >= b; --i)
int V();
int E();
int O();
struct node {
int tp;
int kind;
char c;
int lson, rson;
node() {
tp = -1;
kind = -1;
c = '0';
lson = -1;
rson = -1... | failed | 93_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
using pii = pair<int, int>;
#define F first
#define S second
#define rep(i, a, b) for (int i = a; i < (b); ++i)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
using ll = long long;
typedef vector<int> vi;
#define pb push_back
#define v... | failed | 95_3_wrong.cpp |
#include <cctype>
#include <cstdio>
#include <cstring>
using namespace std;
inline void yes() { printf("YES\n"); }
inline void no() { printf("NO\n"); }
inline int read() {
int x = 0;
char c;
while (!isdigit(c = getchar()))
;
do {
x = (x << 1) + (x << 3) + (c ^ 48);
} while (isdigit(c = getchar()));
... | failed | 44_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
int arr[20000009];
void solve() {
int n, p;
std::cin >> n >> p;
for (int i = 1; i <= n; i++) {
cin >> arr[i];
}
int cur = 0;
for (int i = 0; i < n; i++) {
cur += arr[i];
if ((arr[i + 1] - 1) >= (p - cur) / (i + 1)) {
co... | failed | 107_3_wrong.cpp |
#include <bits/stdc++.h>
using i64 = long long;
struct DIU {
std::function<bool(std::pair<int, int>, std::pair<int, int>)> cmp =
[](const std::pair<int, int> &a, const std::pair<int, int> &b) -> bool {
return a.second < b.first;
};
std::set<std::pair<int, int>, decltype(cmp)> s =
std::set<std::pa... | failed | 25_3_wrong.cpp |
#include <bits/stdc++.h>
using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;
constexpr int N = 1E6;
std::vector<int> primes;
i64 f[N + 1][10];
i64 ans[N + 1];
int minp[N + 1];
int fp[20][10][10];
void solve() {
i64 n;
std::cin >> n;
i64 s = std::cbrt(n)... | failed | 64_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
signed main() {
std::ios::sync_with_stdio(0);
std::cin.tie(0);
int n, m;
std::cin >> n >> m;
std::vector<int> a(n), b(m);
std::vector<std::pair<int, int>> t(n);
for (int i = 0; i < n; i++) {
std::cin >> a[i];
a[i]--;
}
for (int i = 0; i < n; i++)... | failed | 102_2_wrong.cpp |
#include <iostream>
#include <queue>
#include <string>
#include <unordered_set>
#include <vector>
using namespace std;
struct State {
string lights;
vector<int> presses;
int total;
State(string l, vector<int> p, int t) : lights(l), presses(p), total(t) {}
};
string pressButton(const string &lights,
... | failed | 116_2_wrong.cpp |
#include <bits/stdc++.h>
typedef unsigned long long ull;
typedef long long ll;
typedef long double ldb;
typedef double db;
#define file(a) freopen(#a ".in", "r", stdin), freopen(#a ".out", "w", stdout)
#define gc getchar
#define pc putchar
namespace IO {
template <class T> void read(T &s) {
s = 0;
char ch = gc();
... | failed | 94_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define all(a) begin(a), end(a)
#define len(a) int((a).size())
template <int SZ> struct hash_t {
inline static bool initialized = false;
inline static int MOD[SZ], BASE[SZ];
inline static std::vector<int> POWER[SZ];
... | failed | 53_3_wrong.cpp |
#include <bits/stdc++.h>
#define int long long
using namespace std;
void solve() {
int n;
cin >> n;
vector<array<int, 2>> a(n);
for (auto &x : a)
cin >> x[0] >> x[1];
sort(a.begin(), a.end(), [&](array<int, 2> a, array<int, 2> b) {
return a[0] - a[1] < b[0] - b[1];
});
vector<int> pre(n + 1, 0)... | failed | 99_2_wrong.cpp |
#include<bits/stdc++.h>
#define T int TT;cin>>TT;while (TT--)
#define ll long long
#define endl '\n'
#define rep(i,n) for(ll i=0;i<n;i++)
#define ref(i,n) for(ll i=n-1;i>=0;i--)
#define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0)
const ll LNF = 9223372036854775807;
using namespace std;
ll n, m, k, ans, cnt = 1;
... | failed | 89_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
struct point {
int x, y;
} t[10];
int main() {
int n = 5;
int w = 0, h = 0;
for (int i = 1; i <= n; i++) {
cin >> t[i].x >> t[i].y;
}
int ans = 0;
while (1) {
int fl = 0;
sort(t + 1, t + 1 + n, [&](point a, point b) { return a.x < b.x; });
if (... | failed | 59_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
const int mod = 998244353;
int n;
int fa[1000010];
long long f[1000010];
long long dp[5010][5010];
long long sum[5010][5010];
long long C[5010][5010];
int cnt, head[1000010];
int sz[1000010];
struct Edge {
int to, next;
} edge[1000010];
void add(int u, int v) {
edge[++c... | failed | 49_3_wrong.cpp |
#include <bits/stdc++.h>
using i64 = long long;
constexpr int p = 998244353;
void sol() {
int l, r;
std::cin >> l >> r;
if (l == r) {
std::cout << "Alice\n";
}
if (l & 1) {
if (r & 1) {
std::cout << "Alice\n";
} else {
if (l * 2 <= r) {
std::cout << "Alice\n";
} else {... | failed | 68_1_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
int T;
cin >> T;
while (T--) {
solve();
}
return 0;
}
void solve() {
int n, maxn = 0;
vector<int> a(n + 5);
cin >> n;
for (int i = 1; i <= n; i++) {
cin >> a[i];
maxn = max(maxn, a[i]);
}
for (int i = 1; i <= n... | failed | 36_1_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, j, k) for (int i = (j); i <= (k); i++)
#define per(i, j, k) for (int i = (j); i >= (k); i--)
#define pb emplace_back
#define fi first
#define se second
using vi = vector<int>;
using pi = pair<int, int>;
template <typename T> bool chmin(... | failed | 71_3_wrong.cpp |
// Problem: E. Equal Measure
// Contest: Universal Cup - The 3rd Universal Cup. Stage 29: Metropolis
// URL: https://contest.ucup.ac/contest/1913/problem/9041
// Memory Limit: 1024 MB
// Time Limit: 1000 ms
//
// Powered by CP Editor (https://cpeditor.org)
#include <bits/stdc++.h>
#define ll long long
#define pb push... | failed | 70_1_wrong.cpp |
#include <bits/stdc++.h>
#define double long double
using namespace std;
using ll = long long;
vector<int> vec, vec1, vec2;
int n1, n2, n;
const int maxn = 4e5 + 10;
double a[maxn], b[maxn];
void insert(int x) {
if (x > 0) {
vec.emplace_back(x);
}
}
bool check(double mid) {
pair<double, double> pr1 = {0, 0}, ... | failed | 112_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define pb push_back
const ld pi = 3.14159265358979323846;
const int mod = 998244353;
const ll INF = 1e18;
template <typename T> T chmax(T a, T b) { return a > b ? a : b; }
template <typename T> T chmin(T a, T b) { return a ... | failed | 62_3_wrong.cpp |
#include <algorithm>
#include <cstdio>
#include <map>
#include <random>
#include <set>
#include <vector>
using namespace std;
const int max1 = 2e5;
const int inf = 0x3f3f3f3f;
mt19937 rnd((unsigned long long)&max1);
int Mtrand(int L, int R) { return uniform_int_distribution<int>(L, R)(rnd); }
int T, n, m, k;
str... | failed | 22_3_wrong.cpp |
// Problem: D. Master of Both VI
// Contest: Universal Cup - The 3rd Universal Cup. Stage 23: Hong Kong
// URL: https://contest.ucup.ac/contest/1885/problem/9918
// Memory Limit: 1024 MB
// Time Limit: 1000 ms
//
// Powered by CP Editor (https://cpeditor.org)
#include <bits/stdc++.h>
#define ll long long
#define pb p... | failed | 37_3_wrong.cpp |
#include <cstdio>
#include <vector>
using namespace std;
// #define int long long
typedef long long ll;
#define INT 500005
ll a[INT];
void slove() {
int n;
scanf("%d", &n);
for (int i = 0; i < n; ++i) {
scanf("%lld", &a[i]);
}
if (n == 1) {
printf("%lld", a[0]);
} else if (n % 2) {
int p = n / 2... | failed | 39_1_wrong.cpp |
#include <algorithm>
#include <array>
#include <bit>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfenv>
#include <cfloat>
#include <chrono>
#include <cinttypes>
#include <climits>
#include <cmath>
#include <compare>
#include <complex>
#include <concepts>
#include <cstdarg>
#include <cstddef>
#inclu... | failed | 108_1_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
using ll = long long;
using ull = unsigned long long;
void ChatGptDeepSeek() // Date: 2025-04-13
{ // Time: 18:10:15
int n;
cin >> n;
vector<ll> a(n + 1);
vector<ll> b(n + 1), c(n + 1);
for (int i = 1; i <= n; i++)
c... | failed | 72_1_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
int main() {
ios ::sync_with_stdio(0);
cin.tie(0);
int N;
cin >> N;
map<string, vector<string>> memo;
for (int i = 0; i < N * 2; ++i) {
string s;
cin >> s;
string sub = s.substr(0, 4);
memo[sub].pb(s);
}
vector<pair... | failed | 91_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
void solve() {
int n, m, k;
cin >> n >> m >> k;
vector<int> a(n * m + 1), b(n * m + 1);
for (int i = 1; i <= n * m; ++i) {
cin >> a[i];
b[i] = (a[i] - 1) / m;
}
if (m <= k)
cout << m << "\n";
else {
vector<vector<int>> pos(n);
for (int i... | failed | 31_2_wrong.cpp |
#include <bits/stdc++.h>
#define LL long long
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define min(a, b) (((a) < (b)) ? (a) : (b))
using namespace std;
const int maxN = 2e5 + 50;
const LL inf = 1e17;
struct Edge {
int to, val;
Edge() {}
Edge(int t, int v) : to(t), val(v) {}
};
std::vector<Edge> e[maxN];
int n,... | failed | 65_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#ifdef DEBUG
#include "debug.h"
#else
#define debug(...) void()
#endif
#define all(x) (x).begin(), (x).end()
template <class T> auto ary(T *a, int l, int r) {
return vector<T>{a + l, a + 1 + r};
}
using ll = long long;
using ull = unsigned long long;
using vec = complex<i... | failed | 26_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
const int MAX_X = 2e5;
vector<vector<int>> divisors;
void precompute_divisors() {
divisors.resize(MAX_X + 1);
for (int x = 1; x <= MAX_X; x++) {
for (int m = x; m <= MAX_X; m += x) {
divisors[m].push_back(x);
}
}
}
int main() {
precompute_divisors()... | failed | 8_3_wrong.cpp |
// This is a wrong code file
#include <bits/stdc++.h>
using namespace std;
struct node {
char c;
int nxt;
};
const int MAXN = 2e6 + 100;
node nd[MAXN];
int cntnd = 0;
int getnode(char c) {
nd[cntnd].c = c;
nd[cntnd].nxt = -1;
cntnd++;
return cntnd - 1;
}
void solve() {
cntnd = 0;
int n;
cin >> n;
... | failed | 17_3_wrong.cpp |
#include <bits/stdc++.h>
#define int int64_t
using pii = std::pair<int, int>;
const int kMaxN = 4e5 + 5;
struct Node {
int t, id, op;
Node(int _t = 0, int _id = 0, int _op = 0) : t(_t), id(_id), op(_op) {}
friend bool operator<(const Node &n1, const Node &n2) {
if (n1.t != n2.t)
return n1.t < n2.t;
... | failed | 88_2_wrong.cpp |
#include <bits/stdc++.h>
#define db long double
#define int long long
#define pb push_back
#define pii pair<int, int>
#define X first
#define Y second
#define pcc pair<char, char>
#define vi vector<int>
#define vii vector<vector<int>>
#define Rep(i, a, b) for (int i = (int)(a); i <= (int)(b); ++i)
#define Drp(i, a, b) ... | failed | 36_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#ifdef LOCAL
#include <bits/debug.h>
#else
#define dbg(...)
#endif
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
cin >> n;
vector<pair<string, string>> ans;
unordered_map<string, string> mp;
for (int i =... | failed | 91_2_wrong.cpp |
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
using namespace std;
#define mk make_pair
#define MID int mid = (l + r) >> 1;
#define ll long long
#define endl '\n'
#define siz(a) int(a.size())
int a[2001000], n;
const int p = 998244353;
void solveclr() {}
void solve() {
solve... | failed | 84_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
// Check if placing 'c' at (row, col) on the board forms a triplet
bool isValid(vector<string> &board, int row, int col, char c) {
// Temporarily place the character
char original = board[row][col];
board[row][col] = c;
bool valid = true;
// Check row
if (boa... | failed | 50_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
using i64 = long long;
long long power(long long x, long long y, int p) {
long long res = 1; // Initialize result
x = x % p; // Update x if it is more than or
// equal to p
if (x == 0)
return 0; // In case x is divisible by p;
while (y > 0) {
// If y is... | failed | 61_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define eb emplace_back
typedef long long LL;
constexpr int N = 500005;
int n;
vector<int> e1[N], e2[N];
int de[N], fa[N], son[N], sz[N], top[N], bg[N], ed[N], ids;
void dfs1(int x) {
sz[x] = 1;
for (int y : e1[x])
if (y != fa[x]) {
fa[... | failed | 43_1_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 100010, mod = 998244353;
void solve() {
std::string s;
std::cin >> s;
int n = s.size();
if (s == std::string(n, '>')) {
std::cout << "No\n";
return;
}
s = " " + s;
if (s[n] == '-' || s[n - 1] == '-' || s[n - 2] =... | failed | 1_1_wrong.cpp |
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
typedef long long ll;
typedef long double ld;
using namespace std;
const int N = 2010, M = 20010, lpw ... | failed | 38_3_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
const int p = 998244353;
int po(int a, int b) {
if (b == 0)
return 1;
if (b == 1)
return a;
if (b % 2 == 0) {
int u = po(a, b / 2);
return (u * 1LL * u) % p;
} else {
int u = po(a, b - 1);
return (a * 1LL * u) % p;
}
... | failed | 19_1_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define KE ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define flt(x) cout << fixed << setprecision(x);
#define all(x) (x).begin(), (x).end()
#define bcount(t) __builtin_popcount(t)
#define legal(x, lo, hi) (lo <= x && x <= hi)
#define Mod(x,... | failed | 2_3_wrong.cpp |
#include <bits/stdc++.h>
using i64 = long long;
using u64 = unsigned long long;
using u32 = unsigned;
using u128 = unsigned __int128;
struct BlockCutTree {
int n;
std::vector<std::vector<int>> adj;
std::vector<int> dfn, low, stk;
int cnt, cur;
std::vector<std::pair<int, int>> edges;
BlockCutTree() {}
Blo... | failed | 63_2_wrong.cpp |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define lll __int128_t
#define uint uint32_t
using B = bitset<400001>;
B G[3010];
void solve() {
int n, k;
cin >> n >> k;
vector<int> a(n);
for (int i = 0; i < n; i++)
cin >> a[i];
vector<vector<int>> pz(1010);
int maxn = 1000;
for (i... | failed | 34_2_wrong.cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.