fast_code_id
stringlengths
64
64
fast_id
stringlengths
64
64
fast_time
float64
0
0.39
language
stringclasses
1 value
measured_fast_code_id
stringlengths
64
64
measured_slow_code_id
stringlengths
64
64
measurement_metric
stringclasses
1 value
pair_id
stringlengths
6
9
problem_id
stringlengths
6
6
slow_code_id
stringlengths
64
64
slow_id
stringlengths
64
64
slow_time
float64
0
1.69
speedup
float64
2
72.5
stratum
stringclasses
3 values
sampling_key
stringlengths
64
64
slow_code
stringlengths
107
29.9k
fast_code
stringlengths
88
161k
9e4e11481b628ad865f0bea59eb979a5c72012521054021fd3622b3578453fac
e2d165a261ebfe7d0feed86558f847f866c1ff6fd1d6d1d6d28c6aca8c4e08f9
0.018797
cpp
e2d165a261ebfe7d0feed86558f847f866c1ff6fd1d6d1d6d28c6aca8c4e08f9
c4a024eb9d43967900ec2ae0a8c6c76336c72db8f8036a14556037aade4db120
PIE_released_gem5_runtime
pie_60535
p03007
d40dc559b4082e75cc551c340e989c2e32457c796b3939b369efc2276d39be19
c4a024eb9d43967900ec2ae0a8c6c76336c72db8f8036a14556037aade4db120
0.116592
6.20272
4-8
f0b406206b17c792c3b85bf31b8f8624b39ad988b56620c7bdba7d9c0e0b71bb
#include <bits/stdc++.h> #define ll long long #define maxn 500005 #define INF 0x3f3f3f3f using namespace std; int n; int a[maxn]; struct Node { int x, y; Node() : x(0), y(0) {} Node(int xx, int yy) : x(xx), y(yy) {} }; vector<Node> ans; bool vis[maxn]; int main() { scanf("%d", &n); int da = 0, ...
#include <cstdio> #include <cstring> #include <cmath> #include <algorithm> using namespace std; const int SIZEN = 100010; typedef long long LL; int N; LL a[SIZEN] = {0}; int main() { scanf("%d", &N); for (int i = 1; i <= N; i++) scanf("%lld", &a[i]); sort(a + 1, a + 1 + N); LL ans = 0; if (a...
5c682a3177e44a83fa69734dd10585b0cea3dcc02fa9835d16c53fbf4a6095e0
f6e689d7df35590e2d71d27213e43a8c36b75f5c58028a65ed5a1fa559e02fac
0.023311
cpp
f6e689d7df35590e2d71d27213e43a8c36b75f5c58028a65ed5a1fa559e02fac
de1b37c0c7fe59eb98d8d9f47de1b53b2f373501304126c892cfdb3a4692fd8c
PIE_released_gem5_runtime
pie_60539
p01220
476afb3a034db72bb6cb79e7b29eb5689149282b8aac0afa967484c01e49b280
de1b37c0c7fe59eb98d8d9f47de1b53b2f373501304126c892cfdb3a4692fd8c
0.106196
4.555563
4-8
cf2ea99485a0fe775275d82ae1afbc36111bc07d3d2257567deba5d7f20419f8
#include <iostream> #include <algorithm> #include <cmath> #include <complex> #include <vector> #include <cstdio> using namespace std; typedef complex<double> P; const double eps = 1.0e-7; const double pi = acos(-1); bool equals(double a, double b) { return abs(a - b) < eps; } bool equals(P a, P b) { return e...
#include <cstdio> #include <cmath> using namespace std; const double eps = 1.0e-7; const double pi = acos(-1); bool equals(double a, double b) { return abs(a - b) < eps; } int main() { const static double rr = 1.0 / (2.0 * (1.0 - cos(pi * 2.0 / 3.0))); double N; while (scanf("%lf", &N) != EOF && N) { ...
bae6c88a06d52929df568bf2a36a147eb8c3ca567a5f8d1d26f453f2f06a7cf3
5b191b959d15e835e97bac8b2f600e65a4760a7a3520a8e194f516535bccc291
0.064748
cpp
5b191b959d15e835e97bac8b2f600e65a4760a7a3520a8e194f516535bccc291
bc70232b5048e6c904a6a60eacf962475e0105c87bd4efabf122bede6bf320fc
PIE_released_gem5_runtime
pie_606
p01450
0f7ebc807c0fe29f7df0952394e9272849c33f4d4344bfa4a0c59c4a02e647b9
bc70232b5048e6c904a6a60eacf962475e0105c87bd4efabf122bede6bf320fc
0.608764
9.402037
8+
1995e03ef10227e303f19cca029b43bcaa56576098c4c167a195ab2aa1eba914
#include <iostream> #include <vector> #include <algorithm> #include <cstring> using namespace std; const int MOD = 1000000007; int main() { int N, W; static int dp[201][10001]; while (cin >> N >> W) { vector<int> w(N); for (int i = 0; i < N; i++) cin >> w[i]; sort(w.begin(), w.end())...
#include <iostream> #include <vector> #include <numeric> #include <algorithm> using namespace std; const int MOD = 1000000007; int solve(const vector<int> &w, int W) { if (w.back() > W || w.size() == 1) return 1; int sum = accumulate(w.begin(), w.end(), 0); if (sum <= W) return 1; vector<int> ...
32144271c951f635f0e6a85eabc0bed9b30f7fccf59ed127520bb25a543cb208
159fcd4c740aca67e326f735051cf0c8aa6c0ff701a73279f3cf9a8bc9f3ad6a
0.075031
cpp
159fcd4c740aca67e326f735051cf0c8aa6c0ff701a73279f3cf9a8bc9f3ad6a
4a827f944b10557c1195b6e05280de15d068b2b16e5afe73390d1a6233798dce
PIE_released_gem5_runtime
pie_60971
p02716
14ddcbf0ab76dcd893ac794a3156c3d8bdb2388a10c53ebc5398cbbd93e422ce
4a827f944b10557c1195b6e05280de15d068b2b16e5afe73390d1a6233798dce
0.901264
12.011923
8+
0bcd11ba4a2a162fc49a5d5c29fed7ef1ef27367c7cc62c00cf4cdbf3aae1850
#include <bits/stdc++.h> using namespace std; #define trace(...) __f(#__VA_ARGS__, __VA_ARGS__) template <typename Arg1> void __f(const char *name, Arg1 &&arg1) { cerr << name << " : " << arg1 << "\n"; } template <typename Arg1, typename... Args> void __f(const char *na, Arg1 &&arg1, Args &&... args) { cons...
#include <bits/stdc++.h> using namespace std; long long dp[200005], sum[200005], s[200005]; int main() { int n; while (cin >> n) { for (int i = 1; i <= n; i++) cin >> s[i]; for (int i = 1; i <= n; i++) { if (i == 1) sum[i] = s[i]; else sum[i] = sum[i - ...
73efd85a0fe981a25238d619f62e0e5b01258f6f92369efe53d10c207525d246
92cfadd4d9c0e0a3776e19628639ee7ab8b980570b119bd9beae020048143f58
0.007053
cpp
92cfadd4d9c0e0a3776e19628639ee7ab8b980570b119bd9beae020048143f58
7e7262672bfa412cdc2ccc01cdcb31e3ce50dda9cb71bf84a6ed22599eef6731
PIE_released_gem5_runtime
pie_61023
p04017
fd5a1092b3c50b4e339aac88ad009ebcbfa14411a96e121542a512310b98003f
7e7262672bfa412cdc2ccc01cdcb31e3ce50dda9cb71bf84a6ed22599eef6731
0.314906
44.645537
8+
1f266985c04a83f13c382647883d0058b944ba82fca248331ec2a5ac8890a16f
#include <bits/stdc++.h> using namespace std; #define ll long long #define fi first #define se second #define pb push_back #define mp make_pair #define endl "\n" #define pque priority_queue const int mod = 1000000007, N = 100005; int a[N], dis[N], b[N], reach[N][18]; signed main() { ios_base::sync_with_st...
#include <cstdio> #include <algorithm> const int MAXN = 1e5 + 1; int n, l, q, x[MAXN]; int f[MAXN][31]; void prework() { for (int i = 1; i <= n; ++i) { int pos = std ::upper_bound(x + 1, x + n + 1, x[i] + l) - x - 1; f[i][0] = x[i] + l >= x[n] ? n : pos; } for (int j = 1; j <= 30; ++j) for (i...
c1388c179a9be70f89c77f809d6cb96c24fc4a1c59d4118e63d6b9b32c12f2c8
5127f94adb4cf32978fac54cf611bba1653df43d3494a1d24c4c4ee61a8a490b
0.006135
cpp
5127f94adb4cf32978fac54cf611bba1653df43d3494a1d24c4c4ee61a8a490b
adb65613b81d1c7b772e0f0878c2e43aad36307e6ae51ef2de9a80caf45473e7
PIE_released_gem5_runtime
pie_61099
p03367
19993a47ff2ce4603e2ec285b0959fb3907e7028829093a60e20dc5335cb3e62
adb65613b81d1c7b772e0f0878c2e43aad36307e6ae51ef2de9a80caf45473e7
0.189601
30.905389
8+
8642fb81efc96229e37b85430a578e257ca0e7b7dc7db2e9ea4675efa8ea325e
#include <vector> #include <cstdio> #include <cstring> #include <algorithm> #define fo(i, a, b) for (int i = a; i <= b; i++) #define fd(i, a, b) for (int i = a; i >= b; i--) using namespace std; typedef long long ll; int read() { char ch; for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar()) ; ...
#include <cstdio> #include <cstring> #include <algorithm> #define fo(i, a, b) for (int i = a; i <= b; i++) #define fd(i, a, b) for (int i = a; i >= b; i--) using namespace std; typedef long long ll; int read() { char ch; for (ch = getchar(); ch < '0' || ch > '9'; ch = getchar()) ; int x = ch - '0'; ...
e9565952fb27dca486bf93ddf588dc5f2461afe920f278ffd2099e8f4c25609c
2c226a9e405cb50ca7c33d4178b89a4b29d058176c967e67dfac9f332fe7c3e4
0.040309
cpp
2c226a9e405cb50ca7c33d4178b89a4b29d058176c967e67dfac9f332fe7c3e4
26e2159988f11426a6bca311f34a067df6b8ea2329226df9a38a0f77c13c3a1b
PIE_released_gem5_runtime
pie_61101
p00750
f52d076a31fab596cc3186df4c54e7889aa8b995bf14efdf2cfeb86e9fc02dab
26e2159988f11426a6bca311f34a067df6b8ea2329226df9a38a0f77c13c3a1b
0.11186
2.775071
2-4
0f0369aa8bb8098360ae8ce77d746dd104c1ca903f11be72418bdb9ea2b74db2
#include <cstdlib> #include <cstring> #include <functional> #include <iostream> #include <queue> #include <utility> #include <vector> using namespace std; const int MAX_LEN = 6; const int MAX_N = 40; const int LIMIT = MAX_LEN * MAX_N; const string INF(LIMIT, 'z'); struct edge { int to; string cost; ...
#include <bits/stdc++.h> using namespace std; constexpr int MAX_LEN = 6; constexpr int MAX_N = 40; struct edge { int to; string cost; edge(int to_, const string &cost_) : to(to_), cost(cost_) {} edge(int to_, string &&cost_) : to(to_), cost(move(cost_)) {} }; void dfs(int v, const vector<vector<int>> &...
06ca9dd1e5ac955651a0bff00581910b19de8c9a7be42ad8a86dcb8ab492be3a
a645363763411841bfd26a084c4cc0fb7cca6000da9018d34cf0b6d97056acc0
0.000324
cpp
a645363763411841bfd26a084c4cc0fb7cca6000da9018d34cf0b6d97056acc0
16b53c16f84e5eae65b4f8170fa95367320349a30efec2ea1e6e2cbb69b1ff5b
PIE_released_gem5_runtime
pie_61128
p04032
611ffdfb61617f307f81b8d6b4d56dd191c2877dab4789d1a02836648b34508d
16b53c16f84e5eae65b4f8170fa95367320349a30efec2ea1e6e2cbb69b1ff5b
0.000943
2.91356
2-4
de416ec1a160aae1d48af4ca59c23bc019fe9bd43bde1d56d6dac0fae3b16e24
#include <cstdio> #include <string> using namespace std; int main() { char buf[131072]; scanf("%s", buf); string s(buf); size_t ub = s.length(); s += '$'; for (size_t i = 0; i < ub; ++i) for (size_t j = 1; j <= 2; ++j) if (s[i] == s[i + j]) { printf("%llu %llu\n", i + 1, i + j ...
#include <cstdio> #include <cstring> using namespace std; int main() { char s[131072] = {}; scanf("%s", s); size_t ub = strlen(s); s[ub] = '$'; for (size_t i = 0; i < ub; ++i) for (size_t j = 1; j <= 2; ++j) if (s[i] == s[i + j]) { printf("%llu %llu\n", i + 1, i + j + 1); ...
71f9e1f66a8d42b27dfcdd5fcdaaf693d8ae79719055c5562c2fc37b031ddce0
3dcfa79b88c9c6fbf9d6cda33ca7f6be08c9bf3980546cf0deaaf099b9afe880
0.1039
cpp
3dcfa79b88c9c6fbf9d6cda33ca7f6be08c9bf3980546cf0deaaf099b9afe880
e88df3fec8006278b3a3cd6d09a16cc54da208360d253ccd240e57c7889f9792
PIE_released_gem5_runtime
pie_61160
p03594
d05eb6dd05647cba00b60736e0ae212fe7108741baa5d90c65b1f2e7aa286725
e88df3fec8006278b3a3cd6d09a16cc54da208360d253ccd240e57c7889f9792
0.241692
2.326208
2-4
813a9ca58c0c950f88a20c10a3f52ccb349fa96fbc69e7b98c4a102dbb721d60
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < n; ++i) #define SORT(name) sort(name.begin(), name.end()) #define ZERO(p) memset(p, 0, sizeof(p)) #define MINUS(p) memset(p, -1, sizeof(p)) #define MOD 1000000007 #define INF 1000000000 int H, W, d; int a...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, n) for (int i = 0; i < n; ++i) #define SORT(name) sort(name.begin(), name.end()) #define ZERO(p) memset(p, 0, sizeof(p)) #define MINUS(p) memset(p, -1, sizeof(p)) #define MOD 1000000007 #define INF 1000000000 int H, W, d; int m...
80a114a0de9feeaa9d41238c5e3f30f2eeefd616b3f22b57273d3e81bc81cea9
75a64994d48877c0432ff6aceb4dd9c8778a2177dd5eff52a1c1ae4d4142125d
0.107592
cpp
75a64994d48877c0432ff6aceb4dd9c8778a2177dd5eff52a1c1ae4d4142125d
ca8542b041040e2e8d49bd39eafd0e972abbcdf992b2be034fcc377e670f2957
PIE_released_gem5_runtime
pie_61196
p02955
5e98d4877ea989192cd33acff967680a24f625ce0d83242fc420592731578c32
ca8542b041040e2e8d49bd39eafd0e972abbcdf992b2be034fcc377e670f2957
0.278818
2.591431
2-4
946aef6d8a9615397faf6cf15c64cc4518727a747f098a8d6bd58b572eaf2047
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define ALL(v) (v).begin(), (v).end() typedef long long int ll; typedef pair<ll, ll> P; template <class T> inline bool chmax(T &a, T b...
#define _USE_MATH_DEFINES #include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = (a); i < (b); i++) #define rrep(i, a, b) for (int i = (a); i > (b); i--) #define ALL(v) (v).begin(), (v).end() typedef long long int ll; typedef pair<ll, ll> P; template <class T> inline bool chmax(T &a, T b...
a76984c6c65aabf9bd000b384591b87bf8ccd1184d42662f1f7551330491a408
7b518213ded05dec0db7689a51987314e9a429359bc734d612975ecb692cd34a
0.016132
cpp
7b518213ded05dec0db7689a51987314e9a429359bc734d612975ecb692cd34a
5700fb0ec8b6655ac29b83976c4aa43246daba131fed7aaf612d931902cfdccf
PIE_released_gem5_runtime
pie_613
p03357
93d13ffae9d083940c403ae43c8950a23dde654607f3f4a8c5de6442394fa923
5700fb0ec8b6655ac29b83976c4aa43246daba131fed7aaf612d931902cfdccf
0.282066
17.484792
8+
6f3c21118670b7e95b5d9d4b971c60b59c531054cf6d1cb24e77d55033033674
#include <cstdio> #include <cstring> char op[10]; int n, a[4001]; int b[4001][2], bit[4001]; bool c[4001]; int f[2001][2001]; int Min(int a, int b) { return a < b ? a : b; } void Add(int x, int ad) { for (int i = x; i <= n + n; i += (i & (-i))) bit[i] += ad; } int query(int x) { int sum = 0; for (...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; #define x first #define y second #define mp make_pair #define pb push_back template <typename TYPE> inline void chkmax(TYPE &x, TYPE y) { x < y ? x = y : TYPE(); } template <typename...
5a2f573ea682cd935b66715f257640075505064ceae7f25cc3c92c62a4940921
e40e10293099c3e7603d97e5c455a17460ecbab1ee8f34d0bab28fa7ed304306
0.019572
cpp
e40e10293099c3e7603d97e5c455a17460ecbab1ee8f34d0bab28fa7ed304306
9b30c5f6a7e4e95365fe85397f0d6fc5884ea11007658977c8e04f87753c1768
PIE_released_gem5_runtime
pie_6149
p03136
b691e23eb551d344bfa6626da9fc2366e7b2e528259542c02643a4620df0eea9
9b30c5f6a7e4e95365fe85397f0d6fc5884ea11007658977c8e04f87753c1768
0.070927
3.623944
2-4
133abdff8f82b12a63f022e912098a3146491ab8b47ff1af1c6831572068625e
#include <iostream> #include <algorithm> using namespace std; int main() { int n, temp, m = 0, sum = 0; cin >> n; while (n) { cin >> temp; sum += temp; m = max(m, temp); n--; } sum -= m; m < sum ? cout << "Yes" : cout << "No"; return 0; }
#include <stdio.h> #include <stdlib.h> #define size 1000000 int main() { int n, i, c = 0, a[size], b = 0; scanf("%d", &n); for (i = 0; i < n; i++) scanf("%d", &a[i]); for (i = 0; i < n; i++) { c += a[i]; if (a[i] > b) b = a[i]; } if ((c - b) > b) printf("Yes\n"); els...
1998845c3e6cefca1d3663d35244ab1cc09a77f24f1f7c46421c25a567ce564e
52bf0a1a7ece26f7d871a7a4008dd018fad5e205a273c398eb0919e073e40e7e
0.0168
cpp
52bf0a1a7ece26f7d871a7a4008dd018fad5e205a273c398eb0919e073e40e7e
fb69a547c6acb9071f56bb0df49ee724ab06bc09d8170961649a1f6bb4694e56
PIE_released_gem5_runtime
pie_61883
p03166
2b4b9efb481fd80309ab989c7346d7d396b772a583fb08219daa975b46b14226
fb69a547c6acb9071f56bb0df49ee724ab06bc09d8170961649a1f6bb4694e56
0.323635
19.263727
8+
da9940c21c7d70f728f217e40c452935d817c47855d1b409ad6f4fc9dd644ae4
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << (x) << "\n" #define cesp(x) cerr << (x) << " " #define...
#pragma GCC optimize("O3") #pragma GCC target("avx") #include <cstdio> #include <algorithm> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ...
3935d12fafed918b0a4a65fce5c697b699430a7731cbf33a85548cc5ffacd9eb
b6ec2033590980fabcc81faf23faf11f11ff110d3c0c923d8f423aca9357cc20
0.107998
cpp
b6ec2033590980fabcc81faf23faf11f11ff110d3c0c923d8f423aca9357cc20
c35452fcb212b2b604f2ea0b7049dcba02401fa44ef5fc6e03450746229c595a
PIE_released_gem5_runtime
pie_6230
p03959
82cc4a4833f02e9de02081078768f525b5a0338aef2ec1817b854387fc4e32dd
c35452fcb212b2b604f2ea0b7049dcba02401fa44ef5fc6e03450746229c595a
0.286318
2.65115
2-4
58be41dcf6cf0f10662d6f140b861fe623e0e65167a4c731f7aa5192c3a0e7c5
#include <iostream> #include <string.h> #include <string> #include <cstdio> #include <algorithm> #include <stack> #include <queue> #include <vector> #include <cmath> #include <utility> #include <set> #define ll long long int #define ld long double #define INF 1000000000 #define EPS 0.0000000001 #define M...
#include <iostream> #include <algorithm> #include <cstdio> #include <cmath> #include <math.h> #include <string> #include <string.h> #include <stack> #include <queue> #include <vector> #include <utility> #include <set> #include <map> #include <stdlib.h> #include <iomanip> using namespace std; #define ll ...
69a0280ad679c8380a697e3516a586cb398892b7ef1aa6a6704f75f5296d4c26
3f670559066d579699dabe4f474e2bd5c9101429b57264b156c05e8bf7f96a9e
0.020061
cpp
3f670559066d579699dabe4f474e2bd5c9101429b57264b156c05e8bf7f96a9e
11009f36475a04002dd9b4766654b2c0ec58d9e4a94accd107324333488a3afc
PIE_released_gem5_runtime
pie_6231
p03321
69024668931443bb053b22eaa61227fc6ce4a1cc31331f8e5726973a3974d4a1
11009f36475a04002dd9b4766654b2c0ec58d9e4a94accd107324333488a3afc
0.320222
15.962417
8+
62d83d41cfe7f3d97ba649587905b50ebedf1dc7a63b26125fecd23d5aa1bc58
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define sf scanf #define pf printf #define pb push_back #define mp make_pair #define PI (acos(-1.0)) #define mod 1000000007LL #define IN freopen("C.in", "r", stdin) #define OUT freopen("output.txt", "w", std...
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N = 705; const int M = 490005; int n, m, u, v, ans = 0x7fffffff; bool g[N][N], s[N], t[N]; int col[N], cnt[2]; void dfs(int x, int c) { col[x] = c; cnt[c == 1]++; for (int i = 1; i <= n; i++) { if (i == x || ...
433102814d6d259bb702beba79a1187b37e258ffd40f714cba278bdb10779d58
226c0b3214dc585ec1d1d54bf91381b03ba861f5ed73bb4d0a8134ec1c51c664
0.082119
cpp
226c0b3214dc585ec1d1d54bf91381b03ba861f5ed73bb4d0a8134ec1c51c664
6046afd28d7ba4b03ce584cbe8d129a123b9bc5401ee5b860d1e763b18c97659
PIE_released_gem5_runtime
pie_62895
p02991
218b9865a54cddb43367b8728ee2ff7043ed9a28db894a4a2f848cce1671837d
6046afd28d7ba4b03ce584cbe8d129a123b9bc5401ee5b860d1e763b18c97659
0.874404
10.64808
8+
f107d72b6ff84df9cffedaf22c96185911795590b2efd02996ac7461e585b2e8
#include <bits/stdc++.h> using namespace std; static const int MAX = 300000; static const int INF = 1e9; vector<int> G[MAX], d(MAX, INF); void bfs(int s) { queue<int> q; q.push(s); d[s] = 0; while (!q.empty()) { int u = q.front(); q.pop(); for (int v = 0; v < G[u].size(); v++) { i...
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { cin.tie(0); ios::sync_with_stdio(false); int n, m; cin >> n >> m; vector<vector<int>> G(n); for (int i = 0; i < m; i++) { int u, v; cin >> u >> v; u--; v--; G[u].emplace_back(v); } int s, ...
1b4bcc0b36ce724fef520b0fe8045ad1d971bda5ad5719bacf2cd725cee2b38a
3a772e2c5ef3085d8c2d3414206c4fc0a977517c0f75861023807bd5f711c3eb
0.021963
cpp
3a772e2c5ef3085d8c2d3414206c4fc0a977517c0f75861023807bd5f711c3eb
3889f1d36766acc643a48a53c07996595e02a4df3716384c9004a85fc168f35a
PIE_released_gem5_runtime
pie_63091
p03160
498ca7755bb3f50661df8e65ba883216cd8d88c17faecaf1a197afcbb80282ed
3889f1d36766acc643a48a53c07996595e02a4df3716384c9004a85fc168f35a
1.000694
45.563068
8+
026ff91cd4e0fa115cadeb93565566a07275ad61946e638bc3d797a6fc2d79cc
#include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false), cin.tie(0) typedef long long ll; const int maxn = 1e6 + 5; const int inf = 0x3f3f3f3f; ll a[maxn]; ll dp[maxn]; int main() { IO; int n, k = 2; cin >> n; for (int i = 1; i <= n; ++i) cin >> a[i]; memset(dp,...
#include <cstdio> #include <algorithm> using std::min; #define MAXN 100003 int abs(int z) { if (z < 0) return -z; else return z; } int main(void) { int N, i, j; int h[MAXN], p[MAXN]; scanf("%d", &N); for (i = 0; i < N; i++) { scanf("%d", h + i); } p[N - 1] = 0; p[N - 2...
d9bc41a82141d088ac97843986786ae751b06a497fbc46e8faa2c34a59f59646
e78862e0e1b917cf6ad57829fe6c1517267cb23c9517d53c62985615289a0abb
0.000184
cpp
e78862e0e1b917cf6ad57829fe6c1517267cb23c9517d53c62985615289a0abb
5d295fcd5eed1d08e89abe6d2b11c4e8d794baac04170c9e0c2e1acfaea8af58
PIE_released_gem5_runtime
pie_6782
p03450
5a58d4e6bc330677e89ddd40e0efe7d1a2f71e5ed5b55d46863370f83dc184bb
5d295fcd5eed1d08e89abe6d2b11c4e8d794baac04170c9e0c2e1acfaea8af58
0.008447
45.813593
8+
5f327e5cf41f4e891924ae68d0a235dcb73e8b1b247c227cd44f084e771519dd
#include <bits/stdc++.h> #define LL long long #define mp make_pair #define pb push_back #define INF (1 << 29) using namespace std; typedef pair<int, int> pii; int n, m; vector<pii> G[200010]; int col[200010]; int vis[200010]; bool dfs(int x, int co) { if (vis[x] != -1) return col[x] == co; vis[x] =...
#include <cstdio> #include <cctype> #include <cstring> #include <algorithm> #include <cmath> #define re register #define ll long long #define il inline #define rep(i, s, t) for (re int i = (s); i <= (t); i++) #define rev_rep(i, s, t) for (re int i = (s); i >= (t); i--) #define each(i, u) for (int i = head[u...
81e8912f1b855f1d53bec75cb59265376ac7983a91221aa4890aeb95caa38ce8
38763beae38e26b9450997b4ea64820b9ea0654d0c17166f6408d52162fa3bb8
0.111138
cpp
38763beae38e26b9450997b4ea64820b9ea0654d0c17166f6408d52162fa3bb8
dd5a537bfc4f6a7e32cadb9f6df1e6b64c83b358d271b5de64124154402a1c2d
PIE_released_gem5_runtime
pie_683
p02618
6e5aaeb12c6341c672b530cea3279d5fd884ed0055c31df7fe16e5f80cab9188
dd5a537bfc4f6a7e32cadb9f6df1e6b64c83b358d271b5de64124154402a1c2d
0.268517
2.416063
2-4
1394bfd115d2dfe01d1501779145808485394e06cc4c85a74c81f0ab13aa8414
#include <bits/stdc++.h> using namespace std; long long calc(int n, const vector<int> &options, const vector<int> &cost, const vector<array<int, 26>> &s, int dd, int nt, int ot) { int before(dd - 1), after(dd + 1); while (before >= 0 && options[before] != nt) before--; while (after < n &&...
#include <bits/stdc++.h> using namespace std; long long calc(int n, int c1, int c2, int s1, int s2, const vector<int> &options, int d, int nt, int ot) { int b1(d - 1), a1(d + 1), b2(d - 1), a2(d + 1); while (b1 >= 0 && options[b1] != nt) b1--; while (b2 >= 0 && options[b2] != ot) b2--...
8d902291c7c6b30a6e51f38aacb3776d5972a8aa9f77e5a3d3ad3c85498eb529
f7208ae8ffe36e978421ac3ebae151a3f91118d7c723921283e069597b48eab8
0.024378
cpp
f7208ae8ffe36e978421ac3ebae151a3f91118d7c723921283e069597b48eab8
f6f44edefdbb3bcfc80fbcbd531e60c9450f949a6e6cca4fd982f1f7897a6dac
PIE_released_gem5_runtime
pie_695
p02874
53475e6719f1a0a139ffccbf06c26a179126665be7f980a82ea6a14b48654cde
f6f44edefdbb3bcfc80fbcbd531e60c9450f949a6e6cca4fd982f1f7897a6dac
0.301746
12.377725
8+
445d9fa23dfb19bc462cce4cf7904a6c965f9df2d52cf933685ddf4f7535a277
#pragma GCC optimize("O3") #pragma GCC target("avx") #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << (...
#pragma GCC optimize("O3") #pragma GCC target("avx") #include <cstdio> #include <algorithm> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #defin...
46d2adca9aa389dd8f20616d65cabf4af7de20c15c4d984bddd9f75219f0d042
dfc1f341c7875fe161ce5c45e99c19dff4d5075f9f5be6ad858c2bc567ed90e2
0.106089
cpp
dfc1f341c7875fe161ce5c45e99c19dff4d5075f9f5be6ad858c2bc567ed90e2
e737a112642316b46ca2ce09aba26b7c7f9384bc217d92ebaa256c21f12efbeb
PIE_released_gem5_runtime
pie_699
p02940
d772be3cb1632df82287b5647672f731d04a57da31754ac7c3d1a417248940df
e737a112642316b46ca2ce09aba26b7c7f9384bc217d92ebaa256c21f12efbeb
0.219674
2.070651
2-4
a8b69641ac5625c79dae719853d518bb352ccf1ebe05e79a742e57963548db96
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <math.h> #include <cmath> #include <cctype> #include <string> #include <set> #include <iomanip> #include <map> #include <algorithm> #include <functional> #include <vector> #include <climits> #include <stack> #include <q...
#include <iostream> #include <cstdio> #include <cstring> #include <cstdlib> #include <math.h> #include <cmath> #include <cctype> #include <string> #include <set> #include <iomanip> #include <map> #include <algorithm> #include <functional> #include <vector> #include <climits> #include <stack> #include <q...
b5ee680896c697f5a72da80f0b0d889fb706d55b7c6c642bd948a21dd8ba9028
4b2e5f50560a521c162e2da6334383b893384f610a2c84541612885bbe8aca48
0.107307
cpp
4b2e5f50560a521c162e2da6334383b893384f610a2c84541612885bbe8aca48
d1926e7178e7b61590d15654beee7804c6ddd993f0f742f72e88c1501dd0d27b
PIE_released_gem5_runtime
pie_700
p03079
2d484c186d9ea9b3183da4b68bcef6f9b1650fa0dfd5297d59f489d55733a445
d1926e7178e7b61590d15654beee7804c6ddd993f0f742f72e88c1501dd0d27b
0.502247
4.680465
4-8
b62b15b61a7e35f70a483053fd9e0bfc0c4f07b210b0e2e7dcdcb9ef864aff45
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <functional> #include <iomanip> #include <stdlib.h> #include <string.h> #include <cstring> #include <cmath> #include <map> #include <queue> #include <deque> #include <stack> #include <set> #include <s...
#include <iostream> #include <cstdio> #include <string> #include <vector> #include <algorithm> #include <functional> #include <iomanip> #include <stdlib.h> #include <string.h> #include <cstring> #include <cmath> #include <map> #include <queue> #include <deque> #include <stack> #include <set> #include <s...
9eff682e607dcfce712c05593183e9b928f7fdb065e0ce03bf06ea85572e6a36
4ea8863bf1dcc3a7d9966a8b56d4a2a8bb2df753c558894d0e1c11f03a6b4734
0.107131
cpp
4ea8863bf1dcc3a7d9966a8b56d4a2a8bb2df753c558894d0e1c11f03a6b4734
61ecdf13735da291d29601c29e1716b83f83aa51c5c024990e695d288e223e72
PIE_released_gem5_runtime
pie_70931
p03062
84451d088b722b9ac29753f220dee9e15bfbdcdc07620d2f1f4159bb7d6621c4
61ecdf13735da291d29601c29e1716b83f83aa51c5c024990e695d288e223e72
0.450436
4.204553
4-8
316b9b11c0a7ba85f61d9c699b62f88d526f5fce56df1ac38fab520dfee7c465
#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; #define off \ ios_base::sync_with_stdio(0); ...
#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; #define off \ ios_base::sync_with_stdio(0); ...
3e86b0fefa7a7378a64a2848665aa64efd85b311f5d18e33b1cef069b45475e4
980cd3aa80ef550230bb324a91124fdc40cef4795d55c5e880e89a86fb11ead9
0.091588
cpp
980cd3aa80ef550230bb324a91124fdc40cef4795d55c5e880e89a86fb11ead9
bc1859ad24e982315ee015d2cecaaa2f75fe7636d98c8219a82036ede9abc9a3
PIE_released_gem5_runtime
pie_70945
p03077
023b94791abdc36e219157a2ca74a58ff3aab3bc307ecefc4f1f0349abb68310
bc1859ad24e982315ee015d2cecaaa2f75fe7636d98c8219a82036ede9abc9a3
0.326645
3.566458
2-4
c88a283e3efb71d650c2b4b70f6718e5b22860a85a575ee95cbb4184e7631fd2
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = (int)1e5 + 10; const double eps = 1e-8; template <typename T> inline T gcd(T a, T b) { a = abs(a), b = abs(b); while (b) { a %= b; swap(a, b); } return a; } vector<pair<int, int> > adj[N + 7]; int main() { ios_ba...
#include <bits/stdc++.h> using namespace std; int main() { long long int n, i, j, min, a[10]; cin >> n; min = 1000000000000009; for (i = 0; i < 5; i++) { cin >> a[i]; if (a[i] < min) min = a[i]; } if (n % min == 0) cout << (n / min) + 4 << endl; else cout << (n / m...
a8b516308c67f4ebc7958ef8962aff3103ee31e99d6e3d339437509e49309b67
70dcc15d2b2627d63c45a4bf8960b544c4eb2d6de357a88101d5564ef63df714
0.018598
cpp
70dcc15d2b2627d63c45a4bf8960b544c4eb2d6de357a88101d5564ef63df714
61440dab67bb9b20de6878db6c774666f2c15a256d1f62f87f6d893496dbb0a0
PIE_released_gem5_runtime
pie_70962
p03678
b54779ef30353f93b7d02075fe37658a98c8cde642b4f88d1ecf1cfc7103905f
61440dab67bb9b20de6878db6c774666f2c15a256d1f62f87f6d893496dbb0a0
0.088423
4.754457
4-8
d951a8f5bf38187f557578203b5016c371b02d656463ec0a841567787d23316e
#pragma GCC optimize(3) #include <iostream> #include <iomanip> #include <stack> #include <queue> #include <list> #include <vector> #include <set> #include <map> #include <string> #include <algorithm> #include <cmath> #include <cstdio> #include <cstring> #include <cstdlib> #include <ctime> #define ll lon...
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int p = 998244353; typedef unsigned long long ull; int n, len, mx; long long l, r, siz[110], cnt1[110], cnt2[110], ans[26], sum[110][26]; ull fhash[200010], bhash[200010], bs[200010]; char s[200010]; void solve(long long m, i...
5a9b937bd74c565d110547c57bbe53d7fb6a32747c34114ff1c31b5135b26c7f
aeceba5756dce480a990bc4e00590ea782376aa98cbe3110e1b535a026dda632
0.01737
cpp
aeceba5756dce480a990bc4e00590ea782376aa98cbe3110e1b535a026dda632
f5fa69005c863a4b5ce374e0f961e2003a8c4883152ea79e68e6b0201d9c4c7b
PIE_released_gem5_runtime
pie_70967
p00654
b6428820bf22797c468250ff75fa44817f0f5954789ad0835799235ce9d36daa
f5fa69005c863a4b5ce374e0f961e2003a8c4883152ea79e68e6b0201d9c4c7b
0.082204
4.732579
4-8
181eb9e67fe42a53c03e93e313bceb613c7eefa7e266f5d2bc235c75a9966ba9
#include <iostream> #include <cstdio> #include <cmath> #include <algorithm> using namespace std; typedef long long LL; #define M 100005 LL gcd(LL a, LL b) { return a == 0 ? b : gcd(b % a, a); } LL n, a[M], b[M], c[M], t; int main() { while (scanf("%lld", &n) != EOF) { if (!n) break; int x = ...
#include <cstdio> #include <algorithm> #include <cmath> typedef long long ll; const int N = 250 + 10; ll a[N]; int idx; int n; void work() { ll b, mx; mx = 0; int idx = 0; for (int i = 0; i <= n * (n + 1) / 2 - 1; ++i) { scanf("%lld", &b); if (!(b & 1)) { a[idx++] = b; } else {...
6995adb02fd5821e4dad9651eeb0831e32f2a41c108ef5960e5f0f0fa716f07a
d8a9fae01734bb116b818d06cd0da2394edb37012f4db12c81c53e7ae732f25c
0.014014
cpp
d8a9fae01734bb116b818d06cd0da2394edb37012f4db12c81c53e7ae732f25c
c34eefea11ff3de8633f49bcc10681c480fbb7985b97f10611eb55ab35a710cb
PIE_released_gem5_runtime
pie_71001
p03619
8b4804663faadb3beb2efff5927e8d6b6e83a84d4b9a4d9ab31f0cf95f70dc3f
c34eefea11ff3de8633f49bcc10681c480fbb7985b97f10611eb55ab35a710cb
0.13681
9.762203
8+
11daf8fe8050b6e3632c1f89759c5483782436ff036e34ddd094665e6bdd5c1e
#include <bits/stdc++.h> #define F(i, a, b) for (int i = a; i <= (b); ++i) #define F2(i, a, b) for (int i = a; i < (b); ++i) #define dF(i, a, b) for (int i = a; i >= (b); --i) #define dF2(i, a, b) for (int i = a; i > (b); --i) #define eF(i, u) for (int i = h[u]; i; i = nxt[i]) #define ll long long #define ld dou...
#include <cstdio> #include <algorithm> using namespace std; #define MAXN 200010 #define PI 3.1415926535897932384626433832795 struct node { int x, y; bool operator<(const node &a) { return x < a.x; } } e[MAXN]; int sx, sy, ex, ey, n; void Pre() { bool f = 0; if (sy > ey) swap(sx, ex),...
06f1c7294119fd71ab2a6cc660635d35dd6de46582b2fbd1819508e9f58cca10
0c6ebafaa3c40750939000a35bf340be5a8f738d7aba756f0f6286776336c340
0.001084
cpp
0c6ebafaa3c40750939000a35bf340be5a8f738d7aba756f0f6286776336c340
2e2bba0e68bdcb9b7eb80c4cc17f17a42e2ab1724cc5fe80fd90b5fca2d5cedc
PIE_released_gem5_runtime
pie_71010
p03923
bd74e32bed3c833414a6390220d37538edef78066cccccf057bd8d62b2c8aed7
2e2bba0e68bdcb9b7eb80c4cc17f17a42e2ab1724cc5fe80fd90b5fca2d5cedc
0.002175
2.00595
2-4
6328a5864c4cd04e2879cce4537d953d02846cdb7a365ede6ed59e8507c95e12
#include <bits/stdc++.h> using namespace std; using Int = __int128_t; Int abs128(Int val) { return val < 0 ? -val : val; } ostream &operator<<(ostream &os, Int val) { if (ostream::sentry(os)) { __uint128_t tmp = abs128(val); char buf[64]; char *d = end(buf); do { --d; *d = char(...
#include <bits/stdc++.h> using namespace std; using Int = __int128_t; Int abs128(Int val) { return val < 0 ? -val : val; } ostream &operator<<(ostream &os, Int val) { if (ostream::sentry(os)) { __uint128_t tmp = abs128(val); char buf[64]; char *d = end(buf); do { --d; *d = char(...
0ed69cf8270287f528debcdd6834c4750e8035d8e13284617718c1c589ec611b
e37aba1bc599665fd33fd49a9450b389d127f6227981c20f1f0065dcfd2a83e1
0.107078
cpp
e37aba1bc599665fd33fd49a9450b389d127f6227981c20f1f0065dcfd2a83e1
57f83fcbf077cd1bc20cc9d7166d72ce944b3678a31d33c371cc6fed2d1aadf2
PIE_released_gem5_runtime
pie_71019
p03381
14c387e8718a4df5f5c943a6cf2e14725d699c85c220d68913eec7661552d04a
57f83fcbf077cd1bc20cc9d7166d72ce944b3678a31d33c371cc6fed2d1aadf2
0.635355
5.933575
4-8
852c520390dca95386bf241dba704bb94fa8ed49035e5292c81aff99973a9be7
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 2e5 + 10; int n; struct TMP { int x, indx, ans; TMP() { x = indx = ans = 0; } } ar[N]; int32_t main() { ios::sync_with_stdio(0); cin.tie(0); cin >> n; for (int i = 0; i < n; i++) cin >> ar[i].x, ar[i].indx = ...
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 100; int n, a[N], b[N]; int main() { ios::sync_with_stdio(false), cin.tie(0); cin >> n; for (int i = 0; i < n; i++) { cin >> a[i]; b[i] = a[i]; } sort(b, b + n); for (int i = 0; i < n; i++) if (a[i] >= b[(n >> 1)]) ...
b08b6d295b587a3d8496b0ed233c33010da022d7746638a9d989c56580fc5b9a
573484bff0dd8373fe0e84c38d4a2381943ffc33c934a4d1b976ddd87d52d9be
0.106797
cpp
573484bff0dd8373fe0e84c38d4a2381943ffc33c934a4d1b976ddd87d52d9be
27810c7694ea21f81bfecda3e042a18282c0ccbd60bde41cfda19a4b212d44e2
PIE_released_gem5_runtime
pie_71033
p03232
000f2962d4aa70ee7afe294df8958837dde37505f71f13a949b6a95d08f43ccc
27810c7694ea21f81bfecda3e042a18282c0ccbd60bde41cfda19a4b212d44e2
0.249753
2.338571
2-4
02fa4c1d10f1f6b01a9c5480cc4a3fa1201ba0aad5b3fbd41603ae04e1054923
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) #define int long long #define double long double #define all(a) a.begin(), a.end() 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(T &a, T b) { ...
#include <iostream> #include <algorithm> #include <utility> #include <vector> #include <numeric> #include <tuple> #include <type_traits> template <class T, class U> inline bool chmin(T &lhs, const U &rhs) { if (lhs > rhs) { lhs = rhs; return true; } return false; } template <class T, class ...
ad88dcf97d4e3ca01c470a91a28bd96c0c2a5468cbe48fc2030d31b1b955f2a9
f3646a35a89f49c5ba7b71db13cf23795c06824f206733888f121d7248d762e8
0.007084
cpp
f3646a35a89f49c5ba7b71db13cf23795c06824f206733888f121d7248d762e8
0dc2ae1957234d9cda7d343345b9662097680f93b55ff5dc7ff629bea7d3f2c8
PIE_released_gem5_runtime
pie_71035
p02840
b5a67b3bc7d9c7f0f708ce790a40e3a98b348d74b03cd11ab599dad0d0618513
0dc2ae1957234d9cda7d343345b9662097680f93b55ff5dc7ff629bea7d3f2c8
0.03738
5.27651
4-8
117359a3a0087e428ec741c2d4fd8f54e84c37aca09cbb38630e3f6cb89e9383
#pragma GCC optimize("O3") #pragma GCC target("avx") #include <bits/stdc++.h> #include <cstdio> #include <algorithm> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) co...
#pragma GCC optimize("O3") #pragma GCC target("avx") #include <cstdio> #include <algorithm> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ...
53142ba720a4cf64ff2d290b359fba48d011dfb8e8bf57a221d462222e68ef35
f10e9c359190475f9760acad6c8f06525b9d6b8d03fca59a16d57a7899a66a47
0.250394
cpp
f10e9c359190475f9760acad6c8f06525b9d6b8d03fca59a16d57a7899a66a47
fa2a693df90da6d1a7dc78fbb9d4ef2564991bf978f6516ac7c7f84d1154cbdb
PIE_released_gem5_runtime
pie_71043
p03253
3f0a64980e10d1a36195df587ed2eb6122dbb27a1302a76c3212c04a3d7c4c30
fa2a693df90da6d1a7dc78fbb9d4ef2564991bf978f6516ac7c7f84d1154cbdb
0.50697
2.024691
2-4
053466bd6697df1d90bf37c49003f47a7da7b74cebd266bf2f4719ff14086de4
#include <bits/stdc++.h> using namespace std; #define ll long long const ll N = 20, P = 1e9 + 7; ll n, m, ans = 1, a[1 << N] = {1}; inline ll read() { ll sum = 0, flag = 1; char c; for (; c < '0' || c > '9'; c = getchar()) if (c == '-') flag = -1; for (; c >= '0' && c <= '9'; c = getchar()...
#include <bits/stdc++.h> #define LL long long #define maxn 201900 #define mod 1000000007 using namespace std; LL fun[maxn], ans = 1; LL power(LL a, int k) { LL ans = 1, y = a; while (k) { if (k % 2) ans = ans * y % mod; y = y * y % mod, k = k / 2; } return ans; } int main() { ...
decac1a09ffea3e885fee291f4aaa295761b78363a4a7821a930631f1b008553
25ff35dcfad38b869b6c9fe5e226c8835dc685be6b9062183dffb561c973c462
0.037858
cpp
25ff35dcfad38b869b6c9fe5e226c8835dc685be6b9062183dffb561c973c462
12c3d1155cc08fdf6123e8f08b7905f6214cd07719646c94e7fbe19cbb5d61b9
PIE_released_gem5_runtime
pie_71081
p02671
cb84a03322877c2f944a2e772aba9e2cbbdc5b8e52c4944b4095b079a3f3f3aa
12c3d1155cc08fdf6123e8f08b7905f6214cd07719646c94e7fbe19cbb5d61b9
0.106369
2.809701
2-4
499e587d2984b28f7cfa1c746dd6d03d2ce94273ab9330d0341ba5f42d530a3e
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < (int)N; i++) int N, ans[531441]; static inline void OUT(int x) { if (x >= 10) OUT(x / 10); putchar(x % 10 + 48); } static inline int Pow(int a, int b) { return b ? Pow(a * a, b >> 1) * (b & 1 ? a : 1) : 1; } string reduce(...
#include <stdio.h> #include <string.h> #pragma GCC optimize("O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") #define rep(i, N) for (int i = 0; i < (int)N; i++) const int pw[13] = {1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 59049, 177147, 531441}; static inline void OUT(int x)...
4bed06a914868b45b1575afb031f4b9c70f9783a2432f3ebbf49f8b013b60d27
46bea6a3a02e47425e5755ee78d5ef63bd607f6b868fe30e7a5e0eb5a9f98afb
0.000672
cpp
46bea6a3a02e47425e5755ee78d5ef63bd607f6b868fe30e7a5e0eb5a9f98afb
e07d5677de136267135365b3e0dc510a4a6f585c6545c0615e5e7fe4dd7d7f99
PIE_released_gem5_runtime
pie_7116
p03394
eac9c2966b3e5dc594463257d2015d01d0cba0a8b5cd42a5ae41beeee6143cae
e07d5677de136267135365b3e0dc510a4a6f585c6545c0615e5e7fe4dd7d7f99
0.003042
4.524458
4-8
2bb40bbbd999a0f793430713d1e91cc88ff423d7145f162981a9ac315568da6f
#include <bits/stdc++.h> #define fr first #define sc second #define mk make_pair #define pb push_back #define sz(s) (int)s.size() #define all(s) s.begin(), s.end() #define int long long using namespace std; const int N = 30005; int n, u[N], sum = 0, m; vector <int> ans; main() { cin >> n; ...
#include <cstdio> #include <cstring> #include <algorithm> #define MN 30000 using namespace std; inline int in() { int x = 0; bool f = 0; char c; for (; (c = getchar()) < '0' || c > '9'; f = c == '-') ; for (x = c - '0'; (c = getchar()) >= '0' && c <= '9'; x = (x << 3) + (x << 1) + c - '0') ; ...
57970f8e5efb483021fbf4f060e9456479801af5fe9630da9a3eda3109550e26
7add5d51de0f325c711887b0c4d364de7caaf162fa7f440f1e259368bdd922ef
0.114351
cpp
7add5d51de0f325c711887b0c4d364de7caaf162fa7f440f1e259368bdd922ef
6e1025bb59cd7718279b7c02acf322597c2379bac2971a48ce941784831a43ee
PIE_released_gem5_runtime
pie_7123
p03616
7d573997b1fc1926200a0889fe416d036efa3ef515cd3de9c30d136da8880973
6e1025bb59cd7718279b7c02acf322597c2379bac2971a48ce941784831a43ee
0.289
2.527308
2-4
8c414ada407533647795201611b34cc1fc04571ab0c9ef7ab3f190d08fb15ee1
#include <cstdio> #include <cstring> #include <iostream> #include <string> #include <cmath> #include <bitset> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <algorithm> #include <complex> #include <unordered_map> using namespace std; typedef long long int ll; ...
#include <cstdio> #include <cstring> #include <iostream> #include <string> #include <cmath> #include <bitset> #include <vector> #include <map> #include <set> #include <queue> #include <deque> #include <algorithm> #include <complex> #include <unordered_map> using namespace std; typedef long long int ll; ...
68ea7aba259e42a8f37b5f3c8c35c1409c5a69fe985051eb7eed572bfaec565b
9b8d124e0233d94cd9145cdb7720832cd7d704058d3df612ff234719ef55541d
0.020118
cpp
9b8d124e0233d94cd9145cdb7720832cd7d704058d3df612ff234719ef55541d
386321001866695aebe1919af8107d6e13786c00b76b272a543da2ff5fcb8df3
PIE_released_gem5_runtime
pie_71369
p02658
adcde9b67154e5385aa84425f11ca7254b04bd4781b547617c2ff4967b8765b8
386321001866695aebe1919af8107d6e13786c00b76b272a543da2ff5fcb8df3
0.928528
46.15345
8+
08b04193628ffb95572b0aa256daf64aa611d924badc0506a72872d41ba6c749
#include <stdio.h> int main() { int i; int brpkali; long long hasil = 1; unsigned long long Data = 1000000000000000000u; scanf("%d", &brpkali); long long arr[1000000] = {}; for (i = 0; i < brpkali; i++) { scanf("%lld", &arr[i]); } for (i = 0; i < brpkali; i++) { if (arr[i] == ...
#include <stdio.h> int main() { int n; scanf("%d", &n); long long int arr[n], max = 1e18, prod = 1, flag = 0, zero = 0; for (int i = 0; i < n; i++) { scanf("%lld", &arr[i]); flag = (arr[i] > max) ? 1 : flag; prod *= arr[i]; (arr[i]) ? max /= arr[i] : zero = 1; } (zero) ? puts("0") ...
80d4812483286173212b6662887840766ba05c31deaba9dd4a728836699e3514
63a367dc64cc37945657e611207e62229b4356ed9d67980b0d63c65feb28d4b0
0.009107
cpp
63a367dc64cc37945657e611207e62229b4356ed9d67980b0d63c65feb28d4b0
40e2ebf0f01e24983556e315d5bff90b86debf3849ad6a2191ab61eb0e9f0582
PIE_released_gem5_runtime
pie_71592
p00859
a5515b034cbfcd6047c3170553f22372e500e602770cfa658dfe377282b2b6d2
40e2ebf0f01e24983556e315d5bff90b86debf3849ad6a2191ab61eb0e9f0582
0.042834
4.70339
4-8
7be4658fe1f28ad6fb0f7b867e91d36088d8c639dcad5cca4c28dd426e421385
#include <iostream> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define MAX 100 #define INFTY (1 << 21) int n, m, G[MAX][MAX], E[MAX * MAX]; int eprim(int base) { int d[MAX]; bool visited[MAX]; rep(i, n) { d[i] = INFTY; visited[i] = false; } d[0] = 0; int cnt = 0;...
#include <cstdio> #include <algorithm> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) #define MAX 100 #define INFTY (1 << 21) int n, m, G[MAX][MAX], E[MAX * MAX]; int eprim(int base) { int d[MAX]; bool visited[MAX]; rep(i, n) { d[i] = INFTY; visited[i] = false; } d[0] = ...
399dd2d4005bcfda0f0059e7d4da48ed59b43b5cb2e360252a6007fee3dc7e48
41ac93f2b1982d3036f3882bb360d9f9b862f6c3a4b1eb524d427a8d17df994c
0.108434
cpp
41ac93f2b1982d3036f3882bb360d9f9b862f6c3a4b1eb524d427a8d17df994c
6d027ff40a47f1570b57b05aa2ed10e291eec5995e19f44136132a1d7686f5b7
PIE_released_gem5_runtime
pie_71602
p02572
cbbdbe9007a733c6de38817fc936809ef2b41381464a3de84e33a3f2e4e9c4d2
6d027ff40a47f1570b57b05aa2ed10e291eec5995e19f44136132a1d7686f5b7
0.896798
8.27047
8+
477c6aa4dacebf555a0122a81bd7d3dd1af4873b9d30ebf7493af426f65fc456
#include <bits/stdc++.h> using namespace std; static const long long MOD = 1000000007; #include <boost/multiprecision/cpp_dec_float.hpp> #include <boost/multiprecision/cpp_int.hpp> namespace mp = boost::multiprecision; using Bint = mp::cpp_int; using Real = mp::number<mp::cpp_dec_float<1024>>; int main() { l...
#include <bits/stdc++.h> using namespace std; static const long long MOD = 1000000007; int main() { long long N; cin >> N; long long A[200010]; long long sum = 0; for (long long i = 0; i < N; i++) { cin >> A[i]; sum += A[i]; } sum %= 1000000007; long long ans = 0; sum -= A[0]; ...
870d40d72171d36da1f79c22823f3a2002297c63e99549b711e7c47a9220a89f
caa2db331d10693c7e92cd38bb4d4d3c37066bac85aee98dc8060ffdb754e03e
0.099655
cpp
caa2db331d10693c7e92cd38bb4d4d3c37066bac85aee98dc8060ffdb754e03e
694a8018b03d502ad303cd92e80194d04afd86bf785c9bfabdf2d58493161df3
PIE_released_gem5_runtime
pie_71630
p00998
fa7e4f6884a7e86edce6d10c1ec4ccf592e596914cc99d6a7d08cfd6db343df3
694a8018b03d502ad303cd92e80194d04afd86bf785c9bfabdf2d58493161df3
1.417402
14.223106
8+
1f1859b8f4c9c239e8bc5233c096e3adfc64cf89a2b0d196f9f233e087a92920
#include <bits/stdc++.h> using namespace std; const int PMAX = 1e6; struct RMQ { using type = int; static type id() { return INT_MAX; } static type op(type l, type r) { return min(l, r); } }; template <typename M> class avl_tree { using T = typename M::type; struct node { T val, all; node ...
#include <bits/stdc++.h> using namespace std; using T = int; const T id = INT_MAX; T op(T l, T r) { return min(l, r); } struct node; node *update(node *t); struct node { T val, all; node *ch[2]; int dep, size; node() {} void init(T v) { val = all = v; dep = size = 1; ch[0] =...
60594c69e2171cd0f83c2880d90f45f91c6347fdc89e6c7fb807c27596b9c3b6
fb9080472bdede2892053007bd74e6f9e73993d0830bcbbd510c1fd255f6c36f
0.001038
cpp
fb9080472bdede2892053007bd74e6f9e73993d0830bcbbd510c1fd255f6c36f
4723b73b500e2ec3ef0933c6aad1da820db2b8ebb2d26dd1655ba67a4509ef24
PIE_released_gem5_runtime
pie_71661
p03716
5f4f68842de83187bc4cc79dd1168ff294153019896fa13deef17660def0193c
4723b73b500e2ec3ef0933c6aad1da820db2b8ebb2d26dd1655ba67a4509ef24
0.011261
10.843537
8+
22f31f6cb74f0721ad9d6586c1f18b35e8a054f7dc1c0131ff69b286710f2a76
#include <bits/stdc++.h> using namespace std; const int N = 300003; const long long infll = 1000000000000000000; int arr[N]; long long lef[N], righ[N]; int main() { int n; scanf("%d", &n); for (int i = 0; i < 3 * n; i++) scanf("%d", &arr[i]); for (int i = 0; i < N; i++) lef[i] = -infll, rig...
#include <iostream> #include <fstream> #include <sstream> #include <iomanip> #include <algorithm> #include <numeric> #include <vector> #include <string> #include <set> #include <map> #include <queue> #include <stack> #include <climits> #include <cmath> #include <cstring> #include <unordered_set> #includ...
5d09d8cd758cbd52813f9a177044265bb9e6aeb77e786617a1e0f6e51032b30b
f38df8741b2f024787d70d825e4c276ad331eba4ca950502c1a2af669e173831
0.096368
cpp
f38df8741b2f024787d70d825e4c276ad331eba4ca950502c1a2af669e173831
171fbc10327873417b773cdf02b705f7a4ababe348a5e285a72821ca1d1e99f1
PIE_released_gem5_runtime
pie_71665
p02983
7a48f31b31276768f088fa4588334c29c8b5dd01a5a1dd1b93c115382d233351
171fbc10327873417b773cdf02b705f7a4ababe348a5e285a72821ca1d1e99f1
0.802769
8.330206
8+
95d1132b89ef0a971ec6ac19e9f67ca9c18e5d40a10606da2c609cb13c07b0f4
#include <cstdio> #include <queue> #include <iostream> #include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < n; i++) typedef long long int ll; using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int i, j, k; long n, m, tmp; long l, r; int min = 2018; string s[...
#include <bits/stdc++.h> #define mod 1000000007 #define INF 1001001001 #define ll long long #define ln cout << endl #define Yes cout << "Yes" << endl #define No cout << "No" << endl #define double long double #define REP(i, m, n) for (ll i = (ll)(m); i < (ll)(n); i++) #define rep(i, n) REP(i, 0, n) #define ...
ae9ab8204dc6ffa76181b6f85cbc4a0c05aa5a3d13f84cd185f4ce3e540f62bc
d097b55c045d9312d0a88f847a1620917c8c9e829dfbc56c90dbe7f598a4646d
0.029276
cpp
d097b55c045d9312d0a88f847a1620917c8c9e829dfbc56c90dbe7f598a4646d
0c43df2953518e332441b8d9956fda8f44611dbc5a116fe13f3e0059dcf53ea0
PIE_released_gem5_runtime
pie_71727
p02262
b915513e5bb853648a6b712f1a3153aef018fda9dc940495468c24c2e7ad1dad
0c43df2953518e332441b8d9956fda8f44611dbc5a116fe13f3e0059dcf53ea0
0.11456
3.913125
2-4
5f6948fbf1503745e270e0a56c922b50c0c5b5492a4c7205d29c4d7cd46d4ffa
#include <iostream> using namespace std; int cnt; void insertionSort(int *a, int n, int g) { int i, j, v; for (i = g; i < n; i++) { v = a[i]; j = i - g; while ((j >= 0) && (a[j] > v)) { a[j + g] = a[j]; j = j - g; cnt++; }; a[j + g] = v; } } void shellsort(int *a...
#include <stdio.h> int cnt; void insertionSort(int *a, int n, int g) { int i, j, v; for (i = g; i < n; i++) { v = a[i]; j = i - g; while ((j >= 0) && (a[j] > v)) { a[j + g] = a[j]; j = j - g; cnt++; }; a[j + g] = v; } } void shellsort(int *a, int n) { cnt = 0;...
3d3642c6a3929cc9712a8a50c0a0f4fc788487bac4d2e84c59aa12f0614f74ca
29ee8bbc062de9246fbba909f816818c0b18c3bf7c2a004f29071d65fb256ef8
0.037794
cpp
29ee8bbc062de9246fbba909f816818c0b18c3bf7c2a004f29071d65fb256ef8
b4a1a50617e2b90827d599270a8a7604e3efbf8d436e6e4425e4bee635de650d
PIE_released_gem5_runtime
pie_71731
p03039
9d3d0bdc238e80e11abaa74b9ee1743a57b35d306e9af167eb28f45823966fcc
b4a1a50617e2b90827d599270a8a7604e3efbf8d436e6e4425e4bee635de650d
0.245634
6.499305
4-8
0cd74a3e340216f45fac325baddded6e3fedec25a6a3e4728d7c7ba4366d8436
#include <iostream> #include <stdio.h> #include <vector> #define lld long long using namespace std; const lld MODULO = 1e9 + 7; const int N = 2e5 + 5; int n, m, t; lld d[N], s[N], k[N], res; vector<lld> F[N]; lld gcd, x, y; void gener() { for (int i = 1; i <= max(m, n); i++) { k[i] = (k[i - 1] + (i -...
#include <iostream> #include <stdio.h> using namespace std; const int MX = 200005, MOD = 1E9 + 7; int m, n, k; long long ans = 0; long long ngt[MX]; long long ive[MX]; long long kgt[MX]; long long d[MX]; long long c[MX]; void gener() { ngt[0] = kgt[0] = 1; ngt[1] = kgt[1] = ive[1] = 1; for (int i =...
23f37e056f50d7caf454f450f081d0fdf25ef2f96a05dafa9144225825342320
d8c0743b60a5d92ce9e24423877a1f82fef6aca8b8250ee12cbcb3834051dcfc
0.00973
cpp
d8c0743b60a5d92ce9e24423877a1f82fef6aca8b8250ee12cbcb3834051dcfc
a686d17ee92570697e13ed0a0a946ceedc62436472bf1e2bd48d511368b7bc2e
PIE_released_gem5_runtime
pie_71737
p00463
817f9b114f079960adb997b2a60943ced18725276ce2ba30cf0f585c99a34f58
a686d17ee92570697e13ed0a0a946ceedc62436472bf1e2bd48d511368b7bc2e
0.167017
17.164878
8+
527a04af52c8c3bbe98c4f881aa780f92ed848590412cae95a9fb1eedefd4189
#include <cstdio> #include <cstring> #include <map> #include <algorithm> using namespace std; struct Side { int h, w, ul, ur, dl, dr; Side(int h = 0, int w = 0, int ul = -1, int ur = -1, int dl = -1, int dr = -1) : h(h), w(w), ul(ul), ur(ur), dl(dl), dr(dr) {} bool operator<(const Side &a) const { r...
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; struct Line { int h, s, ur, ul, lr, ll; Line() {} Line(int h, int s, int ur = 0, int ul = 0, int lr = 0, int ll = 0) : h(h), s(s), ur(ur), ul(ul), lr(lr), ll(ll) {} bool operator<(const Line &r) const { return h < r.h; ...
18d243b74f8ef6d98aedbfcfed8064894d45638c3ccee59bb3d2aa433ad0fd09
2e1f32cbb7e4de7197301bf8de76171a75dc0ea390384fded340a9385d646b94
0.11049
cpp
2e1f32cbb7e4de7197301bf8de76171a75dc0ea390384fded340a9385d646b94
b8f3513b904834911bed0e2d6f293c20e8a5d4bceee778b537998fbcd7adbc18
PIE_released_gem5_runtime
pie_71749
p02863
4ce1805745b7a3e5fcae36653f4f70c2fff8d098aa1e09fd832ba1c11f5fcf24
b8f3513b904834911bed0e2d6f293c20e8a5d4bceee778b537998fbcd7adbc18
0.242579
2.195481
2-4
12b2654f12cc740a8b2a9184522526403034a89582ab08ef55d649eb5fe3cbde
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <set> #include <queue> #include <stack> #include <bitset> #include <functional> #include <map> #include <iomanip> #include <limits> #include <unordered_set> #include <cmath> using namespace std; long long p = 1000000007...
#include <iostream> #include <algorithm> #include <vector> #include <string> #include <set> #include <queue> #include <stack> #include <bitset> #include <functional> #include <map> #include <iomanip> #include <limits> #include <unordered_set> #include <cmath> #include <numeric> #include <array> #include...
d7dbc3ebf502bebfff6528e8beedb4f9eb1446558d85a6e2b26764f613f67d5b
a0b0f64e7db37d25e043c308866d746e1bab36007b60bdfd350eb03535e74968
0.019715
cpp
a0b0f64e7db37d25e043c308866d746e1bab36007b60bdfd350eb03535e74968
82d3186693f5c362bee078d83a2ba1768cbe99fe63e2093e18973f53606de898
PIE_released_gem5_runtime
pie_71909
p03808
058d82b4da1657c057d0401908ca2eefd942104abb07688430ede812eabcee73
82d3186693f5c362bee078d83a2ba1768cbe99fe63e2093e18973f53606de898
0.191673
9.721933
8+
6723f944c6b2d4988503d30b665d4ed9df0d6b15d25ed11d29e54b6b18f70204
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> ...
#include <cstdio> using namespace std; long long int N, A[100010]; int main() { scanf("%lld", &N); long long int sum = 0, div = N * (N + 1) / 2; for (int i = 0; i < N; i++) { scanf("%lld", &A[i]); sum += A[i]; } bool ok = (sum % div == 0); long long int sum_op = sum / div; for (int i = ...
d5059b6cceb3a0e450abaeb55aadd3bd0d73ac47fd37bf125a94452feddd1d06
1676b3062407c6a10d0e895ff7f8200f1df99fc42882133b25995a8a7734c630
0.084094
cpp
1676b3062407c6a10d0e895ff7f8200f1df99fc42882133b25995a8a7734c630
6e87d52d57625dd48fadf4ebfd72c2422671c0fd0882a60996f79bd11eccd1bf
PIE_released_gem5_runtime
pie_71928
p03651
93615c9a2dc500d23844e67c4908a1bc56f66768d101838cb1234e61a33bbc45
6e87d52d57625dd48fadf4ebfd72c2422671c0fd0882a60996f79bd11eccd1bf
0.54868
6.52461
4-8
bfd47ab58ef86a48ffbda5fcf9d5e68d50cefb24c2374818ccbe855116d9d5c1
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <map> #include <cmath> #include <queue> #include <numeric> #include <climits> #include <iterator> #include <iomanip> #include <stack> #include <bitset> #include <functional> using namespace std; const constexpr int INF ...
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <queue> using namespace std; using ll = long long; #define INF 1LL << 59 ll a[201000]; ll N, K; ll GCD(ll a, ll b) { if (a < b) swap(a, b); if (b == 0) return a; return GCD(b, a % b); } int main() { ...
f085a8308aae5f5c5be4ade670604905c35768473e1777d2ccd7d342dad317b3
bf9d762b9bad143728c60e66b7213f65cc482c3a5a7bd3f2be844c9145eb4d94
0.098961
cpp
bf9d762b9bad143728c60e66b7213f65cc482c3a5a7bd3f2be844c9145eb4d94
6bdd9da85537302137e638a15b7591ee17996412bfb7d09a7fe42d2f5fd98607
PIE_released_gem5_runtime
pie_71936
p02797
9ded2ed94504b9bf921830e16cde98f9aa7b143ac694a078c852a731ebbac8bf
6bdd9da85537302137e638a15b7591ee17996412bfb7d09a7fe42d2f5fd98607
0.350547
3.542269
2-4
0e253719716e852143515babffd5eaa30face00be98c8a2df056e0bc4597c43a
#include <bits/stdc++.h> using namespace std; #define max(x, y) ((x) > (y) ? (x) : (y)) #define min(x, y) ((x) < (y) ? (x) : (y)) typedef long long ll; typedef pair<int, int> pii; const int maxn = 1010; map<int, int> cnt, tmp; vector<int> gt[100001]; struct req { long long x; long long d; }; deque<req> q;...
#include <bits/stdc++.h> #define _for(i, a, b) for (int i = (a); i < (b); ++i) #define _rep(i, a, b) for (int i = (a); i <= (b); ++i) #define ll long long using namespace std; int main() { ios::sync_with_stdio(0); ll n, m, sum; cin >> n >> m >> sum; _for(i, 0, m) { cout << sum << " "; } _for(i, 0, n...
5816c5e342505e20e7c684aefda7bc69834685ef2e0a8c396d0bd8cb22e2ad47
d33fdb77fabed748662fef5963f7146c0aacfdf0930ec4758adbc0571e50bc80
0.104778
cpp
d33fdb77fabed748662fef5963f7146c0aacfdf0930ec4758adbc0571e50bc80
2446d9c4513d9b589205fe84e0ee873171dfd4e29be12cdfb7f936d7b7fa36ca
PIE_released_gem5_runtime
pie_71957
p02631
2654075c0e8caaca9cf97dc74d487c87bd57f8917385179eadbaabdd62f83094
2446d9c4513d9b589205fe84e0ee873171dfd4e29be12cdfb7f936d7b7fa36ca
0.86949
8.298409
8+
013799475e91d3c0c82c2e99285706ae2840f2ebb000da991ee1e39f093df6bd
#include <algorithm> #include <bitset> #include <cmath> #include <complex> #include <deque> #include <functional> #include <iomanip> #include <iostream> #include <iterator> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <unordered_map> #in...
#pragma GCC optimize("Ofast") #include <iostream> #include <string> using namespace std; #define REP(i, n) for (int i = 0; i < (int)(n); i++) int a[200000]; signed main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; REP(i, n) cin >> a[i]; int b = 0; REP(i, n) b ^= a[i]; ...
83ded98c33236a3e70e3f43e0a8e1be982f19a8e51aa1bd56fde9a24d26c2153
1a6492cb57d862d61a028a842e658b0a9a25e7a6eb9ed607a0ac7bcdd27896fb
0.000237
cpp
1a6492cb57d862d61a028a842e658b0a9a25e7a6eb9ed607a0ac7bcdd27896fb
3c51523529d064903ce7bab1be88aa5611ecd6c3f555f80ae41b9cc40a5f9362
PIE_released_gem5_runtime
pie_71989
p03682
5d0144f0c64855775e6c75380ce95ed1bb22cbaef383959dee001b4def18e894
3c51523529d064903ce7bab1be88aa5611ecd6c3f555f80ae41b9cc40a5f9362
0.002707
11.436744
8+
a30ea0ef08d2bb5347bacb6a46eb728f1c5d08b39c1dec0ac171d02d59e5151e
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << (x) << "\n" #define cesp(x) cerr << (x) << " " #define...
#pragma GCC optimize("O3") #pragma GCC target("avx") #include <cstdio> #include <algorithm> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ...
8bc89235ba75fceedb299213cdeb0e2404bbc9ac0994ad97f0aa4afa649a8865
05e251f76d77ddd8fd7f5e0251068e1e436072e182fe93a7bca8ff0c705333cf
0.049845
cpp
05e251f76d77ddd8fd7f5e0251068e1e436072e182fe93a7bca8ff0c705333cf
6aff7ab47170456ecd70b2ea9b643cdcf29c4efdf4a6c42d7b404017e092f359
PIE_released_gem5_runtime
pie_72024
p03140
3f4e2767896ff0c3851b1a05ffa2d47a824feaa528313af98eb6d6b180dbe835
6aff7ab47170456ecd70b2ea9b643cdcf29c4efdf4a6c42d7b404017e092f359
0.655887
13.158525
8+
55df647ca393d77ac6e49d8a4d95e3a815b3cf1e3d0f5f772aa4cc9393c3c763
#include <bits/stdc++.h> using namespace std; struct initon { initon() { cin.tie(0); ios::sync_with_stdio(false); cout.setf(ios::fixed); cout.precision(16); }; } __initon; ...
#include <bits/stdc++.h> ...
3feaea1a6ca4e6ab48ae30a801b6c33aa64f4685b7781ed2c67710ed0cbd9097
7fcfaad0bb5308f6436398c2745cc8a47bc7d2f66cbfe3ef6f7f141577718f82
0.01968
cpp
7fcfaad0bb5308f6436398c2745cc8a47bc7d2f66cbfe3ef6f7f141577718f82
630b06400e4f0f004f566c4c1f9447cc2f76f4bf04f7820d79f9befb81f9fa6c
PIE_released_gem5_runtime
pie_72056
p03807
a33884a0cfab447b7755e81ec65dff9f9f360d55169ce81b3a83acc4d0fad032
630b06400e4f0f004f566c4c1f9447cc2f76f4bf04f7820d79f9befb81f9fa6c
0.189829
9.64578
8+
96d757626c1bc9957580bd13ffd6fa59a5e213de09ca68406c3f0ef07e45ff6e
#include <iostream> #include <iomanip> #include <cstdio> #include <string> #include <cstring> #include <deque> #include <list> #include <queue> #include <stack> #include <vector> #include <utility> #include <algorithm> #include <map> #include <set> #include <complex> #include <cmath> #include <limits> ...
#include <cstdio> using namespace std; int main() { int N, cnt = 0; scanf("%d", &N); for (int i = 0; i < N; i++) { int p; scanf("%d", &p); cnt += (p % 2); } printf("%s\n", (cnt % 2) ? "NO" : "YES"); return 0; }
2ad08c5461518ddad126f6f9ee67aabec7383abdc25a0fefc7ec2ec09773ca01
e8a68c5d364b6fcf1771f6ccdcec4eaec4f67af397e37e7e16dbe60874a7fa6b
0.047613
cpp
e8a68c5d364b6fcf1771f6ccdcec4eaec4f67af397e37e7e16dbe60874a7fa6b
a4a33c4ad4880ff149959ccd9bae11ed5dbfb5facadfe99079a1dd9c9096d2c0
PIE_released_gem5_runtime
pie_72139
p01250
d7e010d0524fd84fea415d824033db8d6b124fa3da3bbf04bb50c8e2459e62a1
a4a33c4ad4880ff149959ccd9bae11ed5dbfb5facadfe99079a1dd9c9096d2c0
0.155437
3.264603
2-4
19ae45eb745c56c03c43c4df0a7f3da35637e32e0c4320985cb7c4569411a490
#include <iostream> #include <cmath> using namespace std; int main() { double r; while (cin >> r, r != 0.0) { pair<int, int> a(9999999, 999999); double pi = M_PI; for (int i = 1; i < 100000; i++) { for (int k = -1; k < 2; k += 2) { for (int j = 0; j < 2; j++) { int nu ...
#include <iostream> #include <cmath> using namespace std; int main() { double r; while (cin >> r, r != 0.0) { double pi = M_PI; for (int i = 1;; i++) { for (int k = -1; k < 2; k += 2) { for (int j = 0; j < 2; j++) { int nu = (int)((pi + r * k) * i) + j; if (abs(n...
b5f16bf2000a3ec2c4268e6c5085b7f1d39ff5399bc93db698476cda141bd9c0
f3da20538518d577909ef2c054907119c301e101a12f105aaf64cc2f48c928dc
0.016741
cpp
f3da20538518d577909ef2c054907119c301e101a12f105aaf64cc2f48c928dc
3ec15d4349be7632d1498e1cdb680554e219a2257a638c927a3c4f40fbe5cd92
PIE_released_gem5_runtime
pie_72140
p02943
f86a3308875db918311bc247aef6b7b69bb609d3e0a493e77435d117668450ef
3ec15d4349be7632d1498e1cdb680554e219a2257a638c927a3c4f40fbe5cd92
0.088953
5.313557
4-8
9106b82026fd881effa181a60b42e1df6ce82eb801ac525ddf6316c6b358f1d0
#include <cstdio> #include <cstdlib> #include <iostream> #include <cstring> #include <algorithm> #include <cassert> using namespace std; void read(int &x) { int f = 1; x = 0; char s = getchar(); while (s < '0' || s > '9') { if (s == '-') f = -1; s = getchar(); } while (s >= '0' &...
#include <cstdio> const int Maxn = 10000; char s[Maxn + 5]; int n, k; char *ans; bool check(char *a, char *b) { for (int i = 1; i <= n; i++) { if (a[i] < b[i]) { return 1; } if (a[i] > b[i]) { return 0; } } return 0; } int main() { scanf("%d%d", &n, &k); scanf("%s", s...
5d31ea235727d76f91c0f74f5fbb15ec7e8bf683a47036baf53fc4d09f7bb7aa
be03b4354f86893c217d246895266892c89aac994efabd117aa252a41acb7f02
0.100652
cpp
be03b4354f86893c217d246895266892c89aac994efabd117aa252a41acb7f02
a2364eb0d9348705348f1d427afabd7db0c324aa81ae12730eab8a1bbfad4332
PIE_released_gem5_runtime
pie_72141
p00360
d8301843aa100bf825a517ff35decc995c2965e01c4f08bb50b0883b444304c7
a2364eb0d9348705348f1d427afabd7db0c324aa81ae12730eab8a1bbfad4332
1.462906
14.534324
8+
20ad0a84e41dfa05aebf31982b5e3cb6bd88ff38a5969e8c5202c17d87d01cb7
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef pair<int, int> P; #ifndef MAX #define MAX 800000 #endif template <class T> class RUQ_RMQ { public: int n; T dat[MAX], lazy[MAX], DEFAULT; bool (*cmp)(T, T); void init( int n_, bool (*c)...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef pair<int, int> P; #define MAX 800000 P dat[MAX]; int N; void init(int n) { N = 1; while (N < n) N <<= 1; } void update(int k, P x) { k += N - 1; dat[k] = x; while (k) { k = (k - 1) / 2; ...
8d8b8c717ae8bd1aed22085957ed29e2890f95cf67161022c1bb006d2cc4e1b8
7bd3f806ab2ce89a35a0a8dce52e87e49e805d5c7bd04eb9390bbabf5891c2e8
0.001012
cpp
7bd3f806ab2ce89a35a0a8dce52e87e49e805d5c7bd04eb9390bbabf5891c2e8
432a451bce496aa24fdcb4f78ec9b18d2e52e15a69ff917578af1f6c884dd033
PIE_released_gem5_runtime
pie_72146
p03868
013d57bdd7bd28a191b0bd716d6ada5ed1bddbd375d6802c4e7e2f0ffcb7892e
432a451bce496aa24fdcb4f78ec9b18d2e52e15a69ff917578af1f6c884dd033
0.002957
2.922682
2-4
5a29acfa8107772e8ccc338918ffca80a287985cc820a2e99627042e609e01ba
#include <iostream> #include <algorithm> #include <bitset> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #include <array> #include <unordered_map> #include <complex> #include <deque> #include <cassert> #include <cmath> #include <fu...
#include <iostream> #include <algorithm> #include <bitset> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> #include <array> #include <unordered_map> #include <complex> #include <deque> #include <cassert> #include <cmath> #include <...
05bc5e3bb34247f27fd2c4c9d5091624fc72430ab30a5fdb3aa2825a13e5e4a9
1dd73297db347f209772b26ce9f8bcb2c27e082220783ecf2340f339d6a2e8fc
0.008274
cpp
1dd73297db347f209772b26ce9f8bcb2c27e082220783ecf2340f339d6a2e8fc
94e04830648b32d3f8bb2ae137949299ca268271ce66fb5dd03b7861d73f7c52
PIE_released_gem5_runtime
pie_72150
p02995
bf581d11f6f66fb9bbdc2c70175ea8612bbfc90c8b47134b906da90927ebece7
94e04830648b32d3f8bb2ae137949299ca268271ce66fb5dd03b7861d73f7c52
0.043293
5.232682
4-8
25c8d7f2d3c704b6a28442616ba9b46a92595e1619169a93ab56ddc1470100bf
#include <iostream> #include <sstream> #include <string> #include <string.h> #include <algorithm> #include <stdio.h> #include <math.h> #include <vector> #include <queue> #include <map> #include <set> #include <stack> #define debug(a) cout << "*" << a << "*" << endl using namespace std; typedef long long l...
#include <cstdio> #include <algorithm> using namespace std; long long gcd(long long x, long long y) { if (!y) return x; return gcd(y, x % y); } int main() { long long a, b, c, d; scanf("%lld %lld %lld %lld", &a, &b, &c, &d); long long e = c * d / gcd(c, d); a--; long long ans = (b - a + 1)...
ca51817ab23088ec6d5e1a9aa48710da8ffc9a52b2bded805f346cefa638a106
0ce09533e6cc4f7ca722becf84ac717064e7ef84b7d718af3350624dbc9793cf
0.001004
cpp
0ce09533e6cc4f7ca722becf84ac717064e7ef84b7d718af3350624dbc9793cf
5cc9d4acd3a575c3ba251b0c1fd10c19cac80af5a4d48c8a7c007bb1bb0ba6cb
PIE_released_gem5_runtime
pie_72178
p02068
8c83c3e021bba647fbe0d3345f50ac2933a90d3c113785dbf01894f84bf13f9c
5cc9d4acd3a575c3ba251b0c1fd10c19cac80af5a4d48c8a7c007bb1bb0ba6cb
0.002532
2.522838
2-4
772ff7c829b1d5b1f55011ca3487068c857798afac052c0d903eb470a1d30d30
#include <bits/stdc++.h> using namespace std; #define ll long long const int N = 1009; const int M = 100009; int n; ll a[N], pri[M]; int f[M], tot; void init() { memset(f, 0, sizeof(f)); f[1] = 1; for (int i = 2; i <= M - 9; i++) { if (!f[i]) pri[++tot] = i; for (int j = 1; j <= tot && pr...
#include <bits/stdc++.h> using namespace std; int n; int a[1009]; bool p[40009]; int x[40009], lx; long long ans; bool cmp(int x, int y) { return x < y; } void pd(int x) { if (x == 1) return; long long sum = 0; for (int j = 1; j <= n; j++) if (a[j] % x == 0) sum += a[j]; ans = max(ans...
164a408a1e4664a1c190fbc2d6f3f7419a4b65b280489e9853373af0966e7c43
4a4c3ce0334d3f62aeaa029eaab5ee9a376c40573d15f0d820ad4d57e7c5ff1d
0.01219
cpp
4a4c3ce0334d3f62aeaa029eaab5ee9a376c40573d15f0d820ad4d57e7c5ff1d
21e1b3d2221bab813d5ca4f9a3537de69d550a873f43c3a365db873e6fe65414
PIE_released_gem5_runtime
pie_72213
p04023
256da3962a99599ab14985f7b743e06255969f575b2aa9848cc6d6aab38e123c
21e1b3d2221bab813d5ca4f9a3537de69d550a873f43c3a365db873e6fe65414
0.230358
18.896788
8+
7ba8055624e007784a2ba9ce89a605c1f0f877a8db142b96b49916393eab313a
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll maxn = 100010; ll n, q, top, tn; ll a[maxn], S[maxn], tong[maxn], ci[maxn], sum[maxn]; vector<pair<ll, ll> > V[maxn]; ll find(ll x) { ll l = 1, r = top, res = 1; while (l <= r) { ll mid = (l + r) >> 1; if (S[mid] <= ...
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; #define int long long #define maxn (100010) int n, m, top, s[maxn], cnt[maxn], sum[maxn]; inline int read() { int x = 0, f = 1; char ch = getchar(); while (ch < '0' || ch > '9') ch == '-' ? f = -1, ch = getchar() : ch = ...
8b05226b47ac787be4330288a8dae6a2a205c031ea6a75f40a489187d11e527b
b582ce7f4f55e74c934709c31e9f8d685eb565bed0055e1d7542ea31859641da
0.018496
cpp
b582ce7f4f55e74c934709c31e9f8d685eb565bed0055e1d7542ea31859641da
4e3a4d627c97541459039a8e5ed839640ddc7a28c26176d689707bc389e6a868
PIE_released_gem5_runtime
pie_72218
p02598
bb3c8e57a66dd859be2494329937deee5b363b5e43ca2854e6ee077159c73866
4e3a4d627c97541459039a8e5ed839640ddc7a28c26176d689707bc389e6a868
0.103089
5.573489
4-8
1c491c8ed8e6e1ccaba78e2568459123348febff67c0c6b58abb2f53eacebaea
#pragma GCC optimize("O2") #pragma GCC target("avx2") #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << ...
#pragma GCC optimize("O2") #pragma GCC target("avx2") #include <cstdio> #include <algorithm> #include <cstring> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout <<...
90cf4d0cdbcd7a2dc6024b431dcddd5a10ca3d3f5485c6c277a566a800d5f481
f45fac40a05e14008e0ca3d9aa26744d7800d4d22ac72aade43dcff03104d092
0.10832
cpp
f45fac40a05e14008e0ca3d9aa26744d7800d4d22ac72aade43dcff03104d092
7fd2641eee4667091dc71e7de2275e7d05f4f0cd2ec9b8914158d92d6a1dc726
PIE_released_gem5_runtime
pie_72236
p03553
6dc1edd92b48a514e0ad0758a8cc2d117b696dd6cdfcc70d57537aec381f9ef5
7fd2641eee4667091dc71e7de2275e7d05f4f0cd2ec9b8914158d92d6a1dc726
1.051302
9.705515
8+
193bafe05464d2d85a7a355f94f0c761a762392a1713e937b13f9bac34cf1992
#include <bits/stdc++.h> using namespace std; typedef long long signed int LL; typedef long long unsigned int LU; #define incID(i, l, r) for (int i = (l); i < (r); i++) #define incII(i, l, r) for (int i = (l); i <= (r); i++) #define decID(i, l, r) for (int i = (r)-1; i >= (l); i--) #define decII(i, l, r) for (in...
#include <bits/stdc++.h> using namespace std; typedef long long signed int LL; typedef long long unsigned int LU; #define incID(i, l, r) for(int i = (l) ; i < (r); i++) #define incII(i, l, r) for(int i = (l) ; i <= (r); i++) #define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--) #define decII(i,...
b7b76073cc55f7523d4af6fdb728785fed8ffac6bbd916d87b980c4bfbdfde1c
65c06b2c359742bf68245c2c0640102d876a2aec2db217cc27a982eed337ef9a
0.018101
cpp
65c06b2c359742bf68245c2c0640102d876a2aec2db217cc27a982eed337ef9a
d095e6e63ce215d7a06af20a3982a798a8d64f3400fcfd56928b1ce91c89877c
PIE_released_gem5_runtime
pie_72254
p03358
77edcc1de4aabf7db8fdbb54370ecc5575bfb2dac3e510182009ecd29411e6e2
d095e6e63ce215d7a06af20a3982a798a8d64f3400fcfd56928b1ce91c89877c
0.328094
18.125381
8+
505dc09956a0c62d247f7d88bedb50893dd017464e432febe8ac75d2d389e494
#include <bits/stdc++.h> using namespace std; const int N = 100005; int n, s, u, md, f[N]; char c[N]; vector<int> e[N]; int dfs(int x, int fa) { int ret = (c[x] == 'W'); int deg = fa > 0; for (int i = 0; i < e[x].size(); i++) { int y = e[x][i]; if (y != fa && dfs(y, x)) ret = 1, s += ...
#include <cstdio> #include <algorithm> using namespace std; int n, tot, sum, a[2100000], f[2100000], deg[2100000], dp[2100000][2]; bool w[2100000]; char s[2100000]; int edgenum, vet[4100000], Next[4100000], Head[2100000]; void addedge(int u, int v) { vet[++edgenum] = v; deg[v] ^= 1; Next[edgenum] = Head[u...
b42ae227361fa9e5ab2895989e438f83cc0c33477aa13defdb2536bd8ae6ac71
4c4849c780ceb59309c5e33f5734f51e644caa919e74d08078cb2b81a78d5bd8
0.012524
cpp
4c4849c780ceb59309c5e33f5734f51e644caa919e74d08078cb2b81a78d5bd8
74ce5c999ec0c7e1e017dce1fab2040dfcf0714c0a35109faab93d449e38c144
PIE_released_gem5_runtime
pie_72261
p03617
b38bfd1b48daa979f618a023ec276d8d8ccf609931d6ca5f5d969bd692e0ca5e
74ce5c999ec0c7e1e017dce1fab2040dfcf0714c0a35109faab93d449e38c144
0.06548
5.228549
4-8
b800c78950a56c38c80055e4bae97445f5ec00e3ef652fe5fdff04fda1666a2d
#include <bits/stdc++.h> using namespace std; int main(void) { int64_t n; int a[4]; pair<int, int> b[4]; for (int i = 0; i < 4; i++) { scanf("%d", &a[i]); b[i].first = a[i] << (3 - i); b[i].second = i; } sort(b, b + 4); scanf("%lld", &n); n *= 4; int64_t ans = 0; while (n)...
#include <stdio.h> int min(int a, int b) { return a < b ? a : b; } int main(void) { long long q, h, s, d, n; scanf("%lld%lld%lld%lld%lld", &q, &h, &s, &d, &n); s = min(s, min(q * 4, h * 2)); d = min(d, s * 2); long long ans = n / 2 * d + n % 2 * s; printf("%lld\n", ans); return 0; }
02d70f0bdf7fde28278ed3289410cf7ed04aad014db7b70d02a12752f888199f
2d1dc3297f93b8c265d83146d8c4c38d274f337e07edef158b92b4e429452582
0.105571
cpp
2d1dc3297f93b8c265d83146d8c4c38d274f337e07edef158b92b4e429452582
01d02d4e26f89eb2913b8df8e6ed5f2c3c96db3484ff9e34ef2be86bf7f1069f
PIE_released_gem5_runtime
pie_72333
p03061
f8a42219002116bdf1c547de70a354ffe77ffeee772479065fc9421d9c452f31
01d02d4e26f89eb2913b8df8e6ed5f2c3c96db3484ff9e34ef2be86bf7f1069f
0.228576
2.165133
2-4
201e84dc44e792ef51cf792d9b4d30732073e532b924711edca1dd484de33489
#include <iostream> #include <math.h> #include <stdlib.h> #include <string> #include <vector> #include <map> #include <algorithm> using namespace std; #define INF (1 << 30) int n; int a[100001]; int dp[100001][2]; int dpsolve() { random_shuffle(a, a + n); fill_n(*dp, 100001 * 2, -1); for (int d = n...
#include <iostream> #include <math.h> #include <stdlib.h> #include <string> #include <vector> #include <map> #include <algorithm> using namespace std; #define INF (1 << 30) int n; int a[100001]; int gcdl[100001]; int gcdr[100001]; int main() { cin >> n; for (int i = 0; i < n; i++) { cin >> a[i];...
7a90522d4b0ddf59e9118330e57d4a3d9661ed788d5d43db6712ac006754b205
a1295a63ce8f122e8a95bcc5d47403a36c50c2cc069d973a628fe3612ddf6fff
0.020194
cpp
a1295a63ce8f122e8a95bcc5d47403a36c50c2cc069d973a628fe3612ddf6fff
52288971f3b7a7fe6754b8ae656e2c13e242b300d739277e877de96945d612c1
PIE_released_gem5_runtime
pie_72431
p02918
4327f9a7125c6e3643791ecf5f4e0f0b063c559175d8d922b0d10b40c721def5
52288971f3b7a7fe6754b8ae656e2c13e242b300d739277e877de96945d612c1
0.117422
5.814664
4-8
086cd715a52704fe8b6b733da7ce84cd7bfe89fc16a09261a6c22e7f0a412ad4
#include <cstdio> #include <iostream> #include <algorithm> using namespace std; int main() { int n, k, c = 0, an, i; char s[100005] = {'\0'}; cin >> n >> k; for (i = 0; i < n; i++) { cin >> s[i]; } int count = 0; i = 0; if (s[i] == 'R' && s[i + 1] == 'R') count++; for (i = 1; i < ...
#include <cstdio> #include <cstring> char ren[1000000]; int main() { int n, k; scanf("%d %d", &n, &k); int xf = 0; int j2 = 0; scanf("%s", &ren); for (int i = 1; i < n; i++) { if (ren[i] == ren[i - 1]) xf++; } if (xf + 2 * k > n - 1) xf = n - 1; else xf = xf + 2 * ...
66f39b380e408b74c1690adfb9efb00d38d2a190f6373972fef4a63bb58ba514
21f1ac6f02c44263062476c379a464f12599c08aadce7125011f360fac0f156f
0.036233
cpp
21f1ac6f02c44263062476c379a464f12599c08aadce7125011f360fac0f156f
d8968a3ce2e071c5de1a053f7fe4828289b833c6264952c932c18cf4c555b250
PIE_released_gem5_runtime
pie_72448
p03432
0e65a65acb53bb7ee559081077b32a351c6bbe73d350afe21dc29f775345952b
d8968a3ce2e071c5de1a053f7fe4828289b833c6264952c932c18cf4c555b250
0.092693
2.558254
2-4
f9094def4841ce9e068677cd8088274a6be89515a03d651194a0dfd71b0d5f10
#include <cstdio> using namespace std; #define N 16400 #define M 204 #define mod 998244353 int dp[M][N], n, m, fr[N], ifr[N], rev[N], a[N], b[N], ntt[N]; int pw(int a, int p) { int as = 1; while (p) { if (p & 1) as = 1ll * as * a % mod; a = 1ll * a * a % mod; p >>= 1; } return as; } int...
#include <bits/stdc++.h> using namespace std; namespace TYC { typedef long long ll; const int N = 8005, M = 205, MAXN = 1 << 15 | 5, mod = 998244353, INV2 = (mod + 1) >> 1; int F[M][N], Fac[N], Inv[N], A[MAXN], B[MAXN], w[MAXN], rev[MAXN]; inline int qpow(int x, int tim) { int ans = 1; for (; tim; tim >>=...
c8e78498de05afee3182accbf1e4071267f249363258507839d46b289d15cda8
5db1334d9737ab7d8de2e7df3e1923d0ea18aa6d15313129cd3528b2eebf3288
0.024931
cpp
5db1334d9737ab7d8de2e7df3e1923d0ea18aa6d15313129cd3528b2eebf3288
de2bb43d4738e5ffed96ab8f46530e74ac1cccb878a2b721ffb3dd769d7b4ae4
PIE_released_gem5_runtime
pie_72467
p02557
8d2f0fc8685170e3cc9b7e355045da15833531274c64bb308ff0dc347552ebdf
de2bb43d4738e5ffed96ab8f46530e74ac1cccb878a2b721ffb3dd769d7b4ae4
0.200827
8.055456
8+
15a8d73a92c8a8b563c3736c4bb71bd1eb3b2a000c41f97332c50d4a05c1f928
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 7; int n; vector<int> pos[N]; int cnt[N], res[N]; set<int> have_a, have_b; set<pair<int, int>> st; int get(int i) { return (int)pos[i].size() + cnt[i]; } void pairup(int i, int j) { res[pos[i].back()] = j; pos[i].pop_back(); --cnt[j]; }...
#include <bits/stdc++.h> using namespace std; #define int long long const int N = 2e5 + 7; int n, a[N], b[N]; void out() { cout << "Yes\n"; for (int i = 0; i < n; ++i) cout << b[i] << " "; exit(0); } signed main() { ios::sync_with_stdio(false); cin.tie(0); cin >> n; for (int i = 0; i < n...
26e23fb34df576ee6eaa642aae14ad9b83fe1c3d58552977720ec97d85e7b94b
f7fd4d399740c0a176368142a2dc800550176e55b1a6ed6d2b971b57cf5d814b
0.031157
cpp
f7fd4d399740c0a176368142a2dc800550176e55b1a6ed6d2b971b57cf5d814b
460684fa3dc861cde4e351426981e4e79fef4f07c5cbdaf11662e8baef4469f7
PIE_released_gem5_runtime
pie_72479
p03213
9ec7f47c5b18cf0e017627b0e8e59e7826dcf31299ad563f950cc37f5820b45f
460684fa3dc861cde4e351426981e4e79fef4f07c5cbdaf11662e8baef4469f7
0.092901
2.981706
2-4
1042e7ce30499fdc1dc9a204b598f9ea1893c4f3549a7f9ecf014f58b8db8280
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) #define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--) #define reps(i, n) for (int i = 1; i <= int(n); i++) #define rreps(i, n) for (int i = int(n); i >= 1; i--) #define repc(i, n) for (int i = 0; i <= int(n); i++) #define rrepc(i, n) f...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < int(n); i++) #define reps(i, n) for (int i = 1; i <= int(n); i++) #define repc(i, n) for (int i = 0; i <= int(n); i++) using namespace std; vector<int> primes = { 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, ...
deb509f8e215587e212557008789549116e2389fcd9bf4c8ac2e2bfb852d98a9
c8cc13c22ced14cf8b8a8b2365f0208a6ec31d7286cdc51a684c9851212a689d
0.076761
cpp
c8cc13c22ced14cf8b8a8b2365f0208a6ec31d7286cdc51a684c9851212a689d
ac4c54398140cfd3ecc76975342387ddb82f9c98d97165e6514fe0d48f298f3b
PIE_released_gem5_runtime
pie_72513
p03456
4c3ecfa750903bed3fac8c8e4b851115ff21bf9ab24e8070541c016570fc7e64
ac4c54398140cfd3ecc76975342387ddb82f9c98d97165e6514fe0d48f298f3b
0.181468
2.36407
2-4
3829efdab5717a8bc4a5339fd226551caaf872f3574837945551d310839be7fb
#include <bits/stdc++.h> #define INF (1 << 31) #define MOD 1000000007 using ll = long long; using ull = unsigned long long; int main(int argc, char *argv[]) { std::string a, b; std::cin >> a >> b; bool flag = false; int num = std::stoi(a + b); for (int i = 1; i < 1000000; i++) { if (i * i == n...
#include <bits/stdc++.h> using namespace std; #define YES cout << "YES" << endl; #define NO cout << "NO" << endl; #define Yes cout << "Yes" << endl; #define No cout << "No" << endl; #define INF INT_MAX #define MOD 1000000007 #define PI acos(-1) using ll = long long; using ull = unsigned long long; using Pii ...
b9614339365fda10beba65dbc91f6840548bb85de87e63d4c914202182bd8803
3b91da7c87f88144acb6be3d226a4f526efde7682a1b11aa54da69285afc3889
0.055573
cpp
3b91da7c87f88144acb6be3d226a4f526efde7682a1b11aa54da69285afc3889
77c02e4b4da32393f81aca2582a5e0417c1dff61e21267d7a7c09620eac5f501
PIE_released_gem5_runtime
pie_72524
p01719
62bbf1ecc111b42adc77e51723457e098302a8842b35be3d016df27834ab0833
77c02e4b4da32393f81aca2582a5e0417c1dff61e21267d7a7c09620eac5f501
0.157543
2.83491
2-4
d13c27f0c6b30036dde7c59062383a4aa4a89dd0e6d053154843a412ec08cd49
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { cin.sync_with_stdio(false); int n, d, x; cin >> n >> d >> x; vector<vector<ll>> p(d, vector<ll>(n)); for (int i = 0; i < d; i++) { for (int j = 0; j < n; j++) { cin >> p[i][j]; } } for (int i = 1; i ...
#include <vector> #include <iostream> #include <set> #include <algorithm> #include <map> #include <string> #include <cmath> #include <tuple> #include <queue> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef tuple<ll, ll, ll> T; int main() { ll n, d, x; cin >> n >> d >> x; ...
ca14e341eaaf0a5b2d3899ddebecb9b2a9a9ea51b2b082099c4f5e75fff00824
e2a041ec9c5afccd8768f6c795dd8802e132b6657b7399852ab551a69e569c87
0.01908
cpp
e2a041ec9c5afccd8768f6c795dd8802e132b6657b7399852ab551a69e569c87
410bb3d2a63f398343700892d9f1551a38e12fa637ce735cc2c863f9829e3632
PIE_released_gem5_runtime
pie_72528
p00005
d05690e8bd8fefecf5ea74fa2924eea67f6c8a9daece3b25924319020b6eecb0
410bb3d2a63f398343700892d9f1551a38e12fa637ce735cc2c863f9829e3632
0.100694
5.277514
4-8
0724d8a31be8f068d3b69241b4cf8ba64aec422283ddca94ee87d4fa58b3b9b8
#include <cstdio> #include <iostream> using namespace std; long long GCD(long long a, long long b) { if (a == 0 && b == 0) return 0; if (a == 0) return 1; if (b == 0) return a; else return GCD(b, a % b); } int main() { long long x, y; while (cin >> x >> y) { long long an...
#include <cstdio> int gcd(int a, int b) { return b ? gcd(b, a % b) : a; } main() { int a, b; while (scanf("%d%d", &a, &b) != EOF) { int d = gcd(a, b); int lc = a / d * b; printf("%d %d\n", d, lc); } }
3cdddec0f29e0857fcc434adef7237d7cd6e2f94ed919844b295ea8d862fef97
3ca8d3285f36ca512f54f09a608cc215513dd69faa067987830cbb1b7094b8e8
0.104467
cpp
3ca8d3285f36ca512f54f09a608cc215513dd69faa067987830cbb1b7094b8e8
ea178a6190e7f4b14652f7bed6c3b6f8a3544a47b14cb9f6a292453bab3aabd1
PIE_released_gem5_runtime
pie_7253
p03844
60baece64c0391388528117e30ca3acdf4bd60239711ede071419306d349ba7a
ea178a6190e7f4b14652f7bed6c3b6f8a3544a47b14cb9f6a292453bab3aabd1
0.680981
6.518598
4-8
43646e4145238ddaa082b906d972c13f10cb1c53716462c411f448dea82d184e
#include <bits/stdc++.h> #define lln long long int #define llu unsigned lln #define sc(n) scanf("%d", &n); #define scl(n) scanf("%lld", &n); #define scd(n) scanf("%lf", &n); #define pf(res) printf("%d\n", res); #define pfl(res) printf("%lld\n", res); #define pfd(res) printf("%lf\n", res); #define maxii 20000...
#include <iostream> using namespace std; int main() { int a, b; char c; cin >> a >> c >> b; if (c == '+') cout << a + b; else cout << a - b; return 0; }
2df4bfc810aa020520e1a4e049e2e6aa66430ba931e54473d3ead5dd25b7011f
4664f9bcaabfaecf8e51a85c18dc9d27bd1f43d874e6b6059acdf56e402d2e2b
0.000186
cpp
4664f9bcaabfaecf8e51a85c18dc9d27bd1f43d874e6b6059acdf56e402d2e2b
8bc0d31414437b8d5397a876bf747a16f633e3cf8d4acd77b1aaab23af41a0fd
PIE_released_gem5_runtime
pie_72577
p02866
cb0aae22d916bef1cb23d3f20a5d9161360ad2028408586df44014381df53cfb
8bc0d31414437b8d5397a876bf747a16f633e3cf8d4acd77b1aaab23af41a0fd
0.001882
10.090305
8+
bea38727227c143a5c22e1558ec905c15f4048643bf141607dc9eedb90f63423
#pragma GCC optimize("O3") #pragma GCC target("avx") #include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << (...
#pragma GCC optimize("O3") #pragma GCC target("avx") #include <cstdio> #include <algorithm> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ...
6445a9f9ae83367fa7f8c58d4ae393bd8c40d3a5e94119a7c42636be5862ce62
b153f729ec985d03876e9989e167781931b307954e93f0c16edfed5ec62fd040
0.108737
cpp
b153f729ec985d03876e9989e167781931b307954e93f0c16edfed5ec62fd040
6067ea8d89c6f6813eae6928e2becdfd72385721738f1b45bfbc1175a073dd96
PIE_released_gem5_runtime
pie_72604
p02890
a30e6756526f76544ae9103772511f0e04d9ed3142c1720249b0ef1ecc5412b0
6067ea8d89c6f6813eae6928e2becdfd72385721738f1b45bfbc1175a073dd96
0.781638
7.188341
4-8
1ad6b14a35e2fac0856fd7238297398a7e263a3380e041a7785654ea6b4f5b27
#include <bits/stdc++.h> #define int long long #define inf 1000000007 #define pa pair<int, int> #define ll long long #define pal pair<double, double> #define ppap pair<pa, int> #define PI 3.14159265358979323846 #define paa pair<int, char> #define mp make_pair #define pb push_back #define EPS (1e-8) int dx[8...
#include <bits/stdc++.h> #define inf 1000000007 #define pa pair<int, int> #define ll long long #define pal pair<double, double> #define ppap pair<pa, int> #define PI 3.14159265358979323846 #define paa pair<int, char> #define mp make_pair #define pb push_back #define EPS (1e-8) int dx[8] = {0, 1, 0, -1, 1, 1,...
9828ff2bf4e0efd42535c536e4719c98cbaf7e00ba47d56278f44455f258f0e2
b95560648ea466ca29fa40a6d21954134161ab1d8d25a8d9315736a6099072c4
0.105915
cpp
b95560648ea466ca29fa40a6d21954134161ab1d8d25a8d9315736a6099072c4
e12176571b559c81e95932703e6827d574e09f5d2649a1045dd7878373d76084
PIE_released_gem5_runtime
pie_72617
p03030
ecd56069769c307c798b7c974773f4bc47d5e4ee24ca76b1d04b8faeb898f505
e12176571b559c81e95932703e6827d574e09f5d2649a1045dd7878373d76084
1.065308
10.058168
8+
a03754edef13a0bcbdc3934e7b644ffafd3ce8acf1830de3c2c2d81d19d91618
#include <cstdio> #include <iostream> #include <string> #include <algorithm> using namespace std; int n; struct node { string nm; int sc, id; bool operator<(const node &j) const { return nm < j.nm || (nm == j.nm && sc > j.sc); } } re[200010]; int main() { scanf("%d", &n); for (int i = 1; i ...
#include <stdio.h> #include <stdlib.h> #include <iostream> #include <algorithm> #include <string.h> using namespace std; typedef struct { char str[101]; int pri; int no; } node; node p[101]; bool cmp(node a, node b) { if (a.str != b.str) return strcmp(a.str, b.str) < 0; else return a....
1e90ff5fe5cb614af2e07d55f9aa2a864eab50d75d95a48ba998053f82a1f026
a319d328425f786aef7bcef37dd336bbfa9b48fdbca457b7a37fdc67c5552187
0.021136
cpp
a319d328425f786aef7bcef37dd336bbfa9b48fdbca457b7a37fdc67c5552187
50fc3567a6385276699602c07b99e289fa1954c626ea7bc12366b8275e86041b
PIE_released_gem5_runtime
pie_72631
p01420
fc8f0fe485088b489ceeed4250e345cace116b1619b18889750fab70e4443aa3
50fc3567a6385276699602c07b99e289fa1954c626ea7bc12366b8275e86041b
0.076306
3.610183
2-4
05f1acfb9bec5c65aa606e646f35a5a751c4a5ae80c83abe2fec1a2bd3128f7f
#include <stdio.h> #include <cstring> #include <iostream> #include <string> using namespace std; const double eps = 1e-12; #define REP(i, x) for (int i = 0; i < x; i++) double tmp[107][107]; double rest[107][107], rsum[107][107]; int N, M, L; int p[107], t[107], v[107]; double pp[107]; int main() { whil...
#include <stdio.h> #include <algorithm> #include <math.h> using namespace std; const double eps = 1e-7; const int maxn = 110; const int maxm = 110; double lin[maxm][maxm], tmp[maxm][maxm], c[maxm][maxm], ans[maxm], p[maxm], v[maxm], t[maxm]; int main() { for (int i = 0; i < maxm; i++) { c[i][0] = c[...
87f6a553d19454b3039864c383313d243d6f249379cb2134bcbb4dbc7f52cbf1
308e7c80e06b5122dd1cb2092a74dd9eae6bedb0fead3620132a3e602aae6725
0.10528
cpp
308e7c80e06b5122dd1cb2092a74dd9eae6bedb0fead3620132a3e602aae6725
667dd1fa7003f0cfa17e3c0e692bf3b80ed336c26767dfd475de0d28c9423b62
PIE_released_gem5_runtime
pie_72672
p02726
a761ad9ea3682bdf9e3fd0be6140ef1e74445d32e1283eb81ecdac7e1ed85fe3
667dd1fa7003f0cfa17e3c0e692bf3b80ed336c26767dfd475de0d28c9423b62
0.942285
8.950287
8+
1fd97124f33c4c1784d7e007de9beb4ea0c885ad0572d431dd778d80e8c17407
#include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <vector> #include <map> #include <set> #include <stack> #include <cmath> #include <cstdlib> #include <functional> #include <locale> #include <cctype> #include <sstream> #include <iomanip> #include <queue> #include <b...
#include <iostream> #include <cstdio> #include <algorithm> #include <string> #include <vector> #include <map> #include <set> #include <stack> #include <cmath> #include <cstdlib> #include <functional> #include <locale> #include <cctype> #include <sstream> #include <iomanip> #include <queue> #include <b...
9b28f04233fff9255785674c0b4c03507ee12e44a3d28372a6a654361d8092db
a674ad6cd5ac3a715f628f1ef65b669521f33b26949b5e95bc30c18b7dcbea27
0.019208
cpp
a674ad6cd5ac3a715f628f1ef65b669521f33b26949b5e95bc30c18b7dcbea27
0a447418510b1287f527c41daa0156314379f996e1dd87a11d8ed2f5ea22d741
PIE_released_gem5_runtime
pie_7272
p00457
0ab5cdbaa8adf822876fd9c4978d33c0502ac4b45eced9600a71336f58fe0d05
0a447418510b1287f527c41daa0156314379f996e1dd87a11d8ed2f5ea22d741
0.12731
6.62806
4-8
d2a2e33f8b96d3d6b717569b621ff02fd46240304e49be68f1fb2c9f22a783c9
#include <cstdio> #include <cstring> #include <algorithm> #include <iostream> using namespace std; int chain(int idx, int col); int model[10002]; int n; int main(void) { while (scanf("%d", &n), n) { int mi = n; memset(model, 0, sizeof(model)); for (int i = 0; i < n; i++) { scanf("%d", &...
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; int check(char block[], int idx, int size); int main(void) { int n; while (scanf("%d", &n), n) { int mi = 10001; char block[10001]; for (int i = 0; i < n; i++) { scanf("%s", &block[i]); block[i] -= '0'; ...
127ff6ec2de71e9cd036bb99d6e2ba87c5ce6fc3e6ababc0add8e1d27f73c358
6a9d3910b881a24e5ad4c1008254fc03f492ac623f2a650630bff1d598570b4a
0.001067
cpp
6a9d3910b881a24e5ad4c1008254fc03f492ac623f2a650630bff1d598570b4a
35b4a27ae4284836338e3ab3b28a91a15dc08ad7f5fd7b9f3713dd0b6bc8bb3b
PIE_released_gem5_runtime
pie_7275
p03754
3f74c2ac3f3774b8d9b56dd260ed0f4e103fcac72c774242dfd0b282ca461601
35b4a27ae4284836338e3ab3b28a91a15dc08ad7f5fd7b9f3713dd0b6bc8bb3b
0.005113
4.790492
4-8
162d698c3d7d2abb2c5fc97d72a5afca05c3d681125d81b8769bc8639ccfb96e
#include <bits/stdc++.h> using namespace std; using ll = long long; const int N = 150000; vector<int> g[N]; double dp[N]; double dp1[N]; double dp2[N]; double ans[N]; void dfs(int i, int p = -1) { int sz = (g[i].size() - (p != -1)); for (int j : g[i]) if (j != p) { dfs(j, i); dp[i] += (...
...
ddb67f4a8bb907c72d97e8aa51f4930288e4e91bab78b5f45d43ad9bd74531d0
91b5589d78562a1b4ffe6ee791fead94751bfdf1e0eda3f5a00c9b83ac8871e0
0.106355
cpp
91b5589d78562a1b4ffe6ee791fead94751bfdf1e0eda3f5a00c9b83ac8871e0
55a9375d7dc44bf0ae9bf599c193a6ebce18473ba52847b6e592505795da22cd
PIE_released_gem5_runtime
pie_72775
p03112
e1ed1fff0d8b64e4684bce5eeb37801a0a02efc9278d2ad3d9d7431848cf28d1
55a9375d7dc44bf0ae9bf599c193a6ebce18473ba52847b6e592505795da22cd
0.727223
6.837677
4-8
c176eb64a6bad696639b9fc1e00ba9fb8411423a899832ad36ef641f173d4b3d
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef pair<int, int> P; const int INF = 0x3f3f3f3f; const int MAXN = 200000; int N, M; struct Edge { int to; int weight; int next; }; vector<Edge> edges(MAXN); vector<int> head(MAXN, -1); vector<int> matchi...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> vll; typedef pair<int, int> P; const int INF = 0x3f3f3f3f; const int MAXN = 200000; int main() { ll A, B, Q; cin >> A >> B >> Q; vll numsA(A); vll numsB(B); for (int i = 0; i < A; ++i) { cin >> numsA[i]; ...
041f8a9a69b21962743c183f6b97c68f011df8fc1cb682a11e3bfcfbf5e5c7d3
8ac14aef09bfe7274d0d5965172ccbc902a5425d3dd30b0c42b073f5570ee882
0.021189
cpp
8ac14aef09bfe7274d0d5965172ccbc902a5425d3dd30b0c42b073f5570ee882
89bc7a02ba87ae88592b07cbd6ca41390dd33e7a9202de1e561d322d4c7829b5
PIE_released_gem5_runtime
pie_72779
p01648
4866bba0032d174280df7a1bba5d1fbcf1b6cb8122ff926b5a82eff90bedc4a6
89bc7a02ba87ae88592b07cbd6ca41390dd33e7a9202de1e561d322d4c7829b5
0.09724
4.589152
4-8
4fe4e4e5c65b7bc3f0dac0163a229fced93bdeade518a33ee62492b15e81669a
#include <cstdio> #include <vector> #include <cstdlib> #include <algorithm> using namespace std; struct edge { int u, v, w; edge(int _u = 0, int _v = 0, int _w = 0) : u(_u), v(_v), w(_w) {} bool operator<(const edge &o) const { return w < o.w; } }; int fa[1005]; int root(int x) { return fa[x] = (x == fa...
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int MAXN = 100000; struct node { int u, v, dist; } a[MAXN + 10]; int n, m; int fa[MAXN + 10]; int cnt; int num[MAXN + 10]; int tot; bool cmp(const node &x, const node &y) { return x.dist < y.dist; } int find(int x) { re...
c6dceece586b1a5d928cd92a97d5e00fbfbe13c91b39449c67efd62915843159
c3e7022abd0e1d70c5adc983e72ed780647a39303aa2b4692d407242a7b5c56e
0.085007
cpp
c3e7022abd0e1d70c5adc983e72ed780647a39303aa2b4692d407242a7b5c56e
7552e4dea4ddc3db63fd7c3451175bad5cd4f624ed8f7bece63d8a2864134c0c
PIE_released_gem5_runtime
pie_7278
p01347
d4873434414e2d716947f9b8c5b249dfb0ab3c563bdc99cc6691b9644daae233
7552e4dea4ddc3db63fd7c3451175bad5cd4f624ed8f7bece63d8a2864134c0c
1.062106
12.494367
8+
26f4fefd4e837003b8ace9895765ae7f10d215c1188cece6be20918e01c71262
#include <cstdio> #include <cstring> #include <cmath> #include <algorithm> #define add(a, b, c) (e[i] = b, pre[i] = last[a], last[a] = i, w[i] = c) #define prec 1e-6 #define inf 1e9 using namespace std; struct edge { int u, v, w; edge(int u = 0, int v = 0, int w = 0) : u(u), v(v), w(w) {} }; struct simpl...
#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <algorithm> #include <cstdlib> #include <cmath> #include <map> #include <queue> #include <stack> #include <vector> #include <bitset> #include <functional> using namespace std; #define MAX_V 100 + 2 int indegree[MAX_V], ou...
f2d6c8afe92ad1f25fa5c034ce565c98b568fdafa636f5314428b975c0acbf17
5ad8dada0d533b9d7297aa3b10daee64ac9c7f38b48ff5f3969c6f5da610b04f
0.014316
cpp
5ad8dada0d533b9d7297aa3b10daee64ac9c7f38b48ff5f3969c6f5da610b04f
4b6edaa78aea8ca030c46e41c03ec2c481af40967babf4ad0380987bd4c678e2
PIE_released_gem5_runtime
pie_73089
p03949
849a049182330a22259ca8aed30331da66be005c2d21f0611e71a3f42c7da6ca
4b6edaa78aea8ca030c46e41c03ec2c481af40967babf4ad0380987bd4c678e2
0.541838
37.849316
8+
6a40850ef33caa456fd788e1439c2d415acdee092a6c97a7d6d7cfbbfcf4f382
#include <iostream> #include <cstdio> #include <cstring> #include <cmath> #include <cassert> #include <algorithm> #include <vector> using namespace std; typedef long long LL; const int INF = 100000000; const int MAXN = 111111 * 2; int val[MAXN], l[MAXN], r[MAXN], odd[MAXN]; int n, K; vector<int> adj[MAXN...
#include <cstdio> #include <algorithm> #include <queue> using namespace std; int n; struct edge { int e, nxt; }; edge a[200200]; int m; int sp[100100]; int minv[100100], maxv[100100]; int dep[100100], par[100100]; const int inf = 1000000000; int q[100100], hd, tl; int val[100100]; int main() { int ...
c2cfe15971c71601c3701ebf1cdaec14dbd5b1eb42cb1485f1c3a97c7695ba47
e27eba325d9275da1ef731e6772d2b954abfcd683e481192ac5748bcd0f3f88a
0.086258
cpp
e27eba325d9275da1ef731e6772d2b954abfcd683e481192ac5748bcd0f3f88a
bd952adcbc2d45c7542ec1153a298708aa3cc54059eac06b96990301f11d52ce
PIE_released_gem5_runtime
pie_73400
p02843
7172349d227e88481ce85beee0a7fb7355c4740f2b359f5a0f9285047e97c414
bd952adcbc2d45c7542ec1153a298708aa3cc54059eac06b96990301f11d52ce
0.250108
2.899536
2-4
88b0e9b17d4ba3d79f86f249a18988c33868f222d9432f9cc9f3e0a82076d0d6
#include <iostream> #include <iomanip> #include <string> #include <vector> #include <algorithm> #include <map> #include <cmath> #include <queue> #include <set> #include <cassert> #include <random> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long int ll; const ll INF =...
#include <iostream> #include <iomanip> #include <string> #include <vector> #include <algorithm> #include <map> #include <cmath> #include <queue> #include <set> #include <cassert> #include <random> #define rep(i, n) for (int i = 0; i < (n); i++) using namespace std; typedef long long int ll; const ll INF =...
2fcb2cf82963c2c6a960ac6318df6a63313cffeb768e52e649a923a1239f0e9d
3d1b27a4efe4e96ca05788628ece5a01e83596d75471a101e9cb1e5d43c3c771
0.02448
cpp
3d1b27a4efe4e96ca05788628ece5a01e83596d75471a101e9cb1e5d43c3c771
f983dd780b9e80a53ea3a77959e4b1631d202eaa4272782f22e106d79e315716
PIE_released_gem5_runtime
pie_73434
p03188
5c1b3787d1ff4ebf8b381a0a7fe376dfa4ff32af8f2bb1e7f4643e8c164518f6
f983dd780b9e80a53ea3a77959e4b1631d202eaa4272782f22e106d79e315716
0.091819
3.750826
2-4
2dcee29035f334f54fcb7be435deac5a81ea6641077773a68f44902ef4887a46
#import <iostream> int main() { int K, n, i = -1, j, k; std::cin >> K; std::cout << (n = (K + 3) / 4 * 2); while (++i < n) { std::cout << '\n'; j = -1; while (++j < n) std::cout << ((k = i % 2 * n + (i + j) % n) >= K ? (k - n) % K : k) + 1 << ' '; } return 0; }
#import <cstdio> int main() { int K, n, i = -1, j, k; scanf("%d", &K); printf("%d", n = (K + 3) / 4 * 2); while (++i < n) { puts(""); j = -1; while (++j < n) printf("%d ", ((k = i % 2 * n + (i + j) % n) >= K ? k - n : k) % K + 1); } }
66765fe6440162dd1b53950ef6387a59b328451dfe172b70e5ea59c86fbd8fb0
074aeaaa6925e6d63a9d289832885c1a0620411f0c18336f372106bc8535d927
0.037542
cpp
074aeaaa6925e6d63a9d289832885c1a0620411f0c18336f372106bc8535d927
6fe0868808e7a85037cdf3e77b2a3c204d7c6b3cdfa20bc1aaf42d47a5768045
PIE_released_gem5_runtime
pie_73441
p01558
f0d85b62c63eacc4828756cd4e95b8f08acc5c57ae14d8c3fce60449474bc5bb
6fe0868808e7a85037cdf3e77b2a3c204d7c6b3cdfa20bc1aaf42d47a5768045
0.128732
3.429061
2-4
612e49445ec930fd1788b047bac5d4a2ca99c88119a8ace0aae52bdd3ee3e16d
#include <iostream> #include <set> #include <algorithm> #include <cmath> #include <cstdio> #include <cassert> #include <climits> #define REP(i, s, n) for (int i = s; i < n; i++) #define rep(i, n) REP(i, 0, n) #define inf (1 << 29) #define MAX 300002 using namespace std; typedef unsigned long long ull; ull ...
#include <iostream> #include <set> #include <algorithm> #include <cmath> #include <cstdio> #include <cassert> #define REP(i, s, n) for (int i = s; i < n; i++) #define rep(i, n) REP(i, 0, n) #define inf (1 << 29) #define MAX 300001 using namespace std; typedef unsigned long long ull; int n, m, L, R; char ...
cee261e1de94a55a874a3942c770d3d9452a09bbe5cb108b99ee968600b16ff9
a248cadfa4a4689645b8bff8af596181d890ae626c355fa9abf2bdc43132babd
0.105361
cpp
a248cadfa4a4689645b8bff8af596181d890ae626c355fa9abf2bdc43132babd
66da1ca3bb56b3b0d93baefcba1a11b3020411ea9c12270abce36e04802bcf6f
PIE_released_gem5_runtime
pie_73458
p03504
41c173e7207d843317d07bd94d919399093b6189c82b7f37aaae21f05d0eb765
66da1ca3bb56b3b0d93baefcba1a11b3020411ea9c12270abce36e04802bcf6f
0.305245
2.897142
2-4
f859e5a245c8f4d7ccd403ea9b64d9a5904823c3c61d5e1557459c56eda900bc
#include <iostream> #include <algorithm> #include <vector> #include <queue> using namespace std; using pii = pair<int, int>; using vi = vector<int>; #define FOR(i, a, b) for (int i = (a); i < (b); ++i) #define REP(i, n) FOR(i, 0, n) #define IN(v) ...
#include <iostream> #include <vector> #include <queue> using namespace std; #define rep(i, n) for (int i = 0, _i = (n); i < _i; ++i) struct Program { int s, t, c; Program(int s, int t, int c) : s(s), t(t), c(c) {}; bool operator<(const Program &rhs) const { return s == rhs.s ? t < rhs.t : s < rhs.s; ...
04c6193fd1a4fe84a3fcb7f22f517b6f3247007df62faa77c57b90bb4248b26e
7b9fc863786f36b7a908d15881d36e6b7b26cac38c72dae56687cc3f243a6db4
0.013104
cpp
7b9fc863786f36b7a908d15881d36e6b7b26cac38c72dae56687cc3f243a6db4
889f7f197a9f21d3d06f5a621c28d3b4d6bce3a9952108d85fe06ad00c32ad64
PIE_released_gem5_runtime
pie_73477
p01132
7e6810ee504813daabf4a7492a74aea208fe379da8ac3bb6d499eef91df96f34
889f7f197a9f21d3d06f5a621c28d3b4d6bce3a9952108d85fe06ad00c32ad64
0.068939
5.260953
4-8
c3b34a6e08a70b735e6baa54d94ac82ee319b4786b22d4ca56dc4a839301dc6b
#include <algorithm> #include <iostream> using namespace std; int main() { int N; int coin[4] = {10, 50, 100, 500}; bool first = true; while (cin >> N && N) { int budget[4], used[4] = {}; cin >> budget[0] >> budget[1] >> budget[2] >> budget[3]; int res = 20 * 20 * 20 * 20; for (int i ...
#include <cstdio> int main() { bool first = true; while (true) { int p; scanf("%d", &p); if (p == 0) break; int n10, n50, n100, n500; scanf("%d %d %d %d", &n10, &n50, &n100, &n500); int rest = n10 * 10 + n50 * 50 + n100 * 100 + n500 * 500 - p; n500 -= rest / 500; res...
f474fd86132ecc8126fc4d6dd7897581c2adf53205a0ba77cce74f6e21982e8c
caae80211a76a193f34d301fa00530f1d0d9d3a110c312e4647dda1dc577a793
0.005302
cpp
caae80211a76a193f34d301fa00530f1d0d9d3a110c312e4647dda1dc577a793
9b40f685657c153559545ad3b0625383e4b1433eaba7be8fdd3cbfbeee8d0a0c
PIE_released_gem5_runtime
pie_73480
p04010
08b0c41926310c7d0afef99102a7b4e9c6d3b2d69b97160a74adbfa01e2dbd29
9b40f685657c153559545ad3b0625383e4b1433eaba7be8fdd3cbfbeee8d0a0c
0.089757
16.92785
8+
35405e3e783b6dca133cf60fb8e3d89e8c14b1e6f069ad94b88f519a358aac0d
#include <bits/stdc++.h> using namespace std; #define MAXN 100000 #define ll long long #define rint register int #define gc() getchar() inline int read(int r = 0, int s = 0, int c = gc()) { for (; c < 48 || c > 57; s = c, c = gc()) ; for (; c >= 48 && c <= 57; (r *= 10) += c - 48, c = gc()) ; return...
#include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #define MAXN 100000 using namespace std; typedef long long LL; struct node { int to; node *nxt; } edges[MAXN * 2 + 5]; node *ncnt, *Adj[MAXN + 5]; int N, M, spx, spy; LL sum[MAXN + 5]; LL cirlen, dist[MAXN + 5], xs[MAXN + 5]; ...
692f694fa99f78057a3c46b0b677740e7048bc56882698b7bfa6dfca5875c823
bf25dccbedf1c5b1868249e91f24f8edfd201f947a9f3cb26b0e7932f6586b10
0.052499
cpp
bf25dccbedf1c5b1868249e91f24f8edfd201f947a9f3cb26b0e7932f6586b10
bcb89e523e9e396d6cb41fb3f61fd6e4481514b18008da5a4c67f03700d80eab
PIE_released_gem5_runtime
pie_73571
p02752
8a3d66db5484284fb7d90da9e5bd3db760134b09234d9aa012ac040f2aa04884
bcb89e523e9e396d6cb41fb3f61fd6e4481514b18008da5a4c67f03700d80eab
0.496332
9.454157
8+
a0c4a4f5b42f8b9de57d2e52f1244a52c0b85e8c6e551e17206de69bbd35c21b
#include <cctype> #include <cstdio> #include <vector> #include <cstring> const int N = 300007, P = 998244353, i2 = P - P / 2; int m, root, len, fa[N], dia[N], f[N][3][3], g[3][3]; std::vector<int> e[N]; void inc(int &a, int b) { a += b - P, a += a >> 31 & P; } int mul(int a, int b) { return 1ll * a * b % P; } i...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int maxn = 2e5 + 5, mod = 998244353; inline int gi() { char c = getchar(); while (c < '0' || c > '9') c = getchar(); int sum = 0; while ('0' <= c && c <= '9') sum = sum * 10 + c - 48, c = getchar(); return sum; } inli...
b50bf33ee66f601430f82d4cbe2381481118f9d5c9dd59d96c054155f49536eb
1c19980f686cf4df2ebf6047698ae71e800e02d17b930d3c4bb31b577144d776
0.000192
cpp
1c19980f686cf4df2ebf6047698ae71e800e02d17b930d3c4bb31b577144d776
f1a524ed403fcedae1b4fb2d9b045848ec7f4c5411f7f1661f2ab2fe52bb0ae1
PIE_released_gem5_runtime
pie_73590
p03661
c09c68e41370732de5a99c91633fd4a64c9d14a96bb2223d7dd5888ee1e6852f
f1a524ed403fcedae1b4fb2d9b045848ec7f4c5411f7f1661f2ab2fe52bb0ae1
0.002704
14.076909
8+
47c3abdbba6ad5ae51a45abaeadf8dd482d69ec0de9332ae49b21593b3f64669
#include <iostream> #include <stdio.h> using namespace std; typedef long ll; int main() { int length; ll arr[200000]; ll res[200000] = {0}; ll temp = 0; ll m = 2147483647; scanf("%d", &length); for (int i = 0; i < length; ++i) { scanf("%ld", &arr[i]); } res[0] = arr[0]; for (int i ...
#include <stdio.h> #include <math.h> #include <algorithm> using namespace std; #define ll long long const int N = 2e5 + 10; ll a[N]; int main() { ll n, m, i, j, k, s, t, sum, l, r; scanf("%lld", &n); { sum = 0; for (i = 1; i <= n; i++) scanf("%lld", &a[i]), sum += a[i]; l = 0; ...
81b2cb46ffb726562fab3d5cca79d92456e4ce6e868c4c35754849e6506519b3
20cba542463c94821a4a4fb3cbac21d7d030c701d5970e6eb36691abae408039
0.025788
cpp
20cba542463c94821a4a4fb3cbac21d7d030c701d5970e6eb36691abae408039
a1377077d8ba1d0760286ec21e1dd5f0fc36e6f6e43bd4033ed327095d47da33
PIE_released_gem5_runtime
pie_73708
p00880
b1c95940eeafdcd7954f9b264fd38cc7f1582f79a8ab0598e2b555522fbbccc4
a1377077d8ba1d0760286ec21e1dd5f0fc36e6f6e43bd4033ed327095d47da33
0.1759
6.821046
4-8
8619d9254fb5960fa9eace4c2c95e308f1e878ef1643771f82cd853352ca2d64
#include <bits/stdc++.h> using namespace std; typedef complex<double> point; point p[5], q[5]; const double eps = 1.0e-8; namespace std { bool operator==(const point &a, const point &b) { return abs(a - b) < eps; } } struct line : public vector<point> { line() {} line(const point &a, cons...
#include <cstdio> #include <cmath> int main() { double x1, x2, x3; double y1, y2, y3; double a, b, c; double r1, r2, r3; double d, e, f; double r, s; double ix, iy; scanf("%lf %lf", &x1, &y1); scanf("%lf %lf", &x2, &y2); scanf("%lf %lf", &x3, &y3); while (x1 != 0 || x2 != 0 || x3 != 0...
27a7d9aef74180f2e7776c594dc6dee08c878a8e4866f3dc4cac1c756f3a3e01
fb181858ebc128a49a357c6c1e773e0dca26edfdd514ec031517584bb34665ad
0.001049
cpp
fb181858ebc128a49a357c6c1e773e0dca26edfdd514ec031517584bb34665ad
365b988883df553a07eae4e1b85e5dc4fa82ce76da8a46d921a9398318a8c5f3
PIE_released_gem5_runtime
pie_73726
p02813
a47b563ae26b4630c7ed0b88d41b35e5822fc8cc6a5b08749bcbb06d9d77db42
365b988883df553a07eae4e1b85e5dc4fa82ce76da8a46d921a9398318a8c5f3
0.003616
3.448289
2-4
c07310141f226540988b52e6ad725f0556c9721abf0ce142988328443cc1d53e
#include <stdio.h> #include <sstream> #include <string.h> #include <vector> #include <map> #include <algorithm> #include <utility> #include <set> #include <cctype> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath> #include <deque> #include <limits> #include <iomanip...
#include <stdio.h> #include <sstream> #include <iostream> #include <fstream> #include <string.h> #include <vector> #include <map> #include <algorithm> #include <utility> #include <set> #include <cctype> #include <queue> #include <stack> #include <cstdio> #include <cstdlib> #include <cmath> #include <deq...
b34db9fa2454328439117da7c7e12c9e2d42fd90c1e345908aca062ad2c6b468
9e6aa86dd8ee78f7aefb5350c28cfc46c5083ad71498c3a7e9914ba28ba5c77d
0.000233
cpp
9e6aa86dd8ee78f7aefb5350c28cfc46c5083ad71498c3a7e9914ba28ba5c77d
a67f9eaddfcd18e87a0d642badb97a27d343c01695c245a0fe9759b95cf68e71
PIE_released_gem5_runtime
pie_73727
p00911
a6b3fa7010be5c022f82c311ef14091bdc13a1787ff4372ce3303ad57e38b77a
a67f9eaddfcd18e87a0d642badb97a27d343c01695c245a0fe9759b95cf68e71
0.001023
4.391063
4-8
b6042dd0875b5200ced56d871da76e13f387cbabe46fb557d2ab868ab81ce261
#include <cstring> #include <cstdio> #include <algorithm> #include <vector> #include <string> #include <iostream> using namespace std; const int MAXN = 1e4 + 10; const int MAXG = 110; int n, m; int x[MAXN], op[MAXN], y[MAXN]; int f[MAXG][MAXG], g[MAXG][MAXG]; bool vis[MAXG]; void dfs(int u) { int i, k; ...
#include <cstdio> #include <cstring> #include <algorithm> #include <vector> #include <cctype> using namespace std; #define N 105 int n, m; struct query { int id, x, y; } q[N * N]; bool g[N][N], f[N][N]; bool Q(int x, int y) { for (int i = 1; i <= n; ++i) if (g[x][i] && f[y][i] || g[y][i] && f[x]...
3661d624afccb033e4f6767e33a54682e02a513af2ec56cd33f9f18e63fe3c7e
0dafea2c5ecc25f1d36f9a6b605927d9c97db3d129c290dc62664d74bbf124b5
0.007687
cpp
0dafea2c5ecc25f1d36f9a6b605927d9c97db3d129c290dc62664d74bbf124b5
818cfb0f59220bc0533ed4d63bbf8b79a14396f90552af4e7fbee72b9a948827
PIE_released_gem5_runtime
pie_73733
p00189
0c31260072dc4a8162755e4900048dbd32d16595ac63f425aed06ffbe5c6aba0
818cfb0f59220bc0533ed4d63bbf8b79a14396f90552af4e7fbee72b9a948827
0.227248
29.562422
8+
53cf6215ae2151a83e8d073a9dec3002b55dead86018706965ee7824bed40eab
#include <stdio.h> #include <string.h> #include <algorithm> #define INF 0xfffffff using namespace std; int map[1100][1100]; int main() { int n, m, k, i, j, a, b, c, sum1; while (scanf("%d", &n), n) { for (i = 0; i < 1100; i++) for (j = 0; j < 1100; j++) { map[i][j] = INF; ...
#include <cstdio> #include <algorithm> #include <string.h> using namespace std; int main() { int t, map[12][12], sum, ans, s, i, j, k, max0, a, b, c; while (scanf("%d", &t) && t) { memset(map, 1, sizeof(map)); max0 = 0; for (i = 0; i < t; i++) { scanf("%d %d %d", &a, &b, &c); ...
d1ed754ea4b5b3e33ca625a63c0353bb9d609bc69aa0d287d94df190a0d1e278
eaf529c15dfeb2b4ee52530d94f13d98da3017c2a544662041c204370cdad95a
0.10676
cpp
eaf529c15dfeb2b4ee52530d94f13d98da3017c2a544662041c204370cdad95a
1516c8dc046f04c31c09a94a86c4ced81508b0eb41bdd7cfa8b02c59f28364f0
PIE_released_gem5_runtime
pie_73760
p02860
754dd3ac4c793fd1c3f487f1c7d4ede3ea58edfc5acc316d47ab46df566f6c18
1516c8dc046f04c31c09a94a86c4ced81508b0eb41bdd7cfa8b02c59f28364f0
1.005391
9.417334
8+
2865e778c42e9a68e2ad2523f584547bca4d32e4b3e0affe5bc22dcbe0c31c72
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define first f #define second s #define N 1000000 vector<ll> v(N); ll l, m, n, sum, ans, maximum, minimum, mahakal, a, b, c, t, i, j, k; ll cnt, cnt1, cnt2, cnt3; string str, str1, str2; ll arr[N]; int main() { cin...
#include <bits/stdc++.h> using namespace std; #define ll long long #define mod 1000000007 #define fast \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
eb4040db16ba9187d7a44d709699c6f9af4b1c476ec3ae781aa1a52da3a437c9
aa08973ededc58a970c5ba2db7a8e0a18c522b9a65a423ecfe62114f11e2e528
0.035524
cpp
aa08973ededc58a970c5ba2db7a8e0a18c522b9a65a423ecfe62114f11e2e528
db88dc37729b5e57259c9bcd6c3c1d0a60ca3eaa7c4cb15e0805e7ad606b3246
PIE_released_gem5_runtime
pie_73856
p03043
ffefdec6fcaab1cff6238f44c47e575993fd01eff324de0a5da0a66e3680abc6
db88dc37729b5e57259c9bcd6c3c1d0a60ca3eaa7c4cb15e0805e7ad606b3246
0.166788
4.695037
4-8
3ba1e01df583381451356f05452bedd34b3d7e5a5435c45899843ae100d21838
#include <iostream> #include <string> #include <set> #include <cmath> #include <vector> #include <algorithm> using namespace std; using ll = long long; typedef long double ld; const long double eps = 1e-12; const int maxn = (int)1e5 + 10; ld p[maxn]; void mypow() { p[0] = 1; for (int i = 1; i < maxn; ...
#include <iostream> #include <string> #include <set> #include <cmath> #include <vector> #include <algorithm> using namespace std; using ll = long long; typedef long double ld; const long double eps = 1e-12; ld mypow(ld a, ll i) { if (i == 0) return 1; ld t = mypow(a, i >> 1); t *= t; if (i & 1...
5c7f273ad7f0b28068bef831a0609e27afa334dda905f7ee9aae049cd538456e
9b5cb056c7462713ae4fc49e9ef1bb4043dffb3b6cb6182b018019e968521821
0.001029
cpp
9b5cb056c7462713ae4fc49e9ef1bb4043dffb3b6cb6182b018019e968521821
6a3bcbf679a1ad9cb6a6656160c456282e2a87487a28f1736fd703857c960dff
PIE_released_gem5_runtime
pie_73873
p03732
d53c4427fa82317e169f4a73df44bfa6c677ec23b9719439aa5c68a3d0b16e3f
6a3bcbf679a1ad9cb6a6656160c456282e2a87487a28f1736fd703857c960dff
0.01563
15.191229
8+
f6549a129a17ab9948fd4f50441e79004ef22fa17dbb342442c1bcaf39d19ca2
#include <iostream> #include <algorithm> #include <cmath> #include <cstring> #include <cstdio> #include <cstdlib> #include <vector> #include <iomanip> #define sqr(x) (x) * (x) #define fz1(i, n) for (i = 1; i <= n; i++) #define fd1(i, n) for (i = n; i >= 1; i--) #define fz0g(i, n) for (i = 0; i <= n; i++) #d...
#pragma GCC optimize(1) #pragma G++ optimize(1) #pragma GCC optimize(2) #pragma G++ optimize(2) #pragma GCC optimize(3) #pragma G++ optimize(3) #pragma GCC optimize(4) #pragma G++ optimize(4) #pragma GCC optimize(5) #pragma G++ optimize(5) #pragma GCC optimize(6) #pragma G++ optimize(6) #pragma GCC optimi...
d7d661572f4b056e8d50428b5d879586579fe3dffffe2d722c8b640c6fa9d0bd
01ab9de7e2bff90539ab9bdd8a79efdc062989d4d41753643d57d7c057e6cf34
0.019884
cpp
01ab9de7e2bff90539ab9bdd8a79efdc062989d4d41753643d57d7c057e6cf34
44cef2aaf3561ae34df707419c7e2afb70874e68575f15bad94d74dc81b5bd42
PIE_released_gem5_runtime
pie_73892
p02264
476ec15c41141663e97a0a6c44a7112a0eb8050cb39afcff1dcacb04cd2e33ff
44cef2aaf3561ae34df707419c7e2afb70874e68575f15bad94d74dc81b5bd42
0.559865
28.15692
8+
4cbc11fa8e15c0472119d6e43f021e9fb5713913f220bb8ef26bd317d3542d12
#include <iostream> #include <algorithm> using namespace std; const int MAXN = 100000 + 5; struct process { string name; int time; }; process Q[MAXN]; int head, tail; int n, q, total_time = 0; void enqueue(process x) { Q[tail] = x; tail++; tail %= MAXN; } process dequeue() { process x = Q[hea...
#include <cstdio> #include <cstdlib> #define MAXN 100010 int n, q; typedef struct p { char name[10]; int time; } P; P que[MAXN]; int head, tail, tot; void get_input() { scanf("%d %d", &n, &q); for (int i = 0; i < n; i++) { scanf("%s %d", que[i].name, &que[i].time); } tail = n; } void solv...
069a5b30ddf9a0454e800166d7321cd12f0e8c29e0c8203f1d1562f88d212bdb
e72f41d6b11ab269bb1fc2abd3a1d22e9ec1cdead4ae40703da1e804e5271849
0.06114
cpp
e72f41d6b11ab269bb1fc2abd3a1d22e9ec1cdead4ae40703da1e804e5271849
d75bea89e6ef8cf5d26509d8106ce9611c5d7507efcbc0268898f6668e95f270
PIE_released_gem5_runtime
pie_73942
p02902
e1bb4f0df1ff9b3a6af0d5ff6190dc63d6b04be96bb16818dc76040c3abae0ec
d75bea89e6ef8cf5d26509d8106ce9611c5d7507efcbc0268898f6668e95f270
0.134785
2.204532
2-4
7d20f59bf4ace1f5b751adb23dce683dac423fec6e44b5e6de9866784d545dcc
#include <iostream> #include <sstream> #include <cstdio> #include <cstdlib> #include <cmath> #include <ctime> #include <cstring> #include <string> #include <vector> #include <stack> #include <queue> #include <deque> #include <map> #include <set> #include <bitset> #include <numeric> #include <utility> #...
#include <iostream> #include <vector> #include <algorithm> using namespace std; using Graph = vector<vector<int> >; vector<bool> seen, finished; int pos = -1; vector<int> hist; void dfs(const Graph &G, int v) { seen[v] = true; hist.push_back(v); for (auto nv : G[v]) { if (finished[nv]) conti...