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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<int, nu... | #include <bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define ordered_set \
tree<int, nu... | replace | 30 | 31 | 30 | 31 | 0 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1000000007
using namespace std;
int main() {
int r, c, k;
cin >> r >> c >> k;
long v[r][c];
rep(i, r) rep(j, c) v[i][j] = 0;
long dp[4][r][c];
rep(i, 4) rep(j, r) rep(l, c) dp[i][j][l] = 0;
rep(i, k) {
long ri, ci, vi;... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
#define INF 1000000007
using namespace std;
int main() {
int r, c, k;
cin >> r >> c >> k;
long v[r][c];
rep(i, r) rep(j, c) v[i][j] = 0;
// long dp[4][r][c];
vector<vector<vector<long>>> dp(4, vector<vector<long>>(r, vector<long>(c)));
... | replace | 10 | 11 | 10 | 12 | 0 | |
p02586 | C++ | Runtime Error | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
#define rep(i, n) for (int i ... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <typename T> bool chmax(T &a, T b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
#define rep(i, n) for (int i ... | replace | 30 | 32 | 30 | 32 | 0 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
typedef long long ll;
typedef pair<ll, ll> prl;
typedef vector<ll> vcl;
typedef map<ll, ll> mapl;
typedef unordered_map<ll, ll> umap;
#define pb push_back
#define all(v) v.begin(), v.e... | #include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
typedef long long ll;
typedef pair<ll, ll> prl;
typedef vector<ll> vcl;
typedef map<ll, ll> mapl;
typedef unordered_map<ll, ll> umap;
#define pb push_back
#define all(v) v.begin(), v.e... | replace | 24 | 29 | 24 | 29 | -11 | |
p02586 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define zero_pad(num) setfill('0') << std::right << setw(num)
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
int main() {
int r, c, k;
cin >> r >> c >> k;
map<P, ll> mp;
rep(i, k) {
int r,... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define zero_pad(num) setfill('0') << std::right << setw(num)
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<int, int>;
int main() {
int r, c, k;
cin >> r >> c >> k;
map<P, ll> mp;
rep(i, k) {
int r,... | replace | 36 | 42 | 36 | 42 | TLE | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename key>
using ordered_set = tree<key, null_type, less<key>, rb_tree_tag,
tree_order_statistics_node_update>;
#define F first
#d... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename key>
using ordered_set = tree<key, null_type, less<key>, rb_tree_tag,
tree_order_statistics_node_update>;
#define F first
#d... | replace | 24 | 25 | 24 | 25 | 0 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
#define _USE_MATH_DEFINES
using namespace std;
#define ll long long int
#define pb push_back
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define pre(i, j, n) for (ll i = j; i >= n; i--)
#define all(x) x.begin(), x.end()
typedef pair<int, int> pii;
typedef pair<ll, ll> pl;
typedef vector<in... | #include <bits/stdc++.h>
#define _USE_MATH_DEFINES
using namespace std;
#define ll long long int
#define pb push_back
#define rep(i, j, n) for (ll i = j; i < n; i++)
#define pre(i, j, n) for (ll i = j; i >= n; i--)
#define all(x) x.begin(), x.end()
typedef pair<int, int> pii;
typedef pair<ll, ll> pl;
typedef vector<in... | delete | 27 | 28 | 27 | 27 | -11 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int N = 1e3 + 5;
ll r, c, k, x, y, z, g[N][N], dp[N][N][4];
int main() {
cin >> r >> c >> k;
while (k--) {
cin >> x >> y >> z;
g[x][y] = z;
}
for (int i = 1; i <= r; i++) {
for (int j = 1; j <= c; j++) {
for (int k = 1; ... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int N = 3e3 + 5;
ll r, c, k, x, y, z, g[N][N], dp[N][N][4];
int main() {
cin >> r >> c >> k;
while (k--) {
cin >> x >> y >> z;
g[x][y] = z;
}
for (int i = 1; i <= r; i++) {
for (int j = 1; j <= c; j++) {
for (int k = 1; ... | replace | 3 | 4 | 3 | 4 | 0 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int long long
using pii = std::pair<int, int>;
using namespace std;
const int maxn = 3005;
int R, C, k, r, c, v, dp[4][maxn][maxn], val[maxn][maxn];
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> R >> C >> k;
for (int i = 0; i < k; i++) {
cin >> r >>... | #include <bits/stdc++.h>
#define int long long
using pii = std::pair<int, int>;
using namespace std;
const int maxn = 3005;
int R, C, k, r, c, v, dp[maxn][maxn][4], val[maxn][maxn];
int32_t main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> R >> C >> k;
for (int i = 0; i < k; i++) {
cin >> r >>... | replace | 7 | 8 | 7 | 8 | -11 | |
p02586 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <vector>
using namespace std;
typedef long long ll;
const int N = 3333;
int a[N][N];
ll f[N][N][3];
int n, m, k;
int main() {
int x, y, v;
scanf("%d%d%d", &n, &m, &k);
for (int i = 1; i <= k; i++) {
scanf("%d%d%d", &x, &y, &v)... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <vector>
using namespace std;
typedef long long ll;
const int N = 3333;
int a[N][N];
ll f[N][N][4];
int n, m, k;
int main() {
int x, y, v;
scanf("%d%d%d", &n, &m, &k);
for (int i = 1; i <= k; i++) {
scanf("%d%d%d", &x, &y, &v)... | replace | 9 | 10 | 9 | 10 | -11 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <fstream>
#include <iostream>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> llP;
ll mod(ll a, ll b) {
ll ret = a % b;
if (ret < 0)
ret += b;
return ret;
}
ll modpow(ll a, ll b, ll c) {
ll res = 1;
while (b ... | #include <bits/stdc++.h>
#include <fstream>
#include <iostream>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> llP;
ll mod(ll a, ll b) {
ll ret = a % b;
if (ret < 0)
ret += b;
return ret;
}
ll modpow(ll a, ll b, ll c) {
ll res = 1;
while (b ... | replace | 41 | 49 | 41 | 43 | 0 | |
p02586 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int INF = 0x3f3f3f3f;
const ll inf = 0x3f3f3f3f3f3f3f3f;
const int N = 2e6 + 10;
const ll mod = 1e9 + 7;
int n, m, k;
ll a[3010][3010];
ll dp[3010][3010][4];
int main() {
scanf("%d%d%d", &n, &m, &k);
// for (int i = 1; i <= n; i++)for (int j =... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int INF = 0x3f3f3f3f;
const ll inf = 0x3f3f3f3f3f3f3f3f;
const int N = 2e6 + 10;
const ll mod = 1e9 + 7;
int n, m, k;
ll a[3010][3010];
ll dp[3010][3010][4];
int main() {
scanf("%d%d%d", &n, &m, &k);
// for (int i = 1; i <= n; i++)for (int j =... | delete | 16 | 19 | 16 | 16 | TLE | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <fstream>
#include <iostream>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> llP;
ll mod(ll a, ll b) {
ll ret = a % b;
if (ret < 0)
ret += b;
return ret;
}
ll modpow(ll a, ll b, ll c) {
ll res = 1;
while (b ... | #include <bits/stdc++.h>
#include <fstream>
#include <iostream>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
typedef pair<ll, ll> llP;
ll mod(ll a, ll b) {
ll ret = a % b;
if (ret < 0)
ret += b;
return ret;
}
ll modpow(ll a, ll b, ll c) {
ll res = 1;
while (b ... | replace | 42 | 43 | 42 | 44 | 0 | |
p02586 | C++ | Runtime Error | // Hail god Yato
#include <bits/stdc++.h>
using namespace std;
#define hs \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0... | // Hail god Yato
#include <bits/stdc++.h>
using namespace std;
#define hs \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0... | replace | 58 | 59 | 58 | 59 | -11 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
long long dp[6][6][4];
int main() {
int R, C, K;
cin >> R >> C >> K;
vector<vector<long long>> table(R, vector<long long>(C));
for (int i = 0; i < K; ++i) {
int r, c, v;
cin >> r >> c >> v;
r--;
c--;
table[r][c] = v;
}
// init
for (int ... | #include <bits/stdc++.h>
using namespace std;
long long dp[3005][3005][4];
int main() {
int R, C, K;
cin >> R >> C >> K;
vector<vector<long long>> table(R, vector<long long>(C));
for (int i = 0; i < K; ++i) {
int r, c, v;
cin >> r >> c >> v;
r--;
c--;
table[r][c] = v;
}
// init
for... | replace | 3 | 4 | 3 | 4 | 0 | |
p02586 | C++ | Runtime Error | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
using ll = long long;
#define pp pair<int, int>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define ld long double
#define al(a) (a).begin(), (a).end()
#define mk make_pair
#define chec... | // #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
using ll = long long;
#define pp pair<int, int>
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define ld long double
#define al(a) (a).begin(), (a).end()
#define mk make_pair
#define chec... | replace | 42 | 44 | 42 | 44 | 0 | |
p02586 | C++ | Time Limit Exceeded | #include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
using namespace __gnu_pbds;
using namespace std;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define int long long
#define INF 1e18
#define ff first
#define ss second
#define vi vector<int>
#define pii pair<int, int>
#define mii map<int, ... | #include "bits/stdc++.h"
#include "ext/pb_ds/assoc_container.hpp"
using namespace __gnu_pbds;
using namespace std;
#define pb push_back
#define all(x) (x).begin(), (x).end()
#define int long long
#define INF 1e18
#define ff first
#define ss second
#define vi vector<int>
#define pii pair<int, int>
#define mii map<int, ... | replace | 48 | 49 | 48 | 49 | TLE | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <float.h>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = 0; i <= (n); i++)
using namespace std;
typedef long long ll;
const ll INF = 1LL << 62;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
... | #include <bits/stdc++.h>
#include <float.h>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = 0; i <= (n); i++)
using namespace std;
typedef long long ll;
const ll INF = 1LL << 62;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
... | replace | 38 | 39 | 38 | 39 | -11 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef vector<ll> VLL;
typedef vector<vector<ll>> VVLL;
typedef pair<ll, ll> Pair;
template <class T> T input() {
T t;
cin >> t;
return t;
}
#define FOR(i, ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef vector<ll> VLL;
typedef vector<vector<ll>> VVLL;
typedef pair<ll, ll> Pair;
template <class T> T input() {
T t;
cin >> t;
return t;
}
#define FOR(i, ... | replace | 72 | 73 | 72 | 73 | 0 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef vector<ll> VLL;
typedef vector<vector<ll>> VVLL;
typedef pair<ll, ll> Pair;
template <class T> T input() {
T t;
cin >> t;
return t;
}
#define FOR(i, ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> VI;
typedef vector<vector<int>> VVI;
typedef vector<ll> VLL;
typedef vector<vector<ll>> VVLL;
typedef pair<ll, ll> Pair;
template <class T> T input() {
T t;
cin >> t;
return t;
}
#define FOR(i, ... | replace | 55 | 57 | 55 | 57 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02586 | C++ | Runtime Error | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <stack>
#include <st... | #include <algorithm>
#include <bits/stdc++.h>
#include <bitset>
#include <cmath>
#include <cstring>
#include <deque>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <stack>
#include <st... | insert | 82 | 82 | 82 | 83 | -11 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1000000007;
#define vec vector<int>
#define vecll vector<ll>
#define vecd vector<double>
#define vecst vector<string>
#define vecb vector<bool>
#define v2(v, n, m, init) vector<vector<int>> v(n, vector<int>(m, init))
#define vb2(v, n, m, init... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
ll MOD = 1000000007;
#define vec vector<int>
#define vecll vector<ll>
#define vecd vector<double>
#define vecst vector<string>
#define vecb vector<bool>
#define v2(v, n, m, init) vector<vector<int>> v(n, vector<int>(m, init))
#define vb2(v, n, m, init... | replace | 53 | 54 | 53 | 61 | -11 | |
p02586 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#define IOS ... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#define IOS ... | replace | 25 | 26 | 25 | 26 | -11 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
ll gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } // 最大公約数
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; } // 最小公倍数
using Graph = vector<vector<int>>;
ll inf = 3000000000000000... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
ll gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; } // 最大公約数
ll lcm(ll x, ll y) { return x / gcd(x, y) * y; } // 最小公倍数
using Graph = vector<vector<int>>;
ll inf = 3000000000000000... | replace | 21 | 22 | 21 | 22 | 0 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long
#define l long
#define mk make_pair
#define pb push_back
#define in insert
#define se second
#define fi first
#define mod 1000000007
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define fast \
ios... | #include <bits/stdc++.h>
#define ll long long
#define l long
#define mk make_pair
#define pb push_back
#define in insert
#define se second
#define fi first
#define mod 1000000007
#define watch(x) cout << (#x) << " is " << (x) << "\n"
#define fast \
ios... | replace | 15 | 17 | 15 | 17 | -11 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll g[3001][3001]{};
ll a[3001][3001][4]{};
int main() {
int R, C, K;
cin >> R >> C >> K;
int r, c, v;
for (int i = 0; i < K; i++) {
cin >> r >> c >> v;
g[r][c] = v;
}
for (int i = 0; i <= R; i++) {
for (int j = 0; j <= C; j++... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll g[3002][3002]{};
ll a[3002][3002][4]{};
int main() {
int R, C, K;
cin >> R >> C >> K;
int r, c, v;
for (int i = 0; i < K; i++) {
cin >> r >> c >> v;
g[r][c] = v;
}
for (int i = 0; i <= R; i++) {
for (int j = 0; j <= C; j++... | replace | 4 | 6 | 4 | 6 | -11 | |
p02586 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
const long long MOD = static_cast<long long>(1e9 + 7);
const long long INFINITE = static_cast<long long>(1e16);
const bool IS_DEBUG = true;
... | #include <algorithm>
#include <cmath>
#include <ctime>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
const long long MOD = static_cast<long long>(1e9 + 7);
const long long INFINITE = static_cast<long long>(1e16);
const bool IS_DEBUG = true;
... | replace | 28 | 29 | 28 | 29 | MLE | |
p02586 | C++ | Runtime Error | #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 sp(n) cout << fixed << setprecision(n)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin... | #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 sp(n) cout << fixed << setprecision(n)
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin... | replace | 32 | 34 | 32 | 33 | 0 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
#define all(x) (x).begin(), ... | #include <bits/stdc++.h>
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return 1;
}
return 0;
}
#define all(x) (x).begin(), ... | replace | 63 | 64 | 63 | 65 | 0 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
/*
* JUST KEEP GOING
*/
#define endl '\n'
#define ll long long
#define all(v) ((v).begin()), ((v).end())
#define allr(v) ((v).rbegin()), ((v).rend())
#define sz(v) ((int)((v).size()))
#define clr(v, d) memset(v, d, sizeof(v))
#define rep(i, v) for (int i = 0; i < sz(v); ... | #include <bits/stdc++.h>
using namespace std;
/*
* JUST KEEP GOING
*/
#define endl '\n'
#define ll long long
#define all(v) ((v).begin()), ((v).end())
#define allr(v) ((v).rbegin()), ((v).rend())
#define sz(v) ((int)((v).size()))
#define clr(v, d) memset(v, d, sizeof(v))
#define rep(i, v) for (int i = 0; i < sz(v); ... | insert | 50 | 50 | 50 | 51 | -11 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
// cout << fixed << setprecision(10) << flush;
int R, C, K;
cin >> R >> C >> K;
vector<vector<int>> dist(R + 1, vector<int>(C + 1, 0));
for (int i = 0; i < K; i++) {
int r, c, v;
cin >> r >> c >> v;
dist[r][c] = ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
// cout << fixed << setprecision(10) << flush;
int R, C, K;
cin >> R >> C >> K;
vector<vector<int>> dist(R + 1, vector<int>(C + 1, 0));
for (int i = 0; i < K; i++) {
int r, c, v;
cin >> r >> c >> v;
dist[r][c] = ... | replace | 16 | 25 | 16 | 26 | 0 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define EACH(i, a, b) for (int i = (a); i <= (b); i++)
#define ... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); i++)
#define RFOR(i, a, b) for (int i = (b)-1; i >= (a); i--)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define RREP(i, n) for (int i = (n)-1; i >= 0; i--)
#define EACH(i, a, b) for (int i = (a); i <= (b); i++)
#define ... | replace | 50 | 51 | 50 | 51 | -11 | |
p02586 | C++ | Runtime Error | #include <bits/stdc++.h> // ver2.7.1
#define int long long
#define endl "\n" // fflush(stdout);
#define ALL(v) (v).begin(), (v).end()
#define Vi vector<int>
#define VVi vector<Vi>
#define VVVi vector<VVi>
#define Vm vector<mint>
#define Vs vector<string>
#define Vd vector<double>
#define Vc vector<char>
#define Pii pai... | #include <bits/stdc++.h> // ver2.7.1
#define int long long
#define endl "\n" // fflush(stdout);
#define ALL(v) (v).begin(), (v).end()
#define Vi vector<int>
#define VVi vector<Vi>
#define VVVi vector<VVi>
#define Vm vector<mint>
#define Vs vector<string>
#define Vd vector<double>
#define Vc vector<char>
#define Pii pai... | replace | 243 | 244 | 243 | 245 | -11 | |
p02587 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include ... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <time.h>
#include ... | delete | 106 | 112 | 106 | 106 | TLE | |
p02587 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll dp[51][2][21];
ll ndp[51][2][21];
string s[51];
ll c[51];
bool good(int pos, int flag, int len) {
int sz = s[pos].size();
if (flag == 0) {
int l = sz - len, r = sz - 1;
for (; l <= r; l++, r--) {
if (s[pos][l] != s[pos][r])
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll dp[51][2][21];
ll ndp[51][2][21];
string s[51];
ll c[51];
bool good(int pos, int flag, int len) {
int sz = s[pos].size();
if (flag == 0) {
int l = sz - len, r = sz - 1;
for (; l <= r; l++, r--) {
if (s[pos][l] != s[pos][r])
... | replace | 51 | 52 | 51 | 52 | TLE | |
p02587 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using Vbo = vector<bool>;
using VV = vector<V>;
using VVll = vector<Vll>;
using VVld = vector<Vld>;
using VVbo = vector<Vbo>;
using VVV = vector<VV>;
using V... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using V = vector<int>;
using Vll = vector<ll>;
using Vld = vector<ld>;
using Vbo = vector<bool>;
using VV = vector<V>;
using VVll = vector<Vll>;
using VVld = vector<Vld>;
using VVbo = vector<Vbo>;
using VVV = vector<VV>;
using V... | replace | 122 | 123 | 122 | 123 | 0 | |
p02587 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int h(int tp, int id, int len) { return (tp + (id << 1) + (len << 7)); }
string rev(string s) {
reverse(s.begin(), s.end());
return s;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
const int N = (1 << 12);
const ll inf = (1ll << 6... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int h(int tp, int id, int len) { return (tp + (id << 1) + (len << 7)); }
string rev(string s) {
reverse(s.begin(), s.end());
return s;
}
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
const int N = (1 << 12);
const ll inf = (1ll << 6... | replace | 68 | 70 | 68 | 70 | 0 | |
p02587 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define chmax(a, b) a = max(a, b);
#define chmin(a, b) a = min(a, b);
using namespace std;
using ll = long long;
using P = pair<int, int>;
using VI = vector<long long>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
using VVVVI = vector<VVVI>;
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define chmax(a, b) a = max(a, b);
#define chmin(a, b) a = min(a, b);
using namespace std;
using ll = long long;
using P = pair<int, int>;
using VI = vector<long long>;
using VVI = vector<VI>;
using VVVI = vector<VVI>;
using VVVVI = vector<VVVI>;
... | replace | 31 | 32 | 31 | 32 | 0 | |
p02587 | C++ | Time Limit Exceeded | // This Code was made by Chinese_zjc_.
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
// #include<... | // This Code was made by Chinese_zjc_.
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <vector>
// #include<... | replace | 49 | 50 | 49 | 51 | TLE | |
p02587 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int maxn = 105;
typedef long long ll;
int n, m, a[maxn], b[maxn], len;
int c[maxn];
string s[maxn];
int tt;
vector<pair<int, int>> adj[maxn];
inline bool chk1(string t) {
if (t.s... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
const int maxn = 105;
typedef long long ll;
int n, m, a[maxn], b[maxn], len;
int c[maxn];
string s[maxn];
int tt;
vector<pair<int, int>> adj[maxn * 25];
inline bool chk1(string t) {
if... | replace | 13 | 14 | 13 | 14 | 0 | |
p02588 | C++ | Time Limit Exceeded | #define _USE_MATH_DEFINES
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#pragma GCC target("avx")
// #include <bits/stdc++.h>
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <comp... | #define _USE_MATH_DEFINES
#define _SILENCE_CXX17_C_HEADER_DEPRECATION_WARNING
#define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#pragma GCC target("avx")
// #include <bits/stdc++.h>
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <comp... | replace | 182 | 184 | 182 | 183 | TLE | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<vector<int>> cnt(20, vector<int>(20));
vector<pair<int, int>> a;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
long long x = 0;
bool found = false;
for (int... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin >> n;
vector<vector<int>> cnt(20, vector<int>(20));
vector<pair<int, int>> a;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
long long x = 0;
bool found = false;
for (int... | replace | 46 | 47 | 46 | 47 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL << 60;
const long long int Mod = 1000000007;
using ll = long long int;
using ci = const int;
using vi = vector<int>;
using Vi = vector<long long int>;
using P = pair<int, int>;
using PLL = pair<ll, ll... | #include <bits/stdc++.h>
using namespace std;
///////////////////////////////////////////
const long long int INF = 1LL << 60;
const long long int Mod = 1000000007;
using ll = long long int;
using ci = const int;
using vi = vector<int>;
using Vi = vector<long long int>;
using P = pair<int, int>;
using PLL = pair<ll, ll... | insert | 96 | 96 | 96 | 100 | 0 | |
p02588 | C++ | Runtime Error | #line 2 "/Users/kaage/Desktop/ProgrammingWorkspace/library/other/template.hpp"
#define _CRT_SECURE_NO_WARNINGS
#pragma target("avx2")
#pragma optimize("O3")
#pragma optimize("unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>... | #line 2 "/Users/kaage/Desktop/ProgrammingWorkspace/library/other/template.hpp"
#define _CRT_SECURE_NO_WARNINGS
#pragma target("avx2")
#pragma optimize("O3")
#pragma optimize("unroll-loops")
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>... | replace | 115 | 117 | 115 | 117 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
#define llong long long
#define mkpr make_pair
#define x first
#define y second
#define iter iterator
#define riter reverse_iterator
#define y1 Lorem_ipsum_
#define tm dolor_sit_amet_
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch ... | #include <bits/stdc++.h>
#define llong long long
#define mkpr make_pair
#define x first
#define y second
#define iter iterator
#define riter reverse_iterator
#define y1 Lorem_ipsum_
#define tm dolor_sit_amet_
using namespace std;
inline int read() {
int x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch ... | replace | 27 | 28 | 27 | 28 | 0 | |
p02588 | C++ | Runtime Error | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// マクロ&定数&関数 ===========... | #include <algorithm>
#include <deque>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
#include <vector>
using namespace std;
// マクロ&定数&関数 ===========... | replace | 793 | 795 | 793 | 795 | 0 | |
p02588 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <stack>
#include <vector>
using name... | #include <algorithm>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstring>
#include <fstream>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <regex>
#include <set>
#include <stack>
#include <vector>
using name... | replace | 107 | 108 | 107 | 108 | 0 | |
p02588 | C++ | Runtime Error | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "ctime"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "str... | insert | 63 | 63 | 63 | 65 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> iint;
typedef pair<ll, ll> llll;
#define ALL(x) (x).begin(), (x).end()
const ll zero = 0;
const ll INF = 3000000000000000000; // 10^18
const int inINF = 1000000000; // 10^9
const ll MOD = 1000000007; // 10^9+7
cons... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> iint;
typedef pair<ll, ll> llll;
#define ALL(x) (x).begin(), (x).end()
const ll zero = 0;
const ll INF = 3000000000000000000; // 10^18
const int inINF = 1000000000; // 10^9
const ll MOD = 1000000007; // 10^9+7
cons... | replace | 75 | 76 | 75 | 80 | 0 | |
p02588 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < (N); i++)
int main() {
int n;
scanf("%d", &n);
map<pair<int, int>, int> cnt;
rep(i, n) {
double x;
cin >> x;
long long xl = llround(x * 1e9);
int two = 0, five = 0;
while (xl % 2 == 0) {
two++;
x... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, N) for (int i = 0; i < (N); i++)
int main() {
int n;
scanf("%d", &n);
map<pair<int, int>, int> cnt;
rep(i, n) {
double x;
cin >> x;
long long xl = llround(x * 1e9);
int two = 0, five = 0;
while (xl % 2 == 0) {
two++;
x... | replace | 17 | 18 | 17 | 18 | TLE | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
#if MYDEBUG
#include "lib/cp_debug.hpp"
#else
#define DBG(...) ;
#endif
#if __cplusplus <= 201402L
template <typename T> T gcd(T a, T b) {
return ((a % b == 0) ? b : gcd(b, a % b));
}
template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
#endif
using LL = long long;
constexpr L... | #include <bits/stdc++.h>
#if MYDEBUG
#include "lib/cp_debug.hpp"
#else
#define DBG(...) ;
#endif
#if __cplusplus <= 201402L
template <typename T> T gcd(T a, T b) {
return ((a % b == 0) ? b : gcd(b, a % b));
}
template <typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }
#endif
using LL = long long;
constexpr L... | replace | 81 | 82 | 81 | 82 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define invrepr(i, a, b) for (int i = b - 1; i >= a; i--)
#define invrep(i, n) invrepr(i, 0, n)
#define repitr(itr, a) for (auto itr = a.begin(); itr != a.e... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define invrepr(i, a, b) for (int i = b - 1; i >= a; i--)
#define invrep(i, n) invrepr(i, 0, n)
#define repitr(itr, a) for (auto itr = a.begin(); itr != a.e... | replace | 60 | 61 | 60 | 63 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#pragma region all
///////////// マクロ, エイリアス /////////////////
#pragma region macros_and_aliases
#define rep(i, n) for (long long i = 0; i < (n); i++)
#define rrep(i, n) for (long long i = (n)-1; i > -1; i--)
#define Rep(i, m, n) for (long long i = (m); i < (n); i++)
#define... | #include <bits/stdc++.h>
using namespace std;
#pragma region all
///////////// マクロ, エイリアス /////////////////
#pragma region macros_and_aliases
#define rep(i, n) for (long long i = 0; i < (n); i++)
#define rrep(i, n) for (long long i = (n)-1; i > -1; i--)
#define Rep(i, m, n) for (long long i = (m); i < (n); i++)
#define... | replace | 803 | 804 | 803 | 804 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
mt19937 mt(736);
void solve(istream &cin = std::cin, ostream &cout = std::cout) {
int n;
cin >> n;
vector<ll> arr(n);
for (auto &it : arr) {
string str;
cin >> str;
if (str.find('.') == strin... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
mt19937 mt(736);
void solve(istream &cin = std::cin, ostream &cout = std::cout) {
int n;
cin >> n;
vector<ll> arr(n);
for (auto &it : arr) {
string str;
cin >> str;
if (str.find('.') == strin... | replace | 52 | 53 | 52 | 53 | 0 | |
p02588 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vvvi = vector<vector<vector<int>>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
using vs = vector<string>;
using... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vvvi = vector<vector<vector<int>>>;
using vl = vector<ll>;
using vvl = vector<vector<ll>>;
using vvvl = vector<vector<vector<ll>>>;
using vs = vector<string>;
using... | replace | 92 | 94 | 92 | 105 | TLE | |
p02588 | C++ | Runtime Error | // g++ -std=c++14 test.cpp -o test.out
// 問題URL
// https://atcoder.jp/contests/agc047/tasks/agc047_a
// 参考:https://maspypy.com/atcoder-%E5%8F%82%E5%8A%A0%E6%84%9F%E6%83%B3-2020-08-09agc047
// https://www.hamayanhamayan.com/entry/2020/08/10/054247
// 小数をdoubleで受け取った時点で誤差が発生する、ということが考えられる。
// →string型で受け取ると良い
//... | // g++ -std=c++14 test.cpp -o test.out
// 問題URL
// https://atcoder.jp/contests/agc047/tasks/agc047_a
// 参考:https://maspypy.com/atcoder-%E5%8F%82%E5%8A%A0%E6%84%9F%E6%83%B3-2020-08-09agc047
// https://www.hamayanhamayan.com/entry/2020/08/10/054247
// 小数をdoubleで受け取った時点で誤差が発生する、ということが考えられる。
// →string型で受け取ると良い
//... | replace | 58 | 60 | 58 | 60 | 0 | |
p02588 | C++ | Runtime Error | // warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬████╬╬╬╬╬╬███
// ... | // warm heart, wagging tail,and a smile just for you!
// ███████████
// ███╬╬╬╬╬╬╬╬╬╬███
// ███╬╬╬╬╬████╬╬╬╬╬╬███
// ... | insert | 98 | 98 | 98 | 100 | 0 | |
p02588 | C++ | Runtime Error | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#inclu... | #include <algorithm>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#inclu... | replace | 43 | 44 | 43 | 44 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef vector<double> Vec;
typedef vector<Vec> Mat;
typedef pair<ll, ll> P;
typedef pair<double, ll> Pd;
typedef pair<double, double> PD;
typedef priority_queue<P, vector<P>, greater... | #include <bits/stdc++.h>
#include <stdlib.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef vector<double> Vec;
typedef vector<Vec> Mat;
typedef pair<ll, ll> P;
typedef pair<double, ll> Pd;
typedef pair<double, double> PD;
typedef priority_queue<P, vector<P>, greater... | replace | 92 | 93 | 92 | 93 | 0 | |
p02588 | 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 | 31 | 32 | 31 | 32 | 0 | |
p02588 | C++ | Runtime Error | #include <iostream>
#define val 1000000000
#define for2(x) for (x = 0; x <= 9; x++)
using namespace std;
int n, i, b1, b2, b3, b4, c1, c2, c3, c4;
long long x, y, r, sol;
int a[12][12][12][12];
double curr;
long long cmmdc(long long a, long long b) {
long long r;
while (b != 0) {
r = a % b;
a = b;
b = r... | #include <iostream>
#define val 1000000000
#define for2(x) for (x = 0; x <= 9; x++)
using namespace std;
int n, i, b1, b2, b3, b4, c1, c2, c3, c4;
long long x, y, r, sol;
int a[12][12][12][12];
double curr;
long long cmmdc(long long a, long long b) {
long long r;
while (b != 0) {
r = a % b;
a = b;
b = r... | insert | 47 | 47 | 47 | 49 | 0 | |
p02588 | C++ | Runtime Error | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <utility>
#include <vector>
#define MAXN 200005
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
inline pi read() {
ll x = 0;
pi ans;
int f = 0;
char c = getchar();
while (!isdigit(c) ... | #include <algorithm>
#include <cctype>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <utility>
#include <vector>
#define MAXN 200005
using namespace std;
typedef long long ll;
typedef pair<int, int> pi;
inline pi read() {
ll x = 0;
pi ans;
int f = 0;
char c = getchar();
while (!isdigit(c) ... | replace | 36 | 37 | 36 | 37 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
pair<int, int> f(string &s) {
int d = 0;
ll keep = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == '.') {
d = s.size() - i - 1;
} else {
keep = keep * 10 + (s[i] - '0');
}
}
int two = 0, five = 0;
while (keep ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
pair<int, int> f(string &s) {
int d = 0;
ll keep = 0;
for (int i = 0; i < s.size(); i++) {
if (s[i] == '.') {
d = s.size() - i - 1;
} else {
keep = keep * 10 + (s[i] - '0');
}
}
int two = 0, five = 0;
while (keep ... | replace | 26 | 27 | 26 | 34 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vi = vector<ll>;
using vv = vector<vi>;
// const int MOD = 1000000007;
const int MOD = 998244353;
const int INF = 1001001001;
const ll LINF = 1001001001001;
int main() {
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;
using vi = vector<ll>;
using vv = vector<vi>;
// const int MOD = 1000000007;
const int MOD = 998244353;
const int INF = 1001001001;
const ll LINF = 1001001001001;
int main() {
... | replace | 52 | 53 | 52 | 53 | 0 | |
p02588 | C++ | Runtime Error | // https://atcoder.jp/contests/agc047/tasks/agc047_a
#include "algorithm"
#include "bitset"
#include "cmath"
#include "functional"
#include "iomanip"
#include "iostream"
#include "map"
#include "numeric"
#include "queue"
#include "set"
#include "string"
#include "vector"
#define rep(i, to) for (ll i = 0; i < (to); ++i... | // https://atcoder.jp/contests/agc047/tasks/agc047_a
#include "algorithm"
#include "bitset"
#include "cmath"
#include "functional"
#include "iomanip"
#include "iostream"
#include "map"
#include "numeric"
#include "queue"
#include "set"
#include "string"
#include "vector"
#define rep(i, to) for (ll i = 0; i < (to); ++i... | insert | 109 | 109 | 109 | 112 | 0 | |
p02588 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define m_p make_pair
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define fi first
#define se second
typedef long long ll;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnf(2106);
const int N = 102;
int a[N][N];
int... | #include <bits/stdc++.h>
using namespace std;
#define m_p make_pair
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define fi first
#define se second
typedef long long ll;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rnf(2106);
const int N = 102;
int a[N][N];
voi... | replace | 14 | 15 | 14 | 15 | TLE | |
p02588 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define int long long
#define ll long long
using ull = unsigned long long;
using namespace std;
#define dump(x) \
if (dbg) { \
cerr << #x << " = " << (x) << end... | #include <bits/stdc++.h>
#define int long long
#define ll long long
using ull = unsigned long long;
using namespace std;
#define dump(x) \
if (dbg) { \
cerr << #x << " = " << (x) << end... | delete | 157 | 159 | 157 | 157 | TLE | |
p02588 | C++ | Time Limit Exceeded | // gzhffIThh
#include <bits/stdc++.h>
#define ui unsigned int
#define ll long long
#define ul unsigned ll
#define ld long double
#define pi pair<int, int>
#define fi first
#define se second
#define mp make_pair
#define vi vector<int>
#define pb push_back
#define pq priority_queue
#define sz(x) ((int)x.size())
#defi... | // gzhffIThh
#include <bits/stdc++.h>
#define ui unsigned int
#define ll long long
#define ul unsigned ll
#define ld long double
#define pi pair<int, int>
#define fi first
#define se second
#define mp make_pair
#define vi vector<int>
#define pb push_back
#define pq priority_queue
#define sz(x) ((int)x.size())
#defi... | replace | 203 | 204 | 203 | 204 | TLE | |
p02588 | C++ | Runtime Error | #define MOD 1000000007
#if 1
//------------------------------------------------------------
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
template <class T> struct Entry {
static void Run() { T().Run(); }
};
struct MyMain;
#if defined(TEST)
#include "test.hpp"
#else
signed main() {
cin.... | #define MOD 1000000007
#if 1
//------------------------------------------------------------
#define _USE_MATH_DEFINES
#include <bits/stdc++.h>
using namespace std;
template <class T> struct Entry {
static void Run() { T().Run(); }
};
struct MyMain;
#if defined(TEST)
#include "test.hpp"
#else
signed main() {
cin.... | replace | 711 | 712 | 711 | 712 | 0 | |
p02588 | C++ | Runtime Error | /*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | /*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | insert | 387 | 387 | 387 | 389 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#define pb push_back
#define pi pair<int, int>
#define l first
#define r second
#define all(x) x.begin(), x.end()
#define fori(a, b, step) for (int i = a; i < b; i += step)
#define forj(a, b, step) for (int j = a; j < b; j += step)
#define int long long
const int ... | #include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#define pb push_back
#define pi pair<int, int>
#define l first
#define r second
#define all(x) x.begin(), x.end()
#define fori(a, b, step) for (int i = a; i < b; i += step)
#define forj(a, b, step) for (int j = a; j < b; j += step)
#define int long long
const int ... | replace | 11 | 12 | 11 | 12 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cerr << #x << ": " << x << endl;
#define DEBUG_VEC(v) \
cerr << #v << ":"; \
for (int i = 0; i < v.size(); i++) ... | #include <bits/stdc++.h>
using namespace std;
#define DEBUG(x) cerr << #x << ": " << x << endl;
#define DEBUG_VEC(v) \
cerr << #v << ":"; \
for (int i = 0; i < v.size(); i++) ... | replace | 268 | 269 | 268 | 269 | 0 | |
p02588 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000000 + 7)
using namespace std;
typedef long long ll;
const int MAX = 3000000;
long... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define MOD (1000000000 + 7)
using namespace std;
typedef long long ll;
const int MAX = 3000000;
long... | replace | 231 | 235 | 231 | 251 | TLE | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define ll long long
#define pp pair<ll, ll>
#define ld long double
#define all(a) (a).begin(), (a).end()
#define mk make_pair
int inf = 1000001000;
ll INF = 1e18;
ll mod = 1000000007;
ll MOD = INF;
int Pow(int b, int e)... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define ll long long
#define pp pair<ll, ll>
#define ld long double
#define all(a) (a).begin(), (a).end()
#define mk make_pair
int inf = 1000001000;
ll INF = 1e18;
ll mod = 1000000007;
ll MOD = INF;
int Pow(int b, int e)... | replace | 64 | 65 | 64 | 65 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int N, cnt[100][100];
char sir[100];
const int maxE = 9;
long long ans = 0;
int getExp(long long &N, int p) {
int cnt = 0;
while (N % p == 0)
N /= p, cnt++;
return cnt;
}
void add(int x, int y) {
// printf ("%d %d\n", x, y);
for (int i = 2 * maxE - x; i... | #include <bits/stdc++.h>
using namespace std;
int N, cnt[100][100];
char sir[100];
const int maxE = 9;
long long ans = 0;
int getExp(long long &N, int p) {
int cnt = 0;
while (N % p == 0)
N /= p, cnt++;
return cnt;
}
void add(int x, int y) {
x = min(x, 2 * maxE);
y = min(y, 2 * maxE);
// printf (... | insert | 17 | 17 | 17 | 19 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
#define endl "\n"
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) {... | #include <bits/stdc++.h>
#define endl "\n"
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) {... | insert | 70 | 70 | 70 | 72 | 0 | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
#define M_PI 3.14159265358979323846 // pi
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;
typedef tuple<ll, ll, ll, ll> t4;
typedef tuple<ll, ll, ll, ll, ll> t5;
#define rep(a, n) for (ll ... | #include <bits/stdc++.h>
#define M_PI 3.14159265358979323846 // pi
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<ll> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;
typedef tuple<ll, ll, ll, ll> t4;
typedef tuple<ll, ll, ll, ll, ll> t5;
#define rep(a, n) for (ll ... | replace | 40 | 42 | 40 | 42 | 0 | |
p02588 | C++ | Runtime Error | #include "bits/stdc++.h"
#include <random>
using namespace std;
using ll = long long;
using dd = double;
using pll = pair<ll, ll>;
using tll = tuple<ll, ll, ll>;
using vll = vector<ll>;
using vdd = vector<dd>;
using vpll = vector<pll>;
using vtll = vector<tll>;
using vvll = vector<vll>;
using vvdd = vector<vdd>;
using ... | #include "bits/stdc++.h"
#include <random>
using namespace std;
using ll = long long;
using dd = double;
using pll = pair<ll, ll>;
using tll = tuple<ll, ll, ll>;
using vll = vector<ll>;
using vdd = vector<dd>;
using vpll = vector<pll>;
using vtll = vector<tll>;
using vvll = vector<vll>;
using vvdd = vector<vdd>;
using ... | insert | 467 | 467 | 467 | 471 | 0 | |
p02588 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define MAX2 50
#define MAX5 30
int g[10][MAX2][MAX5];
char s[20];
int32_t main() {
memset(g, 0, sizeof g);
int pot10[10];
pot10[0] = 1;
for (int i = 1; i <= 9; ++i)
pot10[i] = pot10[i - 1] * 10;
int n;
scanf("%lld", &n);
int ans ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define MAX2 47
#define MAX5 23
int g[10][MAX2][MAX5];
char s[20];
int32_t main() {
memset(g, 0, sizeof g);
int pot10[10];
pot10[0] = 1;
for (int i = 1; i <= 9; ++i)
pot10[i] = pot10[i - 1] * 10;
int n;
scanf("%lld", &n);
int ans ... | replace | 4 | 6 | 4 | 6 | TLE | |
p02588 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#include <functional>
#include <iostream>
#define ll long long int
#define mk make_pair
#define pb push_back
#define INF (ll)1e18
#define pii pair<ll, ll>
#define mod 1000000007 // 998244353
#define f(i, a, b) for (ll i = a; i < b; i++)
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_... | #include <bits/stdc++.h>
#include <functional>
#include <iostream>
#define ll long long int
#define mk make_pair
#define pb push_back
#define INF (ll)1e18
#define pii pair<ll, ll>
#define mod 1000000007 // 998244353
#define f(i, a, b) for (ll i = a; i < b; i++)
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_... | replace | 103 | 104 | 103 | 104 | TLE | |
p02588 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
// #define rep(i, n) for (ll i = 0; i < (n); ++... | #include <bits/stdc++.h>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
// #define rep(i, n) for (ll i = 0; i < (n); ++... | replace | 137 | 138 | 137 | 140 | 0 | |
p02589 | C++ | Runtime Error | #ifdef DBG1
#define _GLIBCXX_DEBUG
#endif
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#ifdef DBG1
#define dbg(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#else
#define dbg... | #ifdef DBG1
#define _GLIBCXX_DEBUG
#endif
#include <algorithm>
#include <cassert>
#include <cstdio>
#include <cstring>
#include <functional>
#include <iostream>
#include <map>
#include <set>
#include <string>
#include <vector>
#ifdef DBG1
#define dbg(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
#else
#define dbg... | replace | 86 | 87 | 86 | 87 | 0 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_poizcy.hpp>
typedef long long ll;
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define clr(a, h) memset(a, (h), sizeof(a))
#define mem(a, h) memset(a, (h), sizeof(a))
#define fi first
#def... | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_poizcy.hpp>
typedef long long ll;
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(), (a).end()
#define clr(a, h) memset(a, (h), sizeof(a))
#define mem(a, h) memset(a, (h), sizeof(a))
#define fi first
#def... | replace | 41 | 42 | 41 | 42 | 0 | |
p02589 | C++ | Runtime Error | #include <cstdio>
int n;
int trieroot;
int trien;
int triep[1001000];
int trier[1001000][26];
int triec[1001000];
int triecnt[1001000];
int triercnt[1001000][26];
char s[1001000];
int pd[100100];
int newtn(int prt, int c) {
triep[trien] = prt;
triec[trien] = c;
trien++;
return trien - 1;
}
int main() {
scanf(... | #include <cstdio>
int n;
int trieroot;
int trien;
int triep[1001000];
int trier[1001000][26];
int triec[1001000];
int triecnt[1001000];
int triercnt[1001000][26];
char s[1001000];
int pd[200100];
int newtn(int prt, int c) {
triep[trien] = prt;
triec[trien] = c;
trien++;
return trien - 1;
}
int main() {
scanf(... | replace | 10 | 11 | 10 | 11 | -11 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
#define sz(x) ((int)(x).size())
using namespace std;
typedef long long ll;
const int n = 1e6 + 5;
int N, M, K;
struct node {
int eos = 0, chi = 0;
int cc[26];
int c[26];
};
int root, NC = 0;
node nodes[n];
inline int getIndex(char c) { return c - 'a'; }
int createNode() {
int r = N... | #include <bits/stdc++.h>
#define sz(x) ((int)(x).size())
using namespace std;
typedef long long ll;
const int n = 1e6 + 5;
int N, M, K;
struct node {
int eos = 0, chi = 0;
int cc[26];
int c[26];
};
int root, NC = 0;
node nodes[n];
inline int getIndex(char c) { return c - 'a'; }
int createNode() {
int r = N... | replace | 56 | 57 | 56 | 57 | -11 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define MAXN 200010
#define LEN 1000010
int n, tot = 1;
int son[LEN][26], cnt[LEN], alpha[MAXN][26];
unordered_map<int, int> val[LEN];
char tmp[MAXN];
string s[MAXN];
long long ans, mul;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i) {
scanf("%s", tmp... | #include <bits/stdc++.h>
using namespace std;
#define MAXN 200010
#define LEN 1000010
int n, tot = 1;
int son[LEN][26], cnt[LEN], alpha[MAXN][26];
unordered_map<int, int> val[LEN];
char tmp[LEN];
string s[MAXN];
long long ans, mul;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i) {
scanf("%s", tmp ... | replace | 9 | 10 | 9 | 10 | -11 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define rep1(i, n) FOR(i, 1, n + 1)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define whole(x) (x).begin(), (x).end()
#define rwhole(x) (x).rbegin(), (x... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define rep1(i, n) FOR(i, 1, n + 1)
#define rrep(i, n) for (int i = ((int)(n)-1); i >= 0; --i)
#define whole(x) (x).begin(), (x).end()
#define rwhole(x) (x).rbegin(), (x... | replace | 22 | 23 | 22 | 23 | 0 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define LL long long
const int N = 2e5 + 5;
int n;
vector<string> v;
vector<int> c[N][26];
LL ans;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
reverse(s.begin(), s.end());
v.pb(s);
}
sort(v.begin(),... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define LL long long
const int N = 2e5 + 5;
int n;
vector<string> v;
vector<int> c[N][26];
LL ans;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
string s;
cin >> s;
reverse(s.begin(), s.end());
v.pb(s);
}
sort(v.begin(),... | replace | 46 | 47 | 46 | 47 | -11 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
#define MAXN 200005
#define INF 1000000000
#define MOD 1000000007
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
string str[MAXN];
int tot = 1, n;
int trie[MAXN][26], cnt[MAXN][26];
bool ed[MAXN];
bool has[26];
void insert(string s, int rt)... | #include <bits/stdc++.h>
#define MAXN 2000005
#define INF 1000000000
#define MOD 1000000007
#define F first
#define S second
using namespace std;
typedef long long ll;
typedef pair<int, int> P;
string str[MAXN];
int tot = 1, n;
int trie[MAXN][26], cnt[MAXN][26];
bool ed[MAXN];
bool has[26];
void insert(string s, int rt... | replace | 1 | 2 | 1 | 2 | 0 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
const int N = 2e5 + 5;
int trie[N][60];
string s[N];
int sz;
int zero = 30;
void add(int idx) {
int root = 1;
int z = s[idx].size();
int cnt[33] = {};
for (int i = 0; i < z; i++) {
cnt[s[idx][i] ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define pb push_back
const int N = 2e6 + 5;
int trie[N][60];
string s[N];
int sz;
int zero = 30;
void add(int idx) {
int root = 1;
int z = s[idx].size();
int cnt[33] = {};
for (int i = 0; i < z; i++) {
cnt[s[idx][i] ... | replace | 5 | 6 | 5 | 6 | 0 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int ll
#define ll long long
#define I32_MAX 2147483647
#define I64_MAX 9223372036854775807LL
#define I64_MAX2 1223372036854775807LL
#define INF I64_MAX2
#define MOD 1000000007
// #define MOD 998244353
#define MEM_SIZE 101010
#define DEBUG_OUT true
#define ALL(x) (x)... | #include <bits/stdc++.h>
using namespace std;
#define int ll
#define ll long long
#define I32_MAX 2147483647
#define I64_MAX 9223372036854775807LL
#define I64_MAX2 1223372036854775807LL
#define INF I64_MAX2
#define MOD 1000000007
// #define MOD 998244353
#define MEM_SIZE 101010
#define DEBUG_OUT true
#define ALL(x) (x)... | replace | 135 | 136 | 135 | 136 | -6 | terminate called after throwing an instance of 'std::logic_error'
what(): basic_string: construction from null is not valid
|
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define IN freopen("alchemy_input.txt", "r", stdin)
#define OUT freopen("output.txt", "w", stdout)
#define pb push_back
#define mp make_pair
#define FOR(i, a, b) for (i = a; i <= b; i++)
#define DBG printf("Hi\n")
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define IN freopen("alchemy_input.txt", "r", stdin)
#define OUT freopen("output.txt", "w", stdout)
#define pb push_back
#define mp make_pair
#define FOR(i, a, b) for (i = a; i <= b; i++)
#define DBG printf("Hi\n")
... | replace | 38 | 39 | 38 | 39 | 0 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const int INF = 1e9 + 7;
const ll LINF = 9223372036854775807;
const ll MOD = 1e9 + 7;
const ld PI = acos(-1);
const ld EPS = 1e-10; // 微調整用(EPSより小さいと0と判定など)
int ii() {
int ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pll = pair<ll, ll>;
using pld = pair<ld, ld>;
const int INF = 1e9 + 7;
const ll LINF = 9223372036854775807;
const ll MOD = 1e9 + 7;
const ld PI = acos(-1);
const ld EPS = 1e-10; // 微調整用(EPSより小さいと0と判定など)
int ii() {
int ... | replace | 241 | 249 | 241 | 245 | 0 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int ALPHABET_SIZE = 26;
int glob_ans = 0;
int trie[1000001][26];
std::vector<int> v[200000];
int term[200000] = {0};
int nxt = 1;
void insert(string key, int k) {
int i, lvl = 0;
for (i = 0; i < key.size(); i++) {
v[k].push_back(lvl);
if (trie[lvl][key... | #include <bits/stdc++.h>
using namespace std;
const int ALPHABET_SIZE = 26;
int glob_ans = 0;
int trie[1000001][26];
std::vector<int> v[200000];
int term[1000001] = {0};
int nxt = 1;
void insert(string key, int k) {
int i, lvl = 0;
for (i = 0; i < key.size(); i++) {
v[k].push_back(lvl);
if (trie[lvl][ke... | replace | 8 | 9 | 8 | 9 | -11 | |
p02589 | C++ | Runtime Error | // #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx2")
// 293206GT
#include <algorithm>
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <... | // #pragma GCC optimize("O3")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx2")
// 293206GT
#include <algorithm>
#include <algorithm>
#include <bitset>
#include <chrono>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <... | replace | 121 | 122 | 121 | 122 | -6 | terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
|
p02589 | C++ | Time Limit Exceeded | #pragma region header
// #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define all(a) begin(a), end(a)
#define rall(a) rbegin(a), rend(a)
#define mp make_pair
#define mt make_tuple
#define rep1(i, n) for (decltype(+n) i = 0; i < (n); i++)
#define rrep1(i, n) for (auto i = n - 1; i > static_cast<decltype(i)>(-1... | #pragma region header
// #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#define all(a) begin(a), end(a)
#define rall(a) rbegin(a), rend(a)
#define mp make_pair
#define mt make_tuple
#define rep1(i, n) for (decltype(+n) i = 0; i < (n); i++)
#define rrep1(i, n) for (auto i = n - 1; i > static_cast<decltype(i)>(-1... | replace | 200 | 202 | 200 | 203 | TLE | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
/*
#if __has_include(<boost/multiprecision/cpp_int.hpp>)
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using bll = boost::multiprecision::cpp_int;
using bdouble =
boost::multiprecision::number<b... | #include <bits/stdc++.h>
using namespace std;
/*
#if __has_include(<boost/multiprecision/cpp_int.hpp>)
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using bll = boost::multiprecision::cpp_int;
using bdouble =
boost::multiprecision::number<b... | replace | 368 | 369 | 368 | 369 | -11 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
/*
#if __has_include(<boost/multiprecision/cpp_int.hpp>)
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using bll = boost::multiprecision::cpp_int;
using bdouble =
boost::multiprecision::number<b... | #include <bits/stdc++.h>
using namespace std;
/*
#if __has_include(<boost/multiprecision/cpp_int.hpp>)
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using bll = boost::multiprecision::cpp_int;
using bdouble =
boost::multiprecision::number<b... | replace | 358 | 359 | 358 | 359 | -11 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
/*
#if __has_include(<boost/multiprecision/cpp_int.hpp>)
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using bll = boost::multiprecision::cpp_int;
using bdouble =
boost::multiprecision::number<b... | #include <bits/stdc++.h>
using namespace std;
/*
#if __has_include(<boost/multiprecision/cpp_int.hpp>)
#include <boost/multiprecision/cpp_int.hpp>
#include <boost/multiprecision/cpp_dec_float.hpp>
using bll = boost::multiprecision::cpp_int;
using bdouble =
boost::multiprecision::number<b... | replace | 236 | 237 | 236 | 237 | 0 | |
p02589 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __p... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __p... | insert | 156 | 156 | 156 | 157 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.