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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a52cdda6f27c79f5078fcf7f34ecfc284591f4826ba15c7d8c6948393c40b375 | 03af17349c9b8b565ea97099b4fc16a60809ae92adde8a833ae619519ef44983 | 0.105634 | cpp | 03af17349c9b8b565ea97099b4fc16a60809ae92adde8a833ae619519ef44983 | 8094061f3f7d71fb52ab69fa29baf1991bea3d2095f6713a944bed6c59ec60bc | PIE_released_gem5_runtime | pie_41916 | p03317 | 786cdcc69405e59a300b628f0faf45c990c278f01c3481bce95641367c778bec | 8094061f3f7d71fb52ab69fa29baf1991bea3d2095f6713a944bed6c59ec60bc | 0.693364 | 6.56382 | 4-8 | 454c727c31863a3fbf14391fe2a585735ec076d21697544ec28b750e8e4e2d45 | #include <iostream>
#include <bits/stdc++.h>
#define mod 998244353
typedef long long ll;
using namespace std;
void Fastio() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
ll fact[1000006], inv[1000006];
ll fp(ll base, ll exp)
{
if (exp == 0)
return 1;
ll ans = fp(base, exp / 2);
an... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1e5 + 5, mod = 1e9 + 7, inf = INT_MAX;
int main()
{
int n, m, c, x, ans = inf;
cin >> n >> m;
for (int i = 0; i < n; i++)
{
cin >> x;
if (x == 1)
c = i + 1;
}
for (int i = max(1, c - m + 1); i <= n; ... |
66f7450db1c80d873b435059861bf5f7ed49f16beaea4f8ec5932260da094699 | 7f56074d141abca3c6524dc5d722f9ad5c7186cee7235efad4813044db1ade3f | 0.010478 | cpp | 7f56074d141abca3c6524dc5d722f9ad5c7186cee7235efad4813044db1ade3f | 7d067b33f25b697a67a4153d942ca7f1545dd02c0103934bf32f348de2c578e3 | PIE_released_gem5_runtime | pie_41936 | p00841 | a2f46c5eb6eca3a289cda49488294032b6c96d8f4f92e6cf5e949063010165aa | 7d067b33f25b697a67a4153d942ca7f1545dd02c0103934bf32f348de2c578e3 | 0.025739 | 2.456473 | 2-4 | f9322150165d6bc44a015c823c44844e257bfa8a4f7339b05e322bacaacefdaf | #include <cmath>
#include <ctime>
#include <cstdio>
#include <cctype>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <sstream>
#include <algorithm>
#include <set>
#include <stack>
#include <queue>
#include <string>
#include <vector>
#include <map>
#define maxn 110
#define maxl 100000... | #include <stdio.h>
#include <string.h>
#define MAXN 10010
double v, e, f, b;
int dis[MAXN];
double dp[MAXN], time[MAXN];
int r, n;
void calc()
{
int i;
memset(time, 0, sizeof time);
for (i = 0; i <= dis[n] + 1; i++)
{
double tmp;
if (i >= r)
tmp = 1.0 / (v - e * (i - r));
else
... |
1c18468832524292157ae8f4f9eb0451f3d7dc6a1d0ce63a8ea18d3109222eb8 | adc6e34d68fabe3d95aaf5ba656a3c93ea81ca61f9cf5a02bb07568d8c70d0f4 | 0.072954 | cpp | adc6e34d68fabe3d95aaf5ba656a3c93ea81ca61f9cf5a02bb07568d8c70d0f4 | d9dd839e41ee107a0d027de8a56aa28aa8a95b21baa39ccd9122779eecd06554 | PIE_released_gem5_runtime | pie_41946 | p02611 | 34dbd32ad63077253437e5af8ae84236488718b670ec22e66124e14c92e346c9 | d9dd839e41ee107a0d027de8a56aa28aa8a95b21baa39ccd9122779eecd06554 | 0.149505 | 2.049307 | 2-4 | 2b87b449a0e4e21c29c74bf15b1ff14af016b3e22445aaa7ab5a63dfb72911c7 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); ++i)
#define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); --i)
#define REP(i, n) rep(i, 0, n)
#define REP2(i, n) rep2(i, 0, n)
#define all(hoge) (hoge).begin(), (hoge).end()
#define en '\n'
using l... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); ++i)
#define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); --i)
#define REP(i, n) rep(i, 0, n)
#define REP2(i, n) rep2(i, 0, n)
#define all(hoge) (hoge).begin(), (hoge).end()
#define en '\n'
using l... |
7471a1560fd289a123714449ef669cce77b6760f92b997e58a93dfc5de49dce3 | 70dc36f4524afd00ec731504d02271cdb07015722c8d53bbfa6c1391bb8bd1e9 | 0.05685 | cpp | 70dc36f4524afd00ec731504d02271cdb07015722c8d53bbfa6c1391bb8bd1e9 | 8a24d70a850c4dd3c7c145870a9325ec772863995682149e052c99cf393126f9 | PIE_released_gem5_runtime | pie_41998 | p02633 | a3de7fce0d95937247610c9af6e7c6952c8dbc3957f2b2af2020693a4c4f800d | 8a24d70a850c4dd3c7c145870a9325ec772863995682149e052c99cf393126f9 | 0.149188 | 2.624232 | 2-4 | 19aeb0f25155804b8825fa0211099e07a6325d34a19e4a63829fe5fe987f58e7 | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#include <fstream>
#include <chrono>
#include <random>
#inclu... | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <cmath>
#include <iomanip>
#include <stack>
#include <queue>
#include <numeric>
#include <map>
#include <unordered_map>
#include <set>
#include <fstream>
#include <chrono>
#include <random>
#inclu... |
1fd7ebac1c605ee9a4d423b677918bdf4eff20e4547c1e7c534dd3b04178aaab | e4a91f5d6bff623be898f0d16e0538bd2d227a85cd31cf58c8b6e90579543cdb | 0.010125 | cpp | e4a91f5d6bff623be898f0d16e0538bd2d227a85cd31cf58c8b6e90579543cdb | 83a564a13e3187e34da142724214b8b265583aa583653dc69c4e1151805ddf62 | PIE_released_gem5_runtime | pie_42087 | p02679 | 248e2a2d1a06abd5f2440966fa61621043ebfb82e8f5a22185b61ff3937346a1 | 83a564a13e3187e34da142724214b8b265583aa583653dc69c4e1151805ddf62 | 0.303789 | 30.002576 | 8+ | 247b0371611fa15e6ac733e30781162b187b6419b236b1e65cf5fdaa7151c15b | #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;
typedef unsigned long long ull;
typedef __int128 lll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#d... |
a355e575cb84cdf76519b82fd3703dfd5bd9a098cfc5fa78a20fd207c3223372 | f28959edc4659dce9924217c58f3b7ffd39d64a71f43b07410d08855334ffaad | 0.020827 | cpp | f28959edc4659dce9924217c58f3b7ffd39d64a71f43b07410d08855334ffaad | c2530054049a61651a8935bad29bd26f82904f048eeda7243f63e948c03b9e08 | PIE_released_gem5_runtime | pie_42159 | p00890 | e79bdb69fabbcd8923c3b46ec1e58d1326500f6b8f0f625ac319a592de63decf | c2530054049a61651a8935bad29bd26f82904f048eeda7243f63e948c03b9e08 | 0.089822 | 4.312797 | 4-8 | 6ef129e6352280c7506cab00a8dd7eea946560fe5afb32661243ff653a7f2575 | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF (1 << 28)
int N, M, C, u[2000], v[2000];
int g[128][128], dp[1024][128];
int main() {
for (;;) {
scanf("%d%d%d", &N, &M, &C);
if (N == 0)
return 0;... | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define INF (1 << 28)
int N, M, C, u[2000], v[2000];
int g[128][128], dp[2][128];
int main() {
for (;;) {
scanf("%d%d%d", &N, &M, &C);
if (N == 0)
return 0;
... |
467bf075b6c92871f9aecab74950b08ba880cce30b6a806049605e5fc5a28a61 | 60a0a82a6a0638628295fa9c40df660c6305711ac89edf7b1c6c26d14e5826a4 | 0.00822 | cpp | 60a0a82a6a0638628295fa9c40df660c6305711ac89edf7b1c6c26d14e5826a4 | 97286845c4190f0bb4be20d77c6822083b550fc4fe211bf1873c24d3053eec39 | PIE_released_gem5_runtime | pie_42163 | p02577 | df91cf986e842166d5b80f2394ea7d3390cca3b03b7d23d87cc3bc313950bb4e | 97286845c4190f0bb4be20d77c6822083b550fc4fe211bf1873c24d3053eec39 | 0.039528 | 4.808786 | 4-8 | 01069bb090bfcf1ede431df55c112d736ef15638a1ab9dee0d49d35e0fc9e6af | #include <iostream>
#include <algorithm>
using namespace std;
int main()
{
long long s = 0, i;
string x;
cin >> x;
for (i = 0; i < x.size(); i++)
{
s += (x[i] - '0');
s %= 9;
}
if (s % 9 == 0)
cout << "Yes";
else
cout << "No";
} | #include <stdio.h>
#include <string.h>
int main()
{
char s[1000000];
long long int i, j, p = 0, a, k;
scanf("%s", s);
a = strlen(s);
for (i = 0; i < a; i++)
{
p = p + (s[i] - '0');
p = p % 9;
}
if (p % 9 == 0)
printf("Yes\n");
else
printf("No\n");
return 0;
}
|
75a020c52e965493f6f12b122c60a0fd61796e4ca8b1dfb80eb65885d919670b | 26e4a10a845890bfcb793ff25f465b68c5b9af6979f5a862e49ff2dcbdd841fd | 0.001015 | cpp | 26e4a10a845890bfcb793ff25f465b68c5b9af6979f5a862e49ff2dcbdd841fd | 62809293b847c9cc623d2310db7bffc3e08be84ea591d58f83556f13a82ede6a | PIE_released_gem5_runtime | pie_4225 | p03715 | d2853b4d1d94b42045f9f17aea3bcde1510570ace66c40d677b40e958c20902d | 62809293b847c9cc623d2310db7bffc3e08be84ea591d58f83556f13a82ede6a | 0.003612 | 3.557677 | 2-4 | a8f59307bab04ce311316a919f829cc7847b83cb9b91d981ccdfe4e88c7807ed | #include <iostream>
#include <string>
#include <algorithm>
#include <iomanip>
#include <vector>
#include <map>
#include <cmath>
#include <queue>
#include <utility>
#include <functional>
#include <deque>
#include <cctype>
#include <stack>
#include <bitset>
using ll = long long;
typedef unsigned long long ... | #include <iostream>
#include <algorithm>
#include <cmath>
#include <map>
#include <vector>
#include <queue>
#include <functional>
#include <string>
#include <stack>
#include <set>
#include <sstream>
#include <iomanip>
#include <limits>
#include <cstring>
using namespace std;
using ll = long long;
typede... |
6218e83cc842e09438a51715e93ac52828013e6fcc93117dea7913b48e48983a | 45d72a66dc68a1fa3892b11a66db4e529664c74961735b11f3b9adfae242b5da | 0.107216 | cpp | 45d72a66dc68a1fa3892b11a66db4e529664c74961735b11f3b9adfae242b5da | 412cfa4814d81f20e1e2a9422f5099fced93896402ea750a364f7ed15ac727ce | PIE_released_gem5_runtime | pie_42279 | p02923 | fd023d49069573066641d074dfaf9d5c730334446fcd2d6be50687facd333a92 | 412cfa4814d81f20e1e2a9422f5099fced93896402ea750a364f7ed15ac727ce | 0.374914 | 3.496806 | 2-4 | d97f1953bffd51d40e3f67ea99d3c722a0ad0a0415499c04a7284005c88288e0 | #include <bits/stdc++.h>
using namespace std;
const int inf = 1e5 + 5;
typedef long long ll;
int n, m;
bool vis[100005];
vector<int> v[100005];
int main()
{
cin >> n;
int a[n + 1];
for (int i = 0; i < n; i++)
cin >> a[i];
int ans = 0;
int k = 0;
for (int i = 1; i < n; i++) {
if (a[i] ... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define leading zero str.erase(0, min(str.find_first_not_of('0'), str.size() - 1));
using namespace __gnu_pbds;
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef tree<ll, null_type... |
96f1b1e8126a8b9185a244caafafbc2df24b2a7269eb0724ade646ddfefe78e8 | 5383c8999796bcc5c893c22a3822b702d8fa4cdbb1bc2ed4f7cf2c79c4b26864 | 0.002662 | cpp | 5383c8999796bcc5c893c22a3822b702d8fa4cdbb1bc2ed4f7cf2c79c4b26864 | 330a5314135128b7d488f9c48e23bf3ccb47e0e6c2b7a9ce2976e36d5cc407f7 | PIE_released_gem5_runtime | pie_4230 | p03090 | 16df4303ee23f7542b61a29723ba390a325a2a06cc68ff29bbc809433805bb20 | 330a5314135128b7d488f9c48e23bf3ccb47e0e6c2b7a9ce2976e36d5cc407f7 | 0.01317 | 4.946558 | 4-8 | 61e679d0cc0bdc12e0a1b77e8b20b421d103885a748c603c384addaabb3daf2e | #include <cstdio>
#include <vector>
using namespace std;
int n;
int main()
{
scanf("%d", &n);
int x = (n & 1) ? n : (n + 1);
vector<pair<int, int>> edges;
for (int i = 1; i <= n; i++)
{
for (int j = i + 1; j <= n; j++)
{
if (i + j != x)
{
edges.push_back(make_pair(i,... | #include <cstdio>
int n, ans;
long long t, f[233];
char a[1200][2];
int main() {
scanf("%d", &n);
if (n & 1) {
for (int i = 1; i <= n; i++)
for (int j = i + 1; j <= n; j++)
if (i + j != n)
ans++;
printf("%d\n", ans);
for (int i = 1; i <= n; i++)
for (int j = i + 1;... |
db5b087803223f98a9bbf7ec783df0276c5d9095a169026e91b0566c8789971f | 10efea2ce5840a1ed7199d411c3cb0377e0449ac214be9a96ab42d5191380a16 | 0.045336 | cpp | 10efea2ce5840a1ed7199d411c3cb0377e0449ac214be9a96ab42d5191380a16 | 786e42fa23513a8f68c2c3f10ae2dc8c02ebc978f249d5c6e61ec300a3dab606 | PIE_released_gem5_runtime | pie_42301 | p03338 | 4cb2db77fbda1abc08f326c25d505eb9d1efa6a4c32c132da9d140bf214250b6 | 786e42fa23513a8f68c2c3f10ae2dc8c02ebc978f249d5c6e61ec300a3dab606 | 0.091055 | 2.008473 | 2-4 | 44f54a2b5d626e99e5f4238d62bd8a14a420bc8afdf4907f9d02215b1f14f3ce | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define rep(i, f, n) for (int i = (f); i < (int)(n); i++)
#define repe(i, f, n) for (int i = (f); i <= (int)(n); i++)
using namespace std;
using ll = long long;
using pint = pair<int, int>;
const int INF... | #include <algorithm>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#define rep(i, f, n) for (int i = (f); i < (int)(n); i++)
#define repe(i, f, n) for (int i = (f); i <= (int)(n); i++)
using namespace std;
using ll = long long;
using pint = pair<int, int>;
const int INF... |
dfa4b5e24f7746fc2f30c1afb26590a65554d36b5606c16eabda866f12aecaa7 | 5aa25c5fae9d69fa31b800a2ca375ecceb5559a0047aad20b6cd91d6714f1f9e | 0.015019 | cpp | 5aa25c5fae9d69fa31b800a2ca375ecceb5559a0047aad20b6cd91d6714f1f9e | 9404124915b6a28ef8e4a5f9bde643cb6de4de6deb3c67f99e5069b931801c2c | PIE_released_gem5_runtime | pie_42353 | p03994 | 7e2928cafd7811cf9f325ed8eac7b2be5c8c88ba073bf98ba27b8a587b4737e4 | 9404124915b6a28ef8e4a5f9bde643cb6de4de6deb3c67f99e5069b931801c2c | 0.088432 | 5.887897 | 4-8 | c21d267f930e544364c0d984630039e4f6e173decaaf8627cb7aac080948d034 | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long LL;
const int MAXN = 1e5;
char s[MAXN + 5], ans[MAXN + 5];
LL a[MAXN + 5], b[MAXN + 5];
bool q = 0;
LL sum = 0, k = 0;
int main() {
memset(s, 0, sizeof... | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <algorithm>
using namespace std;
char str[100005];
int num[100005];
int main()
{
int k, i, j, min, bei;
scanf("%s", str);
scanf("%d", &k);
int len = strlen(str);
for (i = 0; i < len; i++)
{
if (str[i] == 'a... |
2239bd6885dd55418a61db80d197638d468a602470408eed078d28f0b86bf04b | 1066ed02c9c4baecb27df088f6302684c7a73399678ea982459cec72ba07847f | 0.070523 | cpp | 1066ed02c9c4baecb27df088f6302684c7a73399678ea982459cec72ba07847f | 94848a38a715eb6590326309190cc928664e53a0dfb43b34ff38acf1632b7deb | PIE_released_gem5_runtime | pie_42357 | p03205 | 25538e89be48acbe291dab56e0a8d581e447c05ad1ae4429092d0d92cc071df2 | 94848a38a715eb6590326309190cc928664e53a0dfb43b34ff38acf1632b7deb | 0.172075 | 2.439994 | 2-4 | 3b667077874cf007f446553e4a4673f4c78fadbcb2dc55777ea32d4cd5bf9c4b | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 200100, MAXM = 1000100, INF = 0x3f3f3f3f;
struct Edge
{
int to, val, nxt;
inline Edge() {}
inline Edge(register int to, register int val, register int nxt)
: to(to), val(val), nxt(nxt) {}
};
Edge e[MAXM];
int head[MAXN], S, T, cnt = -1;... | #include <queue>
#include <cstdio>
#include <cctype>
const int N = 100007;
std::vector<int> e[N];
std::queue<int> q;
int vis[N], mat[N], tam[N];
int read() {
int x = 0, c = getchar();
while (isspace(c))
c = getchar();
while (isdigit(c))
(x *= 10) += c & 15, c = getchar();
return x;
}
int dfs(int ... |
04113450844b57620104d4e276480f9fe3c87b89a6eab879e50f4a6ab6608a61 | 909c551b3e20c1e465c1c5f7e731ef0f51a5add2bfc56b5307cc9df1b94ee83d | 0.0036 | cpp | 909c551b3e20c1e465c1c5f7e731ef0f51a5add2bfc56b5307cc9df1b94ee83d | dd233936502f04df3d78444c8c0fc86508e6426ea3800ad01824ec8358aec345 | PIE_released_gem5_runtime | pie_42379 | p02972 | 2348d467f51d649ac7fe954f96e096c34858e918ac2c7924158958396d20826d | dd233936502f04df3d78444c8c0fc86508e6426ea3800ad01824ec8358aec345 | 0.036134 | 10.036039 | 8+ | 025e9f2830d5595d0b57a8b47eecf03e7476410c30aad29ac42463e9c910e93b | #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>
#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 ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x... |
20d4e626abaef4bbb45b79c00c7de1aa446a2b915a7ec7e5d776698476bef215 | 462e8416a389e28b3fa0f548ebbcda979b42e05f75d6ab957b325dd9aaead6c4 | 0.092403 | cpp | 462e8416a389e28b3fa0f548ebbcda979b42e05f75d6ab957b325dd9aaead6c4 | d76a65cd5e5e4e55937c35e9e4b1a81b3d87c0660a4225d7e2413f662b3ba230 | PIE_released_gem5_runtime | pie_42433 | p03823 | 5a22d60561b42bb4f2b306db4bdf9cf6318130a52278ac40baf3a29c8c8e3ae0 | d76a65cd5e5e4e55937c35e9e4b1a81b3d87c0660a4225d7e2413f662b3ba230 | 0.22599 | 2.445714 | 2-4 | 044f9cc649cc865fa5e0241897ea910db9fdf362843a034cb02cd8e6e717f34d | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
const LL mod = 1000000007;
const LL LINF = 1... | #include <bits/stdc++.h>
using namespace std;
#define fs first
#define sc second
#define pb push_back
#define mp make_pair
#define eb emplace_back
#define ALL(A) A.begin(), A.end()
#define RALL(A) A.rbegin(), A.rend()
typedef long long LL;
typedef pair<LL, LL> P;
const LL mod = 1000000007;
const LL LINF = 1... |
789cae0ef4429d06a894b98fa37e1d96455138653ce76fea0fbbaca43f1bcb54 | 35c087b74c3350266eaecd29b801e0411e56f30dec9761378b63cbdba1cba42e | 0.021101 | cpp | 35c087b74c3350266eaecd29b801e0411e56f30dec9761378b63cbdba1cba42e | 50e9a54c86e5f1ee3c074ad67b50902c5ce2749a64067eab78e366349bb390c8 | PIE_released_gem5_runtime | pie_42441 | p01417 | e00ed1375e30c352afec830ed238b892df6fd6d894e08322f22c19374fe98451 | 50e9a54c86e5f1ee3c074ad67b50902c5ce2749a64067eab78e366349bb390c8 | 0.093693 | 4.440268 | 4-8 | 39443c22ff2b934bb2298728b407150b651ef34d5de8cfcdace465891470f258 | #include <cstdio>
#include <vector>
#include <cmath>
using namespace std;
struct node
{
double x, y, z;
};
struct node x[21];
vector<double> a;
int b[25], i, n, m, j;
double d[21][21], maxx = 0, ans;
double dis(int i, int j)
{
return
((x[i].x - x[j].x) * (x[i].x - x[j].x) + (x[i].y - x[j].y) * (... | #include <stdio.h>
#include <math.h>
#include <string.h>
#define MAX 25
double x[MAX], y[MAX], z[MAX], Dis[MAX][MAX], Max;
int N, M, ipos[MAX];
double dis(int n, int m)
{
return pow(x[n] - x[m], 2) + pow(y[n] - y[m], 2) + pow(z[n] - z[m], 2);
}
void dfs(int cur, int count, double ans)
{
double k = ans;
... |
a57fd98145cbd4839338ae92fd98575632b93077c056627a4e54d5d65be3e4c9 | ff323e9a23841d207c212aa83534b00a52e4490a77f59bff1c9a5d8652c567d3 | 0.010849 | cpp | ff323e9a23841d207c212aa83534b00a52e4490a77f59bff1c9a5d8652c567d3 | ec066b021210d2748c07f4a632697a8d6d6888fbc48841cd20ccefc3606b828d | PIE_released_gem5_runtime | pie_42505 | p03989 | 2039af19ec975b400bf2388d16178e64c9db617403c19506d4e3a9cf0bc52724 | ec066b021210d2748c07f4a632697a8d6d6888fbc48841cd20ccefc3606b828d | 0.06249 | 5.759752 | 4-8 | 292fa5bd176ef54c5fc4cee38129a24086e99d1a474eee59db6fe303164617db | #include <iostream>
#include <sstream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <cstring>
#include <bitset>
#include <functional>
#include <random>
#define REP(i, a, n) for (int i = a; i <= n; ++i)
#define PER(i, a, n... | #include <cstdio>
#define N 2002
#define p 924844033
inline int mod(int x) { return x < p ? x : x - p; }
int a[N], f[N][2], i, j, m, n, s, x;
int main()
{
scanf("%d%d", &n, &m), f[0][0] = 1;
for (i = 1; i <= m; i++)
{
for (j = 0; j <= n; f[j++][0] = 0)
f[j][1] = mod(f[j][0] + f[j][1]);
fo... |
e7943e398448ad36528c31e00cfcfc902a8078e29e13b0e0456b000a393b8032 | 36b8f38b509fe996885e60a2970600cb5160d4aa92924bd8650154c60e93b983 | 0.108315 | cpp | 36b8f38b509fe996885e60a2970600cb5160d4aa92924bd8650154c60e93b983 | 14b874e058d731614c51660b0b7b3f467e4e4b103328c88999799828deec145d | PIE_released_gem5_runtime | pie_4258 | p02883 | 51b9182bf511632c764d3161d1e7d0cf049a9082a14e66e352b55e3dce72ded5 | 14b874e058d731614c51660b0b7b3f467e4e4b103328c88999799828deec145d | 0.454705 | 4.197995 | 4-8 | e9427dbfb876a9fbd34cdff76e03af890dc4db380179717907bcfad1158fc5be | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define len(v) ll(v.size())
#define fi first
#define se second
template <class T>
void cout_vec(const vector<T> &vec) {
fo... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> P;
typedef pair<int, int> Pi;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define FOR(i, a, b) for (ll i = a; i < b; i++)
#define fi first
#define se second
#define endl "\n"
template <typename T... |
708286449751a1248d902c708d99781a0431454ee6d6287087d01ba1b19bb883 | 4e03a559836c5e2ae148c47bbc38ce246ee8cb9b59e2d62fdd6d85ddd4d6d1d4 | 0.106746 | cpp | 4e03a559836c5e2ae148c47bbc38ce246ee8cb9b59e2d62fdd6d85ddd4d6d1d4 | 3102dcc81a16d3f9ceeedd01ff6545c45f614fd27d2ad2f2368490b6550af869 | PIE_released_gem5_runtime | pie_4261 | p01919 | 0136224e069f478b6485e4e45434ad87b13f869d4be5c1aed9197b927a3841e8 | 3102dcc81a16d3f9ceeedd01ff6545c45f614fd27d2ad2f2368490b6550af869 | 0.315793 | 2.958352 | 2-4 | 9d9efa5722678a28c5089f1f7b5aedf4e82affb3f4b2c5b339de11b7c9af201b | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;
struct edge {
int to;
ll cost;
};
vector<edge> G[60000];
ll dp[60000];
priority_queue<pair<ll, int>, vector<pair<ll, int>>, greater<pair<ll, int>>> qu;
int a, b, c;
int nextv(int v) { return (a... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; ++i)
typedef long long ll;
struct Trio {
int to, v;
ll cost;
bool operator<(const Trio &right) const { return (cost > right.cost); }
};
int main(void) {
int n, m, v0, a, b, c;
cin >> n >> m;
vector<int> x(m), y... |
a2b4748f88d9d941c7c72db33dae19a253e56f92216375deb676b6b1597904a7 | de840d5f8d875cf609fd586d4c5ef098ccad175039176eea9ece377a3f616691 | 0.020083 | cpp | de840d5f8d875cf609fd586d4c5ef098ccad175039176eea9ece377a3f616691 | e20f7c03328afe37f9e0f53bc0368ba9b5ed35a73953e390b3bd2158a6ae8f76 | PIE_released_gem5_runtime | pie_4263 | p02560 | 0ae2e2f372f58030836d437ec0eaa70774486e4605bed77f9af90a3bfbda0d99 | e20f7c03328afe37f9e0f53bc0368ba9b5ed35a73953e390b3bd2158a6ae8f76 | 0.104556 | 5.206238 | 4-8 | 1f6314e844c4b598e42cb1d8edff4bd0a30f3eb48659f12d4654d94bce097c2f | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
ll floor_sum(ll n, ll m, ll a, ll b) {
ll ans = 0;
ans += (n - 1) * n * (a / m) / 2 + n * (b / m);
a %= m;
b %= m;
ll y = (a * n + b) / m;
if ... | #define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;
#include <stdio.h>
using namespace std;
ll floor_sum(ll n, ll m, ll a, ll b) {
ll ans = 0;
if (a >= m) {
ans += (n - 1) * n * (a / m) / 2;
a %= m;
}
if (b >= m) {
ans += n * (b / m... |
793c602c6708c6a8e739a754e8e1eda6351c1aa9eb4d87c31bd4a1b804b79664 | 8b9c313e6e99e18f6bcbb6b779cc1c1253cb1e847a99ed6ecd14b3091d738959 | 0.116697 | cpp | 8b9c313e6e99e18f6bcbb6b779cc1c1253cb1e847a99ed6ecd14b3091d738959 | f95f766306962bf583e06017fdea5de37c54d4fd31b66e0e95afda926d54a652 | PIE_released_gem5_runtime | pie_4269 | p02968 | 9230465f0a4771f664db0fffeec1e665cca95cd6192ffcd2cdade10a6857ccde | f95f766306962bf583e06017fdea5de37c54d4fd31b66e0e95afda926d54a652 | 0.465263 | 3.986915 | 2-4 | 2f4c91f120a8933cde899049b979035172c97bb0972a055788275adfa214c1bb |
#include <vector>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int N = 700;
int n, mod, Nf, Ng;
vector<pair<int, int> > Epr;
int Ef[N + 3][N + 3];
int main() {
scanf("%d%d", &n, &mod);
Nf = 2 * n - 1;
Ng = 2 * n - 1;
for (int i = 0; i < 2 * n; i++) {
wh... |
#include <vector>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
const int N = 250;
#define fir first
#define sec second
int n, mod;
struct MNUM {
int num;
MNUM() {}
MNUM(int x) : num(x) {}
MNUM operator+(const MNUM &B) const & { return (1ll * ... |
7dd33c71897df8ed7a3d0a1f6da6911181ade7bd660eff0b6426d61d6d8f9984 | 0966792914b35c6464d0f21a93732d37dc131a8ee8896c82ab0601cacefb5059 | 0.110393 | cpp | 0966792914b35c6464d0f21a93732d37dc131a8ee8896c82ab0601cacefb5059 | 06729ebdf67620329b56a7e28532de2cd0af2ead18bc5eb83fd284f141b8c670 | PIE_released_gem5_runtime | pie_43029 | p03476 | be891ad6bc925c982bb4fe39676f6e6ba71eacd47a3720a66489ceb5da9251d1 | 06729ebdf67620329b56a7e28532de2cd0af2ead18bc5eb83fd284f141b8c670 | 0.240524 | 2.178787 | 2-4 | 023580de5ea7bd8e3d3dc99d474425162bdf536a636ed3ab553f43413391c253 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) FOR(i, 0, n)
#define REPR(i, n) for (int i = n - 1; i >= 0; i--)
#define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i)
#define ALL(obj) (obj).begin(), (obj).end()
#define ALLR(obj) (obj).rbegin(), (obj).rend... | #include <bits/stdc++.h>
using namespace std;
const int SZ = 1e5 + 1;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int q;
cin >> q;
vector<int> l(q), r(q);
int high = 0;
for (int i = 0; i < q; i++) {
cin >> l[i] >> r[i];
high = max(high, r[i]);
}
bitset<SZ> prime;
prim... |
ae0cd63d658011829723979c948619ef1ef43be3414238a421e635ae69b57bda | 72ee6550959ae1f559d6875f65ecd7dd7bcea2571ed498c71fb65f80462ea08e | 0.106331 | cpp | 72ee6550959ae1f559d6875f65ecd7dd7bcea2571ed498c71fb65f80462ea08e | 433a32d9f6f39f857dd362b895bad7ed5bec386ddfad7c1a7954498af155f7c7 | PIE_released_gem5_runtime | pie_4306 | p02240 | 013d0d78102b83301000e432278faf16d2c8b1237c2a1e5058d7732592e05c7d | 433a32d9f6f39f857dd362b895bad7ed5bec386ddfad7c1a7954498af155f7c7 | 0.369669 | 3.476578 | 2-4 | e2de00a9ffd8937ee273bea7d4d24d213dcbec222d1dbf7af48445a6f3fccede | #include <iostream>
#include <vector>
#define N_MAX 100000
using namespace std;
vector<int> sns[N_MAX];
int *group;
int g = 0;
void dfs(int s) {
if (group[s] != 0)
return;
group[s] = g;
int len = sns[s].size();
for (int i = 0; i < len; i++) {
dfs(sns[s][i]);
}
}
int main() {
int n, m, ... | #include <iostream>
#include <vector>
#define eol '\n'
using namespace std;
vector<vector<int> > list;
vector<int> group;
void bfs(int v, int g) {
if (group[v] != 0) {
return;
}
group[v] = g;
for (int i = 0; i < list[v].size(); i++) {
bfs(list[v][i], g);
}
}
int main() {
ios_base::sync_... |
d61c88a52d93b5141577e74e62a9c7e615c74f872b5d7e3c94a5491cb537fb2e | 611d4cb91ab9ef1ec7210c0aa149719430540eaa53d2e4f81c50b666955a52e4 | 0.019629 | cpp | 611d4cb91ab9ef1ec7210c0aa149719430540eaa53d2e4f81c50b666955a52e4 | 8ffe4fc2e33e52c50c8519560302546965b6a6da494f3ac2cfabf59194958766 | PIE_released_gem5_runtime | pie_4311 | p03659 | 4a003b9943230c93e30a46f54958c9829c19728ae8f297f0d7dc18fb132cc6eb | 8ffe4fc2e33e52c50c8519560302546965b6a6da494f3ac2cfabf59194958766 | 0.273188 | 13.917624 | 8+ | 8cba088ba6a7a89bfc4e1fa233f3aab96f1dedf148ef9bfe8350a237af31553e | #include <iostream>
#include <iomanip>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <cctype>
#define szxb 200010
using namespace std;
int n;
long long a[szxb];
int... | #include <cstdio>
#include <cstdlib>
int n;
long long int sum, min, x;
int a[200000];
int main()
{
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d", &a[i]);
for (int i = 0; i < n; i++)
sum += a[i];
min = labs(sum - 2 * a[0]);
for (int i = 0; i < n - 1; i++)
{
x += a[i];
... |
823c2f32766a2904f8bd512b6a48e142ffe3b68be33d67f469655657bd8b4c1c | d8563c8672891aeccdac69498cd98ea847f6599959e8298946474d7a26884c68 | 0.041296 | cpp | d8563c8672891aeccdac69498cd98ea847f6599959e8298946474d7a26884c68 | 6a9466d5951ec4911c40e9972817b8b853813942d40554bfaa4240a2f6aa17d8 | PIE_released_gem5_runtime | pie_43139 | p02787 | c7cc52e501268028d1dd39881af1fda44cd16a39a971fd97522c26fb81af1573 | 6a9466d5951ec4911c40e9972817b8b853813942d40554bfaa4240a2f6aa17d8 | 0.099812 | 2.416996 | 2-4 | 0718178b93b5436a6a12d3026d8629635bc6a4a24c8a33675374d83e783338cf | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <tuple>
#include <cmath>
#include <iomanip>
#include <map>
#include <cstring>
#define ll long long
#define rep(i, n) for (int i = 0; i < (n); i++)
#define repp(i, n) for (... | #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <queue>
#include <stack>
#include <tuple>
#include <cmath>
#include <iomanip>
#include <map>
#include <cstring>
#include <functional>
#include <cctype>
#include <locale>
#define ll long long
#define rep(... |
b34360cf43621a3fbce764d1876db3d130123dcae4ce717c8b9840a66ee6930e | bf051b8c504c53e623748b00af999a76b02867b731876a48caa595a011c6ff08 | 0.103197 | cpp | bf051b8c504c53e623748b00af999a76b02867b731876a48caa595a011c6ff08 | c838d7e4bf28ba4b6046c0bd3c68c82c7df949a9350701c85f5def2d979e0d4c | PIE_released_gem5_runtime | pie_4322 | p02536 | a19b6f1cfcdde5bd14ef7fa2e424b502eb9150073d7816c755c30a6be5d0a332 | c838d7e4bf28ba4b6046c0bd3c68c82c7df949a9350701c85f5def2d979e0d4c | 0.35935 | 3.482189 | 2-4 | b8d44ea434d52575b6e1f018997e663f26670bcfd9629491b6ee8bc7b8e09d02 | #include <bits/stdc++.h>
using namespace std;
vector<int> adj[100005];
vector<bool> vis(100005, false);
void dfs(int i) {
if (!vis[i]) {
vis[i] = true;
for (auto v : adj[i])
dfs(v);
}
}
void solve() {
int n, m;
cin >> n >> m;
for (int i = 0; i < m; i++) {
int x, y;
cin >> x... | #include <bits/stdc++.h>
typedef long long ll;
using namespace std;
vector<int> par;
int find(int n) {
if (par[n] == n)
return n;
else
return par[n] = find(par[n]);
}
void uni(int a, int b) {
a = find(a);
b = find(b);
if (a != b)
par[b] = a;
}
int main() {
ios_base::sync_with_stdio(f... |
3c6168f3c34b2cb205f9a4ed05bc2fba175169b53b906bcb0875711aaf367e24 | cd1e16f7c9fcccebe6b3bc86f30e3b83edc25a1b95e93ffd7db46ad4e57980c7 | 0.011414 | cpp | cd1e16f7c9fcccebe6b3bc86f30e3b83edc25a1b95e93ffd7db46ad4e57980c7 | 2a3ea894f9a17ff2e60a14566e11eb42bb24cb598fadabc23f2d234080441986 | PIE_released_gem5_runtime | pie_43374 | p03579 | 53f8c52feed900c35a4ac26a393cd6d00cadcfc88d303cd6e2f7bd7edd8fd16c | 2a3ea894f9a17ff2e60a14566e11eb42bb24cb598fadabc23f2d234080441986 | 0.035119 | 3.076939 | 2-4 | f4ecf46d69531496f8a8ffd2a5b27ce52586a0de44cf24c3586055c3cf858ec1 | #include <cstdio>
#include <queue>
#include <cstring>
#include <algorithm>
using namespace std;
namespace io {
#define gc() \
(iS == iT ? (iT = (iS = ibuff) + fread(ibuff, 1, SIZ, stdin), (iS == iT ? EOF : *iS++)) : *iS++)
co... | #include <stdio.h>
#define For(i, a, b) for (register long long i = a; i <= b; i++)
#define Rof(i, a, b) for (register long long i = a; i >= b; i--)
#define int long long
using namespace std;
const int maxn = 1e5 + 10;
int fa[maxn << 1];
inline int findfa(int i) { return i == fa[i] ? i : fa[i] = findfa(fa[i]); }... |
c36aa6faa210be60d939037a2727538a8f9cb8223a06e76048f904d69cc3ac6b | 00a4702a5f599d4c19c9b6c14265b80e8a050b6a4a8c6b58cecfddba2ca99007 | 0.107153 | cpp | 00a4702a5f599d4c19c9b6c14265b80e8a050b6a4a8c6b58cecfddba2ca99007 | e353f401b104ededa37030ca0e7bca97a172e09ab820fe2846ebbe126a6df667 | PIE_released_gem5_runtime | pie_434 | p03694 | 7c7c0b8988726067f295c8683fc3e85e8ced802dc29977604a205446b707ec47 | e353f401b104ededa37030ca0e7bca97a172e09ab820fe2846ebbe126a6df667 | 0.994612 | 9.282166 | 8+ | 03a5d8791b806193c2f761f53cef72785bd4b305d5396e8b7875030addd74c61 | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
#include <string>
#include <iomanip>
#include <bits/stdc++.h>
#define INF 999999999
using namespace std;
#define ll long long
#define boost \
ios_base::sync_with_stdio... | #include <iostream>
#include <cmath>
#include <math.h>
#include <algorithm>
#include <fstream>
#include <queue>
using namespace std;
void ll() {
std::ios_base::sync_with_stdio(0);
cin.tie(NULL);
cout.tie(0);
}
int main()
{
ll();
vector<int> v;
int arr[1000];
int n, d = 0, t = 0;
cin >> ... |
8ae614491bd23a9c083e9582d3b9a76c7ff5d2bb65c95fa1559a5602fa2fa257 | 7bd0b14c1be43856601753d47dc9ceea2abf771a62da0e4b92fa2537b87158c0 | 0.019613 | cpp | 7bd0b14c1be43856601753d47dc9ceea2abf771a62da0e4b92fa2537b87158c0 | 9d07037735ea3e988163478dd39690a7fc2e3652c7effbfcbe71c1478c0326d9 | PIE_released_gem5_runtime | pie_43417 | p02975 | 0d1b626461af8293c99b2a02f16ee2e0ccc651ad74ff9797fe531c954b798343 | 9d07037735ea3e988163478dd39690a7fc2e3652c7effbfcbe71c1478c0326d9 | 0.337039 | 17.184869 | 8+ | 6ee6db3a1f5251e0aac842bbaa9084b52adfabf281d09b4457f3d4f7a887a531 |
#include <bits/stdc++.h>
using namespace std;
#define PB push_back
#define MP make_pair
#define EB emplace_back
#define f first
#define s second
#define FOR(i, a, b) for (int i = a; i < (b); ++i)
#define RFOR(i, b, a) for (int i = b - 1; i >= a; --i)
#define FILL(a, b) memset(a, b, sizeof a)
#define ALL(a) ... | #include <cstdio>
#include <algorithm>
using namespace std;
int a[100001];
int main() {
int n;
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
int ql = 1;
for (int i = 1; i <= n; i++)
if (a[i])
ql = 0;
if (ql) {
printf("Yes\n");
return 0;
}
if (n % ... |
17c4b118d54b42309d667b6759baeb02f0cd5df696bade8461777a0feab923e3 | 85f5b41187a45a01946042807f622328513bd02454529ca1123bae894580c7af | 0.030016 | cpp | 85f5b41187a45a01946042807f622328513bd02454529ca1123bae894580c7af | 6388f1564f5ab8bb608d929d0dac1e4a33c0361ccb4d4e654bba12c50a3ea9a3 | PIE_released_gem5_runtime | pie_43441 | p02703 | 354481ca6c2bbb99ae1ef7dd4ec161d4bebc4ec0c8b1d63d557912761191a7ee | 6388f1564f5ab8bb608d929d0dac1e4a33c0361ccb4d4e654bba12c50a3ea9a3 | 0.065877 | 2.194761 | 2-4 | 2186b1bce391d11f41a83ee29e10154fd92e2e3168bb0d59f22eaac08fe094cd | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
const ll inf = 5e18;
struct E {
ll to, co, ti;
};
struct P {
ll ti, id, re;
};
bool operator<(const P &a, const P &b) { return a.ti > b.ti;... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
const ll inf = 1LL << 61;
typedef pair<ll, pll> ppll;
int main() {
ll n, m, s;
cin >> n >> m >> s;
vector<map<ll, pll>> G(n);
for (l... |
9d1ddb9a8f34ec37b5608825569eb95e89279208833f196be63852586d0aa510 | 6d07a80453996a0db9ec6ca783c67300a43cebb025345cfee148f127209a4cec | 0.020623 | cpp | 6d07a80453996a0db9ec6ca783c67300a43cebb025345cfee148f127209a4cec | b5d57731fd21bf4b25310eb2f049f30e6a46aa37e2293304d8acad8f118aaba0 | PIE_released_gem5_runtime | pie_43454 | p02914 | 44278ed97a28eb73e9e9b362d2f2ef63c6801b75d22eb323d08e319cc9274bfd | b5d57731fd21bf4b25310eb2f049f30e6a46aa37e2293304d8acad8f118aaba0 | 0.756186 | 36.666648 | 8+ | fa4841ca0d5b976f1dbd81dae50158dbe1f092d15c963cc2c76f70e4951ede85 | #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>
#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 ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x... |
59cc43df7fa070ab6e79a3261cc86c3b76400e0a91b39bb338976c50af819c18 | 3f97e75f0f27fad303dc87705a65371863007b0e0317bb017bf701b065c4acc9 | 0.040955 | cpp | 3f97e75f0f27fad303dc87705a65371863007b0e0317bb017bf701b065c4acc9 | b1d8a4246c76658fffceefe935af6c251bb506b88fb452190b8bb96b2ccf8fd7 | PIE_released_gem5_runtime | pie_4348 | p03127 | d1c391e8a3c03f08dfc2e10df17d309a3662afa54749cc0d0a93809ccc43cb75 | b1d8a4246c76658fffceefe935af6c251bb506b88fb452190b8bb96b2ccf8fd7 | 0.38679 | 9.444217 | 8+ | a371d28730ce5b652288512fc1ab6f8b432edcb050b3da63b121596da074b0cc | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll GCD(ll a, ll b)
{
if (b == 0)
return a;
else
return GCD(b, a % b);
}
int main(int argc, char **argv)
{
int n;
vector<ll> v(1000000);
cin >> n;
for (int i = 0; i < n; ++i)
cin >> v[i];
int ans{0};
for (int i ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll GCD(ll a, ll b)
{
if (b == 0)
return a;
else
return GCD(b, a % b);
}
int main(int argc, char **argv)
{
ll n;
cin >> n;
vector<ll> v(n);
for (int i = 0; i < n; ++i)
cin >> v[i];
ll res{0};
for (int i = 0; i < n... |
e98f77fcc07cb9a60d92ad2a259b676b4d4a1e75e679457c2af347095bbf6b29 | 74379c7222f0a271da0fc2ecc364c339619a99c3aca9fc8f0eff2c4b0fd5e258 | 0.034571 | cpp | 74379c7222f0a271da0fc2ecc364c339619a99c3aca9fc8f0eff2c4b0fd5e258 | fef33cf053a9df843fbf5f3a7dc08fc5f17e8b15fc0cc53b0ee70dd7dab1937b | PIE_released_gem5_runtime | pie_436 | p03748 | cc1122cfa9b3085f22e27c70aef80be70382eebc940dd0e6f57129723ffacc7f | fef33cf053a9df843fbf5f3a7dc08fc5f17e8b15fc0cc53b0ee70dd7dab1937b | 0.113804 | 3.29192 | 2-4 | 13f260c4924fc24716a1fd0fa7378791a4838ce79f3888fe284d081c4e5412e8 |
#include <iostream>
#include <iomanip>
#include <stack>
#include <queue>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <string>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#define ll unsigned long long
#defin... | #include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
#define gt getchar()
#define ll long long
#define File(s) freopen(s ".in", "r", stdin), freopen(s ".out", "w", stdout)
typedef std::pair<int, int> P;
#define mk std::make_pair
#define fr first
#define sc second
inline int in()
{
i... |
3ab2e1eeea0445bf15cf663d3749905528a0e24295de19a7231bbdbe497e0ca8 | e85aed2e3090810b06705b3327a63ef0a36229b5d89f9a357c138fc4fc96d761 | 0.104854 | cpp | e85aed2e3090810b06705b3327a63ef0a36229b5d89f9a357c138fc4fc96d761 | 069c3e0a130d329956c6de07fd6899c100a1afbeab3c3c52093a68dd162dd356 | PIE_released_gem5_runtime | pie_4368 | p04011 | 6c4e8c86d9696a6b755babbc7d8602516e2664c4acd4245c95f3c1a10d4bd500 | 069c3e0a130d329956c6de07fd6899c100a1afbeab3c3c52093a68dd162dd356 | 0.371323 | 3.541331 | 2-4 | 06076dfffc3e709dd096e16bc23fb305a4624761e8e84bac3ad540fb562364d8 |
#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()
{
long long int n, k, x, y, rem, coast;
cin >> n >> k >> x >> y;
if (n > k)
{
rem = n - k;
coast = (k * x) + (rem * y);
}
else if (n == k)
coast = k * x;
else
coast = n * x;
cout << coast << endl;
return 0;
} |
d5baeaa7bc942b3bbcc643dc683a74f8ad50ecb684bc4e2c35cc2b247eaf65e6 | e89f33c8b859a5b1a3dce496edd7a8f6b46c19217f1167b820dd24b84a13ea5d | 0.043885 | cpp | e89f33c8b859a5b1a3dce496edd7a8f6b46c19217f1167b820dd24b84a13ea5d | 597416b0aea4ab80d55bda14b7bc8e9965fb39835f8bb1e1bac1d11fa34384ab | PIE_released_gem5_runtime | pie_43755 | p03133 | 2d2f253c0fa7a6ca9348a96386b94cfbfebbbebc6cdcf773d865a90813324be6 | 597416b0aea4ab80d55bda14b7bc8e9965fb39835f8bb1e1bac1d11fa34384ab | 0.159357 | 3.631272 | 2-4 | 06e2baeda031cad806a5b57e24e7c1c8513448d9602a6b7cad228d4642bb7b52 | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (ll(i) = (0); (i) < (n); ++i)
#define REV(i, n) for (ll(i) = (n)-1; (i) >= 0; --i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v, n) ... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (ll(i) = (0); (i) < (n); ++i)
#define REV(i, n) for (ll(i) = (n)-1; (i) >= 0; --i)
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define SHOW1d(v, n) ... |
4175971763a1118d8e400f3c33fe3d35e0a8de24ca12cf2a6a6fd471a83b71da | 98b203bd578a18b4041588a5c4126671ac73f0b72b9a2c1484b052446d84f2dc | 0.042183 | cpp | 98b203bd578a18b4041588a5c4126671ac73f0b72b9a2c1484b052446d84f2dc | eab8f17ed23840d4e945f53871b7f71cf40d9893188b2db61837122ee7c6aa7f | PIE_released_gem5_runtime | pie_44028 | p03650 | 67c6a1e7d9fcb220d7facc7204cc89af0353b801ebcaba4028e8461daaa80abb | eab8f17ed23840d4e945f53871b7f71cf40d9893188b2db61837122ee7c6aa7f | 0.516254 | 12.238512 | 8+ | 055eddef9ebcc57a089430cb6c29c6aea84d72db688bb50f084c632d3177f87c | #include <bits/stdc++.h>
using namespace std;
int n, p[200005], in[200005], ta, tb;
set<int> s[200005];
vector<int> x, y;
bool v[200005];
void go(int a) {
v[a] = 1;
for (int i = 0;; i++)
if (s[a].find(i) == s[a].end()) {
s[p[a]].insert(i);
break;
}
in[p[a]]--;
if (in[p[a]] == 0)... | #include <bits/stdc++.h>
using namespace std;
const int N = 2050000;
inline int rd(register int x = 0, register char ch = getchar(), register int f = 0) {
for (; !isdigit(ch); ch = getchar())
f = ch == '-';
for (; isdigit(ch); ch = getchar())
x = (x << 1) + (x << 3) + ch - 48;
return f ? -x : x;
}
... |
d5df3cf74e32f1d3d0e578bf7be0aacd57d20386dcac077d02d825f0abdcaeed | 24f9b97a6314f4c749159181eb735aac5835b95b90bb6af9023e9a0f950354af | 0.001044 | cpp | 24f9b97a6314f4c749159181eb735aac5835b95b90bb6af9023e9a0f950354af | 3b09c814a802b0e53c3ca3d5ea77cfa469c34a3563d75d55b2a0b3cd38a7c851 | PIE_released_gem5_runtime | pie_44084 | p03946 | d9e29121c48129cefae3c688b92ee122ac7a76161daf688c93ad67e95f643458 | 3b09c814a802b0e53c3ca3d5ea77cfa469c34a3563d75d55b2a0b3cd38a7c851 | 0.007357 | 7.043362 | 4-8 | 3309a02dd3d662c10a0e6e6fb8d2a7604ee89940bb5264f2e447c610edf0bc6a | #include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;
const int N = 1e5 + 5;
int ls[N], s[N], pos[N], num[N], n, a[N];
int sum[N * 4];
void add(int now, int l, int r, int pos) {
sum[now]++;
if (l == r)
return;
int mid = l + r >> 1;
... | #include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
int n, t;
int money = 0, counts = 0;
cin >> n >> t;
int a[100001], b[100001];
for (int i = 0; i < n; ++i)
cin >> a[i];
for (int i = 0; i < n - 1; ++i)
b[i] = a[i + 1] - a[i];
int maxium[10000... |
2e6ad3c197ff605f709a1e22a0b17738ce782c79940e169d06fe6df3a84f2f4d | 70fd0cbe70c2f49317131fb7fd880708b6205b0926b342675e23d30ad5a58f66 | 0.020131 | cpp | 70fd0cbe70c2f49317131fb7fd880708b6205b0926b342675e23d30ad5a58f66 | 8fa1b8c5b4f28475b8cb15b3d3d214cdfcdc2200cd2da9b07728b833f90dd3ea | PIE_released_gem5_runtime | pie_4410 | p00448 | 64c2e8efa31162ce88caed9a2e53bff643bcdbeead6626e98931139464e27e93 | 8fa1b8c5b4f28475b8cb15b3d3d214cdfcdc2200cd2da9b07728b833f90dd3ea | 1.062478 | 52.777676 | 8+ | 35cf7bd0f27ddbe3d9b110cad70e3c9e2041180f07e04e684cbe0bd9c519a489 | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
int n, m, ans;
int a[11][100001];
void dfs(int x)
{
int i, j;
if (x >= n)
return;
else
{
int sum = 0;
for (i = 0; i < m; i++)
{
int count = 0;
for (j = 0; j < n; j++)
{
if (... | #include <cstdio>
#include <algorithm>
using namespace std;
int M[15][10005];
int r, c, ans;
void Dfs(int now) {
if (now == r) {
int res = 0;
for (int i = 0; i < c; i++) {
int on = 0;
for (int j = 0; j < r; j++)
if (M[j][i] == 1)
on++;
res += max(on, r - on);
... |
caa3d4f2813ca49bb40ce4d71595c20fdca6405d03657335d52b2f7f43fab774 | 3ff5e6cf86972ead8477135b82a8670f2b9d1273e3bbb45e9c4f2db6006af192 | 0.113199 | cpp | 3ff5e6cf86972ead8477135b82a8670f2b9d1273e3bbb45e9c4f2db6006af192 | 9b6c54c076d44e5161315df4839d96dc8f05f1e3c33a071a658120ab20574c19 | PIE_released_gem5_runtime | pie_44120 | p03178 | 8c0d5c064ad1f82d5e1249ffa0a840b1f66f5a98fe9e7a12e685db658891bf90 | 9b6c54c076d44e5161315df4839d96dc8f05f1e3c33a071a658120ab20574c19 | 1.464194 | 12.934668 | 8+ | 80381241174ecbf9b9fbaa8d96fbf85c661c2d3d242293105c52d19b93946bb9 | #include <bits/stdc++.h>
using namespace std;
int ans = -1, d, mod = 1e9 + 7, dp[10004][3][101];
string x;
int solve(int i, int t, int cnt) {
if (i == x.size() - 1) {
if (cnt)
return 0;
return 1;
}
if (dp[i][t][cnt] != -1)
return dp[i][t][cnt];
int v = 0;
for (int j = 0; j < 10; j+... |
#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
typedef long long ll;
#define pb push_back
const int MOD = 1e9 + 7;
const int N = 1e5;
int dp[N][100];
void add(int &x, int y) {
x += y;
if (x > MOD)
x -= MOD;
}
int main() {
ios_ba... |
52419a12f085be8a14c804d51cb097eb3db158ec0587e0b10fbab5bb99e042e3 | ebec31eb8f5607ebadcba89ac6b879088f956faa034124c6d15a7df659c31e9e | 0.020106 | cpp | ebec31eb8f5607ebadcba89ac6b879088f956faa034124c6d15a7df659c31e9e | 69502309f1b8d336a745da550c736177ebf0df454e9aeafc7f3ed35d775539fc | PIE_released_gem5_runtime | pie_44550 | p03607 | 349d115226bf5927975c5492e9a493f42c8945810c8ce67a799f0d54f4b26fa0 | 69502309f1b8d336a745da550c736177ebf0df454e9aeafc7f3ed35d775539fc | 0.147522 | 7.337307 | 4-8 | 8f19d795ccce75e1a2cc8f116ffe37d02ac4982064f28e9a1777669fcaa76588 | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>
using namespace std;
int main()
{
int n;
int a[100005];
scanf("%d", &n);
memset(a, 0, sizeof(a));
for (int i = 0; i < n; i++)
{
scanf("%d", &a[i]);
}
sort(a, a + n);
int x = 0;
for (int j = 0; j < n;)... | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
long long a[1000010];
int main()
{
int n, x = 1, ans = 0;
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%lld", &a[i]);
sort(a, a + n);
for (int i = 1; i < n; i++)
{
if (a[i] == a[i - 1])
x = (... |
6da8d2e740f22f41fa198875ee6d6ebd24819348f99d8146200ed4d0b8126a0f | 51d30cd8e8ec677020debcce8173a4b601a93c9f5538003eadc98f8f073c7f84 | 0.011103 | cpp | 51d30cd8e8ec677020debcce8173a4b601a93c9f5538003eadc98f8f073c7f84 | f4a321c26443ab2b4e67666ffb33b81b199bc0a01fc3c3c54779ab6c3e6941f9 | PIE_released_gem5_runtime | pie_45207 | p02911 | 496c966f7c8da89caa6b38c41a2176141a879dff964e0d7208900392a53bb068 | f4a321c26443ab2b4e67666ffb33b81b199bc0a01fc3c3c54779ab6c3e6941f9 | 0.278448 | 25.078694 | 8+ | 7b312b28a137351b2432c493ce802057caf4aa2c406a36d8b2b40f6453e36e28 | #include <stdio.h>
#include <iostream>
#include <math.h>
#include <algorithm>
using namespace std;
int main()
{
int N;
long long K, Q;
long long a[500005] = {0};
cin >> N;
cin >> K;
cin >> Q;
for (int i = 1; i <= N; i++)
{
a[i] += K;
a[i] -= Q;
}
for (int i = 1; i <= Q; i++)
... | #include <stdio.h>
int main()
{
long long int n, k, q;
long long int p;
long long int a[100005];
scanf("%lld%lld%lld", &n, &k, &q);
for (int i = 1; i <= n; i++)
a[i] = k;
for (int i = 1; i <= q; i++)
{
scanf("%lld", &p);
a[p]++;
}
for (int i = 1; i <= n; i++)
{
a[i] -=... |
e32cc74c6c4d4e29933fc643b1079380ddebf5f6aa7ce8026b6742ed9fe3376c | aea2486d839d3fac0875a8bc6d61fb3e5290d9999a479df3d740549361825c9d | 0.00019 | cpp | aea2486d839d3fac0875a8bc6d61fb3e5290d9999a479df3d740549361825c9d | 90b8ad3a0672dac6b26104923cb47bd82ca534505be5991b505ce08c72ba8394 | PIE_released_gem5_runtime | pie_45313 | p00494 | 43da8ca23c5606f3f10d3010acab55bd65e7c806f653bf1bedbc21f1984e2985 | 90b8ad3a0672dac6b26104923cb47bd82ca534505be5991b505ce08c72ba8394 | 0.001217 | 6.413874 | 4-8 | 5f2f3c5ffe63f3da36c15a14b1d070af2b470eac4bd3c1ca0cf6620bedcc3088 | #include <cstdio>
#include <cstring>
#include <string>
#include <algorithm>
using namespace std;
char x[1000005];
int a = 0, b = 0, c = 0, d = 0, e, f, i, j, k, maxi = 0;
int main() {
fill(x, x + 1000005, 'A');
scanf("%s", x);
int leng = strlen(x);
while (1) {
if (a == leng) {
break;
}... | #include <stdio.h>
#include <string.h>
char s[1000005];
int min(int a, int b) { return a < b ? a : b; }
int max(int a, int b) { return a > b ? a : b; }
int main() {
scanf("%s", &s);
int n = strlen(s), beg = 0, ret = 0;
while (beg < n)
{
if (s[beg] != 'J') {
beg++;
continue;
}
i... |
33740efec946e44c532268efac8fe7c186c5adbeee5a40956f619bb7d4f1e566 | 3fb513af6e903ec276fcc5386c9f331763de18bc09c1bdf801935ecda7a51cf5 | 0.006549 | cpp | 3fb513af6e903ec276fcc5386c9f331763de18bc09c1bdf801935ecda7a51cf5 | 8f728803af57c0956569d5f0b866e0cc045c78356cbb2fbf92d8c0064e49f592 | PIE_released_gem5_runtime | pie_45319 | p04028 | 25947dc37d7b4445f22b44cde7bb31c27ddbb353675782a5d1e06265f5276757 | 8f728803af57c0956569d5f0b866e0cc045c78356cbb2fbf92d8c0064e49f592 | 0.042588 | 6.502938 | 4-8 | ae0e8c4edc60865bd1657709159a6d7d73f08ba4b416ac7feaa19e0d9d472704 | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 5005;
const int mod = 1e9 + 7;
void add(int &x, int y) {
x += y;
x %= mod;
}
int dp[N], f[N];
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int n;
string s;
cin >> n >> s;
dp[0] = ... | #include <cstdio>
#include <cstring>
const long long mod = 1e9 + 7;
long long matmod(long long val, long long k) {
long long ret = 1ll;
for (; k; k >>= 1) {
if (k & 1)
ret = (val * ret) % mod;
val = (val * val) % mod;
}
return ret;
}
void add(long long &des, long long sor) {
des += sor;... |
8cc7164a00e8bccac8ff66cf44b8ac5f513600cbbe4d44f478aecb885be405ee | fba9020aec44b3eff6139f41edc4e74f5f78504ba5ce0ad451c2c8f95a19706d | 0.086886 | cpp | fba9020aec44b3eff6139f41edc4e74f5f78504ba5ce0ad451c2c8f95a19706d | bdc2d355e55440ea09ba52fcaf538c383c38ad67bf2edac0ed6af99c1626ba33 | PIE_released_gem5_runtime | pie_45322 | p03419 | cc820812c0a3d5bbc3e85ea98638762769b4942f57f7395af3159c04ea9aca8f | bdc2d355e55440ea09ba52fcaf538c383c38ad67bf2edac0ed6af99c1626ba33 | 0.79784 | 9.18263 | 8+ | d9341f52f8e07065f3102321f184300753ec0877393d8d77403227aeca9a0ec1 | #include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <random>
#include <queue>
#include <stack>
#include <bitset>
#include <cassert>
#define int long long
#define double long double
#define rep(i, n) for (int i = 0; i < n; i++... | #include <iostream>
using namespace std;
long long n, m;
int main() {
cin >> n >> m;
cout << abs(n - 2) * abs(m - 2);
} |
b11844a03bb607a0c4dc9f99d51fcda001e6d70a5b55a8a65f56fa2f4cc98916 | d6d8ee15c6a7c364e38e74442e5b3b378bf20e35dd59520f96573632333e7e8e | 0.051572 | cpp | d6d8ee15c6a7c364e38e74442e5b3b378bf20e35dd59520f96573632333e7e8e | 15fb7a525c47b1a29ab773daf4e1b09c5f0f5943c6e93d73503e2c5505f2e45a | PIE_released_gem5_runtime | pie_45324 | p03530 | d80fc8ae3145463e8681a33af15115be287d2d522a3230587512498ea0ff130e | 15fb7a525c47b1a29ab773daf4e1b09c5f0f5943c6e93d73503e2c5505f2e45a | 0.651349 | 12.62995 | 8+ | dac084e58ecf5366270ce18836d06e326ee5d70adcfa891d72642ddbe7742762 | #include <bits/stdc++.h>
using namespace std;
typedef long long lint;
typedef long double llf;
typedef pair<int, int> pi;
const int MAXN = 41;
const int mod = 1e9 + 7;
#define sz(v) ((int)v.size())
int n, m, px, py;
char str[MAXN][MAXN];
int sum[MAXN][MAXN];
int dp[MAXN][MAXN][MAXN][MAXN];
bool has(int sx, ... | #include <bits/stdc++.h>
#define F(i, a, b) for (int i = (a); i <= (b); ++i)
#define D(i, a, b) for (int i = (a); i >= (b); --i)
#define y1 yy1
using namespace std;
const int N = 50, inf = 1e9;
char a[N][N];
int s[N][N];
int dp[N][N][N][N];
inline void cmin(int &x, int y) { x = x < y ? x : y; }
inline int qsi... |
2b54b48baacfcd5af3eef27b68f01a27ba6d8dd1b4ab72f64160b89b3051492f | 193d9d7ca7cfa4fd26587ced82622717178dabbc5797b61cbcb9372e3464d835 | 0.096462 | cpp | 193d9d7ca7cfa4fd26587ced82622717178dabbc5797b61cbcb9372e3464d835 | f11ff195debb8a874b3aeeca68523b057ec9e00e7f3e2e5dd072f233c1f4bf40 | PIE_released_gem5_runtime | pie_45327 | p03185 | ba887308bc8850039c8633709b0ce36dbf0f8ccb1d6555b188413bb9b50fb538 | f11ff195debb8a874b3aeeca68523b057ec9e00e7f3e2e5dd072f233c1f4bf40 | 0.264155 | 2.738424 | 2-4 | afa4d124c4527137571b52a9152bccfd862be52d2b012f64d872950483854431 | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <queue>
#include <stack>
using namespace std;
#define MOD 1000000007
#define LINF (1LL << 60)
#define EPS (1e-10)
typedef long long Int;
typedef pair<Int,... | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <string>
#include <queue>
#include <stack>
using namespace std;
#define MOD 1000000007
#define MOD2 998244353
#define INF ((1 << 30) - 1)
#define LINF (1... |
5ad394169dae4275a09ede7c312ceed333606ee24395bd5f4414973f1c80eb30 | d494f8823d2648a0ace522504321890cefd9de06fdf04bbb69a825a88fff8d07 | 0.019611 | cpp | d494f8823d2648a0ace522504321890cefd9de06fdf04bbb69a825a88fff8d07 | 5826bcdf90ab9ec6b3a279c0041f02a1502e8249358ef57b30cb2e564b6df609 | PIE_released_gem5_runtime | pie_45350 | p02958 | 54cf308f8ac218a6df4aad6e615942d746a5a065afc0fde48a29620aec577a5e | 5826bcdf90ab9ec6b3a279c0041f02a1502e8249358ef57b30cb2e564b6df609 | 0.19206 | 9.79358 | 8+ | 3d636636ede56556604cbb59eb3ed3ba6785f0176be01eb3332b40e1d4e91be2 | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
ll n, a[100000 + 9], b[100000 + 9] = {0}, i, j, f = 0, c = 0;
cin >> n;
for (i = 0; i < n; i++)
{
cin >> a[i];
b[i] = a[i];
}
sort(a, a + n);
for (i = 0; i < n; i++)
{
if (a[i] != b[i])
{
... | #include <stdio.h>
int main()
{
int i, j, a[60], b[60], n, flag;
scanf("%d", &n);
for (i = 0; i < n; i++)
{
scanf("%d", &a[i]);
}
for (i = 0, j = 1; i < n; i++, j++)
{
b[i] = j;
}
for (i = 0, flag = 0; i < n; i++)
{
if (a[i] != b[i])
flag++;
}
if (flag <= 2)
... |
f4a37f2abefaa14119bfe6d9c0e0aaca4ba09ea49fafd30875894184a748af83 | 723501f0ddf2897c8c8182c2719e2b9885107ecdcc3e96fa3ead03442d75119c | 0.108248 | cpp | 723501f0ddf2897c8c8182c2719e2b9885107ecdcc3e96fa3ead03442d75119c | 430cbc44f0368f0eba2aa907281f307a287598e011bc3e9a1f320fa6e5468cdb | PIE_released_gem5_runtime | pie_4554 | p02659 | 6e7009c838ae8332b290a916800efb97dd50e8b8a4aac9b96e15bb3670464d9a | 430cbc44f0368f0eba2aa907281f307a287598e011bc3e9a1f320fa6e5468cdb | 0.690504 | 6.378893 | 4-8 | 10cc74f729c39a6a600e43e477fbfa3b2e3f0af6db871b3c610656caae3cf656 | #include <cstdio>
#include <cstring>
#include <cmath>
#include <utility>
#include <iostream>
#include <functional>
#include <bitset>
#include <algorithm>
#include <vector>
#include <forward_list>
#include <set>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <numeric>
#include... | #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <utility>
#include <tuple>
#include <cstdint>
#include <cstdio>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <deque>
#include <unordered_map>
#include <unordered_set>
#include <bitset>
#incl... |
3b9777e99594aa2ebe04793724d86f80cbb7eca51604b0c7e9feb3051e40ee58 | d3cb491e7f347169d3deac564704aa37a2604c6e814b9d293495eb94cae606f9 | 0.113264 | cpp | d3cb491e7f347169d3deac564704aa37a2604c6e814b9d293495eb94cae606f9 | 8944c1b9e3a2635a60596222244a696c8fa33e28e1fcd268b67ef42d6f5e5160 | PIE_released_gem5_runtime | pie_45552 | p00200 | e443c911da68ffb53f03ca301272afd341ca49530fdae53443674a153e9ed7d2 | 8944c1b9e3a2635a60596222244a696c8fa33e28e1fcd268b67ef42d6f5e5160 | 0.996597 | 8.798878 | 8+ | 2e144c3e190a2e68d93b0ac22e149b8c45f6ac703887f726e4d8cbeb80fe4e78 | #include <iostream>
#include <string>
#include <algorithm>
#include <list>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <numeric>
#include <vector>
#include <cstdio>
#include <climits>
#include <cfloat>
#include <cstring>
#define foreach(t, p, tit) for (t::iterator tit = p.begi... | #include <iostream>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <map>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(n) rep(i, n)
const int MAXN = 301, MAXM = 101;
const int INF = 100... |
a6b802f76709ea38ee88e61a011acfb27a35e14f9cfa5fe625b784daef179eea | 2792c6165c2868c178fdb18fe97e4e898414e261cf38d1f351aea99d3f81c342 | 0.055812 | cpp | 2792c6165c2868c178fdb18fe97e4e898414e261cf38d1f351aea99d3f81c342 | 07e3cb1838623667fc87c4f835a287336b56df3f5bc4ce5c3c589b3c44b2339f | PIE_released_gem5_runtime | pie_45579 | p02551 | 96c83b4b6e85fcf84519b1fa1c16dab92fbefce36cbd64d9b7f0ed69320ca32a | 07e3cb1838623667fc87c4f835a287336b56df3f5bc4ce5c3c589b3c44b2339f | 0.229597 | 4.113744 | 4-8 | 34027b78fe9b00486acb1cafc992a852cf0abe15a8d80becaf73ecfa18a3785c | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 2e5 + 5;
int minTA[maxn], minPA[maxn];
int minTB[maxn], minPB[maxn];
int lowbit(int x) { return x & -x; }
void modify(int x, int c, int n, int minn[]) {
while (x <= n) {
minn[x] = min(minn[x], c);
x += lowbit(x);
}... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
const int maxn = 2e5 + 5;
int l[maxn], h[maxn];
int main()
{
ios::sync_with_stdio(false);
ll n, q;
cin >> n >> q;
ll ans = (n - 2) * (n - 2), maxl = n, maxh = n;
for (int i = 2; i <= n; i++) {
l[i] = n;
h[i] = n;
}
whi... |
4e6e0b23239e276ad3783d767f974938086f08c5a528963b1de40ce054799ae9 | 22536a5c10cd9cc18d4043ba52fb66ecf60222e918c14f88e8dbcab8c7d8ee10 | 0.272965 | cpp | 22536a5c10cd9cc18d4043ba52fb66ecf60222e918c14f88e8dbcab8c7d8ee10 | 22b91962513fa0b79f260219def6dba1cd62f257510f2723d27ed94f9d0cd4f9 | PIE_released_gem5_runtime | pie_45583 | p03306 | 3d33d702acd663e2479d7d3862440e888e56084310b5e5bb9f63a2673c39c82f | 22b91962513fa0b79f260219def6dba1cd62f257510f2723d27ed94f9d0cd4f9 | 0.556119 | 2.037326 | 2-4 | 01b2fb03cc55d70677361490a7b0ba6036a54350dfa59e64459f864cd0c95322 |
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <vector>
#include <queue>
using namespace std;
const int MAXN = 1e5;
int n_pnt, n_edg;
struct NODE {
int p, val;
NODE() {}
NODE(int a, int b) {
p = a;
val = b;
}
};
struct QUEUE {
int u, p;
long long... | #include <iostream>
#include <cstdio>
#include <cstring>
#include <climits>
#include <algorithm>
#include <cmath>
#include <queue>
using namespace std;
#define MAXN 100000
#define MAXM 100000
#define INF 1000000000000000
struct node
{
int next, to;
long long w;
} e[MAXM * 2 + 5];
struct Qr
{
int... |
767d8e52209205b6888c09e17f9a2e805168503703a44941d70f4145c0a80191 | 5a6d6d9aed7743f554044884e41a439d23639f33e2e879527876cefb5009221d | 0.005861 | cpp | 5a6d6d9aed7743f554044884e41a439d23639f33e2e879527876cefb5009221d | 20ec3ef60041f7ce6aae4c61ef31f47f2a91021e41fb588cea708eacd78e23c9 | PIE_released_gem5_runtime | pie_45597 | p00211 | 326cc7b68a35723448d4d127fa62c220e26130d5683cba9a036428c256ff06e6 | 20ec3ef60041f7ce6aae4c61ef31f47f2a91021e41fb588cea708eacd78e23c9 | 0.030835 | 5.260824 | 4-8 | 9b9924ec78050956570bb2261e61dfb0a637a0df1fc4858bab698915e970ffa1 | #include <iostream>
#include <algorithm>
using namespace std;
long long d[10], v[10];
void compute(int n) {
for (int i = 2; i <= min(d[n], v[n]); i++) {
if (d[n] % i == 0 || v[n] % i == 0) {
while (d[n] % i == 0 && v[n] % i == 0) {
d[n] /= i;
v[n] /= i;
}
}
}
}
int main... | #include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
#define MAX 10
typedef long long ll;
ll d[MAX], v[MAX];
ll gcd(ll a, ll b) { return __gcd(a, b); }
ll lcm(ll a, ll b) { return a * b / gcd(a, b); }
int main() {
int n;
while (scanf("%d", &n), n) {
for (int i = 0; i < n; i++... |
a10b71cff9ff3522c0e1b403716a9d3b2b143ff423264fdb642b4e9fb24c628d | 550b3f7f9cc82d2e7eaa21e8ba4e81b75fc29cb2ebf3c75070643655791c58a2 | 0.024189 | cpp | 550b3f7f9cc82d2e7eaa21e8ba4e81b75fc29cb2ebf3c75070643655791c58a2 | 357c498f49f4adfa344b768e83e33a95ca2af10e4caeb729ec9a36e9098d190d | PIE_released_gem5_runtime | pie_45614 | p03733 | ee6e91b94676356b3795ba07cd318497d8a7804864b514dcb155f751177ac8ce | 357c498f49f4adfa344b768e83e33a95ca2af10e4caeb729ec9a36e9098d190d | 0.107868 | 4.459474 | 4-8 | 44f7f3144105b39f6d506e7e9a607af2beb65d5379fad1325d8778d1c1ce74d9 | #include <iostream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <map>
#include <cmath>
#include <cstdlib>
using namespace std;
const int M = 200005;
long long int n, m, flag, sum;
int a[M];
int main()
{
cin >> n >> m;
cin >> a[1];
sum = 0;
for (int i = ... | #include <stdio.h>
int main()
{
int a[200005];
int b[200005];
int n, i, t;
scanf("%d %d", &n, &t);
for (i = 1; i <= n; i++)
{
scanf("%d", &a[i]);
b[i] = a[i] + t;
}
for (i = 1; i <= n - 1; i++)
{
if (b[i] > a[i + 1])
{
a[i + 1] = b[i];
}
}
int sum = 0;
... |
cbc5485ad7210bdb9f9f7c9ea5c6e2c5f93d735bb0c891b1ad8339b02463ca02 | 2d55bc57b65a707d54643471311c20a1e55114cf2c9b1ce22eac2102e77d0a33 | 0.005992 | cpp | 2d55bc57b65a707d54643471311c20a1e55114cf2c9b1ce22eac2102e77d0a33 | 586a5231b4a89bcbc23d087b26e911582cdb6c64ecfb1b7ec894920457647d19 | PIE_released_gem5_runtime | pie_45660 | p02624 | 8bb133ec1d0a8bc50feb9adc32d5ae68c7df30003569f0cba25a2b36c19ccc91 | 586a5231b4a89bcbc23d087b26e911582cdb6c64ecfb1b7ec894920457647d19 | 0.021607 | 3.605733 | 2-4 | 869ace340384f624607c403d3769ee332bbf9dae9402ea31275047f9903b68ae | #include <stdio.h>
#define LL long long
LL ans, b;
int n, prime[2000], not_prime[10010], tot;
void linear_shaker(int x) {
int i, j;
for (i = 2; i <= x; i++) {
if (!not_prime[i])
prime[++tot] = i;
for (j = 1; prime[j] * i <= x; j++) {
not_prime[prime[j] * i] = 1;
if (i % prime[j] ... | #include <stdio.h>
#define LL long long
LL ans;
int main() {
int n, i, m, a, b;
scanf("%d", &n);
for (i = 1; i <= n; i++) {
m = n / i;
a = i, b = a + (m - 1) * i;
ans += (LL)(a + b) * m / 2;
}
printf("%lld\n", ans);
return 0;
} |
fbbff6fe6680d748f244baaee668a972f80447f544199411422c9d8470d0f905 | d438c4ebe47b0feb4f998d71c7b545b06789d527e0280a395172e57de4672b97 | 0.006999 | cpp | d438c4ebe47b0feb4f998d71c7b545b06789d527e0280a395172e57de4672b97 | a36ee8c31d929c8dbf18f797eb611f4972062b1dc984aa5c4c747de7266dd4a4 | PIE_released_gem5_runtime | pie_45697 | p02345 | 3c41582f4b82c023ff3c3a54e83f6e2ca2f9e427cbf932449b1562e5cebb3e80 | a36ee8c31d929c8dbf18f797eb611f4972062b1dc984aa5c4c747de7266dd4a4 | 0.31602 | 45.150606 | 8+ | 5afc16b31179e9dc23f001924cbfd6e54212495c59a8b1d57945aa7afff51e7d | #include <cstdio>
#include <vector>
#include <map>
#include <climits>
#include <algorithm>
using namespace std;
typedef pair<int, int> Pt;
#define MAX 1000001
#define fr first
#define sc second
int n, dat[MAX * 2 - 1];
void update(int i, int x) {
i += n - 1;
dat[i] = x;
while (i > 0) {
i = (i -... |
#include <cstdio>
#include <algorithm>
#include <climits>
using namespace std;
#define MAX (1 << 17)
const int INF = INT_MAX;
int n, seg[MAX * 2 - 1];
void update(int i, int x) {
i += n - 1;
seg[i] = x;
while (i > 0) {
i = (i - 1) / 2;
seg[i] = min(seg[i * 2 + 1], seg[i * 2 + 2]);
}
}
int... |
579791004a9fc4e8bdbdf565946d233ded95e7bd06e8420b4933b1ad5c163c90 | 636eb27d0eaf0f87cea68b59a6a15846622e3aa9e8965efa615d33e2ca8e866c | 0.017383 | cpp | 636eb27d0eaf0f87cea68b59a6a15846622e3aa9e8965efa615d33e2ca8e866c | 6b809a6379c7794a3cbeec683ceabb043b7fde132d042f40189db8c702abec1f | PIE_released_gem5_runtime | pie_4577 | p03069 | 19009e2d89b88a8b34c1c5204ea73143cc9c7b52a0bf187847f5b9a8b28e3a8d | 6b809a6379c7794a3cbeec683ceabb043b7fde132d042f40189db8c702abec1f | 0.059816 | 3.441058 | 2-4 | 0fade352c1bec2b9e311f3a2874ea5447518e1ceb7831878b0ef66c8faf11ef7 | #include <bits/stdc++.h>
using namespace std;
const int c = 300000;
int main() {
int n, b[c] = {}, w[c] = {}, ans = c;
string s;
cin >> n >> s;
for (int i = 0; i < n; i++) {
int flag = 0, flag1 = 0;
if (s[i] == '#')
flag++;
b[i + 1] = b[i] + flag;
if (s[n - i - 1] == '.')
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int n, w = 0, b = 0;
string s;
cin >> n >> s;
for (int i = 0; i < n; i++) {
if (s[i] == '.')
w++;
}
int ans = w;
for (int i = 0; i < n; i++) {
if (s[i] == '#')
b++;
else
w--;
ans = min(ans, b + w);
}... |
39a3b286a63793a1b292a4fdfc0d7b57a0cf45dcdd1b7ef34ce83cd5e3df4a71 | 7e95152fb720b68fb0e2110f53980b141416a35bad3d51a36189c742e0d80515 | 0.094093 | cpp | 7e95152fb720b68fb0e2110f53980b141416a35bad3d51a36189c742e0d80515 | 645df5d61aeba7a6a18e6d6502741937dded5dc2862fb844b2b1c17995dbab7e | PIE_released_gem5_runtime | pie_4579 | p01696 | 36efb025a7b77e167d04b0d7cac84ea4813e9ed7152426ea67409bd97d721bab | 645df5d61aeba7a6a18e6d6502741937dded5dc2862fb844b2b1c17995dbab7e | 0.227836 | 2.421398 | 2-4 | 76e81793578a35bb8ebffdd93e0bb79e57576362c35dec276132f4197c20bff7 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define each(itr, c) for (__typeof(c.begin()) itr = c.begin(); itr != c.end(); ++itr)
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define pb push_back
#define fi first
#d... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int(i) = 0; (i) < (int)(n); ++(i))
#define each(itr, c) for (__typeof(c.begin()) itr = c.begin(); itr != c.end(); ++itr)
#define all(x) (x).begin(), (x).end()
#define mp make_pair
#define pb push_back
#define fi first
#d... |
899b7065d3c4e1c6eaed716231e97c9bfb1e46e1885d70a6055b611267edcbdc | 1a343cf241447f27b5267de019b927b4b6ec8c6505383aa5b640cdbda3305e3f | 0.118216 | cpp | 1a343cf241447f27b5267de019b927b4b6ec8c6505383aa5b640cdbda3305e3f | a3eee9a15a292d22a42c97ac1d91346c6bbb0e8af4b9df94629e278d95ee8537 | PIE_released_gem5_runtime | pie_45945 | p03558 | 60656097addabdd7308660bf996b6dda71847ad2e01ccf1f94e6f6439af7d503 | a3eee9a15a292d22a42c97ac1d91346c6bbb0e8af4b9df94629e278d95ee8537 | 0.778002 | 6.581201 | 4-8 | 035f892bc8021843d1ca8c073f2469fd0190f089fdea559416dc58dd4ae86a38 | #include <bits/stdc++.h>
#define il inline
#define rg register
using namespace std;
typedef long long LL;
const LL m_63 = 1061109567;
const LL m_127 = 2139062143;
const int inf = 2147483647;
const double pi = atan(1.0) * 4.0;
const LL llf = 9223372036854775807;
const LL N = 1e6 + 7;
const int M = 1e6;
int n... | #include <bits/stdc++.h>
#define LL long long
using namespace std;
inline int read() {
int res = 0, f = 1;
char ch = ' ';
while (!isdigit(ch)) {
if (ch == '-')
f = -1;
ch = getchar();
}
while (isdigit(ch)) {
res = res * 10 + ch - '0';
ch = getchar();
}
return res * f;
}
const... |
067c4d109de427e91d90edc13845546d186a7c29d1483e43d322c7f03b40e558 | 3a6d38c6ab470c0d904767de04c264649f4946cfeb496dea0c52f23249413fa5 | 0.010954 | cpp | 3a6d38c6ab470c0d904767de04c264649f4946cfeb496dea0c52f23249413fa5 | 1835a7b6d68c4bb9ad893d289967cf86c5fe60960953aa2daad9fb7a54e5b30b | PIE_released_gem5_runtime | pie_46050 | p02731 | 24703be8fe3acc9fd0bbac6bd31f59c8a788b80201595698dd7c51909c57a927 | 1835a7b6d68c4bb9ad893d289967cf86c5fe60960953aa2daad9fb7a54e5b30b | 0.050599 | 4.619159 | 4-8 | 2019bfb3a53915cdcadd2bf59bf196ef1d48f7e5a9609d30445552bd4429ff34 |
#include <bits/stdc++.h>
#define sf(a) scanf("%d", &a)
#define sfl(a) scanf("%lld", &a)
#define sff(a, b) scanf("%d %d", &a, &b)
#define sffl(a, b) scanf("%lld %lld", &a, &b)
#define sfff(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define sfffl(a, b, c) scanf("%lld %lld %lld", &a, &b, &c)
#define sffff(a, b, c, d)... | #include <stdio.h>
#include <math.h>
int main()
{
double L, v;
scanf("%lf", &L);
v = pow((L / 3), 3);
printf("%.12lf\n", v);
return 0;
}
|
7695b867af1903d0b536d2b19a6deee31d803d61a2238ecd6f7d6e30e1ccac3a | 02d3c918ea230597bb36914df07617c0613267fcdb7af22543761c6060536c73 | 0.190146 | cpp | 02d3c918ea230597bb36914df07617c0613267fcdb7af22543761c6060536c73 | e7a886c665c7b173aa310259624b4e0646bf28f1db7f5d07a9b1df24d458871c | PIE_released_gem5_runtime | pie_46057 | p02456 | 9e6b430fc8b1fb0e1df8de12c6a7e689606257f2ac4fdd02b2c2f40a18c3f73e | e7a886c665c7b173aa310259624b4e0646bf28f1db7f5d07a9b1df24d458871c | 0.806904 | 4.243605 | 4-8 | 2b7f3c5a1a136345837386394d6c95583b8615f17976d7077f9be1be8921f5a1 | #include <bits/stdc++.h>
using namespace std;
template <typename T>
class avl_tree {
struct node {
T val;
int dep, size;
node *ch[2];
node() : node(0) {}
node(T v, node *l = nullptr, node *r = nullptr)
: val(v), dep(1), size(1), ch{l, r} {}
void *operator new(size_t) {
... | #include <bits/stdc++.h>
using namespace std;
void compress(vector<int> &v) {
auto vs = v;
sort(vs.begin(), vs.end());
vs.erase(unique(vs.begin(), vs.end()), vs.end());
for (auto &val : v) {
val = lower_bound(vs.begin(), vs.end(), val) - vs.begin();
}
}
const int MAX = 2e5;
int main()
{
ios::... |
6559cff4ede681ed3344bd3ce7a758029cc6283f3171295de267c7e9dd72bd6d | f892d65501d8c12fb85f55d098fbb32d1e5e934070da5757e487762201b29f7e | 0.019858 | cpp | f892d65501d8c12fb85f55d098fbb32d1e5e934070da5757e487762201b29f7e | 83de1574876aaa34ce92c225b44160b08cdce3e0a9be190b995213e5c500225e | PIE_released_gem5_runtime | pie_46077 | p03573 | 6a7a03de70576b2efc2a2dadd83d15f065246f5aebc7ab5c56adced14c4177c3 | 83de1574876aaa34ce92c225b44160b08cdce3e0a9be190b995213e5c500225e | 0.105539 | 5.314672 | 4-8 | 05ff4bfb9eb37fdca8c856471d1900b6cf1e7a57cc75eaf1f0d786bd75dcd0b7 | #include <iostream>
using namespace std;
int main()
{
int A, B, C;
cin >> A >> B >> C;
if (A == B)
cout << C << endl;
else if (A == C)
cout << B << endl;
else if (B == C)
cout << A << endl;
}
| #include <stdio.h>
int main()
{
int a, b, c;
scanf("%d %d %d", &a, &b, &c);
if (a != b && a != c)
printf("%d", a);
else if (b != a && b != c)
printf("%d", b);
else if (c != a && c != a)
printf("%d", c);
return 0;
} |
aa84106ae72dc4f10e0a6e7eacd89f72f399517618477e9f5093e2ef04e7fae5 | 111c14607eb01ae20bb36a1fa2d5e998e7e1e7ac56ea7e1a807666b8e96b8b07 | 0.001009 | cpp | 111c14607eb01ae20bb36a1fa2d5e998e7e1e7ac56ea7e1a807666b8e96b8b07 | 361408c1896a9ea16243272cac9061994ce611e18732dc6adb65b3e064f86f4f | PIE_released_gem5_runtime | pie_46080 | p03676 | 26b49cd938462332a49ddaddc46acc8944493420094b9c1e9372acf25724c276 | 361408c1896a9ea16243272cac9061994ce611e18732dc6adb65b3e064f86f4f | 0.003885 | 3.848447 | 2-4 | 1eb54fdb1e95fae22c92d2961609a108c393bd83ac14821917f86c48e475b8c6 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int Max = 1e5 + 10;
const int MOD = 1e9 + 7;
int a[Max];
int pos[Max];
ll inv[Max];
ll fac[Max];
int sp;
int ss;
void init() {
fac[0] = 1;
fac[1] = 1;
inv[0] = 1;
inv[1] = 1;
for (ll i = 2; i <= Max; i++) {
fac[i] =... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, pii> pipii;
typedef pair<pii, int> piipi;
typedef pair<pii, pii> piipii;
#define mp make_pair
#define fi first
#define se second
#define all(a) (a).begin(), (a).end()
#define sz(a) (int)(a).size(... |
413c35d174cf63a172bb716f4c5f624834cb6c3a173d2dcb8913224c5f4d0075 | e1009c77ff4d9dbfb9dc26e0eb0aef2292f43ad391bc5495a415d8caed0a7cea | 0.01965 | cpp | e1009c77ff4d9dbfb9dc26e0eb0aef2292f43ad391bc5495a415d8caed0a7cea | f73974f0448676d209ed5c08c7ece7933f0efe1e8ca977f8660a81af392a5314 | PIE_released_gem5_runtime | pie_46118 | p01885 | b12d9652862e1fad545ba80a2fb1103103c8b8b6dbb63804fdf41d175a761479 | f73974f0448676d209ed5c08c7ece7933f0efe1e8ca977f8660a81af392a5314 | 0.267759 | 13.626775 | 8+ | c5253f755051cd666b968b0155ef3864beb6f1eb289d1008502d238a9b1bc512 | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <ctime>
#include <algorithm>
#include <utility>
#include <functional>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <bits... | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
const int maxn = 1e6 + 5;
const int imax = 1e6;
const int inf = 999999999;
int en, n, a[maxn], b[maxn];
typedef long long ll;
ll tree[maxn], sum[maxn], c[maxn];
struct node
{
int x, id;
node() {}
bool operator<(const no... |
8d55d1b3ffef274df2f413c2267d67b624526d2ff28abb571bb482abcf7e2097 | 23e31a29bc2acb26161aec4474e73702843a0ee7a5a73fbad8dfc5cd4f686b75 | 0.058516 | cpp | 23e31a29bc2acb26161aec4474e73702843a0ee7a5a73fbad8dfc5cd4f686b75 | 8cab7a71fc3d53b57793a7762408080df9d520e5efd3b94ead111a93a98ab986 | PIE_released_gem5_runtime | pie_4614 | p02805 | 5ea754cdec3e88a52b44657735f5f02203f4ba884ea2c1bf2166d081eb19a1fd | 8cab7a71fc3d53b57793a7762408080df9d520e5efd3b94ead111a93a98ab986 | 0.167367 | 2.86019 | 2-4 | 2f4ea0041968a234e5b1d15b219826346e62b4a06fd7719224c76dcfadb07d61 | #include <iostream>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <vector>
#include <queue>
#include <cmath>
#include <bitset>
#include <complex>
#include <functional>
#include <numeric>
#include <iomanip>
#define SPBR... | #include <iostream>
#include <algorithm>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <vector>
#include <queue>
#include <cmath>
#include <bitset>
#include <complex>
#include <functional>
#include <numeric>
#include <iomanip>
#define SPBR... |
84f0a4ce16a9b1cffd586a13dc2abaad538d3cdb4786b8867a4ff5852018b2ee | 43d0c2384fa2970d27bdb053bc2dcd532c966371e343da61822718667b71b0bf | 0.35438 | cpp | 43d0c2384fa2970d27bdb053bc2dcd532c966371e343da61822718667b71b0bf | e6e6bed0e5d01ece82d4d12538dc2b2686b2c63e34b6ef90623beb8883ac418b | PIE_released_gem5_runtime | pie_46177 | p00539 | 172ebd6694b94a2c18d49fbbb97fdfa98cf8db2f22c7c027066d248ba1841e0f | e6e6bed0e5d01ece82d4d12538dc2b2686b2c63e34b6ef90623beb8883ac418b | 0.918735 | 2.592517 | 2-4 | a3a621c3937b803a837701cac65446ab773c0cbeb434542b104e11f5bdec79a0 | #include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <functional>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pii;
#define fst first
#define scd second
#define PB push_back
#define rep(i, x) for (ll i = 0; i < (x); ++i)
const ll linf = 3e18;
... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, x) for (int i = 0; i < x; ++i)
#define fst first
#define scd second
using vi = vector<int>;
using pii = pair<int, int>;
using vpii = vector<pii>;
const int inf = 3e18;
struct edge {
int to, cost;
};
vector<edge> G[100010];
... |
35f0d1a0d4628303e1b8df5020175965473aad38fd05ede0e9ad669e4eaa6018 | bc63e8e75b865bfe98db7f86e65211d77cd7a0d4ff67b194770b7575f0231c11 | 0.018515 | cpp | bc63e8e75b865bfe98db7f86e65211d77cd7a0d4ff67b194770b7575f0231c11 | 8c4dbcd22d487c06eb4c4dc618aa9664d44dcb2fb83743e19720ea43c8b70874 | PIE_released_gem5_runtime | pie_46180 | p00170 | 45383e37d9145f3072bb81e59b156db775138fc114666e209e3815084534a135 | 8c4dbcd22d487c06eb4c4dc618aa9664d44dcb2fb83743e19720ea43c8b70874 | 0.089978 | 4.859652 | 4-8 | 70f0148454fe05500321afb2af887719cdb69313aaea248455bd899d39db3d83 | #include <cstdio>
#include <cfloat>
using namespace std;
char f[10][21];
int n, w[10], s[10], a[10], b[10];
bool u[10];
double maxg;
void dfs(int x, int tw, int m, double g) {
if (m == n) {
if (maxg < g) {
maxg = g;
for (int i = 0; i < n; i++) {
b[i] = a[i];
}
}
retu... | #include <cstdio>
#include <algorithm>
using namespace std;
struct C {
int id;
int w;
int s;
static bool compare(const C &l, const C &r) {
if (l.w > r.w) {
return true;
} else if (l.w < r.w) {
return false;
} else {
return (l.s > r.s);
}
}
};
int main() {
C c... |
775f05107060d27d1da947cc7ae8464a2d181f18fcda4f4d40e989033da8c39b | 8754f31936ee7a0be9c6038433a94837dd057a082e83782d95ae51a419badac8 | 0.020382 | cpp | 8754f31936ee7a0be9c6038433a94837dd057a082e83782d95ae51a419badac8 | 31953205de5a969867df9f60155af5d51a74366c3f5457bc7e1f17ac68b44145 | PIE_released_gem5_runtime | pie_46181 | p00254 | 440dfd35d63551d4ceba10eaabb2163ea958979935e0da529bc0ea07d3e26f26 | 31953205de5a969867df9f60155af5d51a74366c3f5457bc7e1f17ac68b44145 | 0.089823 | 4.40696 | 4-8 | 16a66cd21d34b057a4a30a6306aa007e302a9e298603b9cde6100132da26fba1 | #include <cstdio>
#include <sstream>
#include <string>
#include <algorithm>
using namespace std;
template <class F, class T>
void convert(const F &f, T &t) {
stringstream ss;
ss << f;
ss >> t;
}
int main() {
int x, a, b;
string s;
while (scanf("%d", &x), x) {
if (x % 1111 == 0) {
pu... | #include <cstdio>
#include <algorithm>
#include <cstdlib>
#include <climits>
using namespace std;
int ans[10010];
char tmp[8];
int dfs(int x) {
if (ans[x] >= 0) {
return ans[x];
}
if (ans[x] != -1) {
return INT_MIN;
}
ans[x] = INT_MIN;
sprintf(tmp, "%04d", x);
sort(tmp, tmp + 4);
... |
6d6b79150bc07901b16c2bf4a6f4c4d8a357d014d56842fbe43b13815547d570 | 31e20dcca5847dc3351cafcd92944b734d6b8bd5f858094937e6544ebc0655eb | 0.025404 | cpp | 31e20dcca5847dc3351cafcd92944b734d6b8bd5f858094937e6544ebc0655eb | 93c23252cec92e1799bfdfb04c63f75f25607ee4f7a7f4340e84396b2e62af6b | PIE_released_gem5_runtime | pie_46186 | p03479 | 5da5693c931c71b34e0fe1322b83141e0845b1a2443052f2d41600c14144e466 | 93c23252cec92e1799bfdfb04c63f75f25607ee4f7a7f4340e84396b2e62af6b | 0.0901 | 3.546713 | 2-4 | 25905b9599f5d9e09f0a07c8a71f1896c1b108f1b3c27f9c3230b43fd8e427b8 | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep1(i, n) for (int i = 1; i <= n; i++)
#define mp make_pair
#define F first
#define S second
#define IOS \
ios_base::sync... | #include <bits/stdc++.h>
using namespace std;
int main()
{
long long int a, b, c, d, e, i, j, k = 0;
vector<long long> v;
cin >> a >> b;
while (1)
{
if (a > b)
break;
a = a * 2;
k++;
}
cout << k << endl;
} |
e43737f284f68a9d18b2d1dca517e8f60ebeae5a01a544a95167d87678582eee | 437f23f3b16770de3b7a17f4b370a01baf1ff9b1f71fddb2f6eee90a946618c0 | 0.007687 | cpp | 437f23f3b16770de3b7a17f4b370a01baf1ff9b1f71fddb2f6eee90a946618c0 | 15180930f0f0326f64e3d862bb1c0d6ee85284e7ece6d6be5e4786e538783ec5 | PIE_released_gem5_runtime | pie_46279 | p02907 | 57c0f48bcf5872a452cc8245fcd6aa25224ec735ddf45479eeae870e9b31b06d | 15180930f0f0326f64e3d862bb1c0d6ee85284e7ece6d6be5e4786e538783ec5 | 0.095662 | 12.444917 | 8+ | 21169290ef23390bf173a14082800f00bcaf372a99485aa7098cb89d6cccb5b9 | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int mod = 998244353, lim = 512;
inline void add(int &x, int y) { (x += y) >= mod ? x -= mod : 0; }
inline int pl(int x, int y) { return (x += y) >= mod ? x - mod : x; }
inline int kpow(int a, int b)
{
int s = 1;
for (; b;... | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int mod = 998244353;
inline void add(int &x, int y) { (x += y) >= mod ? x -= mod : 0; }
inline int pl(int x, int y) { return (x += y) >= mod ? x - mod : x; }
inline int kpow(int a, int b)
{
int s = 1;
for (; b; b >>= 1, a... |
cc5cd042216a855616c7a10c61df84e0510cab57d0fa20914ca2d5402ff19ad1 | 4d917cbf9444581e45f80d92a5b12d1897f1322dae57afdcf16eebcb2fb524fc | 0.106496 | cpp | 4d917cbf9444581e45f80d92a5b12d1897f1322dae57afdcf16eebcb2fb524fc | 5d295fcd5eed1d08e89abe6d2b11c4e8d794baac04170c9e0c2e1acfaea8af58 | PIE_released_gem5_runtime | pie_46321 | p03452 | 5a58d4e6bc330677e89ddd40e0efe7d1a2f71e5ed5b55d46863370f83dc184bb | 5d295fcd5eed1d08e89abe6d2b11c4e8d794baac04170c9e0c2e1acfaea8af58 | 0.835131 | 7.841926 | 4-8 | 2f0d8c109fa3d4aab1fbc2399abc6022d57a723bd253dbd2be32b07f382e616a | #include <bits/stdc++.h>
#define LL long long
#define mp make_pair
#define pb push_back
#define INF (1 << 29)
using namespace std;
typedef pair<int, int> pii;
int n, m;
vector<pii> G[200010];
int col[200010];
int vis[200010];
bool dfs(int x, int co) {
if (vis[x] != -1)
return col[x] == co;
vis[x] =... | #include <iostream>
#include <string>
#include <cstdio>
#include <cmath>
#include <cstring>
#define max(x, y) x > y ? x : y
using namespace std;
const int maxn = 1011111;
int father[maxn];
int gradfa[maxn];
int find(int x)
{
if (father[x] == x)
return x;
int r = find(father[x]);
gradfa[x] = gra... |
4b89ffb32face980aaa53d968ac23b4ef7e66e882e0e33aa848ba89368b2ba2a | e699a2c525536a51e482319ce89538c32828268524e027b0daacc675cce5dad8 | 0.021531 | cpp | e699a2c525536a51e482319ce89538c32828268524e027b0daacc675cce5dad8 | 1a2281c2c0d2304439d6ab6159eae23d95bb81a8b99ec7dcc5f2aaf871186545 | PIE_released_gem5_runtime | pie_4642 | p02550 | 1402c0516effe665d1c97f36ba89465387a231ff9500d48aeca26902c2e5603d | 1a2281c2c0d2304439d6ab6159eae23d95bb81a8b99ec7dcc5f2aaf871186545 | 0.073632 | 3.41973 | 2-4 | 7efc2a260e962dc5511f1b698c19104edff3c0dc27f1c1b98df4a5562dec6195 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (ll i = 0; i < n; i++)
#define repl(i, l, r) for (ll i = (l); i < (r); i++)
#define per(i, n) for (ll i = n - 1; i >= 0; i--)
#define perl(i, r, l) for (ll i = r - 1; i >= l; i--)
#define fi fist
#define se second
#define pb push_back
#define ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define per(i, n) for (int i = n - 1; i >= 0; i--)
typedef long long ll;
typedef pair<int, int> P;
typedef pair<long long, long long> Pll;
typedef vector<int> vi;
typedef vector<ll> vll;
const long long mod = 1000000007... |
fae2975b7f877c6edd8ebeacac8014e884dda205743a7a4193b502746b1a75ea | 4c9c8cf15b3c3fb33717ac33d9486fc4b31da574aed7bd4bb2660420131a1f13 | 0.019481 | cpp | 4c9c8cf15b3c3fb33717ac33d9486fc4b31da574aed7bd4bb2660420131a1f13 | a9f0ea708a02c37c097450df7f24c24ba923a5f457a47c90d8c3575d123521e0 | PIE_released_gem5_runtime | pie_46494 | p02835 | 46bc5eb71f741b7eaeb3f6231d64955f560a28ec16083e227f289f71721f4ae2 | a9f0ea708a02c37c097450df7f24c24ba923a5f457a47c90d8c3575d123521e0 | 0.104238 | 5.350658 | 4-8 | 000eb2d4bebd5dc0fa0324deda67d88a218b21c93c93122cb3ab952fc19fdb7c | #include <iostream>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if (a + b + c >= 22)
{
cout << "bust";
}
else {
cout << "win";
}
} | #include <stdio.h>
int main() {
int a1, a2, a3, score;
scanf("%d %d %d", &a1, &a2, &a3);
score = a1 + a2 + a3;
if (score >= 22) {
printf("bust\n");
}
else {
printf("win\n");
}
return 0;
}
|
1ef2c7e432b45be981067081075c2ad30ca115e22e3738c4fb33ce546b15eb70 | eb033cd9c295cf5529e6d0051db811ca21ea20b1f733db4577c07def5a9e8417 | 0.08985 | cpp | eb033cd9c295cf5529e6d0051db811ca21ea20b1f733db4577c07def5a9e8417 | 17b2c1a70420fcba03b58384320f6cbe1fb83f0a9a7e3051e8beecc5a9d8e73b | PIE_released_gem5_runtime | pie_4655 | p00743 | 50bebec041baceacca5d49b75fd9f66018b87a6856bcce1239b6dd78385c6fd8 | 17b2c1a70420fcba03b58384320f6cbe1fb83f0a9a7e3051e8beecc5a9d8e73b | 0.342061 | 3.807004 | 2-4 | e2b3ff82841d1dbb0a5ff0a4a23c486c242d54275b01b42ca45e910099e45599 | #include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <functional>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
const int INF = 100000000;
const double EPS = 0.0000001;
typedef pair<int, int> P;
int n, m;
struct edge
{
int to, cos... | #include <algorithm>
#include <functional>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <bits... |
c4d9478001129b8733e9f43ff8a39d7f48440bb3cd6a83ec3c672cafe3373f6c | fa8fd875fa771c51571a687614917dff5c7c22c39e6c358ff579f5542ff5b102 | 0.007148 | cpp | fa8fd875fa771c51571a687614917dff5c7c22c39e6c358ff579f5542ff5b102 | b8b8a64719431604bd31fe63ec59bb7d8cfb15efc7564b43240df8e1418ef63b | PIE_released_gem5_runtime | pie_46557 | p02713 | a6672d931cc38cc3935dcf3ab5bf5f7fcfbd29ace97f8cff3d9a950d7eeabfad | b8b8a64719431604bd31fe63ec59bb7d8cfb15efc7564b43240df8e1418ef63b | 0.030149 | 4.217883 | 4-8 | 99da89ed334d5639ac937af4b527944ec93474ac365b6dbccaf93fe8f0bf523c | #include <iostream>
using namespace std;
int gcd(int p, int q)
{
if (q == 0)
return p;
return gcd(q, p % q);
}
int main(void)
{
int k, sum = 0, g;
cin >> k;
for (int i = 1; i <= k; i++)
{
for (int j = 1; j <= k; j++)
{
g = gcd(i, j);
for (int l = 1; l <= k; l++)
... | #include <cstdio>
int e(int p, int q)
{
if (q == 0)
return p;
return e(q, p % q);
}
int main(void)
{
int k, sum = 0;
scanf("%d", &k);
for (int i = 1; i <= k; i++)
for (int j = 1; j <= k; j++)
{
int g = e(i, j);
for (int l = 1; l <= k; l++)
sum += e(g, l);
}
... |
7ae7bc9766f1e6e6e04aea4b0304402cef50242d06ad5c60f84426d3ebce61d8 | d1daa2cbc041d15060d4333eb46e5a92f6757a83f2d29366d2664f79dddd00ed | 0.102739 | cpp | d1daa2cbc041d15060d4333eb46e5a92f6757a83f2d29366d2664f79dddd00ed | 587d2e9ff06b3678130cf3b1712524a49254712220e03f6e57e1a1d45c95d4c1 | PIE_released_gem5_runtime | pie_46562 | p03238 | 1bf29ac73f8b65a0c42201ec15e6931cf0c736089e0e8906a6c67035b500c37e | 587d2e9ff06b3678130cf3b1712524a49254712220e03f6e57e1a1d45c95d4c1 | 0.364297 | 3.545859 | 2-4 | dcf63eb36170119721d323a489022e59081c85334e9cd522ec797336da762326 | #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <stdio.h>
#include <list>
#include <numeric>
#include <stack>
#include <queue>
#include <tuple>
#include <bitset>
#include <map>
#include <math.h>
using namespace std;
#define rep(i, n) ... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <ctime>
#include <iostream>
#include <list>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <stdio.h>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
... |
7e297d32fb265267135920e361f30f0286e56030814b0f9a0ced93be85d90136 | ab3594cf0723dc1a63f78ac7f9ac88163917dab2f02d52df7d1ffbb764249110 | 0.024065 | cpp | ab3594cf0723dc1a63f78ac7f9ac88163917dab2f02d52df7d1ffbb764249110 | 4c59b3ced59188dba19f17df1801079d8f3718dbeb4f0ed36d67b7d9080b5751 | PIE_released_gem5_runtime | pie_46656 | p02617 | 9bcdb99d9fe67943850352b173a1d911def21c6e82e561a06218e1559d3bd805 | 4c59b3ced59188dba19f17df1801079d8f3718dbeb4f0ed36d67b7d9080b5751 | 0.158145 | 6.57158 | 4-8 | 595c48514423361e84da5c51cb5de991aaa254ad125958da750e57d3d38614dd | #include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 5;
vector<int> e[MAXN];
int main(int argc, char *argv[]) {
int n;
scanf("%d", &n);
long long ans = 1LL * n * (n + 1) * (n + 2) / 6;
for (int i = 1; i < n; i++) {
int u, v;
scanf("%d %d", &u, &v);
if (u > v)
swap(u,... | #include <bits/stdc++.h>
namespace chtholly {
typedef long long ll;
#define re0 register int
#define rel register ll
#define rec register char
#define gc getchar
#define pc putchar
#define p32 pc(' ')
#define pl puts("")
char buf[1 << 23], *p1 = buf, *p2 = buf;
inline int read() {
int x = 0, f = 1;
char... |
3e9f577c1f75a5f7af75441e0687bb770da64516409b42668ef0314d59ec2b80 | 4b4fbb84160f6dd781ed6c567629107c73291458b8c63ab427b127408a1e967a | 0.017778 | cpp | 4b4fbb84160f6dd781ed6c567629107c73291458b8c63ab427b127408a1e967a | bca486ee07191201aae077d6768483b9b50313f4869cea03c477ec6667b36045 | PIE_released_gem5_runtime | pie_46670 | p02749 | b5351c66d94154315210b8d2800021e36b1da6f1a4b4da89e6c7807bcb027da1 | bca486ee07191201aae077d6768483b9b50313f4869cea03c477ec6667b36045 | 0.847595 | 47.67548 | 8+ | 282293e759eaf22bdaa6fdf071589a2b59d583cbb9a017334cb8c20420e87e05 | #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 ... |
2f2afc0303187c3ab940f6c4382170d1333c7c962b2f0f66efc9dc2009d11551 | f28aab3c6ee10d5f74a06fce228fda854ff82f80de9a6beaad598fc81dcb7fe4 | 0.016229 | cpp | f28aab3c6ee10d5f74a06fce228fda854ff82f80de9a6beaad598fc81dcb7fe4 | 0493b0680d59201f4c37aea154b97a5b2e49034430b366cbc709c9be1b499ebf | PIE_released_gem5_runtime | pie_4670 | p04049 | 134fd3aa322c8a9c1fbe9375bb2c7880090adcc8afb9ec77bd5938e72e104c09 | 0493b0680d59201f4c37aea154b97a5b2e49034430b366cbc709c9be1b499ebf | 0.302442 | 18.635411 | 8+ | 2a3f8cff0c5107bda64a19d87affe5babf595989d0825b4d535d1ecfce2a3e3e | #include <bits/stdc++.h>
#define debug puts("&&&&&&")
#define read(x) scanf("%d", &x)
using namespace std;
typedef long long LL;
const int maxn = 1e5 + 5;
const int mod = 1e9 + 7;
int n, k;
int u[maxn], v[maxn];
LL next[maxn], cnt, temp;
LL cnt1;
vector<int> ma[maxn];
void dfs(int f, int t, int deep) {
c... | #include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
#define MAXN 2010
int n, k, u[MAXN], v[MAXN];
int Adj[MAXN], V[MAXN * 2], nxt[MAXN * 2], c;
void AddEdge(int u, int v)
{
c++;
V[c] = v, nxt[c] = Adj[u];
Adj[u] = c;
}
int dep[MAXN];
void dfs(int u, int p)
{
for (int i = ... |
5540aea2adf0a7828346445a5a0f836b4ea5666fa4f395456ea6d15c1969949b | 7fa29865fb4d6e8e1e8b9e5dd2a6fff5e58426beecb3e31bc2a21232d0938591 | 0.140216 | cpp | 7fa29865fb4d6e8e1e8b9e5dd2a6fff5e58426beecb3e31bc2a21232d0938591 | c2f2033d6dde3986c93b4666ab55c984582ed767eb260fcb24463886dfa4f739 | PIE_released_gem5_runtime | pie_46700 | p03049 | 5a60e8491ee78b4e47f7bb1d4cd207f0f60fea08511ae7140233f99e1fcaea2d | c2f2033d6dde3986c93b4666ab55c984582ed767eb260fcb24463886dfa4f739 | 0.460148 | 3.281714 | 2-4 | 0279f7dee31e8ea5752996c593e5c24a0f9e648a1f237e5fccb0f2f7894e515d | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 100100;
string s[N];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
ll n;
cin >> n;
int t;
ll res;
map<char, ll> m;
map<char, ll> p;
int flag = 0;
for (ll i = 0; i < n; i++)
{
cin >> s[i];
... | #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string>
#define ios ios::sync_with_stdio(false)
using namespace std;
typedef long long ll;
const int maxn = 1e4 + 100;
string a[maxn];
int main()
{
ios;
int n, A = 0, B = 0, AB = 0;
cin >> n;
ll sum = 0;
for (int i = 0; i < n;... |
af4e99403384a0033f654a6efb598bcb206e422f04ef852413b629ec8b62d110 | d552c2d899882524d20cff8e6f2bca0f36e5e086e8d88379f40768d632d97d62 | 0.015192 | cpp | d552c2d899882524d20cff8e6f2bca0f36e5e086e8d88379f40768d632d97d62 | d30afa503389de9436efb93f4f414707081df0586fec386573fca5994fea5547 | PIE_released_gem5_runtime | pie_46717 | p03686 | e54da6fd6fb5dd4d40c36ee1c13b3ae52f70feb3f180af9bdee5c721bc748d4a | d30afa503389de9436efb93f4f414707081df0586fec386573fca5994fea5547 | 0.51869 | 34.14208 | 8+ | cae13833c8b2621065d476c8c30caa40639f373859a3599a204a35495e7027b7 | #include <bits/stdc++.h>
#define ll(x) (x << 1)
#define rr(x) (x << 1 | 1)
using namespace std;
const int N = 2e5 + 5;
const int inf = 0x3f3f3f3f;
int n, m, ans = 0;
vector<int> a[N];
struct SegmentTree {
int l, r, mx, tag;
} t[N * 4];
void up(int x) { t[x].mx = max(t[ll(x)].mx, t[rr(x)].mx); }
void build(i... |
#include <cstdio>
#include <algorithm>
using namespace std;
#define N 200005
#define M 200005
#define mid ((l + r) / 2)
#define ls 2 * rt
#define rs 2 * rt + 1
int head[M];
int cnt;
struct edge {
int des, next;
} e[N];
void ins(int u, int v) {
e[++cnt].des = v;
e[cnt].next = head[u];
head[u] = cnt;... |
0928e992472cb4159d1587c10f104e7a1a74767206c004ac754535787df695c7 | 5af9637e766aebef23f4302becac7b2a02de5091ccc1af3084cbf021595110db | 0.001025 | cpp | 5af9637e766aebef23f4302becac7b2a02de5091ccc1af3084cbf021595110db | cdb4e188dd5090fbabcadd997396380f809a7d8e4c95daa6a9289a4b8574f906 | PIE_released_gem5_runtime | pie_46758 | p03560 | eaf51b41f9e6753fbc8f51ce16257290679f9c1e6a6e692be33cb4f5df57490e | cdb4e188dd5090fbabcadd997396380f809a7d8e4c95daa6a9289a4b8574f906 | 0.010672 | 10.411692 | 8+ | 328e68da06fac1f0b0151efcabad8078a2630c9af83e6598ab90a70c2847ac56 | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int MAXN = 1000005;
struct node
{
int from, to, w;
} G[MAXN];
int dist[MAXN];
int head[MAXN];
bool vis[MAXN];
int cnt;
void add(int u, int v, int w)
{
G[cnt].to = v;
G[cnt].w = w;
G[cnt].from = head[u];
head[u] = cnt++;... | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <queue>
#include <cstring>
using namespace std;
typedef long long LL;
const int MAXN = 100005;
const LL inf = 0x3f3f3f3f;
int main(void) {
int k, v, u;
cin >> k;
vector<int> dp(k, 46);
dp[1] = 1;
deque<int> deq = {1};
while (... |
5dfef9ef1263716e4a0436bc808a80a5b81e4a84c55921dcd8a5c8e8c73ea862 | 1612d68ff5179a20f0902d7b0dae771053c9dd4521b33426ea2f43f1c13a80d2 | 0.000192 | cpp | 1612d68ff5179a20f0902d7b0dae771053c9dd4521b33426ea2f43f1c13a80d2 | 361bc04844cfa23418f2793c2076dba688ffdf931026030ded0d69f52e6c9ad1 | PIE_released_gem5_runtime | pie_46777 | p03482 | ca7044842b0579df60d5d2d92c54af03e397e9f46ec6b57422144671706808c5 | 361bc04844cfa23418f2793c2076dba688ffdf931026030ded0d69f52e6c9ad1 | 0.001004 | 5.218055 | 4-8 | 75fe87a0aaff3fee60ccbc0d42a77a6ddbfe22d894ecdcd782ef999858724b62 | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <set>
#include <cstdlib>
#include <vector>
#include <map>
#include <cstring>
using namespace std;
const int maxn = 2e6 + 100;
const long long mod = 1e12 + 7;
long long ans, l1, l2, len1, len2, ty, z, n, ... | #include <stdio.h>
#include <string.h>
int max(int x, int y)
{
return x > y ? x : y;
}
int min(int x, int y)
{
return x < y ? x : y;
}
int main()
{
char ch[100010];
while (scanf("%s", ch) != EOF)
{
int len = strlen(ch);
int ans = len;
for (int i = 1; i <= len - 1; i++)
{
... |
44ee86c744cb7afd7757f3e0dea44b7db6da76d6b6ff169491ca7ab3cde38434 | 81253614f97de164c55edd14e22c71bf2b2fd88891f554ea3c982e3b7914bfeb | 0.03231 | cpp | 81253614f97de164c55edd14e22c71bf2b2fd88891f554ea3c982e3b7914bfeb | ca7bd5c880886b0f1aeb06fd5c7ef877eb000e37d5ae2ea6ab0f1ab7c3c21ccf | PIE_released_gem5_runtime | pie_46780 | p03727 | 021a8d60afe7e069c0e9debe90c9b01faaba11f61b47ecb96ef6de0bda842cdb | ca7bd5c880886b0f1aeb06fd5c7ef877eb000e37d5ae2ea6ab0f1ab7c3c21ccf | 0.388124 | 12.012402 | 8+ | 58ea3a6eba282157e3aeff2aa5241acffa3299bdc051e22f01d51a7709ad86e1 | #include <cstdio>
#include <cstring>
#include <cstdlib>
#include <set>
#include <map>
#include <queue>
#include <algorithm>
using namespace std;
const int MAXN = 100005;
int N;
set<int> E[MAXN];
map<int, int> cnt[MAXN];
queue<pair<int, int>> Q;
int fa[MAXN];
int Root(int x)
{
return fa[x] == 0 ? x : (f... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rg register
template <typename _Tp> inline _Tp read(_Tp &x) {
char c11 = getchar();
x = 0;
while (!isdigit(c11))
c11 = getchar();
while (isdigit(c11))
x = x * 10 + c11 - '0', c11 = getchar();
return x;
}
const int N = 1... |
e803c7cea501290183836b41cdd32bc1c7b7e9110fb2f883083fee0c1d01c9db | 5787cde04ec4b52bb6d54255550280e13484d2bfc6192001cf47495e5b594724 | 0.019934 | cpp | 5787cde04ec4b52bb6d54255550280e13484d2bfc6192001cf47495e5b594724 | d9aaacefe571ff3ada09065925b90d7ea8beb4473cbca298b1cffbf84e76d1d4 | PIE_released_gem5_runtime | pie_46793 | p00344 | f5663ac51513f27476f3274e6e6f4c8625394d7dea2dcfc8e92db9a11bc10b6d | d9aaacefe571ff3ada09065925b90d7ea8beb4473cbca298b1cffbf84e76d1d4 | 0.191513 | 9.607457 | 8+ | d7f02f92dcf21c6186c90f578549f9f907005200f04ec43a69b1e574dbe1f6f8 | #include <bits/stdc++.h>
using namespace std;
int n;
int a[100005];
int x[100005];
int y[100005];
int main() {
scanf("%d", &n);
for (int i = 0; i < n; i++) {
cin >> a[i];
}
memset(x, -1, sizeof(x));
memset(y, -1, sizeof(y));
int ans = 0;
for (int i = 0; i < n; i++) {
int p = i, c = 0... | #include <stdio.h>
int n, i, p, c, ans = 0;
int a[100000];
int x[100000];
int y[100000];
int main() {
scanf("%d", &n);
for (i = 0; i < n; i++) {
scanf("%d", &a[i]);
x[i] = -1;
y[i] = -1;
}
for (i = 0; i < n; i++) {
p = i;
c = 0;
while (x[p] == -1) {
x[p] = c++;
... |
fbeed9a6d4aa65f3f45c268fe3f6f4d673c5888d279cde1c23bda932911fcab9 | a33bce8d7edd3b79cdade45dbc5e9a91f5cd9c1047efbdf94e083aa17d669052 | 0.106704 | cpp | a33bce8d7edd3b79cdade45dbc5e9a91f5cd9c1047efbdf94e083aa17d669052 | 9d7d28c5cfd890dc9584be69e1695a7b7f159b7553f794de488f04992d68f368 | PIE_released_gem5_runtime | pie_46915 | p04006 | 708defcb2f01847caeea7e61094c2874f53440715a93b414548cce41ed7a1bce | 9d7d28c5cfd890dc9584be69e1695a7b7f159b7553f794de488f04992d68f368 | 0.33198 | 3.111236 | 2-4 | 3c871080c285b35483bc0303d7e50c857f305f7f09211e4f1af64b987af9450d | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> pll;
ll mod = 1e9 + 7;
const ll max_n = 1 << 18;
const ll init_m = 1e18;
ll leaf_n;
vector<ll> dat(max_n);
void init(ll n) {
leaf_n = 1;
while (leaf_n < n)
leaf_n *= 2;
for (ll i = 0; i < 2 * leaf_n - 1; i++)
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<ll> vec;
typedef vector<vec> mat;
typedef pair<ll, ll> pll;
const ll mod = 1e9 + 7;
const ll inf = 1LL << 61;
int main() {
ll n, x;
cin >> n >> x;
vec a(n);
for (ll i = 0; i < n; i++)
cin >> a[i];
vec b(n, inf)... |
55aaea3ad94fd3d914c244b87f833915634c882948c07acb5661bf9a42d914d4 | 002eaf31353458d2b42bb0f042342445c53dda9eef35c1a4b6dcdf837a4a2492 | 0.097806 | cpp | 002eaf31353458d2b42bb0f042342445c53dda9eef35c1a4b6dcdf837a4a2492 | 41ee3aea5fe4de3e5c98d2b8097f7bd379a0cd9124c826f878fcc1af086f2392 | PIE_released_gem5_runtime | pie_46927 | p01140 | 5c74724f88f873c27626e3acf897eda94717e12e73898710fba3263303302cc5 | 41ee3aea5fe4de3e5c98d2b8097f7bd379a0cd9124c826f878fcc1af086f2392 | 1.33816 | 13.681807 | 8+ | 37d9aaec1b5142c9beac1f0f8a4c0e249e006d6751de86ca9408b26ddb12cfb9 | #include <stdio.h>
int main() {
int h[1501], w[1501];
int n, m, i, j;
while (scanf("%d%d", &n, &m) && (n | m)) {
int dat[1500001] = {};
n++, m++;
h[0] = w[0] = 0;
for (i = 1; i < n; i++) {
scanf("%d", &h[i]);
h[i] += h[i - 1];
}
for (i = 1; i < m; i++) {
scanf("%... | #include <stdio.h>
#include <vector>
int main() {
int h[1501], w[1501];
int n, m, i, j;
while (scanf("%d%d", &n, &m) && (n | m)) {
std::vector<int> dat(std::max(n, m) * 1500 + 1, 0);
n++, m++;
h[0] = w[0] = 0;
for (i = 1; i < n; i++) {
scanf("%d", &h[i]);
h[i] += h[i - 1];
... |
4a425616dd1200f1f7f305327d04a60826c4bc47f1187b6eb5d02d599bb8b636 | 6d3374fc5b8456a14ba3fb3329fce2aa45aa263a9b6b7ac09bd9d17c80d05355 | 0.103882 | cpp | 6d3374fc5b8456a14ba3fb3329fce2aa45aa263a9b6b7ac09bd9d17c80d05355 | fa65ceef2ab75ddb9122c0690c303dd212fcf17c85cc0b5f666351c4446b630a | PIE_released_gem5_runtime | pie_47416 | p04020 | 53bd81ddf3c6ffc037e62f02f9cd4cde47e9777356b86f54e8e62bde209e804a | fa65ceef2ab75ddb9122c0690c303dd212fcf17c85cc0b5f666351c4446b630a | 0.275698 | 2.653954 | 2-4 | 49d6564f199b1e022a75fb9072f267d05e5bc2fe2f058b8ef548b37c998d6ca5 | #include<bits/stdc++.h>
using namespace std;
typedef long long LL;
const int MAXN = 1e5+7;
LL a[MAXN];
LL dp[MAXN][2];
LL solve(int now, int connected) {
if (now==0) {
assert(connected==0);
return 0;
}
if (dp[now][connected] != -1) return dp[now][connected];
LL has = a[now]-connected... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
ll ara[100005];
int main()
{
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++)
scanf("%d", &ara[i]);
ll res = 0;
for (int i = n - 1; i > 0; i--)
{
int p1 = ara[i];
int p2 = ara[i - 1];
int x = min(ara[i - 1], ... |
e4c122c1aea73bf6d1a487c484dd001b62876a019632cecd5eedd14f2fc7a68e | 39f9a7e94ee96fa61c5bf724ec84de624bf7fe33d05185d82f94e1afe1b378da | 0.040841 | cpp | 39f9a7e94ee96fa61c5bf724ec84de624bf7fe33d05185d82f94e1afe1b378da | d19d1b23061ce1b2962cac9891f834303a8b113eeaa700b71170bcaff45679b4 | PIE_released_gem5_runtime | pie_47418 | p00643 | 541092b6f8067676b40f9ab3fe4fbeff721d49a53adb80c93908d683d1cb16d9 | d19d1b23061ce1b2962cac9891f834303a8b113eeaa700b71170bcaff45679b4 | 0.199966 | 4.896156 | 4-8 | eda8d0be8dc64fbac728613b5b9bc5176a20e81f68627feec78f9533a078d647 |
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cs... | #include <stdio.h>
typedef struct duitype
{
long x, y, z;
} duitype;
duitype dui[1000000];
long jl[7][7][7][7][7][7];
bool bj[11][11][1000];
long temp[7];
long vv[7];
long v[46657][7];
long have[11][11][1000];
long aa, a1, b1, c1, d1, e1, f1, a2, b2, head, last, x, y, z, top, i, ans, k, j, place, zz, n, m... |
e77196285008ceb090778c2ed0ca95152f6bcee45311edb4312640192faec6ab | 21ebf2d455e5810ee714132f73ae6438c9a656a44d3795c2577a9532fd70e77f | 0.005681 | cpp | 21ebf2d455e5810ee714132f73ae6438c9a656a44d3795c2577a9532fd70e77f | 2d53efaecb75e3ca576cfc2fb6bdd2b9b650c6b92c0e9139fa1e00057df830c0 | PIE_released_gem5_runtime | pie_47495 | p03801 | 6995ec653f250f5b8a13e722f76241ed65e578b1927a063c00a509f1c7a91332 | 2d53efaecb75e3ca576cfc2fb6bdd2b9b650c6b92c0e9139fa1e00057df830c0 | 0.150336 | 26.464011 | 8+ | 4b6304abf4f4a67fc0174ab1d741642c683f4caa4e70ebf12ec47a271b71b1fd | #include <bits/stdc++.h>
typedef long long ll;
typedef double db;
#define pa pair<int, int>
#define mk make_pair
#define LOG(format, args...) fprintf(stderr, format, args)
using namespace std;
inline int rd() {
int x = 0, f = 1;
char ch = getchar();
for (; !isdigit(ch); ch = getchar())
if (ch == '-')... | #include <cstdio>
#include <algorithm>
#define int long long
using namespace std;
struct arr
{
int aa, bb;
} a[100010];
int n;
long long b[100010];
int cmp(arr x, arr y)
{
if (x.aa != y.aa)
return x.aa > y.aa;
return x.bb < y.bb;
}
signed main()
{
scanf("%lld", &n);
for (int i = 1; i <= n... |
92ff1464a1a4edbd88b09183ae6ddc74c59f421407626d5dffc250e7fadfc4f6 | 1f5b28d4f21cb157e56994aae726b175012d1fd3b624efd82bb00b449e0c0530 | 0.001043 | cpp | 1f5b28d4f21cb157e56994aae726b175012d1fd3b624efd82bb00b449e0c0530 | 8f6ddc91f4f6e5c51d9db2165b4265aca59fec3540d26b8603b99d8d743d97e6 | PIE_released_gem5_runtime | pie_47506 | p03355 | b165897b589f9d3e63e85f9328d63bad8f1c3a8b51c6a77cf527eb291dcf4164 | 8f6ddc91f4f6e5c51d9db2165b4265aca59fec3540d26b8603b99d8d743d97e6 | 0.003629 | 3.478749 | 2-4 | d45a1429bac491725beb3d8a908d2e3908ceacc887b852b4171f0afc0d3b14f4 |
#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++)
... |
9c2b80e720d5c61a00f397df65e900d206bb3d13497306035eb0a3178147b9c2 | 194c0c7b7034a222a6380335d6d61440e8487b09c1ad590881f1cdfb53b29760 | 0.010474 | cpp | 194c0c7b7034a222a6380335d6d61440e8487b09c1ad590881f1cdfb53b29760 | ae801ca75f3231aee8c71d41ab888c624d536b92f33dcb82a8de4754579fae2a | PIE_released_gem5_runtime | pie_47562 | p02660 | 194a5270731c60d63f476e6f4183381223dfb8098eead4a75cf475b72c81abd0 | ae801ca75f3231aee8c71d41ab888c624d536b92f33dcb82a8de4754579fae2a | 0.162872 | 15.550484 | 8+ | 9ffb1527e8f993aeaf07fe10481e1ac466a421fbc330e3f2a5e4127c6873e0bb | #include <stdio.h>
const int e[40] = {0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5,
5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8};
int main(void)
{
int i, x;
long long a = 0, N;
x = scanf("%lld", &N) - 1;
while (N % 2 == 0) {
x++;
N /= 2;
}
a +... | #include <stdio.h>
typedef long long LL;
const int e[40] = {0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5,
5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8};
LL IN(void)
{
LL x = 0;
short f = 0, c = getchar();
while (c < 48 || c > 57) {
f ^= c == 45, c = getchar... |
939b231da5938c55408ec2410c211815e4ec2941638c30e5943a8dffc9daa459 | 2c000e6d5cf0b782f64adde165184924882e61778e82b6a839331316352e3023 | 0.004069 | cpp | 2c000e6d5cf0b782f64adde165184924882e61778e82b6a839331316352e3023 | 17ee9cd656a0a9f65080748fc60c348b909d0c294a614c26c9b374f45c5aa57b | PIE_released_gem5_runtime | pie_47849 | p03846 | c7f2f10a659ce0b827bfd7e6d307551af69734ef608d75ab5ce1447387db067b | 17ee9cd656a0a9f65080748fc60c348b909d0c294a614c26c9b374f45c5aa57b | 0.03167 | 7.783656 | 4-8 | 02531ae8dbb0100ad90668efbaef36df24321d3335d758f686027480455d20f0 | #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 ... |
b2bf427ad43dd68b45c5342b74a05edba5eeed7a7164ffcc8db9abe443e40940 | f9246b0d01ad4aa6b40f081d88d2f653356f69d389e3b4a0bb2d0a835680fe63 | 0.001023 | cpp | f9246b0d01ad4aa6b40f081d88d2f653356f69d389e3b4a0bb2d0a835680fe63 | 6fa06c210e05b93a7bf37ad22b9c1498068a6ebec7d8c6d7775e9a4daf9e5e7e | PIE_released_gem5_runtime | pie_47889 | p00379 | f69a2ae8705afa3c6b30ae5e4763fbdcc8dbe2ba903b85c54b8492815fd33569 | 6fa06c210e05b93a7bf37ad22b9c1498068a6ebec7d8c6d7775e9a4daf9e5e7e | 0.006375 | 6.234514 | 4-8 | 990b3020034dc127d2c2f5c58f47e1cef54b72492331aef5a6dbd97ed03f971d | #include <iostream>
#include <cmath>
using namespace std;
int main() {
int a, n, m, L_sum;
int ans = 0, i = 1;
long long R_ans;
cin >> a >> n >> m;
R_ans = powl(i + a, n);
while (R_ans <= m) {
int num = R_ans;
L_sum = 0;
while (num > 0) {
L_sum += num % 10;
num /= 10;
... | #include <iostream>
#include <cmath>
using namespace std;
int main(void) {
int a, n, m, ans = 0;
int rightAns = 0, rightDigitSum = 0, leftSum = 1;
;
int rightSum;
cin >> a >> n >> m;
while (pow(leftSum + a, n) <= m) {
rightAns = pow(leftSum + a, n);
rightSum = rightAns;
rightDigitSum ... |
8046a004d51d9cfd3200a5bb99ff12530ec75c7fc132f18cc9621c73bd5f4a76 | 44146398f253aaea794ae2a61e66a42dcb56b09994afd2ca152ac95862cfa884 | 0.140512 | cpp | 44146398f253aaea794ae2a61e66a42dcb56b09994afd2ca152ac95862cfa884 | 046b87fa408a0bbf8745596133d0f6a87671321fc7605beb01d0e8285d8675c0 | PIE_released_gem5_runtime | pie_47892 | p00269 | 80f17572efd5b8eced516f6fd8fc0c1b7e518ed9670b442ec9d726925c7cd9fd | 046b87fa408a0bbf8745596133d0f6a87671321fc7605beb01d0e8285d8675c0 | 0.570414 | 4.05954 | 4-8 | 839e24ddb7987d26fbba85b2ea14bc433aa1e44c8ba5c42a166d1fd147121e36 | #include <bits/stdc++.h>
using namespace std;
const int INF = 1001001001;
const int MAX_V = 1000;
const int S = MAX_V - 2, T = MAX_V - 1;
struct edge {
int to, cap, cost, rev;
edge(int to, int cap, int cost, int rev)
: to(to), cap(cap), cost(cost), rev(rev) {}
};
vector<edge> G[MAX_V];
int dist[MAX_... | #include <cstdio>
#include <vector>
#include <algorithm>
#include <iostream>
#include <cassert>
#include <cstring>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <string>
#include <climits>
using namespace std;
typedef pair<int, int> pint;
typedef vector<int> vint;
#define pb pu... |
187fe0cb8db5d1df61972d4d24b9d89efae3d68166c7b8c61e4282ffa7a74256 | ac612ff96966991030b32f21bf8e15b05d4d1a055c9b60572ee8bf91f40a78be | 0.00847 | cpp | ac612ff96966991030b32f21bf8e15b05d4d1a055c9b60572ee8bf91f40a78be | 1ffebb0bb59c0519e31346d931ce3bee80db4b8ff7660fff2733af432ff58489 | PIE_released_gem5_runtime | pie_47915 | p04015 | 70cceec5404387d6cc518e0904d2547b63ea4cb5bfc47c07dfde3016636d326b | 1ffebb0bb59c0519e31346d931ce3bee80db4b8ff7660fff2733af432ff58489 | 0.138267 | 16.324697 | 8+ | 6f26e026c345b972cdf5cced8a0ea345586c777e7c45fc37de9118d2721e8dc5 | #include <bits/stdc++.h>
using namespace std;
long long F[60][2601], n, K, a[210];
long long ans, tmp[60][2601];
int main()
{
scanf("%lld%lld", &n, &K);
for (int i = 1; i <= n; i++)
scanf("%lld", &a[i]);
F[0][0] = 1;
for (int i = 1; i <= n; i++)
{
memset(tmp, 0, sizeof tmp);
for (int j ... | #include <cstdio>
#include <cstring>
#include <algorithm>
#define MAXN 50
using namespace std;
typedef long long LL;
int a[MAXN + 5];
LL dp[MAXN + 5][MAXN * MAXN + 5];
int main()
{
int n, A;
scanf("%d %d", &n, &A);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
dp[0][0] = 1LL;
for (int i ... |
b2e494685e3e00e167c966543d06c8932da68cac6b0b938dfb32287d5a3aaa56 | df067776519bb34a4d5f369f2cfe7a1afcea69ecd47f1ca739c15086eb8e473b | 0.007732 | cpp | df067776519bb34a4d5f369f2cfe7a1afcea69ecd47f1ca739c15086eb8e473b | d6fd4596ca6f05de32f88eca6526249eb7056a9c35967a6db672c450d1e9c066 | PIE_released_gem5_runtime | pie_48104 | p03726 | 560f3dc792f80e92f643a796e1b908056becadf0f74d686fdb6c38c812d55057 | d6fd4596ca6f05de32f88eca6526249eb7056a9c35967a6db672c450d1e9c066 | 0.0593 | 7.669308 | 4-8 | 544aeee464ff4b2699f58205660fd2c30d30f6f6cb6dc7256bef90c47e1f5c73 | #include <bits/stdc++.h>
using namespace std;
const int N = 100010;
inline char nc() {
static char buf[100000], *p1 = buf, *p2 = buf;
return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
? EOF
: *p1++;
}
inline int read() {
char ch = nc();
int sum = 0;
... | #include <cstdio>
#include <cctype>
#include <cstring>
#include <algorithm>
#define max(a, b) (a > b ? a : b)
#define min(a, b) (a < b ? a : b)
#define reg register
typedef long long ll;
template <typename T> inline T read() {
reg T x = 0;
reg short f = 1;
reg char c = getchar();
for (; !isdigit(c); f... |
d0fe46036736dbbb6633eb0c337ced35f2db20df2784e2339b3c39aa0f23dc4b | da58aabba637796fb18c965822cd14204dadfd0d80c41f94674ef7daa4e1af63 | 0.02358 | cpp | da58aabba637796fb18c965822cd14204dadfd0d80c41f94674ef7daa4e1af63 | 98b208948f5e3ac2ab0e5dc929a5bcf8a96a4c6d3b290207de3a0682ee7c209e | PIE_released_gem5_runtime | pie_48175 | p02642 | 9e2b75fef32269ac1ec21861cc3aa37cc14816ef36932490c6a47f256d2073ac | 98b208948f5e3ac2ab0e5dc929a5bcf8a96a4c6d3b290207de3a0682ee7c209e | 0.183806 | 7.794968 | 4-8 | 6f5c9d282f231e3e540a7e7133bd20c398fd9115cbbd555249ad2afcc42e5326 | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const int M = 1000005;
int main() {
int n;
cin >> n;
vector<int> a(n);
rep(i, n) cin >> a[i];
vector<int> cnt(M);
for (int x : a) {
if (cnt[x] != 0) ... | #include "bits/stdc++.h"
using namespace std;
using ll = long long;
template <typename T>
void print_vec(const vector<T> &v, bool is_reverse = false, ll num = 0) {
if (num == 0)
num = (ll)v.size();
cout << endl;
cout << "i= ";
for (ll i = 0; i < num; i++)
cout << i << " ";
cout << endl;
co... |
788d42148eb0fdf69e127f3dab9c2d00d54b7a44f6ae50ca6d1855eac4a72547 | d50bfc4073439a5161319703f72fbfab612b445eb31826810935a26543dda794 | 0.106565 | cpp | d50bfc4073439a5161319703f72fbfab612b445eb31826810935a26543dda794 | 202b784e0979d7a6cb920b4b4665fd074d1265cec0cbce62afff5db97dabb5fe | PIE_released_gem5_runtime | pie_48211 | p03095 | 8adedaeac37e394d116c5ea04595e2eae69141ff0bf20cdc59e653ac014e85d3 | 202b784e0979d7a6cb920b4b4665fd074d1265cec0cbce62afff5db97dabb5fe | 0.279331 | 2.621231 | 2-4 | 1a1aa9b99d2ca9c4e766364a8c45d65c92db61ce478d86736df61f08d1795562 | #include <bits/stdc++.h>
#define range(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, b) for (int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x) cerr << #x << " = " << (x) << endl;
#define int long long
using namespace std;
template <typename X, typename T>
auto vectors(X x,... | #include <bits/stdc++.h>
#define range(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, b) for (int i = 0; i < (b); i++)
#define all(a) (a).begin(), (a).end()
#define show(x) cerr << #x << " = " << (x) << endl;
#define int long long
using namespace std;
template <typename X, typename T>
auto vectors(X x,... |
3702acc7813f53040741960261519ab43773c8ab027a655f15a4f52a53e348fe | 1134ce3485bef75f34a76edc1b37d3a0192c125d0c4fa5cd642d266b9e056572 | 0.064038 | cpp | 1134ce3485bef75f34a76edc1b37d3a0192c125d0c4fa5cd642d266b9e056572 | 8dfc5203f4c32189c33d27efaf3c9957d94fa61884158a83929189e68b799fc5 | PIE_released_gem5_runtime | pie_48257 | p03329 | 42f0e186315acf1ce712ad730c6eb5ff4477e921436f1f72434612f0e95457b7 | 8dfc5203f4c32189c33d27efaf3c9957d94fa61884158a83929189e68b799fc5 | 0.508656 | 7.943099 | 4-8 | 13e1ca05f954e562c33c5cbc3b1415672aaa3243c4ab8bc4adc9fcb1edc8a4e0 |
#include <bits/stdc++.h>
using namespace std;
template <class T> bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
const int MAX_N = 15;
const int MAX_W = 110000;
int dp[MAX_N][MAX_W];
int main() {
int N;
cin >> N;
vector<int> weight;
for (int i = 1; i <= N; i *... | #include <bits/stdc++.h>
using namespace std;
int func(int n, int a) {
int res = 0;
while (n > 0) {
res += n % a;
n /= a;
}
return res;
}
int main() {
int N;
cin >> N;
int res = N;
for (int i = 0; i <= N; ++i) {
int tmp = func(i, 6) + func(N - i, 9);
res = min(res, tmp);
}... |
50b47d588c9e902f0976102180c6b113811b8c0ecefb86180d1e29dad27c6372 | 4417df717d0daa34b763f98034677a74991aa10064632d3ae0256a8b03548427 | 0.084733 | cpp | 4417df717d0daa34b763f98034677a74991aa10064632d3ae0256a8b03548427 | 832adcf5fa66ce4ce843466cbc1a792a1873e2b8fd91d0be6e2ee786ef896a66 | PIE_released_gem5_runtime | pie_48352 | p03689 | e8c90bff550669bf97168e1df3110ff39b91cc48834994fb46447afe601fd4ae | 832adcf5fa66ce4ce843466cbc1a792a1873e2b8fd91d0be6e2ee786ef896a66 | 0.802938 | 9.476128 | 8+ | 0907651af5cc3105f868354006c9896218d5282519d6fbe4342d86bd61de800a | #include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "random"
using namespace std;
cons... | #include "iostream"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "string"
#include "map"
#include "iomanip"
using namespace std;
const long long int MOD = 1000000007;
long long int N, M, K, H, W, L, R;
int main() {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.