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
de245c4443a14401c63766008d9299d3f55102d2a5b355f7be406aff27c011c4
3cac44b7bf5f1b92e52e5c15cd1a4418868b2a429fb7dbe4039f07683b71eb82
0.053892
cpp
3cac44b7bf5f1b92e52e5c15cd1a4418868b2a429fb7dbe4039f07683b71eb82
d0a3ccb19dfaae10c69a3a60d812d49209e9d81854f880ce80b5493071ab47d5
PIE_released_gem5_runtime
pie_73949
p00486
ed71ff2ceac9c3ba13f1255876e2fb11ba15dd5a900760799006228b383a83c0
d0a3ccb19dfaae10c69a3a60d812d49209e9d81854f880ce80b5493071ab47d5
0.500016
9.27805
8+
a18aa9a44d8f3fa65e3a00c4a61542775c1e94a89fa948201486e7ac584ba610
#include <iostream> #include <vector> #include <algorithm> #include <cstring> #include <cmath> using namespace std; #define MAX_N 1000000 #define INF 1145141145141919810LL; long long x[MAX_N], y[MAX_N], lx[MAX_N], ly[MAX_N], d[MAX_N], n, h, w, sx, sy, c, mx, my, sum, minx, dx, dy; vector<long long> X, Y, B...
#include <iostream> #include <vector> #include <algorithm> using namespace std; long long x[200000], y[200000], n, H, W; vector<long long> X, Y; vector<pair<long long, long long>> candidate; long long dists(long long px, long long py) { vector<long long> RR; long long sum = 0; for (int i = 0; i < n; i++) ...
5cf15af9321c7815109a54bb1189c1c6f6cbbccb09264c26ede782c6a8da5c07
f2ad297448499f6e46a4961a397b4817b635150572a41798b0cd2227ee5b1650
0.000187
cpp
f2ad297448499f6e46a4961a397b4817b635150572a41798b0cd2227ee5b1650
d7a26c8bb21815cf8ce5f284408f6e43691326a354006786b9619574e1c142a2
PIE_released_gem5_runtime
pie_74035
p03495
f7b752fbb9626692cfac2af0f7b4602435c0bd132f54e1fa23404cf96b6bcecd
d7a26c8bb21815cf8ce5f284408f6e43691326a354006786b9619574e1c142a2
0.00182
9.739674
8+
388d1e1a2fd4c7ee8a2253220a4a5e68ad9fb6817974fed77b1d9944b03ae08f
#include <bits/stdc++.h> using namespace std; const int N = 200005; int cnt[N], aux[N]; int main() { int n, k; cin >> n >> k; map<int, int> mp; for (int i = 0; i < n; i++) { int x; cin >> x; cnt[x]++; } int sz = 0; for (int i = 1; i < N; i++) { if (cnt[i]) { aux[sz++] ...
#include <stdio.h> #define N 200002 int a[N] = {0}, b[N] = {0}; int read() { char c; while ((c = getchar()) < 48 || c > 57) ; int x = c - 48; while ((c = getchar()) > 47 && c < 58) x = x * 10 + c - 48; return x; } int main() { int n, k, i, c = 0, t, ans = 0; n = read(), k = read(); ...
e91b2b511caf1e299e7cf6c3ef9c472d5d94fe7bc62cd2a5fbea1f02d6afb637
6f95f28e07ec6da3c73a1d650ce126932881036f9f568f8b7a6f1f8db0ebc543
0.005858
cpp
6f95f28e07ec6da3c73a1d650ce126932881036f9f568f8b7a6f1f8db0ebc543
f7e179428c0e665205d64950b4c36e4dbfc9fb648cd6e7b68995c8476a918051
PIE_released_gem5_runtime
pie_74052
p02963
71e44018bd0c59e6da52d4d9e95f589074cae534e655f143fabf98f1828b7c26
f7e179428c0e665205d64950b4c36e4dbfc9fb648cd6e7b68995c8476a918051
0.028172
4.808833
4-8
00e80f59f92a3c9db025a6c761dc86f0e2dcf59aa3a6efa4592bc3df1b624061
#include <cstdio> #include <cstring> #include <iostream> using namespace std; #define INF 1000000000 long long int a, b, c, d, s; int main() { scanf("%lld", &s); if (s % INF) printf("0 0 %lld %lld %lld %lld\n", 1, s / INF + 1, INF, INF - s % INF); else printf("0 0 %lld %lld %lld %lld\n", 1, s /...
#include <cstdio> #include <cmath> #define ll long long using namespace std; int main() { ll i; ll s, t; ll root; scanf("%lld", &s); root = (ll)sqrt(s); if (root * root == s) { printf("0 0 %lld 0 0 %lld\n", root, root); return 0; } t = (root + 1) * (root + 1) - s; for (i = 1;; i+...
d711585143c39310dfaee7448f56d8e86ba5ae4e87bbfc6c7d4108d233286f46
241713b27cd34464cc6435b0aed2ab09340c8636a6f6f1827a6843cae6df1287
0.025995
cpp
241713b27cd34464cc6435b0aed2ab09340c8636a6f6f1827a6843cae6df1287
8ccfe78f5151bca177320e780afc5d671812345f3092dac260406bf25d17ae20
PIE_released_gem5_runtime
pie_74066
p02352
edeef3fe13d857812cb26757b54a6c3716491a8fefc2c2ed3b9af0f7d61c21f0
8ccfe78f5151bca177320e780afc5d671812345f3092dac260406bf25d17ae20
0.150421
5.7866
4-8
89cd6d2fa8213220f36d4f62aca67b562d087e28d43ac1789483b2003bd8e8b1
#include <cstdio> #include <vector> #include <algorithm> using namespace std; const int SIZE = 1 << 17; template <typename T> struct lazysegtree { T node[2 * SIZE], lazy[2 * SIZE], I_upd, I_qry; bool need_upd[2 * SIZE]; T (*upd_f)(T, T, int, int), (*qry_f)(T, T); lazysegtree(T (*op1)(T, T, int, int), ...
#include <vector> #include <functional> #include <algorithm> #include <iostream> #include <climits> using namespace std; template <typename MonoidType, typename OperatorType, class SegFunc> struct LazySegmentTree { int n; vector<MonoidType> node; vector<OperatorType> lazy; vector<bool> need_update; ...
d5f1f4d71cda58f29a061b209d404947a2f3a579968a349bff1a5597c9849368
419a812c409bd92118ab24b280b92ed41b62701f06acfb464b02385e50aba8c4
0.054271
cpp
419a812c409bd92118ab24b280b92ed41b62701f06acfb464b02385e50aba8c4
844f45092cd4c68dbb1c9d3a1ff19d2a7376fdbdb0e0f6620307dd7c1345026d
PIE_released_gem5_runtime
pie_74093
p03148
2dea321f9f3db31f968a10a44ccb1b39117313f0ee85384a5d5c1ee52f2b8b4a
844f45092cd4c68dbb1c9d3a1ff19d2a7376fdbdb0e0f6620307dd7c1345026d
0.217146
4.001176
4-8
da0b69220eb98157cd3976b6f5b06db0523fde85fe6ec1b45f254fae0c2b6190
#include <bits/stdc++.h> #define rep2(x, fr, to) for (int(x) = (fr); (x) < (to); (x)++) #define rep(x, to) for (int(x) = 0; (x) < (to); (x)++) #define repr(x, fr, to) for (int(x) = (fr); (x) >= (to); (x)--) #define all(c) (c).begin(), (c).end() #define sz(v) (int)(v).size() using namespace std; typedef long long...
#include <bits/stdc++.h> #define rep2(x, fr, to) for (int x = (fr); x < (to); x++) #define rep(x, to) for (int x = 0; x < (to); x++) #define repr(x, fr, to) for (int x = (fr); x >= (to); x--) #define all(c) c.begin(), c.end() #define sz(v) (int)v.size() using namespace std; typedef long long ll; typedef vector<i...
8daec369198855e4e4be2663d01510f579b2ece5859d2d6bccb10b16abe1af7a
9d0612acdb7487b68ba1e63fa1edead7f29ec5e6fd89dd717736ac0220d96db3
0.019541
cpp
9d0612acdb7487b68ba1e63fa1edead7f29ec5e6fd89dd717736ac0220d96db3
732dc480349df145fd9bf0dcce9b6002d8be674141ad86c9b9445db6f45b56c2
PIE_released_gem5_runtime
pie_74153
p02952
7c93c7c9520af6b878d77ccc4f874c4df88b6781ae6f54706ddf7a3c5e553146
732dc480349df145fd9bf0dcce9b6002d8be674141ad86c9b9445db6f45b56c2
0.117092
5.991999
4-8
79b1034c5ca73c5e77fdc07c66623eb8c8fd93f32a8fbf811ef6d68e13b0f785
#include <bits/stdc++.h> using namespace std; #define SORT(c) sort((c).begin(), (c).end()); #define pb push_back #define MP make_pair #define pii pair<int, int> #define pcc pair<char, char> #define pic pair<int, char> #define pci pair<char, int> #define VS vector<string> #define VI vector<int> #define MIN(...
#include <stdio.h> int main() { int n, i, j, count1, count2 = 0, d; scanf("%d", &n); for (i = 1; i <= n; i++) { d = i; count1 = 0; while (d > 0) { d /= 10; count1++; } if (count1 % 2 != 0) count2++; } printf("%d", count2); }
41cedfbd3634709ea493417abca241b46eef37e2e1b53ad5dbfe38980b974497
c47cdbd95d9becf0458906d888c249e9da53a6dc9cd654de27c7668c4e21167c
0.000192
cpp
c47cdbd95d9becf0458906d888c249e9da53a6dc9cd654de27c7668c4e21167c
784ff1a3d58ad694e1cc2156ad116cad7be0f84b008988a52a1786d514217a15
PIE_released_gem5_runtime
pie_74212
p04046
f378a89b9850e2f049f5392c519a911886a38eea69f59b9e5218403df457615c
784ff1a3d58ad694e1cc2156ad116cad7be0f84b008988a52a1786d514217a15
0.004314
22.49867
8+
14ff34fdbadf9b7b2339e6f8a5fa03fe31a27f5565c94e13f4613e330a22b46a
#include <iostream> #include <cmath> #include <algorithm> #include <cstdio> #include <cstring> typedef long long ll; #define rep(i, s, t) for (ll i = s; i < t; ++i) #define mod 1000000007 #define maxn 200005 using namespace std; ll fac[maxn], inv[maxn]; int f(ll a, ll b) { ll ans = 1; while (b) { ...
#include <cstdio> #include <algorithm> using namespace std; #define MOD 1000000007 #define MAXN 200005 #define LL long long LL inv[MAXN], s[MAXN]; int N; int H, W, A, B; LL Pow(LL a, int b) { LL ans = 1; while (b) { if (b & 1) ans = ans * a % MOD; a = a * a % MOD; b >>= 1; } ...
8216382cb8734fe48f6ba53393e068159a0e16aa6ad1c34d7b5e561cc36a3daf
2f211e07250c9c6e7ef7b3d6c7c5dd9c19a202c6ed044c3f77daf7c6e8370bed
0.10812
cpp
2f211e07250c9c6e7ef7b3d6c7c5dd9c19a202c6ed044c3f77daf7c6e8370bed
00ca9e9e2b8097784b555c2ceb46505c07706cdbe32174ed94c282d8e9bb7462
PIE_released_gem5_runtime
pie_74329
p03141
5b91657682b31ca077e7c22d9d693a9d08edb79d7c66e509c28662e23f296db6
00ca9e9e2b8097784b555c2ceb46505c07706cdbe32174ed94c282d8e9bb7462
0.376455
3.481834
2-4
cfe63d5cc3eb51330aeb8dc122775def9302c9c0c3cb7c1e32516e7933003ad8
#ifndef _GLIBCXX_NO_ASSERT #include <cassert> #endif #include <cctype> #include <cerrno> #include <cfloat> #include <ciso646> #include <climits> #include <clocale> #include <cmath> #include <csetjmp> #include <csignal> #include <cstdarg> #include <cstddef> #include <cstdio> #include <cstdlib> #include...
#include <bits/stdc++.h> #define f(i, n) for (int i = 0; i < (n); i++) #define inf (int)(3e18) #define int long long #define mod (int)((1e9) + 7) #define intt long long #define itn long long #define P pair<int, int> #define rep(i, n) for (int i = 0; i < n; i++) #define REP(i, n) for (int i = 1; i <= n; i++) ...
46adfc6e6be3dc6e1763c27be97bcfb54843486495812a9f8e635c74942e90d1
b82a0fc3aa8e171ec68e3c65a2dbcf2b57615834856ec141014faabad6afa052
0.011627
cpp
b82a0fc3aa8e171ec68e3c65a2dbcf2b57615834856ec141014faabad6afa052
1b2d2120bd135beeaddcfc7e438107640ca497f70df4e188e5f23ffbe089c2ed
PIE_released_gem5_runtime
pie_74332
p02908
9cf9fe371616c875ca58dc9915b0c9ed86f51a584d10266035b25a1aee404bfe
1b2d2120bd135beeaddcfc7e438107640ca497f70df4e188e5f23ffbe089c2ed
0.03995
3.436094
2-4
45127cd93008a415cfb582a37cb38dca1b419c2c733b91afd96dd25c48663e5c
#include <bits/stdc++.h> #define fi first #define se second const int N = 100100; using namespace std; struct edge { int a, b, c, flow; }; const int MAXN = 200200; const int inf_int = 1e9; struct Flow { vector<int> g[MAXN]; vector<edge> e; inline int add_edge(int a, int b, int c) { edge e1 = {a...
#include <bits/stdc++.h> #define fi first #define se second const int N = 100100; using namespace std; namespace Dinic { using F = int; const F INF = 1e9 + 1e8; const int N = 220000; const int M = 1100000; int fst[N], nxt[M], to[M]; F cap[M]; int dis[N], q[N], ptr[N]; int E; void init() { memset(fst, -...
12d09c5f6f6e7cb5572271041f4e051d17d192da64875d419cc22b6bd8370366
47fe4941654ad2079982c2cb5428a04cf81e76d7c5b1416c6b2646f57cf47c00
0.011467
cpp
47fe4941654ad2079982c2cb5428a04cf81e76d7c5b1416c6b2646f57cf47c00
b16eeecd72d5e477375c119c8bb22a1ef8cb21a0bc58f607db32794b20e1977e
PIE_released_gem5_runtime
pie_74345
p02793
0a2da038879731f91b29903e2513c4fdcaf421655c5451fd22da6249981ca4f9
b16eeecd72d5e477375c119c8bb22a1ef8cb21a0bc58f607db32794b20e1977e
0.303032
26.426268
8+
51ab14554d7e87f09afcff1edc279d6fd187f0ebd40ad0cb5b737274b5e38e01
#include <stdio.h> #pragma GCC optimize("Os") #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 MOD = 1e9 + 7, MAX = 1e6; int A[10000]; static inline char CH() { static char buf[100000], *ptr1 = buf, *ptr2 = buf; retur...
#include <stdio.h> #pragma GCC optimize("Os") #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 MOD = 1e9 + 7, MAX = 1e6, Primes[168] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 3...
8609f9af91334a1bee7cc28c3431978ec9c4ed31964800e3c780a9c21d386f7b
72bb64e3920a1de9f57752fd6d99f7bac2bf71f454930121826a7d92cd0449ff
0.06812
cpp
72bb64e3920a1de9f57752fd6d99f7bac2bf71f454930121826a7d92cd0449ff
df8cd8325ac3e65e60dcd5fa59e0dc9d8def94951b9f93e0203a3e1f6da806ab
PIE_released_gem5_runtime
pie_74356
p00719
c91e126735271ac4dc0654f25332f12f7f2a444e55a12e6735a755c89de43292
df8cd8325ac3e65e60dcd5fa59e0dc9d8def94951b9f93e0203a3e1f6da806ab
0.220688
3.239692
2-4
bddf53ec3acaf0a4012d340f0df1a2c3f8791f344cd905a3ccc3d4a687892a69
#include <iostream> #include <vector> #include <queue> #include <cstdio> #include <map> #define INF (1 << 24) #define MASK (1 << 10) - 1 #define fr first #define sc second using namespace std; typedef pair<double, double> S; typedef pair<S, int> P; struct edge { double to, time; edge() {} edge(doubl...
#include <iostream> #include <queue> #include <algorithm> using namespace std; #define INF 1000000000 struct edge { int to; double dis; edge(int to, double dis) : to(to), dis(dis) {} }; typedef pair<int, int> iP; typedef pair<double, iP> iiP; int n, m, p, a, b; int t[8]; vector<vector<edge> > graph; ...
e93a63bb372f3a80d28dbb7311c7731f7c7265ddd1b41f6b172438dad3755de0
d2739ec06357c074f70027a9bdc25c2bf01ec32a43f5cdeaf75a21bbc3e7aeb1
0.003999
cpp
d2739ec06357c074f70027a9bdc25c2bf01ec32a43f5cdeaf75a21bbc3e7aeb1
7aeeb6b4ae48d159109b60d4d48cb83b07afab1358faa80ad4624f082dc41cfa
PIE_released_gem5_runtime
pie_74379
p03718
f1dcd12b3f42919b50ee3ae1309e5b47f7910ea7c15c8d586f4800f8e9fb0696
7aeeb6b4ae48d159109b60d4d48cb83b07afab1358faa80ad4624f082dc41cfa
0.022687
5.67292
4-8
a6edd6568521381b14bd5e954aabc27e8af4b30f7cc6351ea514b41926dff908
#include <bits/stdc++.h> #define INF 0x7fffffff using namespace std; struct Edge { int to, capa, flow, next; } e[4000000]; int h[20010], sum = -1, n, m, S, T; int mp[110][110], tot = 0; bool vis[20010]; int d[20010], cur[20010]; void AddEdge(int u, int v, int w) { e[++sum].to = v; e[sum].capa = w; e...
#include <cstdio> #include <algorithm> #include <cstring> using namespace std; namespace MF { #define MAXN 50000 #define MAXM 500000 #define wint int const wint wEPS = 0; const wint wINF = 1001001001; int n, m, ptr[MAXN], next[MAXM], zu[MAXM]; wint capa[MAXM], tof; int lev[MAXN], see[MAXN], que[MAXN], *qb, ...
b15b63509da7426b5cecc4b7d051c37dc0384cb0f6a5bd05431e8084e6de318b
26185d4d685430b6c37b5e19ea30e82d7333aef63739e3aa7248a7e4e7005f03
0.058157
cpp
26185d4d685430b6c37b5e19ea30e82d7333aef63739e3aa7248a7e4e7005f03
4483a85c1f3051bb2c23177ef484fd8bfcb0e9e8a95dc443e8c2548ec676445d
PIE_released_gem5_runtime
pie_74397
p02362
f5795da2eaebe6128cf865d2864e6df3e6c49dff853d8955d0523c41a2dca1f8
4483a85c1f3051bb2c23177ef484fd8bfcb0e9e8a95dc443e8c2548ec676445d
0.1992
3.425226
2-4
818ee10e26789d39d2cff08d30a1f29fd12c52a9a24cdae7dc8ad943028c07cc
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll inf = 0x3f3f3f3f3f3f3f3f; const int mx = 100005; ll dist[mx]; vector<pair<ll, int> > adj[mx]; bitset<mx> inq; int v, e, r; int q[mx], qh, qt, ct = 0; int qpop() { int v = q[qh++]; if (qh > mx) qh = 0; return v; } void q...
#include <bits/stdc++.h> using namespace std; const int maxv = 1005, maxe = 2005; int md[maxv], pt[maxv]; int q[maxv], qh = 0, qt = 0; bool inq[maxv]; vector<pair<int, int>> G[maxv]; bool empty() { return qh == qt; } void push(int v) { if (inq[v]) return; inq[v] = true; q[qt] = v; qt++; if (q...
1542de4ae5fa1f4cd447e86154827e800324dc2808cbb57d21b98411c27d4c4d
4fc2f71311aded8b601a925676a2f9e875c75ccd060dfb918c4995f42050c457
0.019166
cpp
4fc2f71311aded8b601a925676a2f9e875c75ccd060dfb918c4995f42050c457
8cea14813aac45deb1c7468c68efb4ba123ddd8fed118415847076ec7cc85e39
PIE_released_gem5_runtime
pie_74411
p03142
9cc92f33071a3da5e7d77e69447d6be56dcf24e0fe0e2a6afd677162f26a1e2e
8cea14813aac45deb1c7468c68efb4ba123ddd8fed118415847076ec7cc85e39
0.421769
22.006153
8+
2d577ecf5513cd9105ced167a25180ade974f1a46e8407b6984a1918361a03b1
#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...
#include <cstdio> using namespace std; typedef long long ll; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep1(i, n) for (int i = 1; i <= (n); i++) #define co(x) cout << (x) << "\n" #define cosp(x) cout << (x) << " " #define ce(x) cerr << (x) << "\n" #define cesp(x) cerr << (x) << " " #define pb p...
2952fc79707864f3587e001345da02e4b0c9bbd7c9f9634bef21c5354abab129
7b18b3710c2a3b20afa7513bb879579b0088b80f33a52a059ed11e16ac5b09da
0.000192
cpp
7b18b3710c2a3b20afa7513bb879579b0088b80f33a52a059ed11e16ac5b09da
27107f73a800fd84c0c1a317421bb039baa0cdffb03b595d3805d07082267cf2
PIE_released_gem5_runtime
pie_74475
p03527
5f83995ea81b9c3923016361e393bd094e13d3d94db24a248bf9f2bbd5f70a55
27107f73a800fd84c0c1a317421bb039baa0cdffb03b595d3805d07082267cf2
0.012549
65.363378
8+
1e4511464f9d50a2eff08faeab5608f6a3b8fbd6dee2587d0924e91dc28279aa
#include <cstdio> #include <cstring> #include <vector> using namespace std; const int N = 400002; int n, m, i, a, b, c[N], vis[N], sum, tmp; char s[N]; vector<int> e[N]; void Link(int x, int y) { e[x].push_back(y); e[y].push_back(x); } void init() { scanf("%s%d", s + 1, &m); n = strlen(s + 1); f...
#include <cstdio> const int N = 400002; char s[N]; int n, m, c[N], a, b, i, j, k, p; int h[N], t[N], v[N], vis[N]; void add(int a, int b) { t[++k] = h[a]; h[a] = k; v[k] = b; t[++k] = h[b]; h[b] = k; v[k] = a; } void init() { scanf("%s", s + 1); while (s[n + 1]) n++; for (i = 1; i <= n ...
9398c38256b4b429b006587d8f49df2f42cf133f802f372bf75ac1348bafb859
a9bbd12b39a76a746884aa18fc3d4fba84531dd08ba8951874996beaed597652
0.067096
cpp
a9bbd12b39a76a746884aa18fc3d4fba84531dd08ba8951874996beaed597652
dcd7d866e587b9ab754cc82e3bcdcda5b638b3240fb4a97f1f56e9df44e778d8
PIE_released_gem5_runtime
pie_74502
p02766
705f60b4e5381087fcb8b7fbbe7633dc5585798334c04f85c667d53b99b6cb34
dcd7d866e587b9ab754cc82e3bcdcda5b638b3240fb4a97f1f56e9df44e778d8
0.63394
9.448246
8+
be0482c35b64f8b9b1f1392f4c539558703b27d0a4975feee984d8c27601943e
#include <bits/stdc++.h> using namespace std; long long int ar[1000000]; int main() { long long int x, y, rem, temp, i, j, total, f = 0; cin >> x >> y; temp = x; for (i = 0; i < 1000000; i++) ar[i] = -1; i = 0; while (temp >= 1) { rem = temp % y; temp = temp / y; ar[i] = rem...
#include <bits/stdc++.h> using namespace std; int main() { long long int a, b, count = 0; cin >> a >> b; while (a != 0) { a = a / b; count++; } cout << count << endl; return 0; }
0bfc9228e94a8d86f7725332ad2efabb1c5af833ec9287ad592649f18c7bedff
1fede49dd9d9a4ba677f2b988f61217e8dc51518319c654322b1fff4ad194440
0.021816
cpp
1fede49dd9d9a4ba677f2b988f61217e8dc51518319c654322b1fff4ad194440
dbf30b8c82f175a4fd15d7d34657611084025bede96c49421493f2cdded0fec4
PIE_released_gem5_runtime
pie_74511
p03388
3dbffa30a7d2f1fda4a59ce8173cb9b283ca1b70ddc103cfffa259dd886e051e
dbf30b8c82f175a4fd15d7d34657611084025bede96c49421493f2cdded0fec4
0.103324
4.736255
4-8
7f365a23a79db4114f046320efeb8a454551588f5486e95bac363f4a5711dfc5
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int n; scanf("%d", &n); ll a, b, pr, sqq; ll ans; while (n--) { scanf("%lld%lld", &a, &b); pr = a * b; sqq = sqrt(pr); ans = sqq * 2; if (sqq * sqq == pr) { if (a == sqq && b == a) { ...
#include <cmath> #include <cstdio> using namespace std; int main() { int Q; scanf("%d", &Q); for (int i = 1; i <= Q; i++) { long long a, b; scanf("%lld %lld", &a, &b); long long pr = a * b; long long t = sqrt(pr), ans; if (t * (t + 1) < pr) ans = t * 2 - 1; else if (t * ...
382a9544705de113f223f02a52ebae8266677533c67131992bfd31c13de55edc
c747951e3bb66e70e6ded68a68980b0635bea6351f99a34ad4a2b21b04745439
0.079315
cpp
c747951e3bb66e70e6ded68a68980b0635bea6351f99a34ad4a2b21b04745439
acc9bcf77cee236c83930bd44c7322edd9d28a5d615e341b4fd8008475269276
PIE_released_gem5_runtime
pie_74544
p02947
84e47520ca5cea745e467aa45391d12117ec064434ae9723918b3d7158653bb2
acc9bcf77cee236c83930bd44c7322edd9d28a5d615e341b4fd8008475269276
0.796658
10.044188
8+
28a096b7f12c3467e44e7bd37819474459821b05788763c65d582635152d7bd2
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 5; string A[N]; int n; long long sum, mem[N]; long long fact(int i) { if (!i) return 1; if (mem[i] != -1) return mem[i]; return mem[i] = fact(i - 1) * i * 1ll; } long long ans(int i) { if (i <= 1) return 0; if (i == 2) ...
#include <bits/stdc++.h> #define MAX 11000 #define ll long int using namespace std; int main() { map<string, int> mp; string s; ll i, j, n, count = 0, sum = 0; cin >> n; for (i = 0; i < n; i++) { cin >> s; sort(s.rbegin(), s.rend(), greater<char>()); count += mp[s]++; } cout <<...
6433c733c2c5780d9e5ebafda295b4004100ef80d22c9fb9048699bdaec27a6e
b0105f25d09559dbae096f4584b70b279bd4a790ebd823156d7cea4c40ef1b1b
0.066753
cpp
b0105f25d09559dbae096f4584b70b279bd4a790ebd823156d7cea4c40ef1b1b
94a83af193d02231e90f2688bfbaa0f1154fbb531977f4a52bb91a501494b51b
PIE_released_gem5_runtime
pie_74646
p00503
97a04f2d38fe9ce0db8bdeb0a9f969fc24630a43d1ee73eab5e1db9d68992644
94a83af193d02231e90f2688bfbaa0f1154fbb531977f4a52bb91a501494b51b
0.182226
2.729863
2-4
5b1944b6191db1628807a3b4450d58c0495db289e49e087c71eb5a71d2100efb
#include <iostream> #include <algorithm> #include <cstring> using namespace std; #define MAX_M 120 #define MAX_N 60 int x[MAX_N][6]; int y[MAX_N][6]; int z[MAX_M][3]; long long int a[MAX_M][MAX_M][MAX_M]; bool b[MAX_M][MAX_M][MAX_M]; int main() { memset(b, false, sizeof(b)); int n, m; int MAXX[3] = ...
#include <iostream> #include <vector> #include <algorithm> using namespace std; vector<long long> X, Y, Z; long long ax[100], ay[100], az[100], bx[100], by[100], bz[100], n, q, r[100][100][100], sum; int main() { cin >> n >> q; for (int i = 0; i < n; i++) { cin >> ax[i] >> ay[i] >> az[i] >> bx[i] >...
d85dde0a4b0cce0e0acba0efb06ecfb1b68350ad18f0aab1f525cba8980787b0
f0d75d04eee9504ba53284b62f9eda74584d826a29cf6f49448c632db8004244
0.074475
cpp
f0d75d04eee9504ba53284b62f9eda74584d826a29cf6f49448c632db8004244
4643c39585c845153430035078666978f3b63f64d38bee7c3fc31ef29af3c169
PIE_released_gem5_runtime
pie_74650
p03368
3b1de9c8e988508911937adde70d0d77268bbb779a4d6b6b900c282fae665341
4643c39585c845153430035078666978f3b63f64d38bee7c3fc31ef29af3c169
0.321469
4.316484
4-8
61ba2d924841e4ef34b923b318af63f57d31f275d9e34c75a0026f16768e230c
#include <bits/stdc++.h> using namespace std; typedef long long lint; typedef long double louble; template <typename T1, typename T2> inline T1 max(T1 a, T2 b) { return a < b ? b : a; } template <typename T1, typename T2> inline T1 min(T1 a, T2 b) { return a < b ? a : b; } const char lf = '\n'; namespace ae86 {...
#include <bits/stdc++.h> using namespace std; #define ll long long #define REP(i, a, b) for (int i = (a), _end_ = (b); i <= _end_; i++) #define DREP(i, a, b) for (int i = (a), _end_ = (b); i >= _end_; i--) #define EREP(i, u) for (int i = start[u]; i; i = e[i].next) #define fi first #define se second #define mkr...
33c822fa2ce2e9598f2e8ea1817c238845ff4c2d99b23b8e7ea36a3dd261b926
7611b55cb4042d76eebf9984d6f3f4265c5725ee18e1ab82f4d0b717b939d135
0.015182
cpp
7611b55cb4042d76eebf9984d6f3f4265c5725ee18e1ab82f4d0b717b939d135
b24295f4dae7cef22a2539c0f7734f1f6139474586fbf442c0570dc226d8c9dd
PIE_released_gem5_runtime
pie_74692
p02268
ef72d2356e4e172b9506b85ad6dc33f21393451508610ff25209a63f9a30935c
b24295f4dae7cef22a2539c0f7734f1f6139474586fbf442c0570dc226d8c9dd
0.053243
3.507059
2-4
ba108e7bb442a27ce290a4d73717417ca96432b56434f453b53c39fb53014b15
#include <iostream> using namespace std; int binarysearch(int *S, int size, int key) { int left = 0, right = size; int mid; while (left < right) { mid = (left + right) / 2; if (S[mid] == key) { return mid; } else if (key < S[mid]) { right = mid; } else if (key < S[mid + 1])...
#include <stdio.h> int binarysearch(int *S, int size, int key) { int left = 0, right = size; int mid; while (left < right) { mid = (left + right) / 2; if (S[mid] == key) { return mid; } else if (key < S[mid]) { right = mid; } else if (key < S[mid + 1]) { return size; ...
303ecfdf6e01320a9544e0b308dd8359f93be93ffe4bc10b7cbeaade50528bd3
8812ba570397b63ae6d6391f6f02e4518920bcb8f2b1f5908f028a724a636133
0.001028
cpp
8812ba570397b63ae6d6391f6f02e4518920bcb8f2b1f5908f028a724a636133
2b47466ec3132534d970aecc3b1365b15e1305c28d48231617ba03df6ed05633
PIE_released_gem5_runtime
pie_74703
p03372
a1c9d60658c0b1009d70a453406cb42b9d3c248ad7edaad54729acce4abde8f8
2b47466ec3132534d970aecc3b1365b15e1305c28d48231617ba03df6ed05633
0.004314
4.197333
4-8
cc31cb321f3413dc0321dcb3ad3b247a3b3402d2ae88361f22008c5e61323b87
#include <iostream> #include <string.h> #include <stdio.h> #include <map> #include <vector> #include <math.h> using namespace std; #define rep(i, a) for (int i = 0; i < a; i++) #define rrep(i, a) for (int i = a; i >= 0; i--) #define loop3(i, j, k, a) ...
#include "bits/stdc++.h" #include <iostream> #include <string.h> #include <stdio.h> #include <map> #include <vector> #include <math.h> #include <algorithm> #include <queue> #include <set> #include <tuple> using namespace std; #define FOR(i, init, a) for (int i = init; i < a; i++) #define rep(i, a) FOR(i, 0...
a0c16672f6f24bb30c082ac97aa687d1df4372abacc53ed4c8555e9e8f0ba935
1f399c33907ffbad8fa94568ab3b4580cd42ec8a1ef99d9109ca2802766a43ef
0.013833
cpp
1f399c33907ffbad8fa94568ab3b4580cd42ec8a1ef99d9109ca2802766a43ef
3304b146e26a2a2e9a97cdf1be5fa550e47ef266e26b2665e92c6036d4a338cd
PIE_released_gem5_runtime
pie_74719
p02275
e4bef3ec17bf001205a230d253a2eb8cb2fec637e5027f1b31bc28425dfe6b40
3304b146e26a2a2e9a97cdf1be5fa550e47ef266e26b2665e92c6036d4a338cd
0.110851
8.013686
8+
03db8dbce5ba3066c448c7ea5c0241d4dc846fc214233a6986bd01c9655f3099
#include <cstdio> #include <iostream> #include <cmath> #include <cstring> using namespace std; int arr[2000100], c[100001], ans[2000100]; int main() { int i, n; scanf("%d", &n); memset(c, 0, sizeof(c)); for (i = 1; i <= n; ++i) { scanf("%d", &arr[i]); ++c[arr[i]]; } for (i = 1; i < ...
#include <stdio.h> #include <fstream> #include <algorithm> using namespace std; int a[2000005]; int main() { int n; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &a[i]); } sort(a, a + n); for (int i = 0; i < n; i++) { if (i) printf(" "); printf("%d", a[i]);...
650475b4d7f1c3402d3fd59c6f8b1d6719b85f1a1116767a46b1ff154309b9e3
8c918d56228a43688e715be39f8d7746791d8898f0ea88d782a6ba351f693cb8
0.023163
cpp
8c918d56228a43688e715be39f8d7746791d8898f0ea88d782a6ba351f693cb8
fca9b3085e26c495ee9ac7aadb02d4e818df887789353c7080c007bf2fa5ecea
PIE_released_gem5_runtime
pie_74769
p02661
8435dc6134798c3a1f9afbd17599a791897344a508919524c0973ad71a6340eb
fca9b3085e26c495ee9ac7aadb02d4e818df887789353c7080c007bf2fa5ecea
0.110057
4.751509
4-8
06476b943f9144d0b211b60ac5e886bc24a62feadaa0a7f4bb8c9704fcb41ad4
#pragma GCC optimize("O3") #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("O3") #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 <<...
be993297d665ebc75897a7f954511114afc0db074215991bf412410cc043f391
2881389a29ea4ff7b22bbfc1200b8d3ffd788594403dbd106f58bf18a656d234
0.000192
cpp
2881389a29ea4ff7b22bbfc1200b8d3ffd788594403dbd106f58bf18a656d234
f875211639061640b2448ecb76d6b69e78984c9892cee012ba2dd37c33712992
PIE_released_gem5_runtime
pie_74794
p02315
cb017d15433bc38eb535f799dde5e21bfcbaa922d3d61e8117634e5b965849fd
f875211639061640b2448ecb76d6b69e78984c9892cee012ba2dd37c33712992
0.0044
22.921227
8+
d7fb0c71ea2147bbb4fcad21186446f8e8904c67e90492eacd8942e64e10294c
#include <stdio.h> #include <algorithm> #include <string.h> using namespace std; const int MAX_N = 100; const int MAX_W = 10000; int w[MAX_N]; int v[MAX_N]; int dp[MAX_N + 1][MAX_W + 1]; int n, W; int rec(int i, int j) { if (dp[i][j] >= 0) { return dp[i][j]; } int res; if (i == n) { res =...
#include <stdio.h> #include <algorithm> using namespace std; const int MAX_N = 100; const int MAX_W = 10000; int n, W; int v[MAX_N]; int w[MAX_N]; int dp[MAX_N + 1][MAX_W + 1]; void solve() { for (int i = 0; i < n; i++) { for (int j = 0; j <= W; j++) { if (j < w[i]) { dp[i + 1][j] = dp[...
eecdf7ad13ef0056a37dd4fdca8bd60b1c862f713ac3fc268b10b3baa8de5a4e
a6aaa2bbc608283d67deacbba31826422cfcb75635271db37bea9a3f3bf1dc27
0.069644
cpp
a6aaa2bbc608283d67deacbba31826422cfcb75635271db37bea9a3f3bf1dc27
0863579159595d4f37b4d401decb3ef54cbc1a872c60053af0b735e6158d5129
PIE_released_gem5_runtime
pie_74813
p03532
bf07a9bfd64ea9514e472368c9c3eff16d46ab69f15a83c4d760764d5e7c92d9
0863579159595d4f37b4d401decb3ef54cbc1a872c60053af0b735e6158d5129
0.450576
6.469657
4-8
e0e12174c2c73dc9a64709072fe6c1aafe4fa783fcde36b9b06fe3ec8c52216a
#include <cstdio> #include <cstdlib> #include <algorithm> #include <vector> #include <cstring> #define SIZE 200005 #define INF 10000000000000000LL using namespace std; typedef long long int ll; typedef pair<int, int> P; typedef pair<ll, P> PP; struct edge { int to; ll cost; edge(int to = 0, ll cost...
#include <bits/stdc++.h> #define N 300010 #define inf 1000000000000000ll using namespace std; typedef long long ll; inline int read() { int x = 0, f = 1; char ch = getchar(); while (ch < '0' || ch > '9') { if (ch == '-') f = -1; ch = getchar(); } while (ch >= '0' && ch <= '9') { x =...
797e84ba3f9118412078f2b25621263b7e335556ccc17afdfa21be34faee9467
3f577496a389b327217c89d94ecef277ca2c5c67b92b9d8c3c333b9b46d63c6e
0.077563
cpp
3f577496a389b327217c89d94ecef277ca2c5c67b92b9d8c3c333b9b46d63c6e
b5c4f6ca6c38e489ca20db68c9524f0712d4de5619652ff92a2bd4e3390cb5d1
PIE_released_gem5_runtime
pie_74850
p03608
a60efb1761915d4f7a202d7780b1a1400b53995ebbb965e091f75182239ed39e
b5c4f6ca6c38e489ca20db68c9524f0712d4de5619652ff92a2bd4e3390cb5d1
0.281945
3.635043
2-4
27d4410e0d4cf551aa8620bdd837def590a613b0af61ac6b3fdab6bea7f6c084
#include <iostream> #include <algorithm> #include <climits> #include <cstring> #include <vector> #include <queue> #include <utility> #define rep(i, n) for (int i = 0; i < n; i++) #define rep1(i, n) for (int i = 1; i <= n; i++) #define scan(arg) cin >> arg #define prin(arg) cout << arg << "\n" #define prin2(a...
#include <iostream> #include <algorithm> #include <vector> #include <queue> #define rep(i, n) for (int i = 0; i < n; ++i) #define rep1(i, n) for (int i = 1; i <= n; ++i) using namespace std; template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <cla...
0be4fb8ca4c46d719a3a4a9496b6b711de853685c29de1b0d8ad97bb048396cc
04d9d0835cf4ef91066ea3d1183fff7a4f005101388a7709d37a693204c4efb1
0.055689
cpp
04d9d0835cf4ef91066ea3d1183fff7a4f005101388a7709d37a693204c4efb1
6ae7098eb7f14fbeb3979bcc2c1735902903eb84f7db85ca8e87ed43b5f64130
PIE_released_gem5_runtime
pie_74882
p03157
195500d81cc7f9f49d48116fe19787517b8f987855b483cb3616902ea959a868
6ae7098eb7f14fbeb3979bcc2c1735902903eb84f7db85ca8e87ed43b5f64130
0.128532
2.308021
2-4
f03e8f6ebad23cdefb83388588f22efef28710250ab4af0546fded184c6ca3d9
#include <iostream> #include <string> #include <map> using namespace std; struct UF { int par[200000]; int rank[200000]; void init(int n) { for (int i = 0; i < n; i++) { par[i] = i; rank[i] = 0; } } int find(int x) { if (par[x] == x) return x; return par[x] = fin...
#include <iostream> #include <string> using namespace std; typedef pair<long long, long long> P; int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1}; int h, w; string s[400]; bool b[400][400]; P f(int y, int x) { long long c = 0, d = 0; b[y][x] = true; if (s[y][x] == '#') { c++; } else { d++;...
94150ac2e8e47f08910a3526c2c2978ca792a7c37624400617df70e728e890f9
a95dd73b71b71785ab5ad479095a9554eaf02dac1b7bf0619bfbdc6c8a7fa158
0.006015
cpp
a95dd73b71b71785ab5ad479095a9554eaf02dac1b7bf0619bfbdc6c8a7fa158
3c3e592a45408504b419172272fafeec6b930ce5e62f77abbe19dd45e06e0c2e
PIE_released_gem5_runtime
pie_74896
p02794
f3136deeb2785515f634e444477be2f41e1480abea464b8c5c9dfed1c2f6ff9a
3c3e592a45408504b419172272fafeec6b930ce5e62f77abbe19dd45e06e0c2e
0.032299
5.370056
4-8
5f211dc08cc11f7bb02ac8a0d63402bc3121057d9cd797bf69123d3cfd6cd89b
#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> 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) << "...
125820d2d9427d74e410ed83482e314d1115ca5e32cffa4d339d7df87b6f6ffc
8e23bdc588ec3255b80eb7f0e985fd5e235924ace47673ede32a67cad4ee8ace
0.032322
cpp
8e23bdc588ec3255b80eb7f0e985fd5e235924ace47673ede32a67cad4ee8ace
ec8b1349d01709d2652201ce0c1b0fa217562def5394876602b610401f8a5fe5
PIE_released_gem5_runtime
pie_74909
p02901
091936f0d94992099fe72463785f2e4b35c462b5830e3566e0e27fab171171f3
ec8b1349d01709d2652201ce0c1b0fa217562def5394876602b610401f8a5fe5
0.371644
11.498235
8+
2d02560640048d39b679f9d1f9d770a598b6375fb8760278ce1a49da580b80b4
#include <iostream> #include <algorithm> #include <vector> using namespace std; const int N = 1e5 + 10; typedef long long LL; vector<int> v[N]; int a[N]; int b[N]; int dp[1 << 15]; int main() { int n, m; cin >> n >> m; for (int i = 1; i <= m; i++) { cin >> a[i]; int c; cin >> c; ...
#include <cstring> #include <algorithm> #include <cstdio> #define N 10005 #define INF 0x3f3f3f3f using namespace std; long long int d[N]; long long int a[1005]; int v[15]; int s[10005]; int b[1005]; int c[15]; int n; int m; int tar; long long int ans = INF; int main() { scanf("%d%d", &n, &m); mems...
a6b63fd1c85799e323afd6d7e2b2ea7a289dc7eab37cb886e5ee2b719b2c70f4
8e52005cf8b2654c03ce7c8a144ff89c7d97ea8088b44f41e057bd884b6ab366
0.024954
cpp
8e52005cf8b2654c03ce7c8a144ff89c7d97ea8088b44f41e057bd884b6ab366
22727c1e77952afcc59878e47ce273d0fb0dcc4973d5a0767e37dc2b782d3dd9
PIE_released_gem5_runtime
pie_74981
p00274
cf5dfc55a96ac00f4a598af5c0cf47c5801a9c1b51d0a925e084fa1decee81f9
22727c1e77952afcc59878e47ce273d0fb0dcc4973d5a0767e37dc2b782d3dd9
0.095702
3.835206
2-4
fe3686da7abb602be26bbc99f4fdd6a368d9eb92eaabb383b79b944e0d893548
#include <stdio.h> int main(void) { int N, i, c; int *k, *kk; while (1) { scanf("%d", &N); if (N == 0) break; k = new int[N]; kk = new int[N]; for (i = 0; i < N; i++) kk[i] = 0; for (i = 0; i < N; i++) scanf("%d", &k[i]); i = 0, c = 0; while (1) { ...
#include <stdio.h> int k[10000]; int main() { int N, cnt, same, Not; while (1) { cnt = 0; same = 0; Not = 0; for (int i = 0; i < 10000; i++) k[i] = 0; scanf("%d", &N); if (N == 0) break; for (int i = 0; i < N; i++) { scanf("%d", &k[i]); if (k[i] > 1)...
5f0b394612db4e896e11ac7f6295e60b4bf4602dc7812e30bd7e78ffd35742b1
a371661406432806e5d96a809c8ad2a47310e6bd2338a955ab08e952a084b01a
0.021835
cpp
a371661406432806e5d96a809c8ad2a47310e6bd2338a955ab08e952a084b01a
20e2771e70a0cc4e0e9a1fa6f1ae12493c7957df66cd841722665716aa24322c
PIE_released_gem5_runtime
pie_74992
p03545
25c79508745f95cdb2adc5ba3134dd15f856937dbef63cb9c68950b494100a77
20e2771e70a0cc4e0e9a1fa6f1ae12493c7957df66cd841722665716aa24322c
0.105685
4.840173
4-8
697b72940333e0006a7e4fe2497937698c362d9e8e25928efa322d433dace96a
#include <iostream> #include <cstdlib> #include <cstring> #include <cmath> #include <cstdio> using namespace std; int main() { int e; int a, b, c, d; cin >> e; d = e % 10; c = (e / 10) % 10; b = (e / 100) % 10; a = (e / 1000); if ((a + b + c + d) == 7) { cout << a << "+" << b <<...
#include <stdio.h> #include <stdlib.h> #include <math.h> int main() { int a[4], b[3], i, m[3]; char num[5]; scanf("%s", num); for (i = 0; i < 4; i++) { a[i] = num[i] - '0'; } for (i = 0; i < 8; i++) { m[0] = i % 2; m[1] = i / 2 % 2; m[2] = i / 4 % 2; b[0] = pow(-1, m[...
e5e3c8ba5323504c22d90b22e2ce592932fe236bcecb6695719b392b3f3505f3
e409b4f138f434464d26c08118dcc544a291ba2de6578a5c0070bec4f2ec376a
0.018591
cpp
e409b4f138f434464d26c08118dcc544a291ba2de6578a5c0070bec4f2ec376a
ffcd92d3deb59ccc1b4c544cb34ad36597b3ae3d1c6f934ec7c5fed6b5710201
PIE_released_gem5_runtime
pie_75030
p03950
314f44031bff9e71075d817be00c71010ae0a983123c95c30b012bf44b0f7711
ffcd92d3deb59ccc1b4c544cb34ad36597b3ae3d1c6f934ec7c5fed6b5710201
0.341807
18.385639
8+
3159b74a175b7ca7e81fd7577a8d727c293f4a8d6474adc2ccdf7363bedff559
#include <algorithm> #include <cstring> #include <iostream> #include <cstdio> #include <cstdlib> #include <stack> using namespace std; const int maxn = 300010, inf = 1 << 29; int W, H, N, ans, tree[maxn * 4], tag[maxn * 4]; inline int gi() { char ch; int ret = 0, f = 1; do ch = getchar(); while ...
#include <cstdio> #include <cstring> #include <algorithm> template <class _Tp> _Tp max(_Tp a, _Tp b) { if (a > b) return a; return b; } template <class _Tp> _Tp min(_Tp a, _Tp b) { if (a < b) return a; return b; } template <class _Tp> void ckmax(_Tp &a, _Tp b) { if (a < b) a = b; } template ...
156c6c6c45dd5b9d7aaea4e518d4cbf0b0300be5a4e4062199fe9b1bbe74194b
97a7444ac7c332c10d6cd0847130273e1c970810e0b9ba91dc53eacb47177f8a
0.044573
cpp
97a7444ac7c332c10d6cd0847130273e1c970810e0b9ba91dc53eacb47177f8a
118b7b242d125e2f917354604a5926232d641a1e1a9f8d8c95f9789e32244ad7
PIE_released_gem5_runtime
pie_75040
p03344
cefa6aad36e91ef78f3e41bd99696e5fac5bdda13bd7c964adf7af809e1e2f14
118b7b242d125e2f917354604a5926232d641a1e1a9f8d8c95f9789e32244ad7
0.098869
2.21813
2-4
0024af4914744297223fd4ed8594064dd23e3134e18d428fd8281675b2933c59
#include <bits/stdc++.h> using namespace std; #define ll long long const int maxn = 1e5 + 7; bool vis[maxn]; int a[maxn], b[maxn], p[maxn], fa[maxn]; ll c[maxn]; ll dp[maxn], sum[maxn]; struct Edge { int nxt, to; } G[maxn << 1], T[maxn << 1]; int bG = 0, hG[maxn], bT = 0, hT[maxn << 1]; void addG(int x, i...
#include <bits/stdc++.h> typedef long long LL; using namespace std; const int N = 1e5 + 5; int n, m, fa[N], p[N]; LL sum[N], f[N], a[N], b[N]; int head[N], ce; bool vis[N]; struct edge { int to, nxt; } e[N << 1]; bool cmp(int x, int y) { return a[x] < a[y]; } void adde(int x, int y) { e[++ce].to = y, e[ce]....
fad3df89256b55d012db83fa6c18f49fa69bdbc17de01557c683aa4863ef0d5a
067cf971ded1838ef09956721a24ed93e35266d26092441536be59bdf730f698
0.054698
cpp
067cf971ded1838ef09956721a24ed93e35266d26092441536be59bdf730f698
842d779b454e75fada779e8d38ea2619d8e496c6fcfc4238caaceb1364c095f9
PIE_released_gem5_runtime
pie_75063
p03128
ca1f43476389a0765e5175e75c950d1e732736a80d30fd83b0a708a60f27bb02
842d779b454e75fada779e8d38ea2619d8e496c6fcfc4238caaceb1364c095f9
0.163461
2.988448
2-4
77e5ebaaa080e14d250f401b9dfeaf4c1d8c188c69b9e9983426b91d778ef66f
#include <bits/stdc++.h> using namespace std; #define ALL(a) (a).begin(), (a).end() #define debug(x) cerr << #x << ":" << (x) << endl string dp[101010]; int cost[9] = {2, 5, 5, 4, 5, 6, 3, 7, 6}; int main() { int n, m; cin >> n >> m; vector<int> a(m); for (int i = 0; i < m; ++i) cin >> a[i]; sor...
#include <bits/stdc++.h> using namespace std; using int64 = long long; #define int int64 string dp[10101]; int cost[10] = {10101010101, 2, 5, 5, 4, 5, 6, 3, 7, 6}; signed main() { int n, m; cin >> n >> m; vector<int> a(m); for (int i = 0; i < m; ++i) { cin >> a[i]; } sort(a.begin(), a.end());...
82f39b930a110ac82eac48095210d1c95dcff0aaf37c961f335e9b448c19af34
2884129cc39b17b7d8777fd75da366d4dc802de4b511ad14c71c2e3bdfec9d8a
0.000196
cpp
2884129cc39b17b7d8777fd75da366d4dc802de4b511ad14c71c2e3bdfec9d8a
b9fbb8b8ccda1fec59676dc39a45a103aa568347665220c1e1a3bc55cb6359db
PIE_released_gem5_runtime
pie_75269
p03855
9430c86d15d8a6b9d881b43d84de0654da723b10f9ed888b268f23b6b0755add
b9fbb8b8ccda1fec59676dc39a45a103aa568347665220c1e1a3bc55cb6359db
0.012304
62.657453
8+
8d4c81e9e7b3df9784bf1f8240de5881f4c059b6540bbc52cd6abd200a301ffc
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 10; int fa1[N], fa2[N]; int findroot1(int u) { return fa1[u] == u ? u : fa1[u] = findroot1(fa1[u]); } int findroot2(int u) { return fa2[u] == u ? u : fa2[u] = findroot2(fa2[u]); } set<int> s2[N]; int ans[N]; int main() { int n, k, l; ...
#include <cstdio> #include <cstring> #include <algorithm> struct abc { int aa, bb, cc; bool operator<(const abc &T) const { return (aa < T.aa || (aa == T.aa && bb < T.bb) || (aa == T.aa && bb == T.bb && cc < T.cc)); } bool operator==(const abc &T) const { return (aa == T.aa && bb == T.bb)...
11a9a9e4597e9f3c52da69f2e5505923bd0ab0a39adfe16502eccca52752915d
68b268fb617bfb7da5b5cb3aeb8cb995ae4d635397fd105c0c701f1c184c18f3
0.098123
cpp
68b268fb617bfb7da5b5cb3aeb8cb995ae4d635397fd105c0c701f1c184c18f3
63b4f7dacab4475fd63f24bff0acb32899250fca1657b0494738a89fc11add04
PIE_released_gem5_runtime
pie_75316
p02347
76d244a6f2840ffba2a2fa8dfc5348ffdb0ce76ad618eeb9bd7f39111aedfd37
63b4f7dacab4475fd63f24bff0acb32899250fca1657b0494738a89fc11add04
1.345949
13.716924
8+
e428e631ffd0259a8ad01344333e30995386c75db0f3a90e6328d99018ddeddc
#include <stdio.h> #include <cmath> #include <algorithm> #include <cfloat> #include <stack> #include <queue> #include <vector> #include <string> #include <iostream> #include <set> #include <map> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define MOD 1000000007...
#include <iostream> #include <algorithm> using namespace std; struct Point { int x, y, i; bool operator<(const Point &that) const { return i < that.i; } void print() { printf("%d\n", i); } }; bool lessX(const Point &p1, const Point &p2) { return p1.x < p2.x; } bool lessY(const Point &p1, const Point &p2) ...
7e4b6184dc1b7cad08498f611eaa0d511c859ba9c8aa98ddbb67ebc1d8e463a4
0ed1d2738958dd2c061496e7dc0c7f18ba1145a85bf29f670dcbfe5a2d311766
0.01236
cpp
0ed1d2738958dd2c061496e7dc0c7f18ba1145a85bf29f670dcbfe5a2d311766
e0259489dc06a207fe3d4f0254533645150795b53c8d912993d6a03c15a6bed3
PIE_released_gem5_runtime
pie_75347
p03717
4d7e4771fd6ce9eb814963b0804a8765f0d30bd7b22b2e8ebd4a9b45605f02af
e0259489dc06a207fe3d4f0254533645150795b53c8d912993d6a03c15a6bed3
0.062897
5.08883
4-8
4d6c09298c6f22a092e7a3abb0cb7b92587427091ca7802fc78b1557bc3f0872
#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 ...
81d1819c00ec2745498389b6d58240933e6ae725a190985b78f1726e1d1b308e
d5f65520ef65574147e6437d59741dd68d8e7cc5b1e3cd70057f2eaa1c350608
0.020187
cpp
d5f65520ef65574147e6437d59741dd68d8e7cc5b1e3cd70057f2eaa1c350608
b0ddf7b836f61ac73228dd5e10ff886f66bbc70f9e3c7fd5a352c72912158b17
PIE_released_gem5_runtime
pie_75353
p00022
ac527984f5defd16669fe0ffd008f4b7b7b8ddad569fa9e3d9ff9947f048d794
b0ddf7b836f61ac73228dd5e10ff886f66bbc70f9e3c7fd5a352c72912158b17
0.104643
5.183761
4-8
07e8a5b83d573c4ba89056673ce1b2ef98746e214f67b5348c56bbc17c30e6f8
#include <iostream> #include <algorithm> using namespace std; int main() { int n; int a[5000]; int tmp; int ans; while (1) { cin >> n; if (!n) break; for (int i = 0; i < n; i++) { cin >> a[i]; } ans = a[0]; for (int i = 0; i < n; i++) { for (int j = i; ...
#include <cstdio> #include <algorithm> using namespace std; int main() { int n, tmp, ans; int a[5000]; while (scanf("%d", &n) && n) { for (int i = 0; i < n; i++) scanf("%d", &a[i]); ans = a[0]; for (int i = 0; i < n; i++) for (int j = i; j < n; j++) { if (i == j) ...
2d23d25873014515cc88aaa3c6c92e5e14926bf8d1eddde004b52b71f541c3db
05cbf54bf56ffb677e1c4bdc92d07fe973788a77d65e8732e2cda58498f0d045
0.149036
cpp
05cbf54bf56ffb677e1c4bdc92d07fe973788a77d65e8732e2cda58498f0d045
c3623d1381179c4023d47da70955fe4766a8c48129e600c34b6b8db9d7b265a4
PIE_released_gem5_runtime
pie_75530
p00744
05ba12cf2f2e407f6c55013213d8f3c50eef822680799bd5894f8d4186326de6
c3623d1381179c4023d47da70955fe4766a8c48129e600c34b6b8db9d7b265a4
0.315691
2.118224
2-4
08a9c64a8cdbafc5d6c28a5790d5a7d74b1b7937c446adf72b963885d0765f34
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; #define each(i,a) for (auto&& i : a) #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; #define each(i,a) for (auto&& i : a) #define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++) #define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--) #define REP(i,n) FOR(i,0,n) #define RREP(...
b2850bac683048ffe7a228eb01a7dc87b9900234b515fa62cd85fc1e89254722
d0c604c6893d214dfec37cd38123671524e1198d8767f22f51a8de5df9574635
0.01951
cpp
d0c604c6893d214dfec37cd38123671524e1198d8767f22f51a8de5df9574635
afa743314cbc8b2e7d7c0a3e3ebdcf0d9ad04529177318c71857dee30578eda4
PIE_released_gem5_runtime
pie_75597
p03175
6dcee71711a9a854a4c837fc03a7c8b62f4a7cbf95709fa116472fae851ac339
afa743314cbc8b2e7d7c0a3e3ebdcf0d9ad04529177318c71857dee30578eda4
0.37851
19.400889
8+
a467b8f3e74b043ce50c066dd9886941fa78fbfc8e232dc9f526ca2fcdb1e1b6
#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 ...
2509c3f530e87adebb37be951dbb78150082c32bd1a4c9c1a17d62854c07486f
fc424df993ae5bbdf4f2f9558952752ed26a547f8ec57e392094d4d1320ce94c
0.057979
cpp
fc424df993ae5bbdf4f2f9558952752ed26a547f8ec57e392094d4d1320ce94c
2c54f3ab8ae8fd8f248ffb1bbc4b74d20529f46a82e49e338fc1676f4cd2a9bb
PIE_released_gem5_runtime
pie_75697
p02832
bc196e1dda627c562b6986dcb79238ea5daaa3ad391cf0ae9ff3b1b779be1dbf
2c54f3ab8ae8fd8f248ffb1bbc4b74d20529f46a82e49e338fc1676f4cd2a9bb
0.377332
6.508044
4-8
4b46b2bc4ca2ab33926f915c59c7b9076a83291f7f77ac9034929265655ce838
#include <bits/stdc++.h> using namespace std; const int N = 2e5 + 3; int n, a[N]; vector<int> occ[N]; int main() { cin >> n; for (int i = 0; i < n; ++i) { cin >> a[i]; occ[a[i]].push_back(i); } int prev = -1, taken = 0; for (int val = 1; val <= n; ++val) { bool found = false; for ...
#include <bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) cin >> a[i]; int ans = 0; for (int i = 0; i < n; i++) { if (a[i] == ans + 1) { ans++; } } if (ans == 0) cout << -1 << endl; else cout << n...
912d85e31e3a96611d70fadbb90fef2ec79ab4bcfbd643c4a98e55d62256c764
df025730c32444a17b762b0b5efb1c0295d8ee33291647bb381b140c8919c7cd
0.111867
cpp
df025730c32444a17b762b0b5efb1c0295d8ee33291647bb381b140c8919c7cd
6bebb217d92663d43754678f6248d9ecae9e86b12081950a7e473d1740ff8513
PIE_released_gem5_runtime
pie_75738
p00884
38606c29dbeb80ea0dd659e8add8e561796a898e5518350d40f9e7b780db72f9
6bebb217d92663d43754678f6248d9ecae9e86b12081950a7e473d1740ff8513
0.658638
5.887684
4-8
a4b37d37e0688bbf767c8fb7ad9800aa10dc148d7f7f1ed55c65b0ca2e6fddf2
#include<stdio.h> #include <iostream> #include <math.h> #include <numeric> #include <vector> #include <map> #include <functional> #include <stdio.h> #include <array> #include <algorithm> #include <string> #include <string.h> #include <assert.h> #include <stdio.h> #include <queue> #include<iomanip> #incl...
#include "bits/stdc++.h" #include <unordered_map> #include <unordered_set> #pragma warning(disable : 4996) using namespace std; using ld = long double; const ld eps = 1e-9; set<string> memo; vector<string> dfs(string now, map<string, vector<string>> mp) { if (memo.find(now) != memo.end()) return vector<s...
e38a7b82909d751ca5f59a044cf5a6c35c5ec2b2e2cf696c88c48c5ddcda7e6e
c229378ab27c61f38fbc59b82a64a09224cdc3d2383781ba5d2cf3045ee0d611
0.010149
cpp
c229378ab27c61f38fbc59b82a64a09224cdc3d2383781ba5d2cf3045ee0d611
a9ce576f80cf0d484db8430233bacfa6f64f378705e79ec0a758f8b150f7c039
PIE_released_gem5_runtime
pie_76430
p02711
cfbb4e05ddef3a8fb33cefb0cf73cf1fe0834483b11080f4c2df21716ec55e5a
a9ce576f80cf0d484db8430233bacfa6f64f378705e79ec0a758f8b150f7c039
0.072978
7.190888
4-8
1b5e4ff4da0bc07bbf95479cd261b6d1a5578947517f023bf31a1fe0603a1c6b
#include <iostream> #include <cstdio> #include <iomanip> #include <algorithm> #include <cstring> #include <cmath> #include <vector> #include <map> using namespace std; string s[10005]; int main() { int n; cin >> n; int flag = 0; while (n != 0) { int m = n % 10; if (m == 7) { ...
#include <stdio.h> int main() { int angka, digitBelakang, digitTengah, digitAwal; scanf("%d", &angka); digitBelakang = angka % 10; digitTengah = (angka - digitBelakang) / 10 % 10; digitAwal = (angka - digitBelakang) / 100 % 10; if (digitBelakang == 7) { puts("Yes"); } else if (digitTengah ...
1c67bf1c9859918b6337fdb3aef700f2fab1f7f806f7406e11fc94ff1c01ebfb
9731bba2de37d82fcb0cf34d3492864b380c1d406bfa104795b3aa4ccd459a51
0.10822
cpp
9731bba2de37d82fcb0cf34d3492864b380c1d406bfa104795b3aa4ccd459a51
13f284258a86962cc11d4c75758ede81fa5cd486b2bc9effb26e77d795cb7dcd
PIE_released_gem5_runtime
pie_76619
p02816
119d5507a4e159980fed6f457be6005771e01de03c6b14288916928db7384d98
13f284258a86962cc11d4c75758ede81fa5cd486b2bc9effb26e77d795cb7dcd
0.221989
2.051271
2-4
5b21dd4074162186199340757d26dbac263cf8a83d3dd8eae753ca874584c0b8
#include <bits/stdc++.h> using namespace std; typedef long long ll; bool isprime(ll val) { if (val <= 1) return false; for (ll i = 2; i * i <= val; i++) { if (val % i == 0LL) return false; } return true; } signed main() { ios::sync_with_stdio(false); cin.tie(0); cout << fixed << s...
#include <bits/stdc++.h> using namespace std; typedef long long ll; template <typename T1, typename T2> bool chmin(T1 &a, T2 b) { if (a <= b) return 0; a = b; return 1; } template <typename T1, typename T2> bool chmax(T1 &a, T2 b) { if (a >= b) return 0; a = b; return 1; } long double dx[4] = {...
5cf779d853cc85163d06b5a8f07df24412881127d0eaec3c758967471f744518
534a8ab4ad31c08ee0a0aa52b35e0cd66ae8f450aba75b06a4dfa8a5b376cf69
0.038258
cpp
534a8ab4ad31c08ee0a0aa52b35e0cd66ae8f450aba75b06a4dfa8a5b376cf69
46f741bc8ddab7997d8a1dcadb50aed893885a0a9e565cf42290617f28b42b8c
PIE_released_gem5_runtime
pie_76636
p01487
2c085fef0267289b89467857605dc5e0f12c8f73df2e4a9c52ebb797895058a3
46f741bc8ddab7997d8a1dcadb50aed893885a0a9e565cf42290617f28b42b8c
0.16536
4.322289
4-8
973a1ba3865e590c4effecb07b5c399f8f254e06a9451970970fec860f90bc3c
#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 <map> using namespace std; 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) { if (a > b) { a = b; return 1; } return 0; } using pint = pair<int, i...
576bc18f3c5d726b54bc122cb9bed13905be68b817ffbb3b3bb6a85c45c3a536
3e52322b48a8905a842865fe6d58fe9023915e567e1c2c2dccfc8e10684219ba
0.006304
cpp
3e52322b48a8905a842865fe6d58fe9023915e567e1c2c2dccfc8e10684219ba
5ea23345762296b715b0175a12dc689e489879a657d0e42df21434b4af7ae2c6
PIE_released_gem5_runtime
pie_76645
p02670
c9aa326cfaeb102a879ca78e916743989c54c27329c027a1d4f408681f2c5e5a
5ea23345762296b715b0175a12dc689e489879a657d0e42df21434b4af7ae2c6
0.058054
9.209623
8+
63e6d0edb608b7c5fadfb1adf6fca8cdcb0cc4932a241a5eae0d830348a8b319
#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 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...
575300e93a15f654424a5fefdc02631fb8fda275bf0ba486334e5e2fe41da60a
34c1ea76e54698f78b7881b6d324baab347654c031b784cef911ab54930f47dc
0.109046
cpp
34c1ea76e54698f78b7881b6d324baab347654c031b784cef911ab54930f47dc
0495d334ab9f89d4c8d22b75de5e99ff8e0972978f8e5f47543fc59d2a0bea45
PIE_released_gem5_runtime
pie_76647
p03520
adc2a776f476e31b7e838b004d71dede4fcfc3837e7699a424dba20ba0dd66a3
0495d334ab9f89d4c8d22b75de5e99ff8e0972978f8e5f47543fc59d2a0bea45
0.68989
6.326615
4-8
21dd3e659df23bf75901242fa2bdbb703e8e441598f1be7ea0fe15605821c325
#include <string> #include <vector> #include <iostream> #include <algorithm> using namespace std; struct edge { int to, id; }; int n, vc, a[200009], b[200009], c[200009]; long long sd, ans[200009], s[200009], dist[200009]; vector<edge> g[200009]; void dfs(int pos, int pre) { c[pos] = 1; for (edge e : g[p...
#include <vector> #include <iostream> #include <functional> using namespace std; int main() { cin.tie(0); ios_base::sync_with_stdio(false); int N; cin >> N; vector<int> A(N - 1), B(N - 1); vector<vector<int> > G(N); for (int i = 0; i < N - 1; ++i) { cin >> A[i] >> B[i]; --A[i], --B[i];...
5a09c9ba807b7e3ffc8ee592cf8f747ec6690c35fe6401b7fa277f67184bb062
298973bcb396f003844f1427a28a8d0d5b9191dfb35b6af6d91bba916a4b8de2
0.007636
cpp
298973bcb396f003844f1427a28a8d0d5b9191dfb35b6af6d91bba916a4b8de2
2e46272ce462cd0e95168f48b275543120dc8c25ddaaee060f8dba547b4ef772
PIE_released_gem5_runtime
pie_76660
p03448
56e24f308b6a11a2e80b24a0cd82f04337e5f4803776e945445b9653dc305168
2e46272ce462cd0e95168f48b275543120dc8c25ddaaee060f8dba547b4ef772
0.053425
6.996665
4-8
0b38938bfe5af0b0f592b1ef4a3f1078b40d61f623dc5432f63a12381e3343f3
#include <iostream> #include <string.h> #include <stdlib.h> #include <stdio.h> #include <bitset> #include <algorithm> #include <cstdio> #include <time.h> #include <queue> #include <set> #include <map> #include <stack> #include <math.h> #define ll long long #define int64 long long #define mem(x, y) memset...
#include <cstdio> using namespace std; int A, B, C; int X; int solve() { int result = 0; for (int i = 0; i <= A; ++i) { for (int j = 0; j <= B; ++j) { for (int k = 0; k <= C; ++k) { int tmp = i * 500 + j * 100 + k * 50; if (tmp == X) result++; } } } retur...
04404a9f3a4c8db5fa497dffd29d18f6931eb290a4390ea9512e42b69f4768a4
16b20c4d05f9c2a9e9661c0a963133160c932bab23d375a83ba8e3ebe668f47c
0.019783
cpp
16b20c4d05f9c2a9e9661c0a963133160c932bab23d375a83ba8e3ebe668f47c
a59d757dfc805203f04283c1fc7dc21ce22fb97f6285f291b87b2a95c6e375c2
PIE_released_gem5_runtime
pie_76700
p03707
68561dc6dd219514f913636fb761b37006154ee7cb5a7632a05ef24bb2ab2880
a59d757dfc805203f04283c1fc7dc21ce22fb97f6285f291b87b2a95c6e375c2
0.111932
5.657859
4-8
1af2af056982b39c983253fc781967ad4c6498d64d384f8b3c0b026d86bae8a8
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <sstream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <cmath> #include <cctype> #include <cstring> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> #include...
#include <cstdio> #include <cstring> #include <algorithm> #define MN 2005 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') ; ...
8bb0213bc735720136bc13e6dda7f4392971cf0dee1f765af9697d678e6d4157
97ac95a7d4c6e0a96845db130a2ecf4b24db507828329368bae129bf5f2cbbad
0.026515
cpp
97ac95a7d4c6e0a96845db130a2ecf4b24db507828329368bae129bf5f2cbbad
aeb5da5cc5540ba84b036796360b677114ad59c84c9cfdad47b86e661278e84d
PIE_released_gem5_runtime
pie_76729
p02774
e621d252d410a92313ef38877f3f3c625bca26ffe76e34ce01779744102a691d
aeb5da5cc5540ba84b036796360b677114ad59c84c9cfdad47b86e661278e84d
0.11239
4.238656
4-8
0569c3fcb27cf87dff698e75e3909958f4413f947af547a907508199706383a1
#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> 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) << "...
8f035ca3ef9e97584ceca9c55d77d47a5447b35ca5967e8ae19442711998efef
767f9e04ac1a103fd20e1fb9ddcfd80aa7b8e0c4643f30ef324efd9747db1f7d
0.092562
cpp
767f9e04ac1a103fd20e1fb9ddcfd80aa7b8e0c4643f30ef324efd9747db1f7d
291dc28d92d0269006ea9ad5c4f09229cae36e230932a0a7cc247063844c5ccf
PIE_released_gem5_runtime
pie_76962
p00997
f43ba315d3d10a9c78ad595ab1cfa39410bc3a68238989d57579cc9df1088d5f
291dc28d92d0269006ea9ad5c4f09229cae36e230932a0a7cc247063844c5ccf
1.083186
11.702326
8+
ff90fdd61c1db971e46751759ea720b2423b34c6761a42bc003641359822453e
#include <bits/stdc++.h> #define N 200001 #define f first #define s second using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<ll, P> PP; vector<P> G[N]; ll n; ll par[N]; ll Rank[N]; ll Cnt[N]; void init(int n) { for (int i = 0; i < n; i++) { par[i] = i; Rank[i] = 0...
#include <bits/stdc++.h> using namespace std; #define int long long struct UF { vector<int> data; UF(int n) : data(n, -1) {} int find(int x) { if (data[x] < 0) return x; return data[x] = find(data[x]); } int size(int x) { return -data[find(x)]; } bool same(int x, int y) { return find...
5cf1fbe45421442af8b702176d41dbe2aaba5cbf43c4e3bfa5601b79bca7f4ad
ef13dcbb192ded215153f2a7c68203afa867bfa26eec12722321aa2e0047897d
0.001027
cpp
ef13dcbb192ded215153f2a7c68203afa867bfa26eec12722321aa2e0047897d
1422ef5c5f3e58d9b69c0e0a0409bfb8cac621fd35a3cc3a776f7c8d4a6ea5e6
PIE_released_gem5_runtime
pie_76966
p03196
3690199cf7f682bff5f9b297eb6c7adb74e31847706f2eeb3f8205661eed8d44
1422ef5c5f3e58d9b69c0e0a0409bfb8cac621fd35a3cc3a776f7c8d4a6ea5e6
0.006605
6.430047
4-8
e3002ae5b69a1b59813565962b96c31687be51fe7305d2b8e99cb8e89eb9cc5c
#include <bits/stdc++.h> using namespace std; typedef long long l; l o = 0, ans = 1; bool ok = 0, w[5000005]; int main() { l n, k; cin >> n >> k; if (n == 1) { cout << k << endl; return 0; } for (int i = 2; ok == 0; i++) { if (i * i > k) break; if (w[i] == 1) ...
#include <iostream> #include <sstream> #include <fstream> #include <string> #include <vector> #include <deque> #include <queue> #include <stack> #include <set> #include <map> #include <algorithm> #include <functional> #include <utility> #include <bitset> #include <cmath> #include <cstdlib> #include <cti...
2c21d93f9c0edc79a2b7af8e04a9517694b05e5e176ea7eb383eaed2df8a5fe6
e25c97937e24a2fc62c9ac865aec761209ae391a7f4eb673d5763a4cf9d94d62
0.069044
cpp
e25c97937e24a2fc62c9ac865aec761209ae391a7f4eb673d5763a4cf9d94d62
7a0f625a1a70b60abcac7f013a45a30e1b9c5ce1932397fd7872eef7ca06536f
PIE_released_gem5_runtime
pie_76973
p00706
b40264d8d61ecdc9e9bcd716f271ee298c26ee35971277890ea014f6274e61fd
7a0f625a1a70b60abcac7f013a45a30e1b9c5ce1932397fd7872eef7ca06536f
0.182962
2.649948
2-4
41a060967f340efc5fcb7370acdb2f85caba665e03ddac415b1e94c2eb7f950b
#include <iostream> #include <algorithm> using namespace std; int dp[501][501]; bool field[501][501]; int main() { for (int N; cin >> N, N;) { fill(dp[0], dp[501], 0); fill(field[0], field[501], 0); int W, H; cin >> W >> H; while (N--) { int X, Y; cin >> X >> Y; field...
#include <iostream> #include <algorithm> #include <cstring> using namespace std; int main() { while (true) { int N; cin >> N; if (N == 0) break; int W, H; cin >> W >> H; int F[W][H]; memset(F, 0, sizeof(F)); for (int i = 0; i < N; ++i) { int x, y; cin >> x...
d7931185340b62c6b46e2eceacecce91f299fbbd5cc452be1deb570c5a06b6f4
5613a8953807478354391cb648e1ec2ce54a3641c86088ff65f33ac8b568e5e7
0.049887
cpp
5613a8953807478354391cb648e1ec2ce54a3641c86088ff65f33ac8b568e5e7
785a909b76b6acf839e326941d0cf8e498d28395d045e6610518797d11b968b0
PIE_released_gem5_runtime
pie_76974
p03958
a710cf30762cd4c995416842059b2d71ecdee6aa632e4919f9b7c8e31fbcd4b2
785a909b76b6acf839e326941d0cf8e498d28395d045e6610518797d11b968b0
0.178138
3.57083
2-4
5851c430b3c04898f677da5fa1466d26c72cb853a2d2c149dbfef233ebf67998
#include <bits/stdc++.h> #define pb push_back using namespace std; void debug_out() { cerr << '\n'; } template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) { cerr << " " << H; debug_out(T...); } #define dbg(...) cerr << #__VA_ARGS__ << " ->", debug_out(__VA_ARGS__) #define dbg_v(x, n) ...
#include <bits/stdc++.h> #define NMAX 1009 using namespace std; struct tip { int val; int t; }; priority_queue<tip> H; bool operator<(tip a, tip b) { return a.val < b.val; } int i, n, h; int a[NMAX]; int main() { cin >> n >> h; for (i = 1; i <= h; i++) { int x; cin >> x; H.push({...
2df5c9b2d03cacf1221e48f296fa6d4d41ba54344f1cbdc80de2ecb3f2aa1f83
59e077185b3bb3eeab8147d48d5cf93ec7aeffe77df0b656be3c8282b58233d3
0.107773
cpp
59e077185b3bb3eeab8147d48d5cf93ec7aeffe77df0b656be3c8282b58233d3
910c3bfa5c946d71b26c891259770be7ac1166784923274ecae9e562276763a9
PIE_released_gem5_runtime
pie_76993
p03165
48021726e18b9d0aa498f490a9a0bdcdaecf171004de4b56531235907d9003ee
910c3bfa5c946d71b26c891259770be7ac1166784923274ecae9e562276763a9
0.691713
6.418264
4-8
21674803055d7fd411e92c0d7ccb579f618ae6f053ba194e153bf57e4c4e0ce7
#include <bits/stdc++.h> using namespace std; #define f first #define s second #define pb push_back #define mp make_pair #define ll long long int typedef pair<int, int> pii; vector<int> v; map<int, int> op; #define MAX 200005 bool visited[MAX]; vector<int> adj[MAX]; const int M = 1e9 + 7; int n, m; const...
#include <bits/stdc++.h> using namespace std; #define f first #define s second #define pb push_back #define ll long long #define MAX 200005 #define mp make_pair const int M = 1e9 + 7; const int mod = 998244353; typedef double ld; bool visited[MAX]; ll qpow(ll x, ll k, ll m) { return k == 0 ? 1 ...
920b0e9f15d541d6b3f3bc5a308755e49b93f1919dee119b54d6977d93dc2065
0afff6ad14fe13442b71e6c0728a49e454412fab181ed51d0a54114208bbeed0
0.103724
cpp
0afff6ad14fe13442b71e6c0728a49e454412fab181ed51d0a54114208bbeed0
12199f213ed1f9c5eb82fe9add6a61be6586b9e9bab1548115e4b49f73f5c7a5
PIE_released_gem5_runtime
pie_77047
p02556
e7b2c0f8f28b2f0ba4e3fecbd43f4d89164583c19784c96a1d892b4ec8b8ddf6
12199f213ed1f9c5eb82fe9add6a61be6586b9e9bab1548115e4b49f73f5c7a5
0.795866
7.672939
4-8
edb5cfb1fe0c1cbf96a2a4162d7f608fc6832085e19d0871f9dab50a2ba31110
#include <bits/stdc++.h> using namespace std; const int mod = 1e9+7; int add(int a, int b) { return a + b < mod ? a + b : a + b - mod; } int mul(int a, int b) { return int(1LL * a * b % mod); } int fexp(int b, int e = mod - 2) { int ans = 1; while(e) { if(e & 1) ans = mul(ans, b); b = mul(b, ...
#include <bits/stdc++.h> using namespace std; const int N = 200005; struct vec { int x, y; int operator*(const vec &o) const { return x * o.x + y * o.y; } int dist(const vec &o) const { return abs(x - o.x) + abs(y - o.y); } } pt[N]; int n; int main() { scanf("%d", &n); for (int i = 0; i < n; i++) {...
4a7155c18f5fabf4737cf5a0b25f463607cbf485bf50f6052bcae3b62ac75745
8f58eeb493a50c6db880e65cba8b121caf7425760f2f630e0bac6e2e1c62a1bc
0.082621
cpp
8f58eeb493a50c6db880e65cba8b121caf7425760f2f630e0bac6e2e1c62a1bc
26b864cd0dba1f6c7cdbe7479e3266352f5e0a0776317568673787225c7e4c80
PIE_released_gem5_runtime
pie_77063
p02868
a673e07899818d10bf407d268dbac74be86c615ebc4ecc7d4f992dc1f46a3d73
26b864cd0dba1f6c7cdbe7479e3266352f5e0a0776317568673787225c7e4c80
0.577346
6.987877
4-8
5409ad194936a687af2e6dffee53f6740e5e26b0bf60d0c203123aba533382a6
#include <bits/stdc++.h> using namespace std; const int N = 110000; const long long INF = 1LL << 60; int L[N], R[N], C[N]; long long val[N]; vector<int> st[N], en[N]; set<pair<long long, int>> S; int main() { ios::sync_with_stdio(0); cin.tie(0), cout.tie(0); int n, m; cin >> n >> m; for (int i = 1...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; typedef pair<ll, int> li; typedef pair<int, ll> il; typedef vector<il> vil; typedef vector<int> vi; typedef pair<int, int> ii; typedef vector<ii> vii; vector<vil> graph; vector<ll> dist; void dijkstra() { dist[1] = 0ll; priority_q...
656754dba3234fb8c2a96a84889dbba0829cb618974927ab4254092add6f384d
36f19a08f34e80fbf6b425402c8aec535033a01fabcb9b9512888c1350bb3b86
0.018412
cpp
36f19a08f34e80fbf6b425402c8aec535033a01fabcb9b9512888c1350bb3b86
18c44b609b6fbd196941921e21a0f2ce38f86053e80b6c7e01c1a85fb09d4d1b
PIE_released_gem5_runtime
pie_77129
p02683
59507fea336c38b9702ee6f6bd50157e7baa29fe189542b260334eaca0933cf1
18c44b609b6fbd196941921e21a0f2ce38f86053e80b6c7e01c1a85fb09d4d1b
0.870632
47.285444
8+
69389cf14b59df3683057e5934ea4ecf2c2fc82fc1f482404bd3694fd79cd1a6
#include <iostream> #include <string> #include <cstdio> #include <vector> #include <cmath> #include <algorithm> #include <functional> #include <iomanip> #include <queue> #include <ciso646> #include <random> #include <map> #include <set> #include <bitset> #include <stack> #include <unordered_map> #includ...
#include <cstdio> #include <algorithm> using namespace std; int n, m, x; int c[15], a[15][15], b[15], d[15], len, sum = 100000000, cost; void dfs(int step) { int i, j, k; if (step == len + 1) { for (k = 1; k <= m; k++) d[k] = 0; for (j = 1; j <= len; j++) for (k = 1; k <= m; k++) ...
f096ccdabe9d8ee650a1727965f3d4ebe70fe8f2c66a68e05004fc62e08c74b2
c9df809d382400ccf6202a1e72db1330d5d4d2e495b133736dcaff447f792ce5
0.100867
cpp
c9df809d382400ccf6202a1e72db1330d5d4d2e495b133736dcaff447f792ce5
db0a04cf71d56ae55cf730dc2d7d9863170db48de1e8ad34e57f662879ba6719
PIE_released_gem5_runtime
pie_77138
p03944
d87cce48d74034ac89af42bce25586ce4098387a08dc1f51803f81cf2cdd4128
db0a04cf71d56ae55cf730dc2d7d9863170db48de1e8ad34e57f662879ba6719
0.648084
6.425133
4-8
831c68f59c0a0a3ecd2e954af41badeed9dd3409bc5bb82d5946c1b322baae44
#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 <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> pii; typedef pair<long long, long long> pll; #define ff first #define ss second #define mp make_pair #define pb push_back #define all(x) (x).begin(), (x).end() #define FastIO ...
1d3e2a1c2042d4891633f6d4389020d174e1b6ed8995798cc69cca7b44c70403
dc6438d709e788d64fea1028f412f1b53e6e4924163a59224792e19a887e8c1d
0.000192
cpp
dc6438d709e788d64fea1028f412f1b53e6e4924163a59224792e19a887e8c1d
4b882b9d8f461d44d4d0a73720e1d534339d0885f973f2368fc9754558e9c2dc
PIE_released_gem5_runtime
pie_77144
p03276
f25da6ae7e5b6e2660fc8fcfe59497310ffedce4301fbca3114d5502fd24d603
4b882b9d8f461d44d4d0a73720e1d534339d0885f973f2368fc9754558e9c2dc
0.001008
5.24937
4-8
0a8e6d99b299dd57c1e7350ba78cb5913684253fa2a672e50e7a04bb02b366b6
#include <bits/stdc++.h> typedef long long ll; using namespace std; const int N = 1e5 + 7; const ll mod = 1e9 + 7; int a[N]; int n, k, ans, now; int main() { scanf("%d%d", &n, &k); for (int i = 1; i <= n; i++) scanf("%d", &a[i]); if (a[n] <= 0) { ans = -a[n + 1 - k]; } else if (a[1] >= ...
#include <cstdio> #include <algorithm> using namespace std; const int maxn = 1e5 + 7; int a[maxn]; int main() { int n, k; scanf("%d%d", &n, &k); int cnt = -1; for (int i = 0; i < n; ++i) { scanf("%d", &a[i]); if (a[i] >= 0 && cnt == -1) { cnt = i; } } if (cnt == -1) { pri...
52d43f27ccd711df3db96ef77ab97c88090224c4015067a64081d8ed7f087493
71817fe5bdd8bfe0cb83cc54cb5c1fad68eb02dd1e81518858fa5b80ff59c049
0.018106
cpp
71817fe5bdd8bfe0cb83cc54cb5c1fad68eb02dd1e81518858fa5b80ff59c049
920a569e023b952c75d474e2846f7b1ddcf2344d9d8773535550706e8071ff45
PIE_released_gem5_runtime
pie_77150
p00958
f4ca05e4ffda0ed37138a52d96d46aefd03a3b449fd188bf82d6282202834b2d
920a569e023b952c75d474e2846f7b1ddcf2344d9d8773535550706e8071ff45
0.097228
5.369884
4-8
5db981433873748311396b01a63a6cea752bd3476b607401a333e740ab2b3b49
#include <iostream> #include <cstdio> #include <cmath> #include <vector> #include <algorithm> #include <stack> #include <cstring> #include <queue> #include <set> using namespace std; const int maxN = 110; #define FORU(i, l, r) for (int i = l; i <= r; ++i) #define FORD(i, r, l) for (int i = r; i >= l; --i) ...
#include <cstdio> #define LL long long using namespace std; int m, cnt; int ans; struct poi { int x, y; poi() {} poi(int xx, int yy) { x = xx; y = yy; } void read() { scanf("%d%d", &x, &y); } friend poi operator-(poi a, poi b) { return poi(a.x - b.x, a.y - b.y); } friend int operator^...
d0eecd5a37487ca7843f313f6a5b81f8ca1d0ec1c613d9f3fdb339e68058097e
fa9577e02b739b39607c1c2fc9439a706974b2fcf73499645b1713529e3f6509
0.011312
cpp
fa9577e02b739b39607c1c2fc9439a706974b2fcf73499645b1713529e3f6509
37b8cf82240219b7ebbe46f539126f5df404a5516bba7cada44b2e97197b2dfb
PIE_released_gem5_runtime
pie_77160
p03859
56ac9baae880e396d32fbc5488fda32e81695f096fc6264f90b9976bbfc1f9ac
37b8cf82240219b7ebbe46f539126f5df404a5516bba7cada44b2e97197b2dfb
0.055139
4.874542
4-8
42720e65a00a22eeaac9429af326837b06c190f945e47e2c701ab42024d2181a
#include <cctype> #include <cstdio> #include <cstring> #include <algorithm> #define rep(i, x, y) for (int i = x; i <= y; ++i) #define repd(i, x, y) for (int i = x; i >= y; --i) int get() { char c; while (!isdigit(c = getchar())) ; int k = c - '0'; for (; isdigit(c = getchar()); k = k * 10 + c - '...
#include <cctype> #include <cstdio> #include <cstring> #include <algorithm> #define rep(i, x, y) for (int i = x; i <= y; ++i) #define repd(i, x, y) for (int i = x; i >= y; --i) int get() { char c; while (!isdigit(c = getchar())) ; int k = c - '0'; for (; isdigit(c = getchar()); k = k * 10 + c - '...
814799500d02068236943f010c98c3bd1f78972cf742bc2f5becfeb49451da68
dcf0cffe3dd70787383303733ed343b4ccae400e831f20a1b2eafcd7e8d5654b
0.019713
cpp
dcf0cffe3dd70787383303733ed343b4ccae400e831f20a1b2eafcd7e8d5654b
21114f09375fa087fd9d4354b6a02c80d753948ce4ab96ec46bd638c9b829295
PIE_released_gem5_runtime
pie_77171
p02838
48ea2aaa5c350cdece80b2537a1b969f3817921437dc829f86604b437ee5f5fb
21114f09375fa087fd9d4354b6a02c80d753948ce4ab96ec46bd638c9b829295
0.113697
5.767557
4-8
102392cef022dc3b9eaabcc353e7548b3407d20c53fd0f9df6fc5e42e8305e45
#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 ...
04b5bbaac7b8ea44e8d35ee134b251ea42d88ebc10fe4e7cd35cd40c0c6732aa
aece78fc3e4195465d1b53422a73315da68f960f3f3de16df02bb0dc1a7ca7aa
0.029068
cpp
aece78fc3e4195465d1b53422a73315da68f960f3f3de16df02bb0dc1a7ca7aa
205424f62640257cbaaa51111bd173916130e2fdc60f9e3775b4002b76d3a5b9
PIE_released_gem5_runtime
pie_77221
p02732
7edb1970df1ceb5b0ee6f2b48f2f6c3493765d03bbab9ae9e940ad8d89262d74
205424f62640257cbaaa51111bd173916130e2fdc60f9e3775b4002b76d3a5b9
0.394224
13.561943
8+
f8a92a34162db1ce1dfdd5ca05060c01d00071c8366b1bfe359261cb8e3a9460
#include <bits/stdc++.h> #include <iostream> #include <set> #include <vector> #include <algorithm> #define fr(i, b, e) for (int i = (b); i < (e); ++i) #define rp(i, e) for (int i = 0; i < (e); ++i) #define all(x) (x).begin(), (x).end() using namespace std; typedef long int li; typedef long long ll; const int...
#include <bits/stdc++.h> #include <iostream> #include <set> #include <vector> #include <algorithm> #define fr(i, b, e) for (int i = (b); i < (e); ++i) #define rp(i, e) for (int i = 0; i < (e); ++i) #define all(x) (x).begin(), (x).end() using namespace std; typedef long int li; typedef long long ll; const int...
e278a2802d8a5a5a2156329d55d2f36cc5fed1683f5b30729b77cec58f84c6d1
5a6c3df6ae5dbbe71abb41f5b48bbcb961c6127c529d48216ae6efda139cead7
0.087998
cpp
5a6c3df6ae5dbbe71abb41f5b48bbcb961c6127c529d48216ae6efda139cead7
82660f40d5b6f43dfce608935288ece1578d33ef9746c1546697d2bd2dd0e2e0
PIE_released_gem5_runtime
pie_77293
p02715
23bc687133e8cc1f1874b0f105eff56e4a0ae405e543741bf1079869872a6108
82660f40d5b6f43dfce608935288ece1578d33ef9746c1546697d2bd2dd0e2e0
0.187357
2.129106
2-4
5b55d91acf3265a6c0edb1a97706dcd4bd41562586b89ab1e5a9c932373d0aa8
#include <bits/stdc++.h> using namespace std; const long long int MOD = 1e9 + 7; vector<long long int> prime; long long int mypow(long long int x, long long int n) { long long int res = 1; while (n > 0) { if (n % 2 == 1) { res = ((res % MOD) * (x % MOD) % MOD); res %= MOD; } ...
#include <bits/stdc++.h> using namespace std; const long long int MOD = 1e9 + 7; long long int mypow(long long int x, long long int n) { long long int res = 1; while (n > 0) { if (n % 2 == 1) { res = ((res % MOD) * (x % MOD) % MOD); res %= MOD; } x = ((x % MOD) * (x % MOD) ...
6cefba615671fa8fcb937e4e1f4e092bb487e156d99fe72d536860d3a31e9990
8c712b82f903337bfecacbee21b72a9d3ebcfdde8a735d1ddc1f91d7f73d88fa
0.107679
cpp
8c712b82f903337bfecacbee21b72a9d3ebcfdde8a735d1ddc1f91d7f73d88fa
8974ff2c14b5c6af592001b963dfb3cac201a0160e8a3467e9c5a2ff07c152d3
PIE_released_gem5_runtime
pie_77350
p02990
f3304a1ae8d16b6898eb5bf270962be132b15da9a9e1997fdbb7762ec7ecae5f
8974ff2c14b5c6af592001b963dfb3cac201a0160e8a3467e9c5a2ff07c152d3
0.285461
2.65103
2-4
bdd0c3d5d7a95697080a0b14a94c5d04bfe37fefb0537a6cb64e7c56ae1c6100
#include <bits/stdc++.h> using namespace std; #define ll long long const ll mod = 1e9 + 7; const int maxn = 2e5 + 10; ll inv[maxn]; ll fac[maxn]; ll power(ll base, ll n) { ll r = 1; while (n) { if (n & 1) r = r * base % mod; base = base * base % mod; n /= 2; } return r; } voi...
#include <iostream> using namespace std; #define mod 1000000007 typedef long long ll; ll fact[1000006], inv[1000006]; ll fp(ll base, ll exp) { if (exp == 0) return 1; ll ans = fp(base, exp / 2); ans = (ans * ans) % mod; if (exp % 2 != 0) ans = (ans * (base % mod)) % mod; return ans; } vo...
9b8ecb68f89f3cd2241aedb16645a21b38640c8ee3cbc2f745a27156f93b891e
c4d35698086bc14b5bb9b1eec8dba887ed3e1fab5fab7b5bcc7ed71df8ffc7e5
0.019824
cpp
c4d35698086bc14b5bb9b1eec8dba887ed3e1fab5fab7b5bcc7ed71df8ffc7e5
cd82ff23b814e7a00b21dd05df2a37eab90c81b298c846c4bb7fc51294c66838
PIE_released_gem5_runtime
pie_77361
p02954
2314e21c500d2d7f8830c8cb5dc5816210642484924e36d58bd3089ebf817174
cd82ff23b814e7a00b21dd05df2a37eab90c81b298c846c4bb7fc51294c66838
0.148714
7.5018
4-8
8e47f73f8d9069281694c61eb22f17c7f89b4ce55ed1c6d4ff241fb57b845eb7
#include <bits/stdc++.h> using namespace std; int main() { int g, nt, re[100007] = {0}; string q; cin >> q; for (g = nt = 0; q[g]; g++) { if (q[g] == 'R') nt++; else if (nt) re[g - 1] = (nt + 1) / 2, re[g] = nt / 2, nt = 0; } for (g = q.length() - 1, nt = 0; g >= 0; g--) { ...
#include <stdio.h> #include <string.h> #include <string.h> char a[100005]; int b[100005] = {0}; int main() { int len, count = 0, max = 0, i, j, flag, x, y; char b = 0; scanf("%s", a); len = strlen(a); for (i = 0; i < len; i++) { if (a[i] == 'R' && a[i + 1] == 'L') { j = i - 1; ...
4fc740be6d7fd11774f4a332592a1dc76c51b76889a0be100559502c884887cd
1953481c9b196189134954f69ca1b8c0c4398e5a5b0cb6910e693c1d83833311
0.064939
cpp
1953481c9b196189134954f69ca1b8c0c4398e5a5b0cb6910e693c1d83833311
18aa7e39240eed654ffe9baaa5ae835e18789f0c8e18952b38a3efa679f84faa
PIE_released_gem5_runtime
pie_77396
p03838
0718b301227ce7d03edd8beaae11ec9b4601695194414f805a09e64ce801ed20
18aa7e39240eed654ffe9baaa5ae835e18789f0c8e18952b38a3efa679f84faa
0.412246
6.348216
4-8
e616083ef380d33f3b4c0e50275c35b79f2f842cfdb1eec479e2b9885d8d6215
#include <iostream> #include <climits> #include <stack> #include <queue> #include <string> #include <random> #include <utility> #include <cmath> #include <set> #include <map> #include <math.h> #include <string.h> #include <iomanip> #include <stdlib.h> #include <algorithm> #include <vector> using namespa...
#include <bits/stdc++.h> #include <unistd.h> #include <sys/time.h> #include <stdlib.h> using namespace std; typedef long long ll; typedef pair<ll, ll> P; typedef pair<P, ll> T; long long int INF = 2e18; const ll fact_table = 1200008; double Pi = 3.1415926535897932384626; priority_queue<ll> pql; priority_que...
8ef64a028694927f72ff3465d5416823b36ad706d6f0f53d1630f96bb61477af
e14a68bd3831d46ee0075017fc8c5f8e2d06ce4a941f61d37ffeaa1409673dd5
0.046053
cpp
e14a68bd3831d46ee0075017fc8c5f8e2d06ce4a941f61d37ffeaa1409673dd5
fe0dba6e7c6631f09fa1d163166006269711a9de3389b954bbbc7d59d26b5c68
PIE_released_gem5_runtime
pie_77399
p01273
26aa4c5642aacfdf468687d44f1bcc8a3ceb465d3a0ea594edece45bdc1248fc
fe0dba6e7c6631f09fa1d163166006269711a9de3389b954bbbc7d59d26b5c68
0.114457
2.485315
2-4
0ae263f6651d063a175836c9bcec86539730c3e85009857c756f4615d81dbda3
#include <cstdio> #include <vector> #include <algorithm> #define mp make_pair #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef vector<int> vi; typedef pair<int, int> pii; class UnionFind { vi a; int root(int x) { return ~a[x] ? a[x] = root(a[x]) : x; } public: UnionFind(int n)...
#include <cstdio> #include <algorithm> #define mp make_pair #define rep(i, n) for (int i = 0; i < n; i++) using namespace std; typedef pair<int, int> pii; int main() { for (int m, n; scanf("%d%d", &n, &m), n;) { pair<int, pii> packet[20000]; rep(i, m) scanf("%d%d%d", &packet[i].first, &packet[i].seco...
de23c983d8ba20aa7bcd5b1f7861e2becf7ab406f99af0ba29ec637e694c802c
c6fc340182288cdb9ad1641fe53782d8fc04660ee8bf70f6ba146e87967b00c2
0.104752
cpp
c6fc340182288cdb9ad1641fe53782d8fc04660ee8bf70f6ba146e87967b00c2
92a0d433ec9f8502bd877a1048af938df8ed3075e2b6de18de46cb307a05300c
PIE_released_gem5_runtime
pie_77497
p03786
8bfd2f48f8ecae51853317d817ee56c20e5d9a2ad9eaeb01f10bfc2c8df44b1f
92a0d433ec9f8502bd877a1048af938df8ed3075e2b6de18de46cb307a05300c
0.279351
2.666791
2-4
b68836108bae0f5de4184e4dc391c513906cc548c37b023c3bb92eab681f7a55
#include <cstdio> #include <cstring> #include <cstdlib> #include <queue> #include <cmath> #include <iostream> #include <algorithm> #include <stack> #include <vector> #define mt(a) memset(a, 0, sizeof(a)) #define ll long long const ll INF = 0x3f3f3f3f; using namespace std; int main(void) { int n; ll ...
#include <cstdio> #include <cstdlib> #include <cstring> #include <stack> #include <queue> #include <algorithm> #include <iostream> #define ll long long using namespace std; #define max(a, b) (a) > (b) ? (a) : (b) #define min(a, b) (a) < (b) ? (a) : (b) #define s(i) scanf("%d", &(i)) #define ss(i) scanf("%s"...
0380ab599140cb130ac6381cda5688f3a9a1cdedf7ae863d7f6c72f5066a01e9
47dd08a1601c762c61c28d0e695217f993426d1330f31b256058057d1e4f3d47
0.045229
cpp
47dd08a1601c762c61c28d0e695217f993426d1330f31b256058057d1e4f3d47
63bc4d2f5af78a5f9f5045122e90e838f52b7a86e170a10bd9054357ed0711fa
PIE_released_gem5_runtime
pie_77525
p02555
b4d59fef9172ed63d54527f6587228bebcdb95f3509c0fe2402131086f85e7b0
63bc4d2f5af78a5f9f5045122e90e838f52b7a86e170a10bd9054357ed0711fa
0.579521
12.813148
8+
03c4f812008a6a1582f35cc3449458d83f72a44975639d91d32a0d085ef46c24
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; long long dp[700][2002]; long long DP(int cur, long long sum) { if (sum == 0) return dp[cur][0] = 1; if (sum < 3) return dp[cur][sum] = 0; long long &ans = dp[cur][sum]; if (ans > -1) return ans; ans = 0; for (int ...
#include <bits/stdc++.h> using namespace std; const int mod = 1e9 + 7; long long dp[2002]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int i, j, n; cin >> n; dp[0] = 1; for (i = 1; i <= n; i++) { for (j = 3; j <= i; j++) { dp[i] += dp[i - j]...
7a7bde9c8f66a749018a55a1325178684413752476dc3642b19c6a628c537013
6209f20aa64136d9e60b4b221736bbe2faa56d566bd12490b6656220a1fc96aa
0.00622
cpp
6209f20aa64136d9e60b4b221736bbe2faa56d566bd12490b6656220a1fc96aa
159de52afe92ee22a85ca535a8350d1f67c287a14c011d7bbeae48760223b360
PIE_released_gem5_runtime
pie_77549
p03516
bf841b5240edd93f050f6607954fa784138724e461970a0ae625ee086e023ef5
159de52afe92ee22a85ca535a8350d1f67c287a14c011d7bbeae48760223b360
0.032431
5.214009
4-8
b420322046c7fee3114397827e6b7a15c6e9e57e64a39ff564f7715214389f22
#include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using namespace std; #define ll long long #define mem(Arr, x) memset(Arr, x, sizeof(Arr)) const int maxN = 320; const int Mod = 1e9 + 7; const int inf = 2147483647; int n, D[maxN]; int F[maxN][maxN][2]; int Fac...
#include <cstdio> const int N = 5004, mod = 1000000007; int n, ans, inv[N], fac[N], ifac[N], F[N][2]; int main() { scanf("%d", &n); fac[0] = fac[1] = ifac[0] = ifac[1] = inv[1] = 1; for (int i = 2; i <= n; ++i) { fac[i] = 1ll * i * fac[i - 1] % mod; inv[i] = 1ll * (mod - mod / i) * inv[mod %...
253c2f7968e4dd92f36709a0e247385c6c2e60873154097742c87fcbe53c0b79
d7dd9940fd584e49db3e6d0dfeb4713f8392019d30bf9e6e4a40a5955d9c4444
0.092995
cpp
d7dd9940fd584e49db3e6d0dfeb4713f8392019d30bf9e6e4a40a5955d9c4444
e69dba5afb7cf1de43c7a4575456c08a4fdcb42f96e0f76d15b649bd05137208
PIE_released_gem5_runtime
pie_77576
p03690
6eddc4af8719a1434b09ce1826de8211b712992a924333a2712cd5a6fe536352
e69dba5afb7cf1de43c7a4575456c08a4fdcb42f96e0f76d15b649bd05137208
0.657776
7.073226
4-8
39d5a8335a299686e042254ef13e9440ecf928ec3983ef77a3582dc11e5e568b
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <sstream> #include <iomanip> #include <cstdio> #include <cstdlib> #include <cmath> #include <cctype> #include <cstring> #include <vector> #include <list> #include <queue> #include <deque> #include <stack> #include <map> #include <set> #include...
#include <cstdio> #include <map> #define maxn 100005 using namespace std; int n, a[maxn], b[maxn], fa[maxn], siz[maxn], cnt, ans; map<int, int> mp, val; int find(int x) { if (fa[x] == x) return x; return fa[x] = find(fa[x]); } int main() { scanf("%d", &n); int x = 0; for (int i = 1; i <= n; ...
6206b4d0bb6bf48e331b2bcd1905a740e4e840060250000d86bdf32190f948cb
ac6aee933e717fc6931764c76564a8d2481fd68be5095405f1b62484b1911505
0.008937
cpp
ac6aee933e717fc6931764c76564a8d2481fd68be5095405f1b62484b1911505
1616ea05eff277aec877523316397881cca5d80752941be7284f2a317326309d
PIE_released_gem5_runtime
pie_77687
p04007
077f9391f5290e089d5ea8fe52ca6420490adbc32d4744b97f6edf902e2c522e
1616ea05eff277aec877523316397881cca5d80752941be7284f2a317326309d
0.096244
10.769013
8+
02be08cfd9edc8b3b37befb1f1796a3bf9421b573c384129f027dcd1c4312bac
#include <bits/stdc++.h> #define N 100020 #define ll long long using namespace std; inline int read() { int x = 0, f = 1; char ch = getchar(); while (ch > '9' || ch < '0') ch == '-' && (f = 0) || (ch = getchar()); while (ch <= '9' && ch >= '0') x = (x << 3) + (x << 1) + ch - '0', ch = getchar(); ...
#include <cstdio> #define maxn 505 int n, m; char s[3][maxn][maxn]; int main() { scanf("%d%d", &n, &m); for (int i = 1; i <= n; i++) scanf("%s", s[2][i] + 1); for (int i = 1; i <= n; i++) for (int j = 1; j <= m; j++) s[i & 1][i][j] = '#', s[(i & 1) ^ 1][i][j] = '.'; for (int i = 1; i <=...
ff3c44d9b3dea2ac89434fec2caa9dbd48dbda2e8a62b4f166d525562366e4cc
7582df3ce5c1a412b280297b06353c7f2e74952e5f5bd0eccf18bf4d252a9926
0.055533
cpp
7582df3ce5c1a412b280297b06353c7f2e74952e5f5bd0eccf18bf4d252a9926
da8a3b64eff4c8f8c6399c3f3fc4e8ca30cb809afcf22357d269b1b61038e396
PIE_released_gem5_runtime
pie_77709
p02700
768890ed8575a6f7e6cf7817717729ca2ebc9d8bcb709b89b46ae12f24bfafa5
da8a3b64eff4c8f8c6399c3f3fc4e8ca30cb809afcf22357d269b1b61038e396
0.46752
8.418835
8+
10dadd3ab372ea92727f6565e9092de4865c9141b7943185683fffd1b16fda78
#include <bits/stdc++.h> using namespace std; string s[200005]; int main() { ios::sync_with_stdio(false); int a, b, c, d, count1 = 0; cin >> a >> b >> c >> d; while (a > 0 && c > 0) { if (count1 % 2) { a -= d; if (a <= 0) { cout << "No" << endl; return...
#include <iostream> #include <cstdlib> using namespace std; int a, b, c, d; int main() { cin >> a >> b >> c >> d; while (a > 0 && c > 0) { c -= b; if (c <= 0) { cout << "Yes" << endl; exit(0); } a -= d; if (a <= 0) { cout << "No" << endl; exit(0); } } r...
d4a8e69cf5d5af5a7e69caa7a300f75ae43c87bb0bd1faaaee8fa6d358404ebc
6b01003f0ad4bdc8489bcd1713661fe00cdc1b48f27633c12176969148e05519
0.013863
cpp
6b01003f0ad4bdc8489bcd1713661fe00cdc1b48f27633c12176969148e05519
f7c65f0e732b4aa56897c76f2de7ec824cb9979efcefbbb7eb897495d74905e0
PIE_released_gem5_runtime
pie_77713
p02689
9f7c8a5b46e32d85242e2918bd332a797db641b79ba343487696da1917a8a3e9
f7c65f0e732b4aa56897c76f2de7ec824cb9979efcefbbb7eb897495d74905e0
0.478446
34.512686
8+
a15168a26694c4865da109cfc47ce462e213b186c272007ccd3e69b9b36461aa
#include <bits/stdc++.h> #define p_ pair<int, int> #define mp_ make_pair #define ll long long #define pb push_back #define fi first #define se second #define rep(i, a, b) for (int i = a; i <= b; i++) #define show1(a) cout << #a << " = " << a << endl #define show2(a, b) cout << #a << " = " << a << "; " << #b <<...
#include <stdio.h> const int maxn = 1e5 + 5; int a[maxn]; int can[maxn]; int main() { int n, m; scanf("%d%d", &n, &m); for (int i = 1; i <= n; i++) { scanf("%d", &a[i]); can[i] = 1; } for (int i = 1; i <= m; i++) { int u, v; scanf("%d%d", &u, &v); if (a[u] >= a[v]) can...
07e0a0e86176e378fd05ce4431fd20cbc40cce20a4ea39fe4cf2ea1f93f34273
2106e15186cf6fcc1e593eaee3c7da4281030ba3db260cb2cf1abc856048b1b5
0.027973
cpp
2106e15186cf6fcc1e593eaee3c7da4281030ba3db260cb2cf1abc856048b1b5
e0f514e83f7812b2e20e5ed5720641b0e76d49a468c85b94384c185bcdc54b05
PIE_released_gem5_runtime
pie_77743
p00473
a2737a095c6d136902965941dd3d903764dddb58d5a1223972c887379ed918d0
e0f514e83f7812b2e20e5ed5720641b0e76d49a468c85b94384c185bcdc54b05
0.113675
4.063666
4-8
3507a4b043e41e400940c85b04ac8e3ae63f6bcebf41f203eb6c8501cd7a321c
#include <cstdio> #include <cstring> #include <cstdlib> #include <cmath> #include <ctime> #include <cassert> #include <string> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <functional> #include <iostream> #include <map> #include <set> using namespace std; typedef p...
#include <cstdio> #include <algorithm> using namespace std; #define x 10001 int dp[x][2], num[x]; int main() { int n; scanf("%d", &n); for (int i = 1; i < n; i++) { scanf("%d", &num[i]); } for (int i = 0; i < x; i++) { dp[i][0] = x * x; dp[i][1] = x * x; } dp[1][0] = 0; ...
6990d8d9ef6f46eafd19b5f02a112870f59db2089251063f68e042c3c18660b2
a45d130791729610d5de5019357efe04d4233d661fac119cf1aa099caab0e5f9
0.008972
cpp
a45d130791729610d5de5019357efe04d4233d661fac119cf1aa099caab0e5f9
02901148da4ee4e39fb46c59cb93eb8e922eb078f341bb1bded0d2f06365b372
PIE_released_gem5_runtime
pie_77750
p03837
e131fcccdfb9e7a42e4a99ae2d48fa03a061ca15fe4b5858993e4d66179e7f9d
02901148da4ee4e39fb46c59cb93eb8e922eb078f341bb1bded0d2f06365b372
0.053088
5.917077
4-8
52bb11dca050824f0330afc9b6e6c44fc7a90e0b9323e0c5066ef5f6715369a1
#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 ...
353ec20bbf0b4ae92722a15e5ff55e5ecf8cb22a20bbbf8af37716615fa539a6
ff6118010a6a4db2cf3ceb6b4570442d4616614cf2f983df6d526d0006970c3b
0.095676
cpp
ff6118010a6a4db2cf3ceb6b4570442d4616614cf2f983df6d526d0006970c3b
50ca9a673533981eea82e7f3a865cc67ef5d21c39d9da41ac18464cd63795a96
PIE_released_gem5_runtime
pie_77767
p02814
f69f71d6789188440f0927069d7a2e2a3237cccf449ff2613ecac77c64888501
50ca9a673533981eea82e7f3a865cc67ef5d21c39d9da41ac18464cd63795a96
0.570126
5.958948
4-8
d7481e062b7dd8673e034c29c7ec860710c5a2c4ad7a0ed99772a20da2c2f7fe
#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...
#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...
eadf61fa72846163f8c41bb96f574e82263f48ff7fdcbea86223d717369c3947
64a6c360e187ab70ed59a5e148cf5fcf93f5fa56480da32301c554ec17852f6e
0.019356
cpp
64a6c360e187ab70ed59a5e148cf5fcf93f5fa56480da32301c554ec17852f6e
cf3587bed6e299180512d7ac5daf65707b84694de5a2d5fca07129888b8d4581
PIE_released_gem5_runtime
pie_77828
p03777
55728bfb548fc2873adfb4e1f8f33164735026a7d80aec23bf4810abfd66e591
cf3587bed6e299180512d7ac5daf65707b84694de5a2d5fca07129888b8d4581
0.109705
5.667603
4-8
8fd984ebcd5ed73b798d520fefb8e4e594705879f6d88798af0fde512bb1242c
#include <bits/stdc++.h> using namespace std; int main() { char a[1000000], b[1000000]; int n; cin >> a >> b; n = strcmp(a, b); if (n == 0) cout << "H"; else cout << "D"; return 0; }
#include <stdio.h> int main() { char a, b, t; scanf("%c%c%c", &a, &t, &b); if (a == b) printf("H\n"); else printf("D\n"); return 0; }
24b0d8ca40f0ee3f146001366a85f515b3f9004bee8aef61aaa223f1889c92fa
79f20b1263b1e6152a86ef522681706e034d780c15da860fb170f49a24b59c8b
0.000191
cpp
79f20b1263b1e6152a86ef522681706e034d780c15da860fb170f49a24b59c8b
c50e627bdb69f22e71aa808e3ea49242625ce9c33b394d9b04828b6a3ab9a4d1
PIE_released_gem5_runtime
pie_77855
p03493
c04c268400d8df89b01eff58644e111ed315fa5dca1877205f8ed3e6aabdd03a
c50e627bdb69f22e71aa808e3ea49242625ce9c33b394d9b04828b6a3ab9a4d1
0.00101
5.281008
4-8
b4078e8fcec1fe7e1934d4e4edc741ccca259803a95f7297a2cd5ce810dec935
#include <bits/stdc++.h> using namespace std; int main() { int n, m; int a, b; char c; int ans = 0; for (int i = 0; i < 3; i++) { cin >> c; if (c == '1') ans++; } cout << ans << endl; return (0); }
#include <cstdio> using namespace std; int main() { int s; int ans = 0; for (int i = 0; i < 3; i++) { scanf("%1d", &s); ans += s; } printf("%d\n", ans); return 0; }
f9b13808ca5c715cf35a2039e5a37bd8bf4562b5ebbb40d51f1e108b47ff58b0
34c7dbed74896bbf131c7f6be28905d996aa34bdacb335040d6f0f8395c7dd16
0.015191
cpp
34c7dbed74896bbf131c7f6be28905d996aa34bdacb335040d6f0f8395c7dd16
1267ebd6b2a60b96f7a59542472884edf1941d56128e0f18e5dd9409f2d6dd7a
PIE_released_gem5_runtime
pie_77884
p03841
73903eb621ec0d6eedc8d75ab8331cdbabbe855d5cd2a3407e590a506f43774a
1267ebd6b2a60b96f7a59542472884edf1941d56128e0f18e5dd9409f2d6dd7a
0.16119
10.6109
8+
7bde0b6e3babad1f1ecc87fa9ac001d3d2563ebb1208b99fe6c3da6da00d65c0
#include <bits/stdc++.h> #define ll long long #define pb push_back #define mp make_pair int cnt[501]; bool was[501]; using namespace std; int N; bool can = true; int a[250001]; int pos[500]; vector<pair<int, int> > g; int main() { memset(a, -1, sizeof a); scanf("%d", &N); for (int i = 1; i <= N; i...
#include <cstdio> #include <algorithm> using namespace std; #define MAXN 510 #define MAXM 250010 int a[MAXM], f[MAXN], x[MAXN], n, ls = 1; bool cmp(int a, int b) { return x[a] < x[b]; } int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) { scanf("%d", &x[i]); a[x[i]] = i; f[i]...
affcd6c63b84a83004d8c9433526d04e096ba63391c0084563aff0d3e1f2dfc0
376767d5b5890d221580f4453e2d73f02be429abe9bce20aa7b5d7a019b32d19
0.107496
cpp
376767d5b5890d221580f4453e2d73f02be429abe9bce20aa7b5d7a019b32d19
e08c258d8d9a4f55db6e31da31240aa7172880b23cf0f9b1a3d0533e19542dbd
PIE_released_gem5_runtime
pie_77925
p02701
6433f78888b68fcecfee7d8db35e73c5cb264fedb4751096f72dedbbb9fc719e
e08c258d8d9a4f55db6e31da31240aa7172880b23cf0f9b1a3d0533e19542dbd
0.883171
8.215872
8+
039eee1e338022678b8d0d8f4f72e2fea23d7704b572fc8e0aa14b6e706c4fed
#include <iostream> #include <algorithm> #include <string> using namespace std; int n, i, s; string a[200001]; int main() { cin >> n; for (i = 0; i < n; i++) cin >> a[i]; sort(a, a + n); s = 1; for (i = 1; i < n; i++) { if (a[i] != a[i - 1]) s++; } cout << s << endl; return 0...
#include <bits/stdc++.h> using namespace std; int main() { int N; cin >> N; int Size = ceil(sqrt(N)); vector<string> table[Size]; int sum = 0; while (N-- > 0) { string S; cin >> S; int temp = 0; for (int a = 0; a < S.size(); a++) { temp += S[a] - 'a' + 1; temp *= 26...
791721c26f5304517168e82f1edba15e3bbf3186f26a7f54e8725217c52e5764
1b49e8b29e6d15f698bf87047e0dca4d064ffb4255cb90fbf6f844cbf5a8f28a
0.061359
cpp
1b49e8b29e6d15f698bf87047e0dca4d064ffb4255cb90fbf6f844cbf5a8f28a
7df8b647df7694522c8467a1156e3c4d669d3cbc2d22377bd22d7e30056a65b8
PIE_released_gem5_runtime
pie_77934
p01257
b6a5fba2d7c531f710707b7b40afb6df2618e229b7a4798a5f6e4de5d971d9c4
7df8b647df7694522c8467a1156e3c4d669d3cbc2d22377bd22d7e30056a65b8
0.160838
2.621272
2-4
dc4827eef55c2376c18934518ba49317f5257848089d231cd3a8465d92f0bdc9
#include <bits/stdc++.h> using namespace std; int N, M; int A[10]; int dp[100001]; bool Check(int k) { fill_n(dp, 100001, -1); dp[0] = 0; for (int i = 0; i < N; i++) { for (int j = 0; j <= M; j++) { if (dp[j] >= 0) { dp[j] = k; } else if (j < A[i] || dp[j - A[i]] <= 0) { ...
#include <bits/stdc++.h> using namespace std; int N, M; int A[10]; int dp[100001]; bool Check(int k) { memset(dp, -1, sizeof(int) * (M + 1)); dp[0] = 0; for (int i = 0; i < N; i++) { for (int j = 0; j <= M; j++) { if (dp[j] >= 0) { dp[j] = k; } else if (j < A[i] || dp[j - A[i]...
7bc1a971d61000287201ad4f8616a31b0f7bf597c61959f8f777b9d4b9c6911c
89af44362287011399c48b1424cc400e039830ce5c82662f68cad6d180df2383
0.10816
cpp
89af44362287011399c48b1424cc400e039830ce5c82662f68cad6d180df2383
a42fec86621bde2acbbf633e17d9451982ecafa934ae3215a0193be82268e9d8
PIE_released_gem5_runtime
pie_77966
p03866
1a97a3f55cae2fede5f4549bc190bf43b71b9f7c4739a92e2fd83ede525d08be
a42fec86621bde2acbbf633e17d9451982ecafa934ae3215a0193be82268e9d8
0.925197
8.553933
8+
69cf9ac447b44e47348504edacc87282e569072eee65434c95f6c5c441669d5d
#include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #define MAXN 1000 using namespace std; double sx, sy, tx, ty; struct Circle { double x, y, r; } C[MAXN + 5]; bool vis[MAXN + 5]; double G[MAXN + 5][MAXN + 5]; void Init() { for (int i = 0; i <= MAXN + 3; i++) for (int j =...
#include <bits/stdc++.h> using namespace std; #define rall(x) x.rbegin(), x.rend() #define all(x) x.begin(), x.end() #define fi first #define se second #define pb push_back using ll = long long; using ii = pair<int, int>; using di = pair<double, int>; using minHeap = priority_queue<di, vector<di>, greater<d...
0916f0a89d043d75e165dad8217cbf477a1cb52b4c66ffb034dfaa5b393e8132
08b24bbf41c6339ba597dc334d96732a09de63520e4f8e2c35838c94f5d7cfc7
0.019517
cpp
08b24bbf41c6339ba597dc334d96732a09de63520e4f8e2c35838c94f5d7cfc7
af513232ae77e113e137fe02d65ef61b256a9750d7ad2cc82aae324034a2f0a0
PIE_released_gem5_runtime
pie_787
p03863
26d3ed914b79c7670f54c7d48f73230a5aebb778837813ef532bf6314b211ba1
af513232ae77e113e137fe02d65ef61b256a9750d7ad2cc82aae324034a2f0a0
0.137284
7.03397
4-8
75609940890066588e6a0ff3619b66ecd775bafc0c0efa4912c03b91975885ef
#include <iostream> #include <cstdio> #include <algorithm> #include <vector> #include <stack> #include <queue> #include <map> #include <set> #include <string> #include <cstring> #define ll long long #define rep(x, n) for (ll(x) = 0; (x) < n; (x)++) #define rep1(x, n) for (ll(x) = 1; (x) <= n; (x)++) using ...
#include <cstdio> #include <cstring> #include <algorithm> using namespace std; char st[104014]; int main() { while (~scanf("%s", st)) { int len = strlen(st); if (st[0] != st[len - 1]) { if (len & 1) printf("First\n"); else printf("Second\n"); } else { if ...
5ed2140e850d54c7111944775f3d34b6e72dc6f23493a803b049550ff24211ec
f76855de3afa551213304cbfea7dde6359993a4073c8825555f73c70e273d843
0.019324
cpp
f76855de3afa551213304cbfea7dde6359993a4073c8825555f73c70e273d843
3102c348b7cca60113e9b4312f24eb2fc4b4d62830fccfef4b6e247f0904a598
PIE_released_gem5_runtime
pie_8113
p02801
1cd4a711970ad5f2c8e381ca4e96bd491bb94fbe8dd20c72c402a95739dd9d67
3102c348b7cca60113e9b4312f24eb2fc4b4d62830fccfef4b6e247f0904a598
0.103381
5.350016
4-8
00412002d26df3d5416369bfad873ca51978467529b63be5de48365d3c4d94b8
#include <iostream> using namespace std; int main() { char a; cin >> a; cout << (char)(a + 1); }
#include <stdio.h> int main() { char x; scanf("%c", &x); printf("%c", x + 1); return 0; }
d41d31530b3d3075ebee3cdd8789000bb12916e13b93df02c36877cc59277365
69667000a228ae0fa78f2ebff33119b7c26b31e99430ad5057927e1dabce745b
0.013655
cpp
69667000a228ae0fa78f2ebff33119b7c26b31e99430ad5057927e1dabce745b
75dd2bbe3661e9c9a96c5733a02028610aaa4334a137f8ba29299fc34f661ddf
PIE_released_gem5_runtime
pie_8141
p02856
786bf5a1b6984b4b19f8794f2368c90c8f9ef75f06301560c68d4fe76ff031ec
75dd2bbe3661e9c9a96c5733a02028610aaa4334a137f8ba29299fc34f661ddf
0.052874
3.872179
2-4
75cec85897bfb52c8ad61ac8f2a62d9f3ce5ae452efa4058b2ca1ecd10ab8367
#include <iostream> using namespace std; long long s, sum, n, a[1000001], b[1000001], cnt, ans; long long f(long long x, long long y) { if (x * y % 9 != 0) return x * y % 9; if (x == 0) return 0; return 9; } int main() { cin >> n; for (int i = 1; i <= n; ++i) { cin >> a[i] >> b[i]...
#include <stdio.h> int main() { long long t = 0, sum = 0, n, k[200010], s[200010]; scanf("%lld", &n); for (int i = 1; i <= n; i++) { scanf("%lld%lld", &k[i], &s[i]); sum += k[i] * s[i]; t += s[i]; } if (sum % 9 == 0) printf("%lld", sum / 9 + t - 2); else printf("%lld", sum / 9 +...
685bc8b1d62499eba777c71302126caff276b170cbea259c47c1dd157e556d76
b0f07f666c481efc84ae88dc520074df7ca7ace313cdbc41432d554ad1b7170c
0.020161
cpp
b0f07f666c481efc84ae88dc520074df7ca7ace313cdbc41432d554ad1b7170c
dd4f90e9c40cbce9c94c27230758eb9c873a72114b328a59de80ddf176d0553a
PIE_released_gem5_runtime
pie_8168
p03179
e406dbaa25e5b0316287c44e6f1456e04c33eef6eec4742065880e118b782f5e
dd4f90e9c40cbce9c94c27230758eb9c873a72114b328a59de80ddf176d0553a
0.114622
5.685467
4-8
49a31d10caa4ed8645317277cbe9214b0befd5d305290eaa7ce5cbb3e6367af8
#pragma GCC optimize("Ofast") #pragma GCC optimize("inline") #pragma comment(linker, "/STACK:1024000000,1024000000") #undef __STRICT_ANSI__ #include <cstdio> #include <cmath> #include <cstdlib> #include <string> #include <cstring> #include <cctype> #include <sstream> #include <cfloat> #include <complex> #i...
#pragma GCC optimize("Ofast") #include <cstdio> #define rint register int using namespace std; const int MOD = 1000000007; const int N = 3001; int n, cur; long long dp[2][N]; char ch; inline void adj(long long &x) { if (x >= MOD) x -= MOD; } int main() { scanf("%d\n", &n); dp[0][1] = 1LL; for ...
7ec0a07dc22fc24d290dda3b8627d8eb96d5290be0b2ce504c707c855a31303e
052ad6d1808fb51530b4e0fff3021fc12b958c96ed0b077c0d69704fd9539dee
0.005608
cpp
052ad6d1808fb51530b4e0fff3021fc12b958c96ed0b077c0d69704fd9539dee
f344da19535c0f1fe9c1b675c92e4c72844e35bec86b6e028e4cfdb60e952b4d
PIE_released_gem5_runtime
pie_8170
p02273
5ac9f4aa7885e704c840d8e9456742b3d83fb9e1b1fcba2fc02816338bda99d1
f344da19535c0f1fe9c1b675c92e4c72844e35bec86b6e028e4cfdb60e952b4d
0.011929
2.12701
2-4
01bfce39a038844531e61ad0dcc07bf3b90158a962cf12a099b4b9ac6a5030ab
#include <cstdio> #include <cstdlib> #include <cstring> #include <cmath> #include <climits> #include <iostream> #include <sstream> #include <utility> #include <map> #include <vector> #include <queue> #include <algorithm> #include <set> #include <stack> #define PI 3.14159265358 using namespace std; typed...
#include <stdio.h> #include <math.h> using namespace std; struct Point { double x, y; }; void koch(int n, Point a, Point b) { if (n == 0) return; Point s, t, u; double th = M_PI * 60.0 / 180.0; s.x = (2.0 * a.x + 1.0 * b.x) / 3.0; s.y = (2.0 * a.y + 1.0 * b.y) / 3.0; t.x = (1.0 * a.x + 2.0 *...
219c7f092ff98b0484f0c1b25abbbf3567f6e763564be8aa0bbd90116042d835
467dc819d8b1301c5cefcdb840c1a3b36cd9eae465eb4fab59251d8c0c634002
0.027254
cpp
467dc819d8b1301c5cefcdb840c1a3b36cd9eae465eb4fab59251d8c0c634002
f521e04cb24221763301ddd20c06c8753485913542cacbf8768618291ac3b8b0
PIE_released_gem5_runtime
pie_8181
p03268
d3f3b47166e3baa2a9beb78b26fa0345ac8254deb6a97d6e40f5f5f05ff4f2a2
f521e04cb24221763301ddd20c06c8753485913542cacbf8768618291ac3b8b0
0.069724
2.558332
2-4
9a810b0d67083fbeabdad18d40be98b71efd1f18b9bf1fac8a7cd0cf2fd1ce20
#include <iostream> #include <vector> using namespace std; typedef long long ll; ll solve(ll N, ll K) { ll ans = 0; vector<ll> cnt(200001); for (ll i = 1; i <= N; i++) { cnt[i % K]++; } for (ll b = 1; b <= N; b++) { ll m = (K - b) % K; if (m < 0) { m += K * (-m / K) + K; m...
#include <bits/stdc++.h> using namespace std; #define all(x) (x).begin(), (x).end() #define rep(i, n) for (int i = 0; i < (n); i++) #define endl "\n" typedef long long ll; typedef pair<int, int> pii; typedef pair<ll, ll> pll; template <typename T> ostream &operator<<(ostream &os, const vector<T> &vec) { os <<...
aff6ab2349e8ef90abe573017b4294de4accbdc0662c56b2f1a9c147a28ea8f3
d5c6a3f0e8507464103d14d139e8151cf0585d60b5a9a2cda4b6529ccd94ddab
0.104808
cpp
d5c6a3f0e8507464103d14d139e8151cf0585d60b5a9a2cda4b6529ccd94ddab
074bba713667cdc5a33550d5b90886967150c2b01773e617a969eaeccd033b51
PIE_released_gem5_runtime
pie_8184
p01924
b672db546cdc71f1ccafc43c9210ddedaa98340e4387955c194c31c7281c7986
074bba713667cdc5a33550d5b90886967150c2b01773e617a969eaeccd033b51
0.411302
3.924329
2-4
6dfcc270ff6f1f2827fed6531ee4fe38ba0d0528fa3471e1374907905b2565e8
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vll; #define pu push #define pb push_back #define mp make_pair #define eps 1e-7 #define INF 1000000000 #define sz(x) ((int)(x).size()) #define sq(x) ((x) * (x)) #define fi first #define sec second...
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll t, d, l; ll x[100005]; ll i; ll ans; bool solve() { cin >> t >> d >> l; if (t == 0) { return false; } for (i = 0; i < t; i++) { cin >> x[i]; } ll value = 0; ans = 0; for (i = 0; i < t - 1; i++) { if (x[i] ...
df2d046efaf2feaf388757fac4498962ca43d17aa2bf8a6f415e117109020414
7c68234f62b7ba00e486933ad143994e74e412f840439bcec73c96472a4b4bff
0.0044
cpp
7c68234f62b7ba00e486933ad143994e74e412f840439bcec73c96472a4b4bff
f18e6d269b60638a98494bcd2d4286cec7dc48dfc8a47d5b59cb50907e70deee
PIE_released_gem5_runtime
pie_9217
p02899
a96596b5febefd3d014a5cbfbece44e036bb98ab9729dede70126ec0ec26eb67
f18e6d269b60638a98494bcd2d4286cec7dc48dfc8a47d5b59cb50907e70deee
0.032845
7.464183
4-8
369606aa99dc548af5e1d2896135427173f851f58c2702a467e985d444bb1254
#include <iostream> #include <cstdio> #include <cstring> using namespace std; const int maxn = 1e5 + 10; int a[maxn]; int main() { memset(a, 0, sizeof(a)); int n, tmp; cin >> n; for (int i = 1; i <= n; i++) { cin >> tmp; a[tmp] = i; } for (int i = 1; i < n; i++) cout << a[i] <<...
#include <stdio.h> int nums[100000 + 1]; int main() { int num, n; scanf("%d", &n); for (int i = 0; i < n; i++) { scanf("%d", &num); nums[num] = i + 1; } for (int i = 1; i <= n; i++) printf("%d ", nums[i]); }
eba233bc1a282755b377c4b055cdef398644120af49aee282976b4c2077a4c12
948bb83d1e494fff5437d3953079a0cec4776f0f85201ec470eed9036b5afa4c
0.10429
cpp
948bb83d1e494fff5437d3953079a0cec4776f0f85201ec470eed9036b5afa4c
386c2502523f9bb34dddfe58e9b21a223be9c72b39a761a6b3b395f861d8cb74
PIE_released_gem5_runtime
pie_929
p03962
4ab5098866dbcbf039e80d8ff9ed46209e535a04ce93c3872b1dfbf183cd949c
386c2502523f9bb34dddfe58e9b21a223be9c72b39a761a6b3b395f861d8cb74
0.681875
6.538251
4-8
040d568c8400c5debc872c2704ac210ebf614d79d880a3d00ac585b56b265384
#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 <bits/stdc++.h> using namespace std; int main() { int a, b, c; cin >> a >> b >> c; int cnt = 0; if (a != b) cnt++; if (a != c) cnt++; if (b != c) cnt++; if (cnt != 0) cout << cnt; else cout << 1; }
c8505423df14e30483210a8242c8033b999cad01effd72cb96b76745b141e9e2
95fe5311bfd34306920c85be11abe0b4577e38af2ac7c604d3e091cabb2d859b
0.020193
cpp
95fe5311bfd34306920c85be11abe0b4577e38af2ac7c604d3e091cabb2d859b
4da8d67755ed9de37e262945222506708a626330b6dd1224b5edd5f5e9f1f2e4
PIE_released_gem5_runtime
pie_944
p03622
ece93be774a8460feb83973ab57686bba29cbe4d5fdc8bb26a053f1c61b48671
4da8d67755ed9de37e262945222506708a626330b6dd1224b5edd5f5e9f1f2e4
0.107048
5.301333
4-8
3573da91108144616f1255dd92c2894909e5e35f416d062b8a8a0eefc6491e41
#include <bits/stdc++.h> #define N 1000005 #define p 998244353 #define int long long using namespace std; inline void rd(int &x) { x = 0; char ch = 0; int w = 0; while (!isdigit(ch)) ch = getchar(), w |= ch == '-'; while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar(); x =...
#include <cstdio> typedef long long ll; #define ri register int #pragma GCC optimize(1) #pragma GCC optimize(2) #pragma GCC optimize(3) #pragma GCC optimize("Ofast") const int N = 1000005, mod = 998244353; int fac[N], inv[N]; inline int C(ri n, ri m) { return (ll)fac[n] * inv[m] % mod * inv[n - m] % mod; } ...
be7a38a2fc503abda76e0bea233bba7bdceca9be3716d089cc9d2acd6025738f
f2aa80e5df84a6430639cdea415d4be701f2550bd1f2007a0d71e0e718c5bd32
0.105638
cpp
f2aa80e5df84a6430639cdea415d4be701f2550bd1f2007a0d71e0e718c5bd32
e175c60763073ad8a2362c8b2877018196b8056e5f17317feb735ab1442f0b99
PIE_released_gem5_runtime
pie_9745
p03803
9dce74be206827953568a154da8d8233b2f940a4037ebbb6928b8cc3209c8583
e175c60763073ad8a2362c8b2877018196b8056e5f17317feb735ab1442f0b99
0.374307
3.543287
2-4
27a5029758e76dcd9fb1fe7c5d9a12fe59c96c96d73e333c575240da6623fce0
#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 10000...
#include <iostream> using namespace std; int main() { int a, b; cin >> a >> b; if (a == b) cout << "Draw" << endl; else if (a == 1) cout << "Alice" << endl; else if (b == 1) cout << "Bob" << endl; else if (a > b) cout << "Alice" << endl; else if (b > a) cout << "Bob" << e...
a5a062d5ec6ad15a618ee6d3405ac19e3f9e812a57dfe1ff280939ef01f371e7
ac0ce36014884ffa2dc1469fa29c2d782ad6103a571b34a5e99bc1eed1f510c4
0.010871
cpp
ac0ce36014884ffa2dc1469fa29c2d782ad6103a571b34a5e99bc1eed1f510c4
aed7a38f2b8d86de6517df18a218027bc1af6d56295c957d54665b2a51a501ec
PIE_released_gem5_runtime
pie_9820
p03212
7fa0b99639b873fa0b2a7b9cb57d673b8ed51349dda695cc585e47f7d37ea6b0
aed7a38f2b8d86de6517df18a218027bc1af6d56295c957d54665b2a51a501ec
0.160593
14.772324
8+
1f8e1066c0c89e2f1a3ceeae973914ce2920afccace91b3379d204d72e0e52d7
#include <stdio.h> #include <string.h> #include <algorithm> #include <iostream> #include <set> #include <queue> using namespace std; int n; int z; int sum[1100000]; void dfs(int a, int b, int c, int num, int fl) { if (num > 1e9) { return; } if (fl > 9) return; if (a && b && c) { ...
#include <cstdio> int N, count = 0; void dfs(long long, unsigned char); int main(void) { scanf("%d", &N); dfs(0, 0); printf("%d\n", count); return 0; } void dfs(long long nextNum, unsigned char flag357) { if (nextNum <= N) { if (flag357 == 07) count++; dfs(nextNum * 10 + 3, flag...
20b215ed172a25d5f83dc002a717b762a773d0085ad534fff5497e304aca27cd
647f67667348898ab9c88569732412bdd05834c50076e79c4a6491d7a06122e7
0.017182
cpp
647f67667348898ab9c88569732412bdd05834c50076e79c4a6491d7a06122e7
c26013e74bc7358d9c3c3b40351429b99cbc0125bf82026f3e891624a4b3a3e8
PIE_released_gem5_runtime
pie_9864
p04041
8c6ac221a6938f48799b8547bc7d53c0c08101c344970aba8369c8e450605515
c26013e74bc7358d9c3c3b40351429b99cbc0125bf82026f3e891624a4b3a3e8
0.047531
2.76635
2-4
e56b981bf10cee8ddb91952bbb753864cae0e40be3016216b9f77ead204d319c
#include <bits/stdc++.h> using namespace std; int m = 1000000007, n, x, y, z; unsigned long long f[41][131075], ne[131075][11], i, j, k; int main() { scanf("%d%d%d%d", &n, &x, &y, &z); y += x; z += y; for (i = 1; i <= 1 << z; i++) for (j = 1; j <= 10; j++) { ne[i][j] = 1; for (k ...
#include <cstdio> #include <cstring> using namespace std; const int mo = 1e9 + 7, MAXN = 42, MAXS = 1 << 17 | 1; int n, x, y, z; int f[MAXN][MAXS], g[MAXS][11]; inline void add(int &x, const int &y) { x += y; x >= mo ? x -= mo : 0; } int main() { scanf("%d%d%d%d", &n, &x, &y, &z); y += x, z += y; ...
ec9f5a52dda01c1fe422feb7246c831066c53767d7eaf6fb75c488e1d2ab57e7
67403526e7f5ef17342b1bd965f32b6d1c87e891d5fc98ba0bb72ad8999a3a0d
0.109629
cpp
67403526e7f5ef17342b1bd965f32b6d1c87e891d5fc98ba0bb72ad8999a3a0d
4bbd6dcf6b26c57afafebac64c53ca4d8e797c07a05e4c315679b21f6bd58a5e
PIE_released_gem5_runtime
pie_9889
p03665
f73e24707440f28f0a204c967e030e6e6dfc2ca937d8f2c8116238d3859055fb
4bbd6dcf6b26c57afafebac64c53ca4d8e797c07a05e4c315679b21f6bd58a5e
1.013373
9.243665
8+
3b61f01d451b944b0b8c734c1071a5d615061d1093ad1a8de0244990bea37b48
#include <bits/stdc++.h> using namespace std; #define EACH(i, a) for (auto &i : a) #define FOR(i, a, b) for (int i = (int)a; i < (int)b; ++i) #define RFOR(i, a, b) for (int i = (int)b - 1; i >= (int)a; --i) #define REP(i, n) FOR(i, 0, n) #define RREP(i, n) RFOR(i, 0, n) #define ALL(a) (a).begin(), (a).end() #de...
#include <bits/stdc++.h> using namespace std; using int64 = int_fast64_t; using PAIR = pair<int64, int64>; constexpr int INF = 1 << 30; constexpr int64 LINF = 1LL << 60; constexpr int MOD = 1e9 + 7; constexpr int MAX_N = 3e5 + 1; #define int int64 #define INIT ...