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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, x, n) for (int i = x; i <= n; i++)
#define rep3(i, x, n) for (int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb push_back
#define eb emplace_back
#define all(x) x.begi... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, x, n) for (int i = x; i <= n; i++)
#define rep3(i, x, n) for (int i = x; i >= n; i--)
#define elif else if
#define sp(x) fixed << setprecision(x)
#define pb push_back
#define eb emplace_back
#define all(x) x.begi... | replace | 29 | 30 | 29 | 30 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
int mod = 1000000007;
vector<pair<int, int>> g[100000];
pair<int, int> tddfs(int v, int par = -1) {
pair<int, int> ret = {0, v};
for (auto &x : g[v]) {
int w, cost;
tie(w, cost) = x;
if ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
using namespace std;
int mod = 1000000007;
vector<pair<int, int>> g[200000];
pair<int, int> tddfs(int v, int par = -1) {
pair<int, int> ret = {0, v};
for (auto &x : g[v]) {
int w, cost;
tie(w, cost) = x;
if ... | replace | 8 | 9 | 8 | 9 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define sqr(x) ((x) * (x))
#define mp make_pair
#define uint unsigned
#define PI pair<int, int>
inline char gc() {
static char buf[100000], *p1 = buf, *p2 = buf;
return p1 == p2 && (p2 = (p1 =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
#define sqr(x) ((x) * (x))
#define mp make_pair
#define uint unsigned
#define PI pair<int, int>
inline char gc() {
static char buf[100000], *p1 = buf, *p2 = buf;
return p1 == p2 && (p2 = (p1 =... | replace | 45 | 46 | 45 | 46 | 0 | |
p03055 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <unordered_map>
#include <vector>
#define mod 1000000007
using namespace std;
typedef long long ll;
bool chmax(ll &a, ll b) {
if (a > b)
return 0;
a = b;
return 1;
}
bool chmin(ll &a, ll b) {
if (a < b)
return 0;
a = b;
... | #include <algorithm>
#include <iostream>
#include <queue>
#include <set>
#include <unordered_map>
#include <vector>
#define mod 1000000007
using namespace std;
typedef long long ll;
bool chmax(ll &a, ll b) {
if (a > b)
return 0;
a = b;
return 1;
}
bool chmin(ll &a, ll b) {
if (a < b)
return 0;
a = b;
... | replace | 37 | 38 | 37 | 38 | 0 | |
p03055 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(), (x).end()
#ifdef _DEBUG_
#define debug(...) printf(__VA_ARGS__)
#else
#define debug(...) (void)0
#endif
using namespace std;
typedef long long ll;
typedef pair<... | #include <bits/stdc++.h>
#define PB push_back
#define MP make_pair
#define F first
#define S second
#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(), (x).end()
#ifdef _DEBUG_
#define debug(...) printf(__VA_ARGS__)
#else
#define debug(...) (void)0
#endif
using namespace std;
typedef long long ll;
typedef pair<... | replace | 23 | 24 | 23 | 26 | TLE | |
p03055 | C++ | Runtime Error | /*
* =template=.cpp
* Copyright (C) 2017 hzw <hzw@huzhenweideMacBook.local>
*
* Distributed under terms of the MIT license.
*/
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include... | /*
* =template=.cpp
* Copyright (C) 2017 hzw <hzw@huzhenweideMacBook.local>
*
* Distributed under terms of the MIT license.
*/
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include... | replace | 58 | 59 | 58 | 59 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using P = pair<int, int>;
const int MAX = 1e5;
struct edge {
int to, cost;
};
struct Diameter {
int from, to, d;
};
vector<edge> g[MAX];
P farthest(int u, int p) {
P r(0, u);
for (auto e : g[u]) {
if (e.to == ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)n; i++)
using P = pair<int, int>;
const int MAX = 2e5;
struct edge {
int to, cost;
};
struct Diameter {
int from, to, d;
};
vector<edge> g[MAX];
P farthest(int u, int p) {
P r(0, u);
for (auto e : g[u]) {
if (e.to == ... | replace | 5 | 6 | 5 | 6 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
#define int ll
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<vvc> vvvc;
typedef pair<int, int> pii;
typedef pair<pii, pii> piii;
typedef pair<ll, ll> pll;
typedef ... | #include <bits/stdc++.h>
#include <random>
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
typedef double ld;
#define int ll
typedef vector<char> vc;
typedef vector<vc> vvc;
typedef vector<vvc> vvvc;
typedef pair<int, int> pii;
typedef pair<pii, pii> piii;
typedef pair<ll, ll> pll;
typedef ... | replace | 124 | 125 | 124 | 125 | 0 | |
p03055 | C++ | Runtime Error | #define _CRT_SECURE_NO_WARNINGS
#define _SCL_SECURE_NO_WARNINGS
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <... | #define _CRT_SECURE_NO_WARNINGS
#define _SCL_SECURE_NO_WARNINGS
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <... | replace | 157 | 159 | 157 | 159 | 0 | |
p03055 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#... | replace | 113 | 114 | 113 | 114 | 0 | |
p03055 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
#define ll long long
#define P pair<int, int>
#define FOR(i, N) for (int i = 0; i < (int)N; i++... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <unordered_set>
#include <vector>
#define ll long long
#define P pair<int, int>
#define FOR(i, N) for (int i = 0; i < (int)N; i++... | insert | 144 | 144 | 144 | 148 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int(i) = ((n)-1); (i) >= 0; (i)--)
#define itn int
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
const long long INF = 1LL << 60;
const int MOD = 1000... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int(i) = 0; (i) < (n); (i)++)
#define rrep(i, n) for (int(i) = ((n)-1); (i) >= 0; (i)--)
#define itn int
#define all(x) (x).begin(), (x).end()
#define F first
#define S second
const long long INF = 1LL << 60;
const int MOD = 1000... | replace | 11 | 12 | 11 | 12 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repo(i, n) for (int i = 1; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
#define np next_permutation
#define lb lower_bound
#define ub upper_bound
#define... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repo(i, n) for (int i = 1; i < (int)(n); i++)
#define pb push_back
#define mp make_pair
#define np next_permutation
#define lb lower_bound
#define ub upper_bound
#define... | insert | 42 | 42 | 42 | 47 | 0 | |
p03055 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using PII = pair<int, int>;
int main() {
int n, a, b;
cin >> n;
vector<vector<int>> connect(n + 1, vector<int>());
for (int i = 0; i < n - 1; i++) {
cin ... | #include <algorithm>
#include <cstdio>
#include <iostream>
#include <queue>
#include <string>
#include <utility>
#include <vector>
using namespace std;
using PII = pair<int, int>;
int main() {
int n, a, b;
cin >> n;
if (n == 1) {
cout << "First" << endl;
return 0;
}
vector<vector<int>> connect(n +... | insert | 14 | 14 | 14 | 19 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int> g[200005];
int n, d[200005];
void dfs(int x, int p = 0) {
d[x] = d[p] + 1;
for (auto t : g[x])
if (t != p)
dfs(t, x);
}
int main() {
cin >> n;
d[0] = -1;
for (int i = 1; i < n; i++) {
int a, b;
cin >> a >> b;
g[a].push_back(b);
... | #include <bits/stdc++.h>
using namespace std;
vector<int> g[200005];
int n, d[200005];
void dfs(int x, int p = 0) {
d[x] = d[p] + 1;
for (auto t : g[x])
if (t != p)
dfs(t, x);
}
int main() {
cin >> n;
d[0] = -1;
for (int i = 1; i < n; i++) {
int a, b;
cin >> a >> b;
g[a].push_back(b);
... | delete | 20 | 21 | 20 | 20 | 0 | |
p03055 | C++ | Runtime Error | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <assert.h>
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <climits>
#include <complex> // complex
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include... | #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound
#include <assert.h>
#include <bitset> // bitset
#include <cctype> // isupper, islower, isdigit, toupper, tolower
#include <climits>
#include <complex> // complex
#include <cstdint> // int64_t, int*_t
#include <cstdio> // printf
#include... | replace | 79 | 80 | 79 | 80 | 0 | |
p03055 | C++ | Runtime Error | #include "bits/stdc++.h"
typedef long long ll;
#define int ll
#define fi first
#define se second
#define SORT(a) sort(a.begin(), a.end())
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define MP(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define INF LLONG_MAX / 2... | #include "bits/stdc++.h"
typedef long long ll;
#define int ll
#define fi first
#define se second
#define SORT(a) sort(a.begin(), a.end())
#define rep(i, n) for (int i = 0; i < (n); i++)
#define REP(i, n) for (int i = 0; i < (n); i++)
#define MP(a, b) make_pair(a, b)
#define pb(a) push_back(a)
#define INF LLONG_MAX / 2... | insert | 42 | 42 | 42 | 46 | 0 | 2
|
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
struct Edge {
int to, w;
Edge(int t, int w) : to(t), w(w) {}
};
struct Tree {
int N;
vector<vector<Edge>> edges;
void addEdge(int a, int b) { addEdge(a, b, 1); }
void addEdge(int a, int b, int w) { edges[a]... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
struct Edge {
int to, w;
Edge(int t, int w) : to(t), w(w) {}
};
struct Tree {
int N;
vector<vector<Edge>> edges;
void addEdge(int a, int b) { addEdge(a, b, 1); }
void addEdge(int a, int b, int w) { edges[a]... | replace | 21 | 22 | 21 | 22 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
vector<int> e[100010];
pair<int, int> tddfs(int v, int par = -1) {
pair<int, int> ret = {0, v};
for (auto &x : e[v]) {
if (x == par)
continue;
auto r = tddfs(x, v);
ret = max(ret, {1 + r.first, r.second});
}
return ret;
}
int main() {
int n;
... | #include <bits/stdc++.h>
using namespace std;
vector<int> e[200010];
pair<int, int> tddfs(int v, int par = -1) {
pair<int, int> ret = {0, v};
for (auto &x : e[v]) {
if (x == par)
continue;
auto r = tddfs(x, v);
ret = max(ret, {1 + r.first, r.second});
}
return ret;
}
int main() {
int n;
... | replace | 2 | 3 | 2 | 3 | 0 | |
p03055 | Python | Runtime Error | import sys
sys.setrecursionlimit(2 * 10**5)
def dfs(v, p, links):
farthest_d = 0
farthest_v = v
for u in links[v]:
if u == p:
continue
res_d, res_v = dfs(u, v, links)
if res_d > farthest_d:
farthest_d = res_d
farthest_v = res_v
return farth... | import sys
sys.setrecursionlimit(2 * 10**5 + 5)
def dfs(v, p, links):
farthest_d = 0
farthest_v = v
for u in links[v]:
if u == p:
continue
res_d, res_v = dfs(u, v, links)
if res_d > farthest_d:
farthest_d = res_d
farthest_v = res_v
return f... | replace | 2 | 3 | 2 | 3 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
const int N = 100010;
struct Edge {
int nex, v;
} edge[N << 1];
int tp;
int n, e[N], sg[N], f[N], Ans;
inline void add(int x, int y) {
edge[++tp].v = y;
edge[tp].nex = e[x];
e[x] = tp;
return;
}
void DFS(int x, int fa) {
int a = 1, b = 0;
for (int i = e[x]; i; i = edge[i].nex... | #include <bits/stdc++.h>
const int N = 200010;
struct Edge {
int nex, v;
} edge[N << 1];
int tp;
int n, e[N], sg[N], f[N], Ans;
inline void add(int x, int y) {
edge[++tp].v = y;
edge[tp].nex = e[x];
e[x] = tp;
return;
}
void DFS(int x, int fa) {
int a = 1, b = 0;
for (int i = e[x]; i; i = edge[i].nex... | replace | 2 | 3 | 2 | 3 | 0 | |
p03055 | C++ | Runtime Error | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T> using V = vector<T>;
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
const ll inf = (1e18);
const ll mod = 998244353;
ll gcd(ll a, ll b) { return b ? gcd(b, ... | #pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
template <class T> using V = vector<T>;
#define fi first
#define se second
#define all(v) (v).begin(), (v).end()
const ll inf = (1e18);
const ll mod = 998244353;
ll gcd(ll a, ll b) { return b ? gcd(b, ... | replace | 37 | 38 | 37 | 38 | 0 | |
p03055 | C++ | Runtime Error | #include <iostream>
#include <vector>
#define nmax 100005
using namespace std;
int n, nod1, viz1[nmax], viz2[nmax], maxi1, maxi2, nod2;
vector<int> v[nmax];
void dfs1(int nod) {
for (auto it = v[nod].begin(); it != v[nod].end(); ++it)
if (!viz1[*it]) {
viz1[*(it)] = viz1[nod] + 1;
if (maxi1 < (viz1[*(... | #include <iostream>
#include <vector>
#define nmax 200005
using namespace std;
int n, nod1, viz1[nmax], viz2[nmax], maxi1, maxi2, nod2;
vector<int> v[nmax];
void dfs1(int nod) {
for (auto it = v[nod].begin(); it != v[nod].end(); ++it)
if (!viz1[*it]) {
viz1[*(it)] = viz1[nod] + 1;
if (maxi1 < (viz1[*(... | replace | 2 | 3 | 2 | 3 | 0 | |
p03055 | C++ | Runtime Error | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#i... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <bitset>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <random>
#include <set>
#i... | replace | 91 | 94 | 91 | 94 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < n; i++)
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) { ... | #include <bits/stdc++.h>
using namespace std;
#define ALL(x) x.begin(), x.end()
#define rep(i, n) for (int i = 0; i < n; i++)
#define debug(v) \
cout << #v << ":"; \
for (auto x : v) { ... | insert | 98 | 98 | 98 | 102 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
int N = 1e6, SZ = 320, INF = 1 << 29;
long long LINF = (1LL << 60), mod = 1e9 + 7;
const long double eps = 1e-9, PI = acos(-1.0);
#define lowbit(x) (x & (-(x)))
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<long long, lon... | #include <bits/stdc++.h>
int N = 1e6, SZ = 320, INF = 1 << 29;
long long LINF = (1LL << 60), mod = 1e9 + 7;
const long double eps = 1e-9, PI = acos(-1.0);
#define lowbit(x) (x & (-(x)))
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<long long, lon... | replace | 162 | 163 | 162 | 163 | 0 | |
p03055 | C++ | Runtime Error | #include <cstring>
#include <iostream>
#include <vector>
using namespace std;
vector<vector<int>> adj(200200);
int depth[200200];
int dfs2(int i, int p, int d = 0) {
depth[i] = d;
for (int j : adj[i])
if (p != j)
dfs2(j, i, d + 1);
}
int main() {
int n;
cin >> n;
for (int i = 1; i < n; i++) {
... | #include <cstring>
#include <iostream>
#include <vector>
using namespace std;
vector<vector<int>> adj(200200);
int depth[200200];
int dfs2(int i, int p, int d = 0) {
depth[i] = d;
for (int j : adj[i])
if (p != j)
dfs2(j, i, d + 1);
}
int main() {
int n;
cin >> n;
if (n == 1) {
cout << "First\n... | insert | 17 | 17 | 17 | 21 | 0 | 2 0 2
|
p03055 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <limits>
#include <vector>
using namespace std;
using Graph = vector<vector<int>>;
constexpr int INF = numeric_limits<int>::max() / 3;
void dfs(Graph const &tree, vector<int> &dists, int pos) {
for (auto v : tree[pos]) {
if (dists[v] < INF)
continue;
... | #include <algorithm>
#include <iostream>
#include <limits>
#include <vector>
using namespace std;
using Graph = vector<vector<int>>;
constexpr int INF = numeric_limits<int>::max() / 3;
void dfs(Graph const &tree, vector<int> &dists, int pos) {
for (auto v : tree[pos]) {
if (dists[v] < INF)
continue;
... | replace | 39 | 40 | 39 | 40 | 0 | |
p03055 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (int64_t i = 0; i < (n); i++)
#define irep(i, n) for (int64_t i = 0; i <= (n... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <map>
#include <queue>
#include <set>
#include <tuple>
#include <vector>
using namespace std;
#define rep(i, n) for (int64_t i = 0; i < (n); i++)
#define irep(i, n) for (int64_t i = 0; i <= (n... | replace | 49 | 50 | 49 | 50 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int>> e(n + 1);
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
e[a].push_back(b);
e[b].push_back(a);
}
vector<int> d(n + 1);
using P = pair<int, int>;
function<void(int, vector<int> &)> dfs ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int>> e(n + 1);
for (int i = 0; i < n - 1; i++) {
int a, b;
cin >> a >> b;
e[a].push_back(b);
e[b].push_back(a);
}
vector<int> d(n + 1);
using P = pair<int, int>;
function<void(int, vector<int> &)> ... | replace | 6 | 7 | 6 | 7 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
vector<vector<int>> g(n);
for (int i = 0; i < n; i++) {
int a, b;
cin >> a >> b;
a--;
b--;
g[a].push_back(b);
g[b].push_back(a);
}
vector<int> d(n);
for (int i = 0; i < n; i++) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
int n;
cin >> n;
vector<vector<int>> g(n);
for (int i = 0; i < n - 1; i++) {
int a, b;
cin >> a >> b;
a--;
b--;
g[a].push_back(b);
g[b].push_back(a);
}
vector<int> d(n);
for (int i = 0; i < n; i++) {
... | replace | 7 | 8 | 7 | 8 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
const int MAXN = 8e4 + 5, MAXM = 2e5 + 5, BOUND = 1e7, MOD = 1073741824,
INF = 0x3f3f3f3f, base = 10000;
const ll INFL = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1.... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double db;
typedef long double ld;
const int MAXN = 2e5 + 5, MAXM = 2e5 + 5, BOUND = 1e7, MOD = 1073741824,
INF = 0x3f3f3f3f, base = 10000;
const ll INFL = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1.... | replace | 6 | 7 | 6 | 7 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int n, top, x, y, ans, ma, dis[N], head[N];
struct node {
int too, next;
} edge[N * 2];
void add(int a, int b) {
edge[++top].too = b;
edge[top].next = head[a];
head[a] = top;
}
void dfs(int u, int fa) {
dis[u] = dis[fa] + 1;
if (dis[u] > ma... | #include <bits/stdc++.h>
using namespace std;
const int N = 1000005;
int n, top, x, y, ans, ma, dis[N], head[N];
struct node {
int too, next;
} edge[N * 2];
void add(int a, int b) {
edge[++top].too = b;
edge[top].next = head[a];
head[a] = top;
}
void dfs(int u, int fa) {
dis[u] = dis[fa] + 1;
if (dis[u] > m... | replace | 2 | 3 | 2 | 3 | 0 | |
p03055 | C++ | Runtime Error | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
// T1: Give you a tree.
// You can delete all of the leaves or save one leave when it's your turn.
// The person who can't do anything will lose the game.
const int N = 200005;
int n, head[N];
struct Edge {
int next, to;
};
Edge E[N << 1];
i... | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
// T1: Give you a tree.
// You can delete all of the leaves or save one leave when it's your turn.
// The person who can't do anything will lose the game.
const int N = 200005;
int n, head[N];
struct Edge {
int next, to;
};
Edge E[N << 1];
i... | replace | 65 | 67 | 65 | 66 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define watch(x) cerr << (#x) << ": " << (x) << endl
#define int long long
const int N = 200000;
int n;
vector<int> graph[N];
void dfs(int cur, int par, int d, int &dist, int &deepest) {
if (d > dist) {
deepest = cur;
dist = d;
}
for (int child : graph[cur]... | #include <bits/stdc++.h>
using namespace std;
#define watch(x) cerr << (#x) << ": " << (x) << endl
#define int long long
const int N = 200000;
int n;
vector<int> graph[N + 1];
void dfs(int cur, int par, int d, int &dist, int &deepest) {
if (d > dist) {
deepest = cur;
dist = d;
}
for (int child : graph[... | replace | 8 | 9 | 8 | 9 | 0 | |
p03055 | C++ | Runtime Error | #include "bits/stdc++.h"
using namespace std;
using ll = int64_t;
int main() {
ll N;
cin >> N;
vector<vector<ll>> edges(N);
for (ll i = 0; i < N - 1; i++) {
ll a, b;
cin >> a >> b;
a--;
b--;
edges[a].push_back(b);
edges[b].push_back(a);
}
struct Element {
ll cost, node;
boo... | #include "bits/stdc++.h"
using namespace std;
using ll = int64_t;
int main() {
ll N;
cin >> N;
if (N == 1) {
cout << "First" << endl;
return 0;
}
vector<vector<ll>> edges(N);
for (ll i = 0; i < N - 1; i++) {
ll a, b;
cin >> a >> b;
a--;
b--;
edges[a].push_back(b);
edges[b].p... | insert | 7 | 7 | 7 | 11 | 0 | |
p03055 | C++ | Runtime Error | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "string"
#include "un... | #include "algorithm"
#include "bitset"
#include "cassert"
#include "climits"
#include "cmath"
#include "cstdio"
#include "functional"
#include "iomanip"
#include "iostream"
#include "list"
#include "map"
#include "numeric"
#include "queue"
#include "random"
#include "set"
#include "stack"
#include "string"
#include "un... | replace | 63 | 65 | 63 | 65 | 0 | |
p03055 | C++ | Runtime Error | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, P> Q;
const ll mod = 1000000007;
const ll INF = 1000000000000000;
ll bit[100010], num;
ll par[... | #include <algorithm>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, P> Q;
const ll mod = 1000000007;
const ll INF = 1000000000000000;
ll bit[100010], num;
ll par[... | replace | 17 | 19 | 17 | 19 | 0 | |
p03055 | 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... | insert | 19 | 19 | 19 | 23 | 0 | |
p03055 | C++ | Runtime Error |
#include <bits/stdc++.h>
using namespace std;
#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 rRep(i, m, n) for (long long i = (n)-1; i >= (m); i--)
#de... |
#include <bits/stdc++.h>
using namespace std;
#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 rRep(i, m, n) for (long long i = (n)-1; i >= (m); i--)
#de... | insert | 656 | 656 | 656 | 661 | -11 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<ll, ll> PLL;
#define chmax(x, y) \
do { \
x = max(x, y); ... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef unsigned long long int ull;
typedef pair<ll, ll> PLL;
#define chmax(x, y) \
do { \
x = max(x, y); ... | insert | 48 | 48 | 48 | 52 | 0 | |
p03055 | C++ | Runtime Error | // #define NDEBUG
#include <cstddef>
#include <cstdint>
#include <vector>
namespace n91 {
using i8 = std::int_fast8_t;
using i32 = std::int_fast32_t;
using i64 = std::int_fast64_t;
using u8 = std::uint_fast8_t;
using u32 = std::uint_fast32_t;
using u64 = std::uint_fast64_t;
using isize = std::ptrdiff_t;
using usize =... | // #define NDEBUG
#include <cstddef>
#include <cstdint>
#include <vector>
namespace n91 {
using i8 = std::int_fast8_t;
using i32 = std::int_fast32_t;
using i64 = std::int_fast64_t;
using u8 = std::uint_fast8_t;
using u32 = std::uint_fast32_t;
using u64 = std::uint_fast64_t;
using isize = std::ptrdiff_t;
using usize =... | replace | 100 | 104 | 100 | 101 | -6 | 45661ea8-9fcf-4d85-9b8c-a2b03fd7fa3a.out: /home/alex/Documents/bug-detection/input/Project_CodeNet/data/p03055/C++/s496035584.cpp:102: bool n91::solve(): Assertion `false' failed.
|
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
ll mod = 1e9 + 7;
int main() {
ll n;
cin >> n;
vector<set<ll>> E(n);
for (ll i = 0; i < n - 1; i++) {
ll a, b;
cin >> a >> b;
a--;
b--;
E[a].insert(b);
E[b].insert(a);
}
vector<ll> d1(n, -1... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
ll mod = 1e9 + 7;
int main() {
ll n;
cin >> n;
vector<set<ll>> E(n);
for (ll i = 0; i < n - 1; i++) {
ll a, b;
cin >> a >> b;
a--;
b--;
E[a].insert(b);
E[b].insert(a);
}
vector<ll> d1(n, -1... | replace | 33 | 34 | 33 | 34 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int>> g(n);
for (int i = 0; i < n; ++i) {
int a, b;
cin >> a >> b;
g[a - 1].push_back(b - 1);
g[b - 1].push_back(a - 1);
}
int dist = 0;
vector<int> v(n);
function<int(int, int)> dfs = [&](int v, ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
vector<vector<int>> g(n);
for (int i = 0; i < n - 1; ++i) {
int a, b;
cin >> a >> b;
g[a - 1].push_back(b - 1);
g[b - 1].push_back(a - 1);
}
int dist = 0;
vector<int> v(n);
function<int(int, int)> dfs = [&](int... | replace | 7 | 8 | 7 | 8 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll N = 1e5 + 5;
vector<ll> adj[N];
ll node, dist;
void dfs(ll src, ll pr, ll d) {
if (d >= dist) {
node = src;
dist = d;
}
for (auto &v : adj[src])
if (v != pr)
dfs(v, src, d + 1);
}
int main() {
ios_base::sync_with_stdi... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const ll N = 2e5 + 5;
vector<ll> adj[N];
ll node, dist;
void dfs(ll src, ll pr, ll d) {
if (d >= dist) {
node = src;
dist = d;
}
for (auto &v : adj[src])
if (v != pr)
dfs(v, src, d + 1);
}
int main() {
ios_base::sync_with_stdi... | replace | 3 | 4 | 3 | 4 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rng(i, l, r) for (int i = int(l); i < int(r); i++)
#define rep(i, r) rng(i, 0, r)
#define rrng(i, l, r) for (int i = int(r) - 1; i >= int(l); i--)
#define rrep(i, r) rrng(i, 0, r)
#define pb push_back
#define eb emplace_back
#define mp make_pa... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rng(i, l, r) for (int i = int(l); i < int(r); i++)
#define rep(i, r) rng(i, 0, r)
#define rrng(i, l, r) for (int i = int(r) - 1; i >= int(l); i--)
#define rrep(i, r) rrng(i, 0, r)
#define pb push_back
#define eb emplace_back
#define mp make_pa... | replace | 246 | 248 | 246 | 248 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
const int N = 200005;
int n, x, y, ne[N], fi[N], zz[N], ans, tot, Maxsd[N], sd[N];
void jb(int x, int y) {
ne[++tot] = fi[x];
fi[x] = tot;
zz[tot] = y;
}
void dfs(int x, int y, int z) {
Maxsd[x] = sd[x] = z;
for (int i = fi[x]; i; i = ne[i])
if (zz[i] != y) {
... | #include <bits/stdc++.h>
using namespace std;
const int N = 400005;
int n, x, y, ne[N], fi[N], zz[N], ans, tot, Maxsd[N], sd[N];
void jb(int x, int y) {
ne[++tot] = fi[x];
fi[x] = tot;
zz[tot] = y;
}
void dfs(int x, int y, int z) {
Maxsd[x] = sd[x] = z;
for (int i = fi[x]; i; i = ne[i])
if (zz[i] != y) {
... | replace | 2 | 3 | 2 | 3 | 0 | |
p03055 | C++ | Runtime Error | /* be name khoda */
// #define stream_enable
#define long_enable
#include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
// #include <bits/stdc++.h>
// #include <numeric>
// #include <iomanip>
// #include <cmath>
// #include <bit... | /* be name khoda */
// #define stream_enable
#define long_enable
#include <algorithm>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <vector>
// #include <bits/stdc++.h>
// #include <numeric>
// #include <iomanip>
// #include <cmath>
// #include <bit... | replace | 107 | 108 | 107 | 108 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define int long long
#define double long double
#define mod 1000000007
#define F first
#define S second
#define P pair<long long, long long>
#define all(a) a.begin(), a.end()
#define INF 10000000000000000
#define endl '\n'
template <class T> inli... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define int long long
#define double long double
#define mod 1000000007
#define F first
#define S second
#define P pair<long long, long long>
#define all(a) a.begin(), a.end()
#define INF 10000000000000000
#define endl '\n'
template <class T> inli... | replace | 28 | 30 | 28 | 30 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0, _n = (int)(n); i < _n; ++i)
#define ALL(v) (v).begin(), (v).end()
#define CLR(t, v) memset(t, (v), sizeof(t))
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
return os << "(" ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define REP(i, n) for (int i = 0, _n = (int)(n); i < _n; ++i)
#define ALL(v) (v).begin(), (v).end()
#define CLR(t, v) memset(t, (v), sizeof(t))
template <class T1, class T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &a) {
return os << "(" ... | replace | 36 | 37 | 36 | 37 | 0 | |
p03055 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
using Graph = vector<vector<ll>>;
#define rep(i, n) for (ll i = 0; i < (ll)(n); i++)
#define rep2(i, m, n) for (ll i = m; i < (ll)(n); i++)
#define rrep(i, n, m) for (ll i = n; i >= (ll)(m); i--)
const int dx[4] = {1, 0, -1, 0... | insert | 37 | 37 | 37 | 41 | 0 | |
p03055 | C++ | Runtime Error | // Hacheylight
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <st... | // Hacheylight
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <st... | replace | 57 | 58 | 57 | 58 | 0 | |
p03056 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define N 200
int n, m, ans, f[N][N][N], g[N][N][N];
char s[N][N];
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; ++i) {
scanf("%s", s[i] + 1);
}
for (int l = n; l; --l) {
for (int r = l; r <= n; ++r) {
for (int h = m; h; --h) {
... | #include <bits/stdc++.h>
using namespace std;
#define N 200
int n, m, ans, f[N][N][N], g[N][N][N];
char s[N][N];
int main() {
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; ++i) {
scanf("%s", s[i] + 1);
}
for (int l = n; l; --l) {
for (int r = l; r <= n; ++r) {
for (int h = m; h; --h) {
... | replace | 29 | 30 | 29 | 30 | TLE | |
p03056 | C++ | Memory Limit Exceeded | // 第8回シンデレラガール総選挙は是非本田未央ちゃんに投票をお願いします!
// ファンのことも他のアイドルの子たちのことも本当に大事にしてて、今まで周りに色んなものを与えてくれました。
// 今度は私たちが未央ちゃんにお返しをする番です。みんなでガラスの靴を履かせてあげましょう!
// #本田未央を一番星に #本田未央を令和のシンデレラガールに
// #第8回シンデレラガール総選挙
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <c... | // 第8回シンデレラガール総選挙は是非本田未央ちゃんに投票をお願いします!
// ファンのことも他のアイドルの子たちのことも本当に大事にしてて、今まで周りに色んなものを与えてくれました。
// 今度は私たちが未央ちゃんにお返しをする番です。みんなでガラスの靴を履かせてあげましょう!
// #本田未央を一番星に #本田未央を令和のシンデレラガールに
// #第8回シンデレラガール総選挙
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <c... | replace | 40 | 41 | 40 | 41 | MLE | |
p03056 | C++ | Runtime Error | /*
Author: QAQAutomaton
Lang: C++
Code: D.cpp
Mail: lk@qaq-am.com
Blog: https://www.qaq-am.com/
*/
#include <bits/stdc++.h>
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define DEBUG printf("Passing [%s] in LINE %d\n", __FUNCTION__, __LINE__)
#define Debug debug("Passing [%s] in LINE %d\n", __FUNCTION__, __LINE__)
#... | /*
Author: QAQAutomaton
Lang: C++
Code: D.cpp
Mail: lk@qaq-am.com
Blog: https://www.qaq-am.com/
*/
#include <bits/stdc++.h>
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define DEBUG printf("Passing [%s] in LINE %d\n", __FUNCTION__, __LINE__)
#define Debug debug("Passing [%s] in LINE %d\n", __FUNCTION__, __LINE__)
#... | replace | 126 | 127 | 126 | 127 | -11 | |
p03056 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mit map<int, int>::iterator
#define sit set<int>::iterator
#define itrm(g, x) for (mit g = x.begin(); g != x.end(); g++)
#define itrs(g, x) for (sit g = x.begin(); g != x.end(); g++)
#define ltype int
#define rep(i, j, k) for (ltype(i) = (j); (... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define mit map<int, int>::iterator
#define sit set<int>::iterator
#define itrm(g, x) for (mit g = x.begin(); g != x.end(); g++)
#define itrs(g, x) for (sit g = x.begin(); g != x.end(); g++)
#define ltype int
#define rep(i, j, k) for (ltype(i) = (j); (... | replace | 53 | 55 | 53 | 55 | TLE | |
p03056 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
const int maxn = 185 + 3;
int n, m;
int c[maxn][maxn];
int L[maxn][maxn];
int U[maxn][maxn];
int fl[maxn][maxn][maxn];
int fu[maxn][maxn][maxn];
int gl[maxn][maxn][maxn];
int gu[maxn][maxn][maxn];
char ch;
int main() {
scanf("%d%d", &n, &m)... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
const int maxn = 185 + 3;
int n, m;
int c[maxn][maxn];
int L[maxn][maxn];
int U[maxn][maxn];
int fl[maxn][maxn][maxn];
int fu[maxn][maxn][maxn];
int gl[maxn][maxn][maxn];
int gu[maxn][maxn][maxn];
char ch;
int main() {
scanf("%d%d", &n, &m)... | replace | 49 | 55 | 49 | 57 | TLE | |
p03056 | C++ | Memory Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
// #define int long long
#define lowbit(x) ((x) & (-x))
using namespace std;
const int maxn = 190;
int n, m, sum[maxn][maxn... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
// #define int long long
#define lowbit(x) ((x) & (-x))
using namespace std;
const int maxn = 190;
int n, m, sum[maxn][maxn... | replace | 15 | 16 | 15 | 16 | MLE | |
p03056 | C++ | Runtime Error | #include <bits/stdc++.h>
#define int unsigned short
using namespace std;
#define gc getchar
inline int read() {
register int x = 0, f = 1;
char ch = gc();
while (!isdigit(ch)) {
if (ch == '-')
f = -1;
ch = gc();
}
while (isdigit(ch)) {
x = (x << 3) + (x << 1) + ch - '0';
ch = gc();
}
... | #include <bits/stdc++.h>
using namespace std;
#define gc getchar
inline int read() {
register int x = 0, f = 1;
char ch = gc();
while (!isdigit(ch)) {
if (ch == '-')
f = -1;
ch = gc();
}
while (isdigit(ch)) {
x = (x << 3) + (x << 1) + ch - '0';
ch = gc();
}
return (f == 1) ? x : -x;
... | delete | 1 | 2 | 1 | 1 | -11 | |
p03056 | C++ | Memory Limit Exceeded | /****************************************************************
* Author: huhao
* Email: 826538400@qq.com
* Create time: 2020-02-03 16:33:26
****************************************************************/
#include <algorithm>
#include <math.h>
#include <stdio.h>
#include <string.h>
#define fr(i, a, b) for (int ... | /****************************************************************
* Author: huhao
* Email: 826538400@qq.com
* Create time: 2020-02-03 16:33:26
****************************************************************/
#include <algorithm>
#include <math.h>
#include <stdio.h>
#include <string.h>
#define fr(i, a, b) for (int ... | replace | 23 | 24 | 23 | 24 | MLE | |
p03056 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define reg register
using namespace std;
int n, m;
char s[185][185];
int f[185][185];
short dp[185][185][185][21];
int pd(reg int sx, reg int sy, reg int ex, reg int ey) {
return f[ex][ey] + f[sx - 1][sy - 1] - f[sx - 1][ey] - f[ex][sy - 1];
}
int main() {
scanf("%d %d", &n, &m);
for (... | #include <bits/stdc++.h>
#define reg register
using namespace std;
int n, m;
char s[190][190];
int f[190][190];
short dp[190][190][190][21];
int pd(reg int sx, reg int sy, reg int ex, reg int ey) {
return f[ex][ey] + f[sx - 1][sy - 1] - f[sx - 1][ey] - f[ex][sy - 1];
}
int main() {
scanf("%d %d", &n, &m);
for (... | replace | 4 | 7 | 4 | 7 | TLE | |
p03056 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i, n) rep2(i, 0, n)
#define rep2(i, m, n) for (int i = m; i < (n); i++)
#define ALL(c... | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define fi first
#define se second
#define rep(i, n) rep2(i, 0, n)
#define rep2(i, m, n) for (int i = m; i < (n); i++)
#define ALL(c... | replace | 49 | 50 | 49 | 50 | MLE | |
p03056 | C++ | Runtime Error | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <queue>
#include <set>
#define max(x, y) ((x > y ? x : y))
#define min(x, y) ((x < y ? x : y))
using namespace std;
const int N = 200;
char f[20][N][N][N];
int n, m;
char a[N][N];
int sum[N][N];
int ... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <iostream>
#include <queue>
#include <set>
#define max(x, y) ((x > y ? x : y))
#define min(x, y) ((x < y ? x : y))
using namespace std;
const int N = 200;
short f[20][N][N][N];
int n, m;
char a[N][N];
int sum[N][N];
int... | replace | 12 | 13 | 12 | 13 | -11 | |
p03056 | C++ | Memory Limit Exceeded | /*
* UM.
* J@B@1 iO@1
* Y@@@B@BB. 7B@B@B@
* :@B@i,B@B@O ,Z@B@B@B@Br
* @B@q i@B@BS 7@B@@@O5vMB@q
* 8@@B LB@B@i FB@@@BNjYjLE@B@
* ... | /*
* UM.
* J@B@1 iO@1
* Y@@@B@BB. 7B@B@B@
* :@B@i,B@B@O ,Z@B@B@B@Br
* @B@q i@B@BS 7@B@@@O5vMB@q
* 8@@B LB@B@i FB@@@BNjYjLE@B@
* ... | replace | 205 | 207 | 205 | 207 | MLE | |
p03056 | C++ | Memory Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
const int N = 188;
int dp[N][N][N][20];
int sum[N][N];
char c[N][N];
int n, m;
inline int cal(int x, int y, int l, int r) {
return sum[r][y] + sum[l - 1][x - 1] - sum[l - 1][y] - sum[r][x - 1];
}
inline bool no_cost(int x, int y, int l, int r) {
if (cal(x, y, l, r) == 0... | #include <bits/stdc++.h>
using namespace std;
const int N = 187;
int dp[N][N][N][18];
int sum[N][N];
char c[N][N];
int n, m;
inline int cal(int x, int y, int l, int r) {
return sum[r][y] + sum[l - 1][x - 1] - sum[l - 1][y] - sum[r][x - 1];
}
inline bool no_cost(int x, int y, int l, int r) {
if (cal(x, y, l, r) == 0... | replace | 2 | 4 | 2 | 4 | MLE | |
p03056 | C++ | Runtime Error | // includes {{{
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
// #include<deque>
// #include<multiset>
#include <cst... | // includes {{{
#include <algorithm>
#include <bitset>
#include <cassert>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <tuple>
#include <vector>
// #include<deque>
// #include<multiset>
#include <cst... | replace | 166 | 167 | 166 | 167 | 0 | |
p03056 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
typedef long long ll;
#define mid ((l + r) >> 1)
const int N = 190;
char str[N][N];
int n, m, tmp, sum[N][N], dp[N][N][N][18];
bool check(int lx, int rx, int ly, int ry) {
int res =
sum[rx][ry]... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
using namespace std;
typedef long long ll;
#define mid ((l + r) >> 1)
const int N = 190;
char str[N][N];
int n, m, tmp, sum[N][N], dp[N][N][N][18];
bool check(int lx, int rx, int ly, int ry) {
int res =
sum[rx][ry]... | replace | 47 | 49 | 47 | 48 | TLE | |
p03056 | C++ | Time Limit Exceeded | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<int, P> P1;
typedef unsigned char uc... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> P;
typedef pair<int, P> P1;
typedef unsigned char uc... | insert | 76 | 76 | 76 | 83 | TLE | |
p03056 | C++ | Memory Limit Exceeded | /*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄... | /*
ЗАПУСКАЕМ
░ГУСЯ░▄▀▀▀▄░РАБОТЯГУ░░
▄███▀░◐░░░▌░░░░░░░
░░░░▌░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▐░░░░░▐░░░░░░░
░░░░▌░░░░░▐▄▄░░░░░
░░░░▌░░░░▄▀▒▒▀▀▀▀▄
░░░▐░░░░▐▒▒▒▒▒▒▒▒▀▀▄
░░░▐░░░░▐▄▒▒▒▒▒▒▒▒▒▒▀▄
░░░░▀▄░░░░▀▄... | replace | 86 | 87 | 86 | 87 | MLE | |
p03056 | C++ | Runtime Error | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <thread>
#include <tuple>
#include <unordered_map>
#inc... | #include <algorithm>
#include <climits>
#include <cmath>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <string>
#include <thread>
#include <tuple>
#include <unordered_map>
#inc... | replace | 23 | 25 | 23 | 25 | -11 | |
p03057 | C++ | Runtime Error | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <cmath>
#include <complex>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <... | replace | 56 | 57 | 56 | 71 | 0 | |
p03057 | C++ | Runtime Error | #include <bits/stdc++.h>
#define rep(i, n) for ((i) = 1; (i) <= (n); (i)++)
using namespace std;
const int mod = 1e9 + 7;
int n, m, i, lst, dp[200005], s[200005], f[200005][2], tmp, mi = 0x3f3f3f3f, l;
string st;
int main() {
cin >> n >> m;
cin >> st;
st = " " + st;
i = 1;
lst = 1;
while (i <= n) {
if (... | #include <bits/stdc++.h>
#define rep(i, n) for ((i) = 1; (i) <= (n); (i)++)
using namespace std;
const int mod = 1e9 + 7;
int n, m, i, lst, dp[200005], s[200005], f[200005][2], tmp, mi = 0x3f3f3f3f, l;
string st;
int main() {
cin >> n >> m;
cin >> st;
st = " " + st;
i = 1;
lst = 1;
while (i <= m) {
if (... | replace | 12 | 13 | 12 | 13 | 0 | |
p03057 | C++ | Runtime Error | #include <bits/stdc++.h>
#define Tp template <typename Ty>
#define Ts template <typename Ty, typename... Ar>
#define Reg register
#define RI Reg int
#define Con const
#define CI Con int &
#define I inline
#define W while
#define N 200000
#define X 1000000007
using namespace std;
int n, m, t, a[N + 5], f[N + 5], g[N + 5... | #include <bits/stdc++.h>
#define Tp template <typename Ty>
#define Ts template <typename Ty, typename... Ar>
#define Reg register
#define RI Reg int
#define Con const
#define CI Con int &
#define I inline
#define W while
#define N 200000
#define X 1000000007
using namespace std;
int n, m, t, a[N + 5], f[N + 5], g[N + 5... | replace | 33 | 34 | 33 | 34 | 0 | |
p03057 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (int i ... | #include <bits/stdc++.h>
using namespace std;
struct fast_ios {
fast_ios() {
cin.tie(0);
ios::sync_with_stdio(false);
cout << fixed << setprecision(20);
};
} fast_ios_;
#define FOR(i, begin, end) for (int i = (begin); i < (end); i++)
#define REP(i, n) FOR(i, 0, n)
#define IFOR(i, begin, end) for (int i ... | replace | 231 | 232 | 231 | 232 | 0 | |
p03057 | C++ | Runtime Error | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | #include <algorithm>
#include <assert.h>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#defin... | replace | 142 | 143 | 142 | 143 | 0 | |
p03057 | C++ | Runtime Error | // #include <algorithm>
// #include <iostream>
// #include <string>
// using namespace std;
// #define MAX_N 200000
// #define MAX_M 200000
// #define MOD 1000000007
// #define INF 1 << 29
// int N, M;
// string S;
// long long dp[MAX_N + 2], rdp[MAX_N + 2];
// int all_color_is_same()
// {
// long long rr = 1... | // #include <algorithm>
// #include <iostream>
// #include <string>
// using namespace std;
// #define MAX_N 200000
// #define MAX_M 200000
// #define MOD 1000000007
// #define INF 1 << 29
// int N, M;
// string S;
// long long dp[MAX_N + 2], rdp[MAX_N + 2];
// int all_color_is_same()
// {
// long long rr = 1... | replace | 177 | 179 | 177 | 181 | 0 | |
p03057 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define REP(i, st, ed) for (register int i = st, i##end = ed; i <= i##end; ++i)
#define DREP(i, st, ed) for (register int i = st, i##end = ed; i >= i##end; --i)
typedef long long ll;
template <typename T> inline bool chkmin(T &x, T y) {
return (y < x) ? (x = y, 1) : 0;
}
... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, st, ed) for (register int i = st, i##end = ed; i <= i##end; ++i)
#define DREP(i, st, ed) for (register int i = st, i##end = ed; i >= i##end; --i)
typedef long long ll;
template <typename T> inline bool chkmin(T &x, T y) {
return (y < x) ? (x = y, 1) : 0;
}
... | replace | 59 | 65 | 59 | 65 | TLE | |
p03057 | C++ | Runtime Error | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
const int Q = 1 << 19;
char s[Q];
int n, m;
const int MOD = 1e9 + 7;
inline int add(int a, int b) {
a += b;
return a >= MOD ? a - MOD : a;
}
inline int sub(int a, int b) {
a -= b;
return a < 0 ? a + MOD : a;
}
inline int mul(int a, ... | #include <algorithm>
#include <cstdio>
#include <iostream>
using namespace std;
const int Q = 1 << 19;
char s[Q];
int n, m;
const int MOD = 1e9 + 7;
inline int add(int a, int b) {
a += b;
return a >= MOD ? a - MOD : a;
}
inline int sub(int a, int b) {
a -= b;
return a < 0 ? a + MOD : a;
}
inline int mul(int a, ... | delete | 29 | 30 | 29 | 29 | 0 | |
p03058 | C++ | Time Limit Exceeded | #ifndef LOCAL
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include ... | #ifndef LOCAL
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#endif
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <string>
#include ... | replace | 71 | 74 | 71 | 78 | TLE | |
p03058 | C++ | Time Limit Exceeded | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | #include <algorithm>
#include <bitset>
#include <cassert>
#include <chrono>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdint>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#inclu... | replace | 274 | 275 | 274 | 275 | TLE | |
p03058 | C++ | Time Limit Exceeded | /*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | /*
`-:://:::-
`//:-------:/:`
.+:--.......--:+`
`+:--..`````..--//`
.o:--..`` ``..--:o`
... | replace | 438 | 440 | 438 | 440 | TLE | |
p03058 | C++ | Runtime Error | #include <bits/stdc++.h>
const int N = 2005;
struct edge {
int to, nxt;
} e[N << 1];
int n, m, head[N], tot;
void link(int x, int y) {
e[++tot] = (edge){y, head[x]}, head[x] = tot;
e[++tot] = (edge){x, head[y]}, head[y] = tot;
}
typedef std::bitset<N> bitset;
int f[N], next[N][N], lca[N][N];
bitset path[N],... | #include <bits/stdc++.h>
const int N = 2005;
struct edge {
int to, nxt;
} e[N << 1];
int n, m, head[N], tot;
void link(int x, int y) {
e[++tot] = (edge){y, head[x]}, head[x] = tot;
e[++tot] = (edge){x, head[y]}, head[y] = tot;
}
typedef std::bitset<N> bitset;
int f[N], next[N][N], lca[N][N];
bitset path[N],... | replace | 27 | 28 | 27 | 28 | 0 | |
p03058 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define ri register int
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
qu[55];
int f, qr;
// getchar
#define gc() ... | #include <bits/stdc++.h>
using namespace std;
#define ri register int
namespace io {
const int SIZE = (1 << 21) + 1;
char ibuf[SIZE], *iS, *iT, obuf[SIZE], *oS = obuf, *oT = oS + SIZE - 1, c,
qu[55];
int f, qr;
// getchar
#define gc() ... | replace | 133 | 139 | 133 | 138 | TLE | |
p03058 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define pi std::pair<int, int>
#define mkp std::make_pair
#define ll long long
#define pb push_back
#define fi first
#define se second
//{{{IO
namespace IO {
template <class I> void read(I &x) {
x = 0;
char ch = getchar();
bool f = false;
... | #include <bits/stdc++.h>
#define debug(...) fprintf(stderr, __VA_ARGS__)
#define pi std::pair<int, int>
#define mkp std::make_pair
#define ll long long
#define pb push_back
#define fi first
#define se second
//{{{IO
namespace IO {
template <class I> void read(I &x) {
x = 0;
char ch = getchar();
bool f = false;
... | delete | 101 | 106 | 101 | 101 | TLE | |
p03059 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
int a, b, t;
cin >> a >> b >> t;
cout << (t / a) * b;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int a, b, t;
cin >> a >> b >> t;
cout << (t / a) * b;
} | delete | 6 | 10 | 6 | 6 | 0 | |
p03059 | C++ | Runtime Error | #include <bits/stdc++.h>
#define ll long long int
#define mp make_pair
#define ld long double
#define MAX 100007
#define pb push_back
#define MOD 1000000007
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen(... | #include <bits/stdc++.h>
#define ll long long int
#define mp make_pair
#define ld long double
#define MAX 100007
#define pb push_back
#define MOD 1000000007
using namespace std;
int main() {
ll a, b, t;
cin >> a >> b >> t;
cout << b * (t / a);
return 0;
} | delete | 10 | 17 | 10 | 10 | 0 | |
p03059 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a, b, t;
cin >> a >> b >> t;
int ans = 0;
for (int i = a; i <= t; ++a) {
ans += b;
}
cout << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int a, b, t;
cin >> a >> b >> t;
int ans = 0;
for (int i = a; i <= t; i += a) {
ans += b;
}
cout << ans << endl;
return 0;
} | replace | 7 | 8 | 7 | 8 | TLE | |
p03059 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repa(i, a, n) for (int i = (a); i < (n); i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define rrepa(i, a, n) for (int i = n - 1; i >= (a); i--)
#define all(a) (a).begin(), (a).end()
#define MOD 1000000007... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repa(i, a, n) for (int i = (a); i < (n); i++)
#define rrep(i, n) for (int i = n - 1; i >= 0; i--)
#define rrepa(i, a, n) for (int i = n - 1; i >= (a); i--)
#define all(a) (a).begin(), (a).end()
#define MOD 1000000007... | replace | 28 | 33 | 28 | 30 | TLE | |
p03059 | C++ | Time Limit Exceeded | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP1(i, a, b) for (int i = (a); i <= (b); i++)
#define pb push_back
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define sz(x) (sizeof(x) / sizeof(*x))
#define F first
#de... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
#define REP(i, n) for (int i = 0; i < (n); i++)
#define REP1(i, a, b) for (int i = (a); i <= (b); i++)
#define pb push_back
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((int)(x).size())
#define sz(x) (sizeof(x) / sizeof(*x))
#define F first
#de... | replace | 16 | 20 | 16 | 18 | TLE | |
p03059 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int d = 0;
for (int i = a; i <= c; i * a) {
d++;
}
cout << d;
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
cout << (c / a) * b;
return 0;
} | replace | 6 | 12 | 6 | 7 | TLE | |
p03059 | C++ | Runtime Error |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, T;
cin >> A >> B >> T;
cout << B * T / A << endl;
return 1;
} |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B, T;
cin >> A >> B >> T;
cout << B * (T / A) << endl;
return 0;
} | replace | 6 | 8 | 6 | 8 | 1 | |
p03059 | C++ | Time Limit Exceeded | /*#include <iostream>
#include <algorithm>
#include <array>
#include <cmath>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#de... | /*#include <iostream>
#include <algorithm>
#include <array>
#include <cmath>
#include <deque>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <vector>
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#de... | insert | 167 | 167 | 167 | 168 | TLE | |
p03059 | C++ | Runtime Error | #define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#def... | #define __USE_MINGW_ANSI_STDIO 0
#include <bits/stdc++.h>
#define IOS \
ios::sync_with_stdio(0); \
cin.tie(0); \
cout.tie(0);
#def... | replace | 42 | 47 | 42 | 47 | TLE | |
p03059 | C++ | Time Limit Exceeded | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, t, x;
cin >> a >> b >> t;
t = t + 0.5;
a = t / a;
x = a * b;
cout << x << endl;
while (1) {
}
return 0;
} | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, t, x;
cin >> a >> b >> t;
t = t + 0.5;
a = t / a;
x = a * b;
cout << x << endl;
} | delete | 11 | 14 | 11 | 11 | TLE | |
p03059 | C++ | Time Limit Exceeded | // include
// ------------------------------------------------
#include <algorithm>
#include <bits/stdc++.h>
#include <math.h>
#include <vector>
using namespace std;
// func
// ------------------------------------------------
int CalcSumOfDigit(int n); // 各桁の和を計算する。
string upper(string str); // 英字を大文字に変換する。
string l... | // include
// ------------------------------------------------
#include <algorithm>
#include <bits/stdc++.h>
#include <math.h>
#include <vector>
using namespace std;
// func
// ------------------------------------------------
int CalcSumOfDigit(int n); // 各桁の和を計算する。
string upper(string str); // 英字を大文字に変換する。
string l... | insert | 36 | 36 | 36 | 37 | TLE | |
p03059 | C++ | Time Limit Exceeded | #include <stdio.h>
int main() {
int a, b, t, j;
while (scanf("%d %d %d", &a, &b, &t)) {
j = 1;
int c = 0;
if (a <= t) {
for (int i = a; i <= t; i = i + a) {
c = c + b;
}
printf("%d\n", c);
}
if (a > t)
printf("0");
}
return 0;
} | #include <stdio.h>
int main() {
int a, b, t, sum = 0;
scanf("%d%d%d", &a, &b, &t);
int num;
num = t / a;
sum = sum + num * b;
printf("%d\n", sum);
return 0;
} | replace | 2 | 15 | 2 | 8 | TLE | |
p03059 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int A, B, T;
cin >> A >> B >> T;
int t = A, ans = 0;
while (t < T + 0.5) {
ans += A;
}
cout << ans << endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
int A, B, T;
cin >> A >> B >> T;
int t = A, ans = 0;
while (t < T + 0.5) {
ans += B;
t += A;
}
cout << ans << endl;
return 0;
}
| replace | 8 | 9 | 8 | 10 | TLE | |
p03059 | C++ | Time Limit Exceeded | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int i = 1;
int z = 0;
while (a * i <= c) {
z += b;
}
cout << z << endl;
} | #include <iostream>
using namespace std;
int main() {
int a, b, c;
cin >> a >> b >> c;
int i = 1;
int z = 0;
while (a * i <= c) {
z += b;
i++;
}
cout << z << endl;
}
| insert | 9 | 9 | 9 | 10 | TLE | |
p03059 | C++ | Runtime Error | #include <bits/stdc++.h>
using namespace std;
#define N 1000
#define pb push_back
#define mp make_pair
#define ll long long
#define mod 1000000007
#define all(cont) cont.begin(), cont.end()
#define sortcmp(n, cmpfunc) sort(all(n), cmpfunc)
#define fastio ... | #include <bits/stdc++.h>
using namespace std;
#define N 1000
#define pb push_back
#define mp make_pair
#define ll long long
#define mod 1000000007
#define all(cont) cont.begin(), cont.end()
#define sortcmp(n, cmpfunc) sort(all(n), cmpfunc)
#define fastio ... | replace | 24 | 28 | 24 | 28 | 0 | |
p03059 | C++ | Time Limit Exceeded | #include <assert.h>
#include <bits/stdc++.h>
#include <time.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// s... | #include <assert.h>
#include <bits/stdc++.h>
#include <time.h>
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
// s... | insert | 68 | 68 | 68 | 69 | TLE |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.