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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b5719e4d7223352c916cdf705623598055da221d4d56657558c1a7ddc49e2ff2 | 70d392124840526c843ccd43a8d4ab8e64ed7452daf9b671d424c0666f9c4fd2 | 0.016142 | cpp | 70d392124840526c843ccd43a8d4ab8e64ed7452daf9b671d424c0666f9c4fd2 | 5ac48951354a08d9c96a190283e6a54b2835d6cd964c005a2ce10ef78b3527b1 | PIE_released_gem5_runtime | pie_48409 | p03600 | 321bf6229eaf3d77293a1eeaf5eacbf132c66c5ee89793912e84d35aeff4692d | 5ac48951354a08d9c96a190283e6a54b2835d6cd964c005a2ce10ef78b3527b1 | 0.777111 | 48.141364 | 8+ | ade2235fd6e9164c5c536fd7d0e888805cf6c567f62c876c135b09d1b27f799f | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
long long int a[1000][1000], b[1000][1000], c[1000][1000];
int main()
{
long long int i, n, m, j, k, x, y;
long long int sum = 0;
scanf("%lld", &n);
for (i = 1; i <= n; i++)
{
for (j = 1; j <= n; j++)
{
scanf("%lld", ... | #include <stdio.h>
int main()
{
int a[309][309], n;
while (~scanf("%d", &n))
{
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++)
scanf("%d", &a[i][j]);
long long ans = 0;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j < i; j++)
{
bool flag ... |
2308a2c261b1ffca4ee7aa90d986914b5007cd805bc4b35c5cdbebefab9eac2b | 9ce507c7aa246f058761e7b3b572e4a0a29ae13c2cea17fda9e34e3167e7d7f3 | 0.01552 | cpp | 9ce507c7aa246f058761e7b3b572e4a0a29ae13c2cea17fda9e34e3167e7d7f3 | 96e772805f4611f4081912fb61e782535a77d2cac9366e9241914980fee51c00 | PIE_released_gem5_runtime | pie_48428 | p03746 | 39f0bbcc8859377a801eb24c0959c0bfc49a936381984621fbfc0b185ba00857 | 96e772805f4611f4081912fb61e782535a77d2cac9366e9241914980fee51c00 | 0.282589 | 18.20789 | 8+ | 76188da24e3f8baf81f224ebd94825b9c40c8100faa54d64e9b4329afa473e96 |
#include <functional>
#include <algorithm>
#include <exception>
#include <stdexcept>
#include <streambuf>
#include <iterator>
#include <string.h>
#include <stdlib.h>
#include <typeinfo>
#include <valarray>
#include <iostream>
#include <sstream>
#include <istream>
#include <stdio.h>
#include <climits>
#... | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAXN = 100005, MAXM = 200005;
int n, m;
struct edge
{
int v, nxt;
edge() {}
edge(int vv, int nn)
{
v = vv, nxt = nn;
}
} E[MAXM];
int w[MAXN], ncnt, ans[2][MAXN];
bool vis[MAXN];
void addedge(int u, in... |
2475a7c9aadfb1d8501dbc1624896a7859a662284e51caacf428031d4fd098a4 | 3512a87ffbaf369784bac6a8fb7e3489791ce139d9f36d9b646749ff0fc61830 | 0.019404 | cpp | 3512a87ffbaf369784bac6a8fb7e3489791ce139d9f36d9b646749ff0fc61830 | 56d047bc916a2b90c2ccafb928ce5ce231f9f4a40391d4bc863d7c3425c990a3 | PIE_released_gem5_runtime | pie_48483 | p04018 | e7b834ead33d8ac4d7f6016940a6364ec7209d8e1cdca2862d8aed817bff3fa7 | 56d047bc916a2b90c2ccafb928ce5ce231f9f4a40391d4bc863d7c3425c990a3 | 0.639369 | 32.950183 | 8+ | 76fefb746d65ec94a080cdab22f6fc6ea377782ca4d19a2f02950a0aa1aa3eea | #include <bits/stdc++.h>
#define int long long
using namespace std;
const int N = 5e5 + 5;
const int base = 317;
const int mod = 1e9 + 2277;
string s;
int Hash[N], pw[N], n;
bool pref[N], suff[N];
void buildHash() {
s = "#" + s;
pw[0] = 1;
for (int i = 1; i < N; i++)
pw[i] = (pw[i - 1] * base) % m... | #include <stdio.h>
#include <string.h>
#include <algorithm>
#define Maxn 500005
char s[Maxn];
int n, ans, fail1[Maxn], fail2[Maxn];
void buildFail(char *s, int *fail) {
int j = fail[0] = -1;
for (int i = 1; i <= n; ++i) {
while (j >= 0 && s[j] != s[i - 1])
j = fail[j];
fail[i] = ++j;
}
}
... |
d93dc5c39786663af56a279a2c29a7b3b098da50115948ffe9341f0718703cc1 | 32a4851192154c17e74ef214acc71b888f410e15eafc6f1f23ca9ff58cc1bfc7 | 0.008405 | cpp | 32a4851192154c17e74ef214acc71b888f410e15eafc6f1f23ca9ff58cc1bfc7 | d6848e643f0a8b13129e9c1ab5748e6c90006edf3297dd73bbdf72c7e9e4bd27 | PIE_released_gem5_runtime | pie_48540 | p03020 | a048630496639ac75480bf182c500c8850844770fec0a2902f82920ec7b73c8f | d6848e643f0a8b13129e9c1ab5748e6c90006edf3297dd73bbdf72c7e9e4bd27 | 0.037815 | 4.499357 | 4-8 | 36c80ab2da565c488dbecf45585dcd7bb7061e6b23829d7f243bbba82575e2bc | #include <cstdio>
#include <iostream>
#include <queue>
#include <cstring>
using namespace std;
typedef long long ll;
const int maxn = 2000, maxm = 20005;
const ll inf = 1e11;
struct Edge {
Edge() {}
Edge(int a, int b, ll c, int d) {
v = a;
f = b;
w = c;
nxt = d;
}
int v, f, w, nxt;
};... | #include <cstdio>
#include <cstring>
#define N 1001
#define V 2020
#define E 20386
#define F 0x7fffffff
#define MIN(A, B) ((A) < (B) ? (A) : (B))
struct edge {
int u, v;
long long w;
int c, x;
} e[E];
const long long y[2][4] = {{-1, 1, -1, 1}, {-1, -1, 1, 1}};
long long p[2][2][N], d[V];
int h[V], m... |
19370b25e54479248c654aa73dfd15390190c77704100165c174e07eb68ee7a6 | 7206a4cf72926a8760a63f2f7cc3722356cc5dfdec4918b5242991178c4331ca | 0.014404 | cpp | 7206a4cf72926a8760a63f2f7cc3722356cc5dfdec4918b5242991178c4331ca | f2653b92b9986bf3eda0295dbd8a0cc5a2d4e499265f1b1509ad2280b04d584c | PIE_released_gem5_runtime | pie_48613 | p03809 | 022f54269f2ff6b71bb68a88f242625285d2feca96606b4078c931d987d252bf | f2653b92b9986bf3eda0295dbd8a0cc5a2d4e499265f1b1509ad2280b04d584c | 0.495052 | 34.368919 | 8+ | 34997f4ea93985d518a52056ac2e53375064ca6c91115ea8c6ea46da02eaa870 | #include <iostream>
#include <sstream>
#include <iomanip>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>... | #include <cstdio>
#include <algorithm>
#define int long long
using namespace std;
typedef long long LL;
const int MAXN = 1e5 + 5;
int n;
int head[MAXN], to[MAXN << 1], nxt[MAXN << 1], cnt, ans, du[MAXN << 1];
LL f[MAXN], a[MAXN];
void add(int u, int v) {
nxt[++cnt] = head[u];
head[u] = cnt;
to[cnt] = v;
... |
db0bd7fcde3e9a29847d9a1d9bf4a0683aeb65015bedbd7cc0e93e43404e2f27 | 65cdf446ec9906c7937329a2e3bed4e5480253a82c667644d793efe7588a1285 | 0.105724 | cpp | 65cdf446ec9906c7937329a2e3bed4e5480253a82c667644d793efe7588a1285 | 5975c93f4399bb384ca97e95a101438f879e261568111d3f82c1de30c8695843 | PIE_released_gem5_runtime | pie_48640 | p03312 | f7ec2f494df0daab3edb7b7a501cda2992a8ff804ef8bd75377efe2ae5dc69b8 | 5975c93f4399bb384ca97e95a101438f879e261568111d3f82c1de30c8695843 | 0.453051 | 4.285215 | 4-8 | 9b29abc9049e14ce6a78dd3e46322efb2c8df87d05485f45e0e9c84dee71a5d8 | #include <iostream>
#include <algorithm>
#include <cmath>
#include <vector>
using namespace std;
template <typename T>
using V = vector<T>;
template <typename S, typename T>
using P = pair<S, T>;
using ll = long long;
#define FOR(i, a, b) for (ll i = (a); i < (b); i++)
#define NREP(i, n) FOR(i, 1, n + 1)
ll... | #include <algorithm>
#include <iostream>
using namespace std;
using ll = long long;
ll N;
ll A[200010], sum[200010];
pair<ll, ll> divide(ll b, ll e) {
ll ok = b, ng = e;
ll ds = sum[e] - sum[b - 1];
while (ng - ok > 1) {
ll mid = (ok + ng) / 2;
ll ps = sum[mid] - sum[b - 1];
if (ps * 2 <= ... |
a43ac02f272e3719d2dda8254a263f1c6302fe3172151d7b566ae3b91014cb43 | 15cd9b3a734555e4b3e160e2a4e1dd826e6ca12b1d03ee1bc1b5bb8d2d78f129 | 0.018272 | cpp | 15cd9b3a734555e4b3e160e2a4e1dd826e6ca12b1d03ee1bc1b5bb8d2d78f129 | 1f2bb5a9a5a780afbf2b502056ba8b1761718ec0890610068c23855ec48dfd10 | PIE_released_gem5_runtime | pie_48680 | p03677 | 9b5bdaaedb0c9d01ddc76f942f12395a31a957cedc18d4e83aca69d3145cb305 | 1f2bb5a9a5a780afbf2b502056ba8b1761718ec0890610068c23855ec48dfd10 | 0.736167 | 40.290038 | 8+ | a34bdd17bbc7445aa408a5084d797ac75b76c0f91dd5c09309249b2443f535be | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
#define Forn(i, n) for (int i = 1; i <= (n); i++)
#define forn(i, n) for (int i = 0; i < (n); i++)
#define lid id << 1 | 1
#define rid (id << 1) + 2
#define foreach(it, a) ... | #include <cstdio>
#include <algorithm>
using namespace std;
#define ll long long
const int maxn = 1e5 + 5;
const ll INF = 0x3f3f3f3f3f3f3f3f;
int a[maxn];
struct node
{
int l, r;
ll diff, lz;
} tree[4 * maxn];
void build(int l, int r, int cur)
{
tree[cur].l = l;
tree[cur].r = r;
if (l == r)
... |
7acdda1c8585c570d62c54f2278a4e63fe748cfe790330ff5dfaf8aaeea04ddf | ab65ad4b7acea122f47a19b8f7858492d691e046adca319db251911e791b264d | 0.019821 | cpp | ab65ad4b7acea122f47a19b8f7858492d691e046adca319db251911e791b264d | 6ef89cd3d54a8c66df19303b98c707f3dfef75efd3cfed5414c60a1ffc5a6359 | PIE_released_gem5_runtime | pie_48698 | p02652 | 453af1d9795eea5bd58b214a37fff4f85836490f984c3b48f227bfa263593509 | 6ef89cd3d54a8c66df19303b98c707f3dfef75efd3cfed5414c60a1ffc5a6359 | 0.107404 | 5.418722 | 4-8 | 0dd032f129b33ac697433898ffdb4b3a6eb1e3eb2b57951ba1e210dfedc2274d | #include <iostream>
#include <string>
#include <algorithm>
#include <cstdlib>
template <typename T>
void fin(T const &t) {
std::cout << t << std::endl;
exit(0);
}
int main() {
std::cin.tie(0);
std::ios::sync_with_stdio(false);
std::string s;
std::cin >> s;
int ans = s.size();
int aa[] = {0, 1,... | #include <cstdio>
#include <algorithm>
char buf[1000010];
int main() {
scanf("%s", buf);
int a0 = 0, a1 = 1, b0 = 0, b1 = -1;
int c0 = a0 - b0, c1 = a0 - b1, c2 = a1 - b0, c3 = a1 - b1;
for (char *p = buf; *p; p++) {
if (*p == '0') {
--a0;
--a1;
--b0;
--b1;
}
else if... |
2e5f356e23f1290c4c2f50d8e6a400bd4d14a81ab8a48c08ec93560d7a29b1bf | 591369c1edf84effa582e70ce5118584e0cea92363083fe9af0e96eb6e8d7e36 | 0.025062 | cpp | 591369c1edf84effa582e70ce5118584e0cea92363083fe9af0e96eb6e8d7e36 | 0bfef0f3bf4b132970be3bcb7da47c51c70b903e94ee91266302b9e944bae557 | PIE_released_gem5_runtime | pie_48704 | p03038 | 1acff1796c3139b5831d0e30fd3843f6c7daf86a106240a081dedebe48e158cc | 0bfef0f3bf4b132970be3bcb7da47c51c70b903e94ee91266302b9e944bae557 | 0.194345 | 7.754626 | 4-8 | 26fa4c6e0d77bbd38d1c635b8ac3654aa1eaf15ea77827332fa4e1520b5bbfeb | #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... |
4acfa6e2bf5b6986720f6c134bf6acb94215b3a457e95e9ba1d5ab31b5174b43 | 14de792b363e192439011d5ac97e5f22ae67f623579063fed00d3b9b575a996a | 0.004413 | cpp | 14de792b363e192439011d5ac97e5f22ae67f623579063fed00d3b9b575a996a | cfa5085f0706114faa4ad02792ea6f8dc55db9685b31cbda5205dd4c563342a0 | PIE_released_gem5_runtime | pie_48761 | p03346 | d938436e14b3ce07e031e8157dde327a3418c747388f065fcd52896730c6580e | cfa5085f0706114faa4ad02792ea6f8dc55db9685b31cbda5205dd4c563342a0 | 0.173778 | 39.381275 | 8+ | 859cbf11f815f4aa4df524065144c69202e7ca39f2f72ef6a6344454f5bda2cd |
#include <iostream>
#include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
#define Max int(2e5 + 10)
using namespace std;
int n, p[Max], a[Max], dp[Max];
vector<int> g[Max];
int dfs(int x)
{
if (dp[x] > 0)
return dp[x];
dp[x] = 1;
for (int i = 0; i < g[x].size(); i++)
dp[... | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define mem(v, x) memset(v, x, sizeof(v))
#define low(x) (x & (-x))
int pos[500010], n, m;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; i++) {
scanf("%d", &m);
pos[m] = i;
}
int len = 1, ans = 5000000;
... |
3fcec708df61139345c3c8ffba6f9568a51c9cf96888e209b92001639b610971 | d5b1184b1aa24c9863332784ae57a3c68617bc29da0b3a4928f17e5f50880f0f | 0.005808 | cpp | d5b1184b1aa24c9863332784ae57a3c68617bc29da0b3a4928f17e5f50880f0f | c61c1edb4ee7a225ab6bbd6a9a78f602b10b32436dece403f6b53396332889b3 | PIE_released_gem5_runtime | pie_48918 | p01288 | 2dc336077c052402d845f4f39b32236274405cbaa7e7a824b575a8d237fef6a9 | c61c1edb4ee7a225ab6bbd6a9a78f602b10b32436dece403f6b53396332889b3 | 0.327056 | 56.311061 | 8+ | 110f297768ebf8f2bb66f511c4dbd6c59e51bb8184e6838f06df4db427b512ef | #include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
#define LL long long
#define L (x << 1)
#define R (x << 1 | 1)
#define N 100110
using namespace std;
vector<int> edge[N];
vector<int> mark[N], query[N];
int n, m;
struct Tree {
struct node {
int v;
} ... | #include <cstdio>
#include <cstring>
#include <algorithm>
#define N 100010
int a[N];
long long Find(int x) { return a[x] == x ? a[x] : Find(a[x]); }
int main() {
while (true) {
int n, q;
scanf("%d%d", &n, &q);
if (!(n || q))
break;
a[1] = 1;
for (int i = 2; i <= n; i++)
s... |
7052e63336953abacecff79fb088dc29035651937d55566158334305f0fd8ff5 | d1802abea59b130c68150ff81bc9ce397a66d8cd9a6c97af8d461769117b3dfb | 0.009929 | cpp | d1802abea59b130c68150ff81bc9ce397a66d8cd9a6c97af8d461769117b3dfb | 73d24f434e5ab427e1801d789788f2c1ab3f6855047107d410f470deb0501043 | PIE_released_gem5_runtime | pie_49086 | p03033 | 7445cf01dfc7dc4630d7a7f0d269b1282ecaa062bc87dda58f9ca3d1d29ef20a | 73d24f434e5ab427e1801d789788f2c1ab3f6855047107d410f470deb0501043 | 0.389974 | 39.276289 | 8+ | 2bb90d4e5c056cefdd01a501e2d28de67256ddea4489a4472816f7a29db69582 | #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 ... |
e0afa360944fccaad4beb35ed47f55c9eecea4586df4ba18cf77f87a318e9ffb | 4e5525e1970cdde6b988e6b53c9c28f82817490058771508f33484704b548d86 | 0.038286 | cpp | 4e5525e1970cdde6b988e6b53c9c28f82817490058771508f33484704b548d86 | 1dde462a6c3bf39181c0b8e9bccabd52583e26975db5d6dbf7a4ee98e6afa52c | PIE_released_gem5_runtime | pie_49102 | p02326 | 600ae580cf63ced4aa0828b89887072def5e3cfbb1f8cd85ee3faf6d1cfd62f3 | 1dde462a6c3bf39181c0b8e9bccabd52583e26975db5d6dbf7a4ee98e6afa52c | 0.122737 | 3.205751 | 2-4 | a511294f9490f840cea690dab7fe59861342a50d3dd237e1aeadcdd0f4eecebc | #include <iostream>
#include <algorithm>
using namespace std;
const int MAX = 1400;
int minSquare(int tile[MAX][MAX], int x, int y) {
if (tile[y][x] == 1) {
tile[y][x] = 0;
return 0;
}
return min(tile[y - 1][x - 1], min(tile[y - 1][x], tile[y][x - 1])) + 1;
}
int main() {
int H, W;
int tile... | #include <stdio.h>
#include <algorithm>
using namespace std;
const int MAX = 1400;
int main() {
int H, W;
int tile[MAX][MAX];
int ans = 0;
scanf("%d%d", &H, &W);
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
scanf("%d", &tile[i][j]);
}
}
for (int y = 0; y < H; y++) ... |
e705f3a7521aca263d124c7add66cd8b6e758583d39054531810a05872c48112 | 3dc3ffddf6c76b2541029de56ae1d9dd1baf64cf5b4e917aa8a3578f5d7dc0b4 | 0.059419 | cpp | 3dc3ffddf6c76b2541029de56ae1d9dd1baf64cf5b4e917aa8a3578f5d7dc0b4 | 57dd95d52370caff7688ba9cf94b56ea01060238780c0001a9d0beaff34972ef | PIE_released_gem5_runtime | pie_49135 | p02973 | 64f3ab5b018d3ccb9424313f31686080e52c722a5e98e5cf3d30eb6dda1b463c | 57dd95d52370caff7688ba9cf94b56ea01060238780c0001a9d0beaff34972ef | 0.549213 | 9.243099 | 8+ | 8cdb6c71a01cfda06092c30b42d3069497f01e18f86efe987679efc59a348339 | #include <iostream>
#include <map>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <set>
#include <math.h>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<ll, P> Q;
const ll mod = 1000000007;
const ll INF = 1000000000000000;... | #include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <string>
#include <queue>
#include <fstream>
#include <string>
#include <math.h>
#include <set>
#include <string>
#include <bitset>
#include <fstream>
using namespace std;
typedef long long ll;
typedef unsigned long long u... |
2656ed7b16820d044842ef0e887347ec7e1dfc65bb5eab19985a30ef13753bbe | deef40e7b54a6574e84dd1389bf28d4e16effcba8f7751ac55b8b2a3456dc158 | 0.00025 | cpp | deef40e7b54a6574e84dd1389bf28d4e16effcba8f7751ac55b8b2a3456dc158 | 40cedd14b98c32b8f3e5fb0b0347a17c8a5a6d7930875bc124f865835d39a7e2 | PIE_released_gem5_runtime | pie_49187 | p03830 | 7b25ab7060909e34297c46a218049c2008aa7a3e8f33484e25f01527e6477edb | 40cedd14b98c32b8f3e5fb0b0347a17c8a5a6d7930875bc124f865835d39a7e2 | 0.001015 | 4.052932 | 4-8 | 1add7925c05a2a335b511593b4557be750da4e7be8704ee60022db1a701740e4 | #include <iostream>
using namespace std;
#define LL long long
const LL MOD = 1e9 + 7;
LL n;
LL get(LL x, LL y)
{
LL ret = 0;
while (x >= y) {
ret += x / y;
x /= y;
}
return ret;
}
bool prime(int x)
{
if (x < 2)
return false;
if (x == 2)
return true;
if (x % 2 == 0)
retu... |
#include <cstdio>
#include <math.h>
#include <algorithm>
using namespace std;
typedef long long LL;
const int mod = 1e9 + 7;
int a[1010], num;
LL bit[1010];
bool isprime(int x) {
if (x == 1)
return false;
int q = sqrt(x);
for (int i = 2; i <= q; i++)
if (x % i == 0)
return false;
re... |
08f09cb28f2a1393331196d82089e7646a8282a55298a1025b14b4b5598a0ecd | 58f8e5f536872ace10fd8d6404744ae140a3b2e9f9bbdb9f3dfe500c51a9c4f9 | 0.019496 | cpp | 58f8e5f536872ace10fd8d6404744ae140a3b2e9f9bbdb9f3dfe500c51a9c4f9 | f789a85b96392f2b1cafb51220a87144d3ca3c294c6b9f1a72d37315539c631f | PIE_released_gem5_runtime | pie_49359 | p01340 | a7bd068ef2e5f15d2427d2c3175f1f3e0fcad35aa74279cc16f6c52de3c7fec4 | f789a85b96392f2b1cafb51220a87144d3ca3c294c6b9f1a72d37315539c631f | 0.105901 | 5.432013 | 4-8 | 94cc497d2154ec0a2ef72bbbf5346d81c610f76e08a5c21ea06f89552d26e6f1 | #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cst... | #include "stdio.h"
#include "stdlib.h"
int n, m;
int map[15][15];
char str[100];
char dir[] = {' ', 'U', 'D', 'R', 'L'};
int sx, sy;
int c;
int ans[100];
bool dfs(int x, int y, int step)
{
if (step == c)
return true;
if (map[x][y] != 2)
for (int i = x - 1; i >= 0; i--)
if (!map[i][y])
... |
4046d3af895dd53f8460c70029184468f54e2b42ea1617f6aaa19f71d8471380 | 7b629d60471d0c244b22e7d3ca3b39e2241fed8a779a2a87eba489d4abfde1b9 | 0.008574 | cpp | 7b629d60471d0c244b22e7d3ca3b39e2241fed8a779a2a87eba489d4abfde1b9 | 1757f803d44b7d2f1758cece9e9348b72b6eecb45d61d9ffed883a3bcd66e4a4 | PIE_released_gem5_runtime | pie_49364 | p01359 | ee14683bb7277e984c546ff75abc277874cfe803224235fd2e155804d4c925d7 | 1757f803d44b7d2f1758cece9e9348b72b6eecb45d61d9ffed883a3bcd66e4a4 | 0.043608 | 5.086186 | 4-8 | 0f408893cc5f9ba4ba11371a1ec02269a3cfd3104f4b2482117c8ce6973a7ba4 | #include <iostream>
#include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <map>
#define inf 1e9
#define eps 1e-8
#define MAXT 500000
#define MAXN 1010
using namespace std;
int n, q;
struct Node
{
char nam[20];
int ... | #include <stdio.h>
#include <algorithm>
#define inf 1000000111
#define N 1005
using namespace std;
struct Calender
{
int l, r;
char st[22];
} cale[N];
int cmp(Calender x, Calender y)
{
return x.l < y.l;
}
int main()
{
int n, q, x;
while (scanf("%d%d", &n, &q))
{
if (n == 0 && q == 0)
... |
5a0f2c7ea72cfbf5c3bd3ce80a25e78044b39738d11917a4ca63d4587b502f53 | 0cf961592fbbd5392250a0b9a4b3dc7582a330eec5dc8b8458aa651e9745c565 | 0.009783 | cpp | 0cf961592fbbd5392250a0b9a4b3dc7582a330eec5dc8b8458aa651e9745c565 | 644cf0a018d779365df21c13a4a0a1888fe07ad7c1b35b7b2e14e9382c495f8a | PIE_released_gem5_runtime | pie_49368 | p04014 | 85c9edfc3645f8c32d9294c3c33d8d827b0abeeb332a2b03f236fd888850857b | 644cf0a018d779365df21c13a4a0a1888fe07ad7c1b35b7b2e14e9382c495f8a | 0.047445 | 4.84975 | 4-8 | 2d4901c50fdaa087094ae3e9894ce56a5593090bb5bea91b0218e50ed5bdf98d |
#ifdef local
#include "D:\vscode\acm\local.hpp"
#else
#include <bits/stdc++.h>
using namespace std;
#define debug(...) \
do { \
} while (... | #include <stdio.h>
#include <math.h>
typedef long long LL;
LL f(LL x, LL n)
{
if (n < x)
return n;
return f(x, n / x) + n % x;
}
int main()
{
LL n, s, i, d, k, x, y;
scanf("%lld%lld", &n, &s);
if (s > n) {
puts("-1");
return 0;
}
if (s == n) {
printf("%lld\n", n + 1);
r... |
36d7fd75d26525e7040df4ae22fe600e14bee776437e34c6f7bc7cfa7712dd0b | 00c061419a58846b1dce70f9a6686950930822608315b0816efaa325707d82bb | 0.110051 | cpp | 00c061419a58846b1dce70f9a6686950930822608315b0816efaa325707d82bb | 9d105f71e40ccfc09a11ce84a9dcaf54ed2005d5a6c23b3f5f05de92696dd00a | PIE_released_gem5_runtime | pie_49401 | p02839 | cdab797d23049f6433d4a1c32c26c5bac5ee56a994a5678fb1c9c47c27de4b57 | 9d105f71e40ccfc09a11ce84a9dcaf54ed2005d5a6c23b3f5f05de92696dd00a | 0.319174 | 2.900248 | 2-4 | 05d2ba59bb173450b208823b1400a19b7bf5f868232dfb1ebf6fe927d72efd59 |
#include <vector>
#include <list>
#include <map>
#include <climits>
#include <set>
#include <unordered_set>
#include <unordered_map>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream... |
#include <vector>
#include <list>
#include <map>
#include <unordered_map>
#include <climits>
#include <set>
#include <unordered_set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream... |
df9eb0a19b9073743918e6ba770edd3c3daeb62fc806e34d1320d8432ab799c8 | 84e94f171b16fd956f9719009e25844b44b054659df1f3dc1a2e83207a8f158c | 0.000251 | cpp | 84e94f171b16fd956f9719009e25844b44b054659df1f3dc1a2e83207a8f158c | 706843c87ee05cdfb0f3435d02389630895d4887d02e5f45dfce2a7ff6fcf420 | PIE_released_gem5_runtime | pie_49469 | p02245 | 52aedcaac05d7fae1e27ebbb80602dab13b2da23b3472c54e66f9a416f422963 | 706843c87ee05cdfb0f3435d02389630895d4887d02e5f45dfce2a7ff6fcf420 | 0.002663 | 10.589609 | 8+ | b5bd854fb8fbf9c5128502abf3160cd18a66c66dc51aa33756727f5831696b07 | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
#include <map>
#include <queue>
#define Max 9
int gg[Max] = {1, 2, 3, 4, 5, 6, 7, 8, 0}, s[Max];
int ff[4][2] = {0, -1, 1, 0, 0, 1, -1, 0};
int sum;
struct node
{
int a[Max];
int step;
};
map<int, int> m;
int bfs()
{
... |
#include <stdio.h>
#include <string.h>
#include <math.h>
int Map[4][4];
int max1, min1;
int start_x, start_y;
int flag;
int c[4][2] = {0, 1, -1, 0, 1, 0, 0, -1};
int HMD()
{
int i, j, num = 0;
for (i = 0; i < 3; i++)
for (j = 0; j < 3; j++)
if (Map[i][j] == 0)
continue;
else... |
71fbe2bb44bb4ba54dac89667a4fd151f47e1e171ee26edccbd9204ee84daf3a | be67fcddb02ae73e5dbd45e9c88aaa3e98fc15216038b844cbc277870677c9e7 | 0.067826 | cpp | be67fcddb02ae73e5dbd45e9c88aaa3e98fc15216038b844cbc277870677c9e7 | aa89b04f93bf0015b287e204b12310990ca8d2dfe6c0ba8fcf798804c207d183 | PIE_released_gem5_runtime | pie_49512 | p02364 | 1756e0907ba523975f89ba22862777d3715a0b086a27dfa86804b1feaf50b1b5 | aa89b04f93bf0015b287e204b12310990ca8d2dfe6c0ba8fcf798804c207d183 | 0.145806 | 2.149711 | 2-4 | 09469cde700e363c5db2f5604dd8db65bab152a9070316d54a91744fdfaf7845 | #include <stdio.h>
#include <algorithm>
#include <iostream>
using namespace std;
int fa[100010];
int n, m;
struct edge {
int x, y, w;
edge(int x = 0, int y = 0, int w = 0) : x(x), y(y), w(w) {}
} a[100010];
int getfa(int x) {
if (x == fa[x])
return x;
else
return getfa(fa[x]);
}
bool cmp(ed... | #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
#define PB push_back
#define PF push_front
#define LB lower_bound
#define UB upper_bound
#define fr(x) freopen(x, "r", stdin)
#define fw(x) freopen(x, "w", stdout)
#define iout(x) printf("%d\n", x)
#define lout(x) printf("%lld\n", x)
#define REP(x, l, u... |
7618d6b85823e79e8ab71e6be8634d03ed515d6ae448a7ee88040a167960a378 | fb0f04cf89ea6f3074240a4198addbec5a288b97fa9682e62eba1c9c49ab7733 | 0.01964 | cpp | fb0f04cf89ea6f3074240a4198addbec5a288b97fa9682e62eba1c9c49ab7733 | 08b50d80b5c1888a32e92a47e6c2591e0a35a2024717e5d0ba4bc1c8066136fa | PIE_released_gem5_runtime | pie_49543 | p02999 | ed93b4aa0f4d25dcba7965b5e9d5227b9b342f53e18fb25f21cf357c34370d96 | 08b50d80b5c1888a32e92a47e6c2591e0a35a2024717e5d0ba4bc1c8066136fa | 0.10531 | 5.362156 | 4-8 | 1575ca29d0a883e1acf9e30199b3ff368392bcb1304d2a948c42762ae2d44b94 | #include <iostream>
using namespace std;
int main()
{
int x, n;
cin >> x >> n;
if (x < n) {
cout << 0;
} else {
cout << 10;
}
return 0;
}
| #include <stdio.h>
int main()
{
int x, a;
scanf("%d%d", &x, &a);
if (x < a) {
printf("0");
}
else {
printf("10");
}
return 0;
} |
7603a52c2c19a8d2d6bdabbffaf0147eb24629b666dbbe14a30bba4ba8f29873 | 505cf33aa5b4707e546dedfcad33d5c30d73da9d907001ff1a10f00c5da0be22 | 0.068893 | cpp | 505cf33aa5b4707e546dedfcad33d5c30d73da9d907001ff1a10f00c5da0be22 | 0115ad7bad3773eeb5e76d62a775de01fa52aeb766b961372249e8a5913227e2 | PIE_released_gem5_runtime | pie_49547 | p01062 | e42950ccfee76a5028674376894854eeee03ab10be2d24f2c201131a5e12716a | 0115ad7bad3773eeb5e76d62a775de01fa52aeb766b961372249e8a5913227e2 | 0.855373 | 12.415907 | 8+ | 1785d9e12f4f024868d98e59b9366869ccd7c19fb281ed5161d249bee4bc4584 | #include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>
#include <complex>
using namespace std;
using ll = long long;
const int MN = 200200;
vector<int> g[MN];
int sz[MN], rt[MN];
void dfs(int p, int b) {
sz[p] = 1;
rt[p] = b;
for (int d : g[p]) {
if (d == b)
continue;
... | #include <cstdio>
#include <algorithm>
#include <stack>
#include <queue>
#include <deque>
#include <vector>
#include <string>
#include <string.h>
#include <cstdlib>
#include <ctime>
#include <cmath>
#include <map>
#include <set>
#include <iostream>
#include <sstream>
#include <numeric>
#include <cctype>... |
a70a09b63bf42d2d0a18d071bc3db39c11dce94ce706f64d9accac448c64410d | 22d04ff96832efeef4650407f5aff9e117a8b5931a3c2b998287c5e6d27218af | 0.046497 | cpp | 22d04ff96832efeef4650407f5aff9e117a8b5931a3c2b998287c5e6d27218af | 98352d1f8e44917c41485ad9c36be03a397ebde38f697bed782cb1becdd41881 | PIE_released_gem5_runtime | pie_49560 | p02366 | c59883e45180781708606af03fefd6eb53dcc549bdcb96ba4e4784ae438005e8 | 98352d1f8e44917c41485ad9c36be03a397ebde38f697bed782cb1becdd41881 | 0.181536 | 3.904231 | 2-4 | 0345e0c12fc9ee02a18ba10e141c6125d9c7e092f0f2aa3533a039dfc7a504db |
#include <iostream>
#include <vector>
#include <set>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
static const int WHITE = 0;
static const int GRAY = 1;
static const int BLACK = 2;
int N, num = 1;
vector<int> G[MAX];
set<int> st;
int colors[MAX], prenum[MAX], parent[MAX],... |
#include <iostream>
#include <vector>
#include <set>
using namespace std;
static const int MAX = 100000;
static const int NIL = -1;
int timer;
int prenum[MAX], parent[MAX], lowest[MAX];
bool visited[MAX];
void dfs(int current, int prev, int n, vector<vector<int>> &G) {
visited[current] = true;
prenum[c... |
f05e268624d24bebce8c2026626292e16dfc60571e4e6eb63b87bf25e18f50c5 | 3b1d43d5a867f15826e6ff17b09075b5b88f249026abaad396f2adfc5c4e635a | 0.107944 | cpp | 3b1d43d5a867f15826e6ff17b09075b5b88f249026abaad396f2adfc5c4e635a | 3b63864c9418c505def930db00ec6245686d2b7937422cea34fef917b5739cc1 | PIE_released_gem5_runtime | pie_49574 | p00324 | c03c33b771ff28037dd00ec65015ec511a94da652121076da58afbd0ce578c69 | 3b63864c9418c505def930db00ec6245686d2b7937422cea34fef917b5739cc1 | 0.335332 | 3.106531 | 2-4 | 753e359dbe276c6f56cc22b717b6919da2b3c9da0d49bf05e352a00842995a48 | #include <iostream>
#include <algorithm>
#include <array>
#include <cstdint>
#include <functional>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string>
#include <unordered_map>
#include <utility>
#include <vector>
#define INF 1000000000
#define MOD 100000... | #include <iostream>
#include <algorithm>
#include <array>
#include <cstdint>
#include <functional>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stdlib.h>
#include <string>
#include <utility>
#include <vector>
#define INF 1000000000
#define MOD 1000000007
#define rep(i, a, b)... |
10f35518bcafef852b5296100af2306d896bfeb51ac2b9303cc7587a81e9ae09 | b123260a5e44405b99bccdac20c2c2d5ff85461016ef8d2737926b77d072f4a2 | 0.019668 | cpp | b123260a5e44405b99bccdac20c2c2d5ff85461016ef8d2737926b77d072f4a2 | 9024dbfcda69f62a28a3591b2e96c6dadbf0519cce345040f7b0cf1fdd3f7a15 | PIE_released_gem5_runtime | pie_49585 | p03473 | 0c7a1518113f088eb1abaf4b869bb38bdc8e8a40e549616f9a009ab4d85277cb | 9024dbfcda69f62a28a3591b2e96c6dadbf0519cce345040f7b0cf1fdd3f7a15 | 0.104565 | 5.316405 | 4-8 | 02d0497017299465593cd948d866756333cc0fc8e63eb1a9eb00bb00c03b7012 | #include <bits/stdc++.h>
using namespace std;
int main() {
int m;
cin >> m;
cout << 48 - m << endl;
} | #include <cstdio>
int m;
int main() {
scanf("%d", &m);
printf("%d\n", 48 - m);
} |
2fd19137c4843275f4bfedca5bb92df4995aa4826adfee5a29978726a42503b6 | e7f1a960991c01f8b06caa5995ff7ec5c5a4e15163bb82eb8f398f4d6b6a67fc | 0.077259 | cpp | e7f1a960991c01f8b06caa5995ff7ec5c5a4e15163bb82eb8f398f4d6b6a67fc | 12ab68ff1ac57d72fdc05a9fbea72a0a7de171542d5f37a972a2837528625b89 | PIE_released_gem5_runtime | pie_49589 | p02976 | ee79117dc7b513630d76e163cb5a62dce5497728b6e5c5dcd059b5d0c84122b0 | 12ab68ff1ac57d72fdc05a9fbea72a0a7de171542d5f37a972a2837528625b89 | 0.504994 | 6.536411 | 4-8 | 11d39aa7f20049479e53ea72795bc8610cda006d76c3d910ff90fc3b839cf5d8 | #include <bits/stdc++.h>
using namespace std;
const int maxn = 1000 * 100 + 20;
vector<int> gr[maxn], ans[maxn];
int n, m, vis[maxn];
void dfs(int v, int u) {
vis[v] = 1;
for (int i : gr[v]) {
if (!vis[i]) {
dfs(i, v);
if (ans[i].size() % 2)
ans[i].push_back(v);
else
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
struct E {
int v;
bool vis;
E *next, *rev;
};
const int N = 100010;
int n, m;
bool vis[N], par[N];
E *g[N];
E *adde(int u, int v) {
static E pool[N * 2], *p = pool;
++p;
p->v = v;
p->next = ... |
37d0e27aa22c82e38c55ba44c7a855597790e6f25ea6e893f297dd9fe955f6f3 | d1f903c369ce8ff3ab1313af9f97bbdeac0af7fbf6959387731b9347c2912a73 | 0.067684 | cpp | d1f903c369ce8ff3ab1313af9f97bbdeac0af7fbf6959387731b9347c2912a73 | c5c7ac05d32ba1758ee1894759881faafdd0157706428ccd4e4ac3da9a566d8b | PIE_released_gem5_runtime | pie_49630 | p03087 | 5045e3ffab73b813cdf3b5a79aaf27d75bae2fa3b2fc810f904a6acce117d4d4 | c5c7ac05d32ba1758ee1894759881faafdd0157706428ccd4e4ac3da9a566d8b | 0.741332 | 10.952766 | 8+ | b7922ba00f79ee1330e65f4099daa7779b97fbd2fb89cef328d1c1ef3adde28c |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fast() \
ios_base::sync_with_stdio(0); \
cin.tie(0)
#define all(x) x.begin(), x.end()
#define pb push_back
#define F firs... |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define fast() \
ios_base::sync_with_stdio(0); \
cin.tie(0)
#define all(x) x.begin(), x.end()
#define pb push_back
#define F firs... |
78f28b15fc085cf4da018daa46b9b40e8c9b9a5a4df5928e81ccc38f0f7567a6 | 2523b96d28451c0346b389fa18ffe8d8607dd337e7d970902945fb7b474c0a3e | 0.094703 | cpp | 2523b96d28451c0346b389fa18ffe8d8607dd337e7d970902945fb7b474c0a3e | bc5343d76c12e22a7c2f146d61659e9aa8aa13bfdc8a0c630919b25a502a5b48 | PIE_released_gem5_runtime | pie_49645 | p02820 | 4c00c669b668e1ebb28268e24cfc3237128103131227f662f33599a3fa365f85 | bc5343d76c12e22a7c2f146d61659e9aa8aa13bfdc8a0c630919b25a502a5b48 | 0.368174 | 3.887681 | 2-4 | 6913124ee5d0bd8743965032b0907a23d699343682d437bea63c1451fe62c2c9 | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
const int INF = 1001001001;
const int mod = 1000000007;
int score = 0;
int N, K;
int R, S, P;
string T;
vector<vector<int>> dp(3, vector<int>(100001, 0));
vector<ch... | #include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
const int INF = 1001001001;
const int MOD = 1000000007;
typedef long long ll;
int main() {
int N, K;
cin >> N >> K;
int R, S, P;
cin >> R >> S >> P;
stri... |
1889e6710bed1856fbaf961925688694485efb150634bdff9b57e0315f8cb0a8 | 41c773cad00d8f11c44a795831033c6ce7eee5d74558fdcd19713e0b158a21c3 | 0.000193 | cpp | 41c773cad00d8f11c44a795831033c6ce7eee5d74558fdcd19713e0b158a21c3 | 300054744b7ec325574ba6c4c16bdfc576e4fe3458031982dc27dbaf5c1b3d12 | PIE_released_gem5_runtime | pie_49654 | p03847 | 98bc0cbddbb055b345df782d58ccfb7ece1392f883e4f46c988cd14d237e52dd | 300054744b7ec325574ba6c4c16bdfc576e4fe3458031982dc27dbaf5c1b3d12 | 0.001603 | 8.286797 | 8+ | ee4bf090999a3e3fc713a1c248fab7e0b768a49fd11a8342f02d403ef1deb312 | #include <stdio.h>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iterator>
#pragma warning(disable : 4996)
typedef long long ll;
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#define MA... | #include <stdio.h>
#include <string>
#include <cstring>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <iterator>
#pragma warning(disable : 4996)
typedef long long ll;
#define MIN(a, b) ((a) > (b) ? (b) : (a))
#define MA... |
1dd308952b2493c0c112a24dace57b8f21812dbcb889102cfb06fc33a1d9ced3 | 3d33167b1f3f7b307c49888ba55e892d83d58355be37308124c9e586ad50c5a9 | 0.012645 | cpp | 3d33167b1f3f7b307c49888ba55e892d83d58355be37308124c9e586ad50c5a9 | d928094ec13277a0f445d3fcc4b5b2837620f536403286cd742237d784a7ff61 | PIE_released_gem5_runtime | pie_49663 | p03270 | 19ae93a3a796fec10827506f4e387b1ee826abb542d7617442a6b7ae67eb850d | d928094ec13277a0f445d3fcc4b5b2837620f536403286cd742237d784a7ff61 | 0.132899 | 10.509984 | 8+ | fdca158f576c41a22180e3116ec06c3e6b60a43c6863b4154b4e927c674b75a0 | #include <cstdio>
#include <cstdlib>
#define min(a, b) (a < b ? a : b)
const int clz = 998244353;
#define mod clz
long long matm(long long val, long long k) {
long long ret = 1;
while (k) {
if (k & 1)
ret = ret * val % mod;
k >>= 1;
val = val * val % mod;
}
return ret;
}
int n, k;
... | #include <cstdio>
#include <cstring>
#include <algorithm>
#define ll long long
#define mod 998244353
#define MN 4000
using namespace std;
inline int in() {
int x = 0;
bool f = 0;
char c;
for (; (c = getchar()) < '0' || c > '9'; f = c == '-')
;
for (x = c - '0'; (c = getchar()) >= '0' && c <= '9'... |
84979bb9161d53560cb361b7c78038f768a90021008c7c58df792345632d312e | 6fe4e1d1fa0968382940c018dbd2b3f2dcd8d20368cd1196fd50a5b8ee0dfdf6 | 0.011927 | cpp | 6fe4e1d1fa0968382940c018dbd2b3f2dcd8d20368cd1196fd50a5b8ee0dfdf6 | 2e4e2e825153d441e950896bde30c197472f2c17bc91565e37e6946143c9803f | PIE_released_gem5_runtime | pie_49681 | p03014 | 06d4725b6caa46b7a3098f29ded8accce321c351dd45b860f69b02373b3d7beb | 2e4e2e825153d441e950896bde30c197472f2c17bc91565e37e6946143c9803f | 0.069856 | 5.856724 | 4-8 | d6e24fada0f8dba972deb4db001b84ce3076a5964cfdf4f6527a3abee916a7b9 | #include <bits/stdc++.h>
#define N 2020
using namespace std;
char grid[N][N];
vector<int> ln[N], vln[N];
int main() {
int n, m, i, j, k, l, num, ans = 0, pos1, pos2, posa, posb;
cin >> n >> m;
for (i = 0; i < n; i++)
{
for (j = 0; j < m; j++)
{
cin >> grid[i][j];
if (grid[i][j] ... | #include <stdio.h>
char g[2001][2001];
int n, m, maxc[2001][2001], maxr[2001][2001], lst = -1, res, max;
int main() {
scanf("%d%d", &n, &m);
for (int i = 0; i < n; i++)
scanf("%s", g[i]);
for (int i = 0; i < n; i++, lst = -1, res = 0)
for (int j = 0; j <= m; j++)
if (j == m || g[i][j] != '.')... |
9025f651c16877b391c92f6bf86aa78cf7dd44d1dc3bbd4357262f94f6c162ab | 60f60d9f4ab90a429ae7d2cce7426399afd4b139d986f7ef7cc615ba67ec79ac | 0.01088 | cpp | 60f60d9f4ab90a429ae7d2cce7426399afd4b139d986f7ef7cc615ba67ec79ac | e5b8b9e674aba8680a4db922bead8ca3f02e5235ac444537ee6b5119b76cbf98 | PIE_released_gem5_runtime | pie_4979 | p02864 | a33c93908ea887df8530927f7037fdbc055445691fdd455acf625a87d6f550ef | e5b8b9e674aba8680a4db922bead8ca3f02e5235ac444537ee6b5119b76cbf98 | 0.142542 | 13.101741 | 8+ | 16d1ed4bf8a347f3ec9e4fa3862759dac26de8915760c4083773b084e3f68c00 | #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 ... |
3298729b1634944c395c653735bf300568e07fd3ac027a832e7cc07e39e28002 | 12fc327a6768d4fa83e7f37069ff927f1142ea3fa698ffcea30c25c12904ae1f | 0.10574 | cpp | 12fc327a6768d4fa83e7f37069ff927f1142ea3fa698ffcea30c25c12904ae1f | 9dce9a4d3c3cf3d846946e727b9b8b8c3da482d0e8b140e85e45490bbf0a8ef4 | PIE_released_gem5_runtime | pie_49988 | p03101 | f052dcd405cf7c3c0ef066196548fb624da4a4898d40289a49c5ee529b039608 | 9dce9a4d3c3cf3d846946e727b9b8b8c3da482d0e8b140e85e45490bbf0a8ef4 | 0.220323 | 2.083631 | 2-4 | fc808bb4026ba3621999d6985dbc01136a5875b638e113e35304884648756fa9 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define vvec(m, n) vector<vector<int>>(int(m), vector<int>(n))
#define ALL(a) (a).begin(), (a).end()
using ll = long long;
int main() {
int H, W, h, w;
cin >> H >> W >> h >> w;
vector<vector<int>> data(int(500),... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define vvec(m, n) vector<vector<int>>(int(m), vector<int>(n))
#define ALL(a) (a).begin(), (a).end()
using ll = long long;
int main() {
int H, W, h, w;
cin >> H >> W >> h >> w;
cout << H * W - h * W - w * H + h ... |
1298fabe52b6f8b9d6b607fd3684132726831d1dc6c28b3fa7136e76623a27c6 | d538f509d440a83105219d3faf77164065011009a4e55f69dac1993d6180e66a | 0.000197 | cpp | d538f509d440a83105219d3faf77164065011009a4e55f69dac1993d6180e66a | 56bdc598700060346edba5ee10d1abe8033eb677a89eb620964f294957f0f63f | PIE_released_gem5_runtime | pie_5016 | p04045 | 31ae1b53f0f6a6853928c509e34c5dfb9d06bd7598874dc3982dd4003e596aee | 56bdc598700060346edba5ee10d1abe8033eb677a89eb620964f294957f0f63f | 0.001422 | 7.203598 | 4-8 | 7b698df02b16bc321aaeed972c16622a4a1049a6fbfc75011eeff5219c242b20 | #include <iostream>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
#define Inf 0x3f3f3f3f
using namespace std;
typedef long long ll;
int a[100010];
int vis[100010];
bool check(int n)
{
while (n)
{
if (vis[n % 10])
return f... | #include <cstdio>
using namespace std;
int n, k, x;
bool arr[10];
bool check(int n)
{
while (n)
{
if (arr[n % 10])
return 0;
n /= 10;
}
return 1;
}
int main()
{
while (scanf("%d%d", &n, &k) != EOF)
{
for (int i = 0; i < k; i++)
{
scanf("%d", &x);
arr[x] =... |
8f9c888f6efb52a52053470d55b1226d27d6ceb4bcd53bbaaf13561d9eb2a216 | dc57cee783afaea0ff64b23157798b3837301746946731514c2d547442c729ba | 0.019856 | cpp | dc57cee783afaea0ff64b23157798b3837301746946731514c2d547442c729ba | f1b3784c59b32b8c272f23a10d2b57fffa4cdf51a133ee5a6acc2e6f0435ba94 | PIE_released_gem5_runtime | pie_50405 | p04029 | 1a12d4896bc9bfd778e548e897ab2f8d08e4a53abcc2762eb8b4a9ae0240eccd | f1b3784c59b32b8c272f23a10d2b57fffa4cdf51a133ee5a6acc2e6f0435ba94 | 0.374768 | 18.873944 | 8+ | 0068d5e5e13b9d5b57914deaaea919762792a62468dd78ea5ee13c9c52bee421 |
#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 <stdio.h>
int main() {
int N, candies = 0;
int i;
scanf("%d", &N);
for (i = 1; i <= N; i++) {
candies = candies + i;
}
printf("%d", candies);
return 0;
} |
fa558bcabbc52eb8a8b6219873e4ad7c3ce932b1aad56a571349b67540ee96e1 | a74285bf2d8a4c3dbad59f0493bb51232759ec2b6d1bf6a6fcdb36d3dba96b76 | 0.104151 | cpp | a74285bf2d8a4c3dbad59f0493bb51232759ec2b6d1bf6a6fcdb36d3dba96b76 | 29320bae76a1559e5a3040629edb514c99799a1172720292ca2a82ad8d8581a7 | PIE_released_gem5_runtime | pie_50579 | p02284 | eb9b9553c1acf3656d9aaeaf5b622eb23df0f2058013cf489365b693afd16c24 | 29320bae76a1559e5a3040629edb514c99799a1172720292ca2a82ad8d8581a7 | 1.150524 | 11.046704 | 8+ | 0d272f2e99ec0fb1b1676fabebecdf2b2ce58f8f842243d17c96c667a46876e1 | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
#define N 600000
#define NIL -1
int key[N];
int parent[N];
int leftc[N];
int rightc[N];
int root = NIL;
void insert(int z) {
int x, y;
y = NIL;
x = root;
while (x != NIL) {
y = x;
if (key[z... | #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
using namespace std;
#define NIL NULL
struct Node {
int key;
struct Node *parent;
struct Node *leftc;
struct Node *rightc;
};
typedef struct Node *Nodepointer;
Nodepointer root;
void insert(int k) {
Nodepointer x, y, z;
... |
3f6f55fb5be3eb5ce8a1ebeb966b88b4b22795c9672fc4665a1ed9829d74fa1a | 904b2a2a0b8fade7143fee40d6229b9182467a42e90adb9558d961a632665d50 | 0.013883 | cpp | 904b2a2a0b8fade7143fee40d6229b9182467a42e90adb9558d961a632665d50 | 8cab6db2c6f4c73ffc4ea76efccca701607216523d5d297c29c5e682df9ff4dc | PIE_released_gem5_runtime | pie_50591 | p04039 | 101dacd4782e51b75a8d5336591a8f13d01d9bc91c10b2f0ebf249396e8ca10d | 8cab6db2c6f4c73ffc4ea76efccca701607216523d5d297c29c5e682df9ff4dc | 0.080086 | 5.768603 | 4-8 | 145da5e7dca9166bde8619a7bd7c2e6ef0480918cf4c9612361e0450d9c66777 | #include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <valarray>
#include <iterator>
#include <stack>
#include <set>
#include <cstring>
#include <cstdlib>
#include <queue>
#include <list>
#include <map>
#include <strstream>
#include <streambuf>
#includ... | #include <stdio.h>
#include <math.h>
#define MAX_N 10000
#define MAX_k 9
int N, k;
int D[MAX_k];
int check(int a) {
int i, j, n, m;
n = a;
while (n != 0) {
m = n % 10;
for (j = 0; j < k; j++)
if (m == D[j])
return 1;
n /= 10;
}
return 0;
}
int main() {
int i;
sca... |
39f176c225228d05c0e5540c5fe71f5619753d534be01ba92affef705c48fd75 | 116baf51e8f5155dafb800e3a2f309141f28c49b5037f7b61772012ee75694aa | 0.004778 | cpp | 116baf51e8f5155dafb800e3a2f309141f28c49b5037f7b61772012ee75694aa | 8ce00404e66821f96c1477f0c728363fe8dd81c45e2b55448617f9ed8f33284f | PIE_released_gem5_runtime | pie_50617 | p00618 | 2568a26b121abc6e0dbffb249e16d1fba08724d4495358dfbffaf320460e21ad | 8ce00404e66821f96c1477f0c728363fe8dd81c45e2b55448617f9ed8f33284f | 0.053146 | 11.122812 | 8+ | 414542b2019bf660fb04fd5c601f238014b8362c177ac2bfa9399c3510864419 | #include <cstdio>
#include <cctype>
#include <queue>
#include <algorithm>
#include <cstring>
using namespace std;
#define REP(i, N) for (int i = 0; i < (int)(N); ++i)
int unit[20];
int need[20];
int nextInt() {
int r = 0, ch;
while (isspace(ch = getchar()))
;
do {
r = r * 10 + ch - '0';
} while... | #include <cstdio>
#include <cctype>
#include <queue>
#include <algorithm>
#include <cstring>
using namespace std;
#define REP(i, N) for (int i = 0; i < (int)(N); ++i)
int unit[20];
int need[20];
int nextInt() {
int r = 0, ch;
while (isspace(ch = getchar()))
;
do {
r = r * 10 + ch - '0';
} while... |
fb2d0413a6e3e09f7e412d99c1cceb7ecb7c2cb7a19665d9a153b3953cea4c10 | 861358e56b13bead4aa0e415abc7e13a2032b1e280c0963359406d3b7f200b88 | 0.104984 | cpp | 861358e56b13bead4aa0e415abc7e13a2032b1e280c0963359406d3b7f200b88 | f26866a82b822ddd4aabc8e2e319ef0fc31eaf530a23a776d4312c7b43994719 | PIE_released_gem5_runtime | pie_50620 | p03685 | e8a5e869466a48523d0b631d216f0bb8d38971407635304e2292ca79019d62a6 | f26866a82b822ddd4aabc8e2e319ef0fc31eaf530a23a776d4312c7b43994719 | 0.354692 | 3.378542 | 2-4 | 1249229683d83313225763b418f1a3c6fceeb9b208f45d56723b6407c746681a | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define mst(a, b) memset(a, b, sizeof(a))
#define lowbit(x) ((x) & (-x))
#define X first
#define Y second
using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;
typedef long long LL;
ty... |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define ll long long
#define ld long double
typedef pair<ll, ll> ii;
typedef vector<ll> vi;
typedef vector<vi> vvi;
typedef vector<ii> vii;
typedef vector<... |
f006ab339203816fbbd20a7875dde064c5b1af590f6c6be05797bc7c848de98a | 371ac0ce145818d1b72b7236d63add9f3ca225443b8c7b478dac58fb9674aac8 | 0.010897 | cpp | 371ac0ce145818d1b72b7236d63add9f3ca225443b8c7b478dac58fb9674aac8 | 557a19734925f58ba7f29e4f08b44e779f251dc9a23c52ead71f1b1997d025d8 | PIE_released_gem5_runtime | pie_50630 | p01130 | cc1bf137748f8c572acd7c2052672eba9c8bd5274abba284c72b244b6034b57e | 557a19734925f58ba7f29e4f08b44e779f251dc9a23c52ead71f1b1997d025d8 | 0.048898 | 4.487164 | 4-8 | 9f0f23d8debcb64224a3b3436d6bc39c083386b4727bb9e3fac9d5b95977dfc7 | #include <iostream>
#include <queue>
#include <algorithm>
#include <cstring>
using namespace std;
typedef int W;
const int MAXV = 1005;
const int MAXE = 5005;
const int INF = 100000000;
int adj[100][100];
int main() {
int n, m, s, g1, g2, b1, b2, c;
while (cin >> n >> m >> s >> g1 >> g2, n | m | s | g1 ... | #include <queue>
#include <algorithm>
#include <cstring>
#include <cstdio>
using namespace std;
typedef int W;
const int MAXV = 1005;
const int MAXE = 5005;
const int INF = 100000000;
int adj[100][100];
int main() {
int n, m, s, g1, g2, b1, b2, c;
while (~scanf("%d%d%d%d%d", &n, &m, &s, &g1, &g2),
... |
1e607bc51d25d183b2fea51a573cd627140fae02e3423c77d405129a931d6c2d | 0bc1159b7427c2679cf1ce2474ece09df1e1952c6c668e9eaed7b24ce8dc9378 | 0.104717 | cpp | 0bc1159b7427c2679cf1ce2474ece09df1e1952c6c668e9eaed7b24ce8dc9378 | e00e4ea98549bc86b57d39511c5fdaba46a3b3d81e0934d1043aeac9dc177b27 | PIE_released_gem5_runtime | pie_50646 | p03738 | e15eee1cd0138e05d5fa11f668539aa91c23d34fd5b0b5bc31394f17e527c7b9 | e00e4ea98549bc86b57d39511c5fdaba46a3b3d81e0934d1043aeac9dc177b27 | 0.848842 | 8.106072 | 8+ | 0692ecf0f2fe4521f6cee85a43c1d33888b44852c15cbb52fa53e2b8d8bf7a10 | #include <bits/stdc++.h>
#define ll long long int
#define sz 200010
using namespace std;
string ss[sz];
int main()
{
string a, b;
ll x, y;
cin >> a >> b;
x = a.length();
y = b.length();
if (x > y)
cout << "GREATER" << endl;
else if (x < y)
cout << "LESS" << endl;
else
{
f... | #include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
map<char, int>::iterator it;
vector<int> v[1000];
int main()
{
string s, s1;
cin >> s >> s1;
int l, l1, c = 0, f = 0, d, r, m;
l = s.length();
l1 = s1.length();
if (l > l1) {
cout << "GREATER" << endl;
}
else if (l < l1) {
... |
97be12a1dbff1f94b784ecf8a9f60cef59d4a14abc378c8dcf6ae13b95125a22 | 521c05e47f234f88c72ee5fc9a13c7ce4bb8543509921bb4a754bf7c5706b2df | 0.107298 | cpp | 521c05e47f234f88c72ee5fc9a13c7ce4bb8543509921bb4a754bf7c5706b2df | 80a413e7f32b6c686e8a7b9f6a26209d9b91e1f550fa1319720e5b2e92787bd8 | PIE_released_gem5_runtime | pie_50656 | p02987 | 85acb9c5d8a80018bf68f8fd6f2a9bfe8b2eb5d47c278588c3472ca187f96da7 | 80a413e7f32b6c686e8a7b9f6a26209d9b91e1f550fa1319720e5b2e92787bd8 | 0.693197 | 6.460503 | 4-8 | 2e6e9c307aeefa0a8e29f6c38923e09d7d934be17cb23f670cb635a67f19b797 | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <string>
#include <vector>
#include <limits>
#include <algorithm>
#include <utility>
#include <sstream>
#include <numeric>
#include <iterator>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#defi... | #include <iostream>
#include <map>
using namespace std;
#define repd(i, a, b) for (int i = (a); i < (b); ++i)
#define rep(i, n) repd(i, 0, n)
int main() {
string s;
cin >> s;
map<char, int> mp;
rep(i, s.size()) { mp[s[i]] += 1; }
for (auto value : mp) {
if (value.second != 2) {
cout << "... |
b987fb3b77f9cbf681e1e91a66aa225bd3f52447a5024463267685688a34526e | 26cf5b10b7fef1b613813de8e12f8b43d6688fdccf36ccaa2f67b301334f4a54 | 0.00706 | cpp | 26cf5b10b7fef1b613813de8e12f8b43d6688fdccf36ccaa2f67b301334f4a54 | e45989d2b565dd181560a49acdb48ee24386509c94ea425ce3c7112e25f9cb57 | PIE_released_gem5_runtime | pie_50663 | p03556 | 5a4f07396c3b05d8b7c602b3d9bb922d837c8c0b62ad1ee8f8d3aaee0f749dbc | e45989d2b565dd181560a49acdb48ee24386509c94ea425ce3c7112e25f9cb57 | 0.034419 | 4.875248 | 4-8 | 7fe2f0df927ac816fa64b3fc9c957e05a9c1d61e2821065ba5eb7e33eb9f1cfe | #include <iostream>
using namespace std;
bool IsSquare(int N)
{
int i;
for (i = 1; N > 0; i += 2)
{
N -= i;
}
if (N == 0)
return true;
else
return false;
}
int main()
{
int n;
cin >> n;
while (n) {
if (IsSquare(n)) {
cout << n;
break;
}
else
... | #include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
int main() {
int n;
scanf("%d", &n);
n = sqrt(n);
printf("%d\n", n * n);
return 0;
} |
d1338bf0f5bf7c12d089c6283d99cf048231eb1c08fa6559b54b0a6c33d76f09 | f584b6e0e4dd75b0184bc236ade117aaa36e8a3ca5df3116e3fec336df3b1afd | 0.082489 | cpp | f584b6e0e4dd75b0184bc236ade117aaa36e8a3ca5df3116e3fec336df3b1afd | 3ed1acf8d8986389800fca850d2c8d239068b23f4203eb952e17907aa6f46fe2 | PIE_released_gem5_runtime | pie_50690 | p02748 | 8af8cac057003b08a11274828e5215cc8852bc94ed0484f900806b2f11b70841 | 3ed1acf8d8986389800fca850d2c8d239068b23f4203eb952e17907aa6f46fe2 | 0.389512 | 4.72197 | 4-8 | 632a258f565ea0fa487dc377c3c74b615fddafec674c92e7c245caa184cf3004 | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
typedef ... | #include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i < b; i++)
#define rrep(i, a, b) for (int i = a; i >= b; i--)
#define fore(i, a) for (auto &i : a)
#define all(x) (x).begin(), (x).end()
using namespace std;
void _main();
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
_main();
}
typedef ... |
43a7acde38d27f2aa0f8371da586733d271a4aa8d0a9610fbea16fce0f67251d | d92b474e5a59c2032e04addef2be376ac79baeae251ad21d25e8eecf0cee6ea6 | 0.000193 | cpp | d92b474e5a59c2032e04addef2be376ac79baeae251ad21d25e8eecf0cee6ea6 | c41e99af6f35dee207274ccd90b87e75932e029ba074b5ca77247060d0859184 | PIE_released_gem5_runtime | pie_50911 | p03163 | 794fafcdc67eb024b32873e19965e4a182d2209ef84ddf5b65b038caeab28df4 | c41e99af6f35dee207274ccd90b87e75932e029ba074b5ca77247060d0859184 | 0.002657 | 13.749539 | 8+ | 025c2eafb6b1dfd0b1fd7eda79bd0fb43b1c20a0a29d99983d3d95d17423f09d | #include <iostream>
#include <cstdio>
#include <cstring>
using namespace std;
typedef unsigned long long ULL;
ULL N, w;
ULL W[105];
ULL Value[105];
ULL f[200000];
inline ULL max(ULL x, ULL y) { return x > y ? x : y; }
int main() {
cin >> N >> w;
ULL ans = 0;
for (ULL i = 1; i <= N; i++)
cin >> W... | #include <stdio.h>
using namespace std;
#define MAX(a, b) (a > b ? a : b)
int main() {
int num, cap;
scanf("%d %d", &num, &cap);
int itens[num + 1][2];
for (size_t i = 1; i < num + 1; i++) {
scanf("%d %d", itens[i], itens[i] + 1);
}
num++, cap++;
long long parciais[num][cap];
for (size_t ... |
68566931bbd8e51449e2f1808dbb984c7de6efa73d2627a3de86c99bf304d3b4 | 1d4d3e879be0d4b7021bd8893e7ff3aead9ac3a56fd64b9f395d5417a4ccf5c2 | 0.110141 | cpp | 1d4d3e879be0d4b7021bd8893e7ff3aead9ac3a56fd64b9f395d5417a4ccf5c2 | 73297273122ad49910df6a40052404accb1d9d912c6232a16ac1bcf08be3ef56 | PIE_released_gem5_runtime | pie_51 | p03078 | f57afc6dc77d2ff81e85f56271afd0ea36720701bd1d106e682754a897c9d0fc | 73297273122ad49910df6a40052404accb1d9d912c6232a16ac1bcf08be3ef56 | 0.40751 | 3.699894 | 2-4 | a0f3f3f5d73748b4d8273e1ec5065dec152dbd23c0a01eabf6ff00d2a75eee7f | #include <bits/stdc++.h>
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1000000000000000000;
const double EPS = 1e-10;
const pair<int, int> fd[] = {make_pair(1, 0)... | #include <bits/stdc++.h>
#define repd(i, a, b) for (int i = (a); i < (b); i++)
#define rep(i, n) repd(i, 0, n)
#define int long long
typedef long long ll;
using namespace std;
const int MOD = 1000000007;
const int INF = 1010000000;
const double EPS = 1e-10;
const pair<int, int> fd[] = {make_pair(1, 0), make_pa... |
eaa859af3cde9b4bac5866c079a4ebb7b64d13557e4bb9d55cb7f2986f4531bb | baa0ffa47a63d5409a0c60903bd7ca20c499ec63ca980588b8f10a27a9ca284d | 0.012111 | cpp | baa0ffa47a63d5409a0c60903bd7ca20c499ec63ca980588b8f10a27a9ca284d | 494dad853a71082a95d45ea7478493ed11c35078933121806a70a7d2183dd9ae | PIE_released_gem5_runtime | pie_5131 | p00946 | dffe179e9d2278e67417fef3b481fbda819ce07dee37fe86a8d0cc621effe3ab | 494dad853a71082a95d45ea7478493ed11c35078933121806a70a7d2183dd9ae | 0.027392 | 2.261731 | 2-4 | 0fba36250fd0f709dbcc2d4eb59676d40b7d6435de03436e73c492d74838d0cd | #include <bits/stdc++.h>
using namespace std;
#define N 1000002
#define pb push_back
int hit[N], a[N];
int main() {
int n, m;
cin >> n >> m;
for (int i = 1; i <= m; i++) {
scanf("%d", &a[i]);
}
for (int i = m; i >= 1; i--) {
int x = a[i];
if (hit[x] == 0)
printf("%d\n", x);
... | #include <cstdio>
#include <cstring>
using namespace std;
int n, m;
bool flag[250000];
int a[250000];
int main()
{
memset(flag, 1, sizeof(flag));
scanf("%d%d", &n, &m);
for (int i = 1; i <= m; i++)
scanf("%d", &a[i]);
for (int i = m; i >= 1; i--)
if (flag[a[i]])
printf("%d\n", a[i]),... |
5230a163dc47f8ba0d01f66628369fffa7299371ad752e5564cad1f8ffd0c8a3 | 443f8eb1c8766c3c452405686462d3180281ca616e1e69a8187f6fef2f3726e1 | 0.106476 | cpp | 443f8eb1c8766c3c452405686462d3180281ca616e1e69a8187f6fef2f3726e1 | f48de9cc3f4d87bf297658e5b54660c00eadb82d627039a9c3b43ab77ddb7f07 | PIE_released_gem5_runtime | pie_51437 | p03341 | 5af05b6c009ba394082e10089f3c5dceb3ce1d696954b50ea90170de48966b4a | f48de9cc3f4d87bf297658e5b54660c00eadb82d627039a9c3b43ab77ddb7f07 | 0.497947 | 4.676609 | 4-8 | 46694d1544d0c95101e6f2980c69d44780b1e28095d2fa1d9b6968ef1e2eef8e | #include <bits/stdc++.h>
const int MAX_N = 300000;
int main() {
int N;
std::string S;
std::cin >> N >> S;
std::vector<int> left(MAX_N), right(MAX_N), cost(MAX_N);
int cnt;
cnt = 0;
for (int i = 0; i < N; ++i) {
left[i] = cnt;
if (S[i] == 'W')
++cnt;
}
cnt = 0;
for (int i =... | #include <bits/stdc++.h>
const int MAX_N = 300000;
int main() {
int N;
std::string S;
std::cin >> N >> S;
static int left[MAX_N], right[MAX_N], cost[MAX_N];
int cnt;
cnt = 0;
for (int i = 0; i < N; ++i) {
left[i] = cnt;
if (S[i] == 'W')
++cnt;
}
cnt = 0;
for (int i = N - 1... |
da25932aeaadce3823b2a17c758c0cca5dbb976870faa7bc87f7389ad3ae2c45 | ac64b80976ef8c2edbbbdb8c2b50cfefc8bf22489c1f2ce8be68c851c51e720f | 0.110634 | cpp | ac64b80976ef8c2edbbbdb8c2b50cfefc8bf22489c1f2ce8be68c851c51e720f | 5a852485f9092c4943c5d883877a0903cad80ac663505353fa522a8cea741898 | PIE_released_gem5_runtime | pie_51452 | p03436 | 2276b3eb8406d922d2c70fd60623cadcb0a28a0ee4e8e88cc15450d0253bc273 | 5a852485f9092c4943c5d883877a0903cad80ac663505353fa522a8cea741898 | 0.221368 | 2.000895 | 2-4 | 67e408b839be9d24bcd27c800644d85bea4f09dac0997a50fb7c50b4e0513e20 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Edge = pair<int, int>;
using Graph = vector<vector<Edge>>;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
const ll MOD = 1000000007;
const ll n... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using Edge = int;
using Graph = vector<vector<Edge>>;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
const ll MOD = 1000000007;
const ll nmax = 8;
c... |
52cafe65967ada06ea8c0917fbfd633f9d63deb46fe1e06af5f1c75f08b87d8d | 9320ed17d6bec7102dafb822b01b306444dd71680b51eba33dae4cdcd9761a70 | 0.005948 | cpp | 9320ed17d6bec7102dafb822b01b306444dd71680b51eba33dae4cdcd9761a70 | 4472ae4534fb3a9064942e32a9a172014a9abe7a82e8d5013ee47b28bb9afc4d | PIE_released_gem5_runtime | pie_51472 | p03674 | cfc85cd2e0170962e12f9447f98e9867f93837eba3d069ff2c68e0ed877f24c4 | 4472ae4534fb3a9064942e32a9a172014a9abe7a82e8d5013ee47b28bb9afc4d | 0.087276 | 14.672897 | 8+ | 78c879724071800d5ff4185a85752acd548b8565bd967997e7126da3ea180ead | #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>
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) << "... |
bcfa709e7efd2d1d9ad37c06d4e5387253becc1aba29b4d8412c4a4a74a28aef | 6e1d2fa2c1e2efc0b5e6faaf0f6b269a857da481d848495482aebda4af61a036 | 0.020456 | cpp | 6e1d2fa2c1e2efc0b5e6faaf0f6b269a857da481d848495482aebda4af61a036 | 1afb84bbf3cb1ed734348b7f6d8935095c514880b73968bc5cbb3950df8d2b23 | PIE_released_gem5_runtime | pie_51518 | p02887 | de85ea70a6adc01635f986b29f3887bdf5583225702ca261c8ceb15ad2ff2851 | 1afb84bbf3cb1ed734348b7f6d8935095c514880b73968bc5cbb3950df8d2b23 | 0.131967 | 6.451338 | 4-8 | 2acbe9e3ade4406fee816d633df9508d21ca7ae1d994f2c176310f5c770f10dd | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define maxn 100010
char ss[maxn];
int main()
{
int n;
cin >> n;
cin >> ss;
int siz = sizeof(ss);
char pre;
pre = ss[0];
int cnt = 0;
for (int i = 1; i < siz; i++)
{
if (pre != ss[i... | #include <stdio.h>
int main()
{
int a, n, cnt = 1;
char s[100000];
scanf("%d", &n);
getchar();
for (a = 0; a < n; a++) {
scanf("%c", &s[a]);
}
for (a = 0; a < n - 1; a++) {
if (s[a] != s[a + 1]) {
cnt++;
}
}
printf("%d", cnt);
} |
698cf8415c3f9b1889fb3b905cb6bbc871187d5be12e21607515a62e3a5e81fd | fe9f435467e7b7bc0713b2b7c029757c38acdc330aa53935c20bdb79dd65e5f7 | 0.101033 | cpp | fe9f435467e7b7bc0713b2b7c029757c38acdc330aa53935c20bdb79dd65e5f7 | 66058d3da01b4a9283deecefd1ca393a56efaa12d593739abab573e75a054c4b | PIE_released_gem5_runtime | pie_51547 | p02361 | 3367a4c322586b76bbf178a36ec356d0aa1645e2b3931086e23bd2fe496e2929 | 66058d3da01b4a9283deecefd1ca393a56efaa12d593739abab573e75a054c4b | 0.743229 | 7.356288 | 4-8 | 40013b78ba1580d6aa52300dde74d9c52ba7fae5d8003bbd7638d9e1388dab1f | #include <iostream>
#include <string>
#include <vector>
#include <utility>
#include <queue>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <complex>
#define INF 2147483647
#define llINF 9223372036854775807
#define pb push_back
#define mp make_pair
#... | #include <bits/stdc++.h>
#define INF 1e9
#define llINF 1e18
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define ll long long
#define vi vector<ll>
#define vvi vector<vi>
#define BITLE(n) (1LL << ((ll)n))
#define SHIFT_LEFT(n) (1LL << ((ll)n))
#define SU... |
83d22b0c32c0b5a082e4488cfc182f2b5957a5149b115613d89fb2043d70d81b | 267a50ef6c50c07778d2b34ff9b978c72616c34b2e51d0732636912e1bc96010 | 0.108734 | cpp | 267a50ef6c50c07778d2b34ff9b978c72616c34b2e51d0732636912e1bc96010 | 2e4714785813053c34087f207fb17676906a39dcddb2f32755a09b616d3f2e74 | PIE_released_gem5_runtime | pie_5160 | p02850 | e3d1b493c2e86ba48077db594e14a350dcde83e1c954d9258366f67b131694e2 | 2e4714785813053c34087f207fb17676906a39dcddb2f32755a09b616d3f2e74 | 0.42648 | 3.922249 | 2-4 | 18883f482e4f9541c6fb2d89e913cf644d74be388de9c81b30f0cca2d681a289 | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
typedef long long int ll;
typedef pair<int, int> P;
int n;
vector<vector<int>> graph(101010, vector<int>(0));
vector<int> colors(101010);
map<P, int> edge_num;
int mc = 0;
void dfs(int a, int pa, int pc) {
in... | #include <bits/stdc++.h>
using namespace std;
#define rep2(i, m, n) for (int i = (m); i < (n); ++i)
#define rep(i, n) rep2(i, 0, n)
typedef long long int ll;
typedef long double ld;
typedef pair<int, int> P;
template <typename T> struct V : vector<T> { using vector<T>::vector; };
V()->V<int>;
V(size_t)->V<int>... |
ad446d484762a9f5149df6795e293793b08613a7125259c089df005eb7bb89a5 | 1b6ec7508dd9628ed4dd327a40604476846461b90e3f80e3311bda53dcde2f93 | 0.018882 | cpp | 1b6ec7508dd9628ed4dd327a40604476846461b90e3f80e3311bda53dcde2f93 | 3637d0b92e5765bcce46583b2b4718dec68f78ddbfe50fc4e33e20a790388886 | PIE_released_gem5_runtime | pie_51611 | p04027 | 2c43d32f630b80823f10aa2b217d1e248dfac7dce5ae1647d4b1bc4d2df56130 | 3637d0b92e5765bcce46583b2b4718dec68f78ddbfe50fc4e33e20a790388886 | 0.469392 | 24.859509 | 8+ | 08e786da5fae6398aa145c403895d19be17af65042a1f2694932d06e41087bb8 | #include <bits/stdc++.h>
#define il inline
#define rg register
using namespace std;
typedef long long ll;
const int O = 510;
const ll mod = 1e9 + 7;
il int gi() {
int o = 0, fl = 1;
char ch = getchar();
while (!isdigit(ch) && ch != '-')
ch = getchar();
if (ch == '-')
fl = -1, ch = getchar();
... | #include <cstdio>
#include <cstring>
#define ll long long
using namespace std;
inline int read() {
int x = 0, f = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-')
f = -1;
c = getchar();
}
while (c >= '0' && c <= '9') {
x = (x << 1) + (x << 3) + (c ^ 48);
c = getch... |
9e3b0d4a6e55cedf62ae96ec06e92ceb569f21297f68f6f5bd9d4ca6f4e0cfec | 06657330edca3010faf7264aab95b77b875ca1b08011ec9a1e733defd16ea0e5 | 0.020196 | cpp | 06657330edca3010faf7264aab95b77b875ca1b08011ec9a1e733defd16ea0e5 | cd3b87b3a2af193a3cb6907f69471952a0a27802b2d4b66097379a47b2456ead | PIE_released_gem5_runtime | pie_51797 | p03625 | e5602c7850ec9abaa65e884be40e60e03ce156027043b161d9b02ae02a743a68 | cd3b87b3a2af193a3cb6907f69471952a0a27802b2d4b66097379a47b2456ead | 0.376859 | 18.66055 | 8+ | 3ea4464bfffe7e94251ce5a889f643672920697c355954611a267f8f43cadd19 | #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 <stdio.h>
#include <algorithm>
typedef long long ll;
int n;
ll a[100005];
bool cmp(const ll &a, const ll &b)
{
return a > b;
}
int main()
{
int i;
ll l = 0ll, w = 0ll;
scanf("%d", &n);
for (i = 0; i < n; i++)
{
scanf("%lld", a + i);
}
std::sort(a, a + n, cmp);
for (i = ... |
1a91fac133d0d19971816ab8bcd470ee5ed73dc19b9ee2575ff91ddac7d62ad8 | fafba6265d4a50c85c977f9b2c055f4921855f2ab63ec15f0aa72637abc4acd1 | 0.019389 | cpp | fafba6265d4a50c85c977f9b2c055f4921855f2ab63ec15f0aa72637abc4acd1 | 3cacaa80998aca196b5e25e94d2d238d8ba6401f42225ea7c3cb43bf18d52623 | PIE_released_gem5_runtime | pie_51924 | p03349 | e0d5bb72a539dea6c59ea474cb32d773c8a949528d65b22a1eb4e279709364bf | 3cacaa80998aca196b5e25e94d2d238d8ba6401f42225ea7c3cb43bf18d52623 | 0.253761 | 13.087535 | 8+ | 1ee5ce741fa24b26097beab8aa3ef3822d6b746a78d21a9fc9cd99440d5b38c8 | #include <bits/stdc++.h>
#define rep(i, l, r) for (int i = l; i <= r; i++)
using namespace std;
typedef long long ll;
const int maxn = 305;
ll f[maxn][maxn], g[maxn][maxn], c[maxn][maxn], fac[maxn], inv[maxn];
int n, k;
ll mm;
ll dfs(int i, int j);
ll getsum(int i, int j) {
if (~g[i][j])
return g[i][j];... | #include <cstdio>
using namespace std;
#define N 305
int n, m, p, dp[N][N], su[N][N], c[N][N];
int main()
{
scanf("%d%d%d", &n, &m, &p);
n++;
m++;
for (int i = 1; i <= m; i++)
dp[1][i] = 1, su[1][i] = i;
for (int i = 0; i <= n; i++)
c[i][i] = c[i][0] = 1;
for (int i = 2; i <= n; i++)
fo... |
95d1da3c06f87b05c134fe87e88be779fb6a86bf097b56d42f4ca296d99e6ef9 | 529cfe9f73279bc4409efcfee833fdce4969e01eae49ff427fd2b3782734cd94 | 0.000583 | cpp | 529cfe9f73279bc4409efcfee833fdce4969e01eae49ff427fd2b3782734cd94 | fcb721738d13f2a5cb230a96a11dfccfbbf4a8b1e4a9b80e43d5aca85f6b7640 | PIE_released_gem5_runtime | pie_52960 | p02613 | 2c7d56226864642ceabbc1ad262bfb63f2a02421f7dc77a5ecc2d81aa4789a79 | fcb721738d13f2a5cb230a96a11dfccfbbf4a8b1e4a9b80e43d5aca85f6b7640 | 0.013512 | 23.183581 | 8+ | 01c21ff2ff892f459d1c5714ae9687b19b7bfd8c2669f5dd6e8131949e1ed120 | #include <iostream>
using namespace std;
int main()
{
string s[100000];
int i, n;
int AC = 0, WA = 0, TLE = 0, RE = 0;
cin >> n;
for (i = 0; i < n; i++) {
cin >> s[i];
}
for (i = 0; i < n; i++) {
if (s[i] == "AC") {
AC += 1;
}
else if (s[i] == "WA") {
WA += 1;
}... | #include <stdio.h>
int main()
{
int ac = 0, wa = 0, tle = 0, re = 0, in;
char input[10];
scanf("%d", &in);
for (int i = 0; i < in; i++)
{
scanf("%s", input);
if (input[0] == 'A') {
ac++;
}
else if (input[0] == 'W') {
wa++;
}
else if (input[0] == 'T') {
... |
7c6ba5dfd2b020a469589ea886f78f6467ac3c1bc6bcedac563d735d78e7114b | 4685bb85b7ce18c79920c7e2d13f2d0d96c4bca568b4027adbe407ab45e2ebdd | 0.019553 | cpp | 4685bb85b7ce18c79920c7e2d13f2d0d96c4bca568b4027adbe407ab45e2ebdd | f5efb333a869803d7a263600b0cc3755b2466f3b1159a2b3a9fc16cc95eeee31 | PIE_released_gem5_runtime | pie_5392 | p03768 | 411f49c78546def77b809061571765b964415a5608434d7cc6f9956718dd3637 | f5efb333a869803d7a263600b0cc3755b2466f3b1159a2b3a9fc16cc95eeee31 | 0.818357 | 41.853043 | 8+ | 312239051acfb39513e8db5a0166862a39e8dbd239fb0788e60057ee36a2ac00 |
#include <stdio.h>
#include <iostream>
#include <algorithm>
#include <vector>
#include <deque>
#include <set>
#include <stack>
#include <string.h>
#include <map>
#include <vector>
#include <queue>
#include <math.h>
#include <stack>
#include <complex>
#define ll long long
#define X real()
#define Y ima... | #include <cstdio>
#include <algorithm>
#include <cstring>
#define MN 100005
using namespace std;
int n, m, q, v[MN], c[MN], d[MN], col[MN][11], num, head[MN];
struct edge {
int to, next;
} g[MN << 2];
void ins(int u, int v) {
g[++num].next = head[u];
head[u] = num;
g[num].to = v;
}
void dfs(int u, int c... |
527680f237fbe723618c05aedc280161509cf23b2b16fb3b766b6d861a9868bd | 4ec9c4aaf744d46713e86baefa89442ed4b7e17c405f38c81a861efda77b3a81 | 0.007075 | cpp | 4ec9c4aaf744d46713e86baefa89442ed4b7e17c405f38c81a861efda77b3a81 | 7359f75a0850c29e1f25da2f9f8c91c02f95e48c2a313c8a753658f281825008 | PIE_released_gem5_runtime | pie_54218 | p02729 | a0f5d647cbcaa3251e81b99d3a1cdc2db96b60d136de119f4e80ac2cb71fdf35 | 7359f75a0850c29e1f25da2f9f8c91c02f95e48c2a313c8a753658f281825008 | 0.133284 | 18.837828 | 8+ | 169c91b49c64de8cdacc96232467dd2ea6dbdfa502d4abe821c4ad0d3a478801 | #include <bits/stdc++.h>
using namespace std;
int gcd(long long a, long long b)
{
if (b == 0)
return a;
return gcd(b, a % b);
}
const int N = 1e5 + 5;
vector<int> adj[N];
bool visited[N];
int nodesNum;
void dfs(int node)
{
if (visited[node])
return;
visited[node] = true;
for (int child... | #include <stdio.h>
int main() {
int a, b, c, d;
scanf("%d %d", &a, &b);
c = a * (a - 1) / 2;
d = b * (b - 1) / 2;
printf("%d\n", c + d);
return 0;
} |
6a688b913193d3bd70248afea2b524dab6b76e26830068f5db4d89552554fa2e | ab99e650a13049ba30321f4b51264f5dbeabc26ac66a5a77f142daa30e69ae45 | 0.037382 | cpp | ab99e650a13049ba30321f4b51264f5dbeabc26ac66a5a77f142daa30e69ae45 | 3f2bf4a942332b8bf12e59e0589b898990fa93d081b270063ffeb1e382df8c74 | PIE_released_gem5_runtime | pie_54231 | p03641 | dbd4ef8675ef4a0b679e5aa05318f6f075047b164ab1004465658a4083b69b23 | 3f2bf4a942332b8bf12e59e0589b898990fa93d081b270063ffeb1e382df8c74 | 0.414811 | 11.096669 | 8+ | 12977ea9b70893302dcb3dbc3489e14e1457cb347540c3bffdf8fe679e6ac17e | #include <stdio.h>
#include <iostream>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <string>
#include <cstring>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <ctime>
#include <vector>
#include <fstream>
#include <list>
#include <iomanip>
... | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n, a[N], t[2][N << 2];
inline int read() {
int s = 0, f = 1;
char ch;
for (; ch < '0' || ch > '9'; ch = getchar())
if (ch == '-')
f = -1;
for (; ch >= '0' && ch <= '9'; ch = getchar())
s = (s << 1) + (s << 3) + ch - ... |
372f1541c415f6e10d6cd5407194656872faa4da4733486c664fc23720791907 | 5f94dd3fffe45b455bb7a61dfad5ab5111d49480874a259f62003bb20b92dd13 | 0.001031 | cpp | 5f94dd3fffe45b455bb7a61dfad5ab5111d49480874a259f62003bb20b92dd13 | 726482d4034b3a67be414ea3af97538390a20470a6a223bc8a6a7cb48a91720f | PIE_released_gem5_runtime | pie_54257 | p04016 | 01e9dde53a2117be68226e1d445d0780238158c42575f47e9e9df18295a4044b | 726482d4034b3a67be414ea3af97538390a20470a6a223bc8a6a7cb48a91720f | 0.003081 | 2.987796 | 2-4 | 2a7d7d9fc41b2214beec13d77be37cd5895ab7ee74abadadccbd1bf913de386f | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
LL f(LL b, LL n) {
if (b > n)
return n;
return f(b, n / b) + n % b;
}
int main() {
LL n, s, ans = 1e18;
scanf("%lld%lld", &n, &s);
for (int b = 2; b <= 1000000; b++)
if (f(b, n) == s)
ans = min(ans, b * 1ll);
if (n =... | #include <iostream>
#include <cstdio>
#include <set>
#include <list>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <string>
#include <sstream>
#include <algorithm>
#include <cstring>
#include <cstdlib>
#include <cctype>
#include <cmath>
#include <fstream>
#include <iomanip>... |
71fe0cf58ef8680a47484d4b0364e29033d04e9420154e8d9e59b8719aebeb14 | ffb8bca4f037e7c171018911fb7d42449b3b35a80e175b596f52e92a7555f5b3 | 0.103196 | cpp | ffb8bca4f037e7c171018911fb7d42449b3b35a80e175b596f52e92a7555f5b3 | 17e1c683a7bc200c2883f67f52d8b4cf1d39d02b587c2d56db6e7b18c5f977e3 | PIE_released_gem5_runtime | pie_54259 | p01886 | 98eb16042f3d4099eadf733869f80e9983568c3b91c3313745bbdc9bc4952744 | 17e1c683a7bc200c2883f67f52d8b4cf1d39d02b587c2d56db6e7b18c5f977e3 | 0.615057 | 5.960102 | 4-8 | 935c388549a0b3952ffdf5da0bb9f8c381f7c871d4e23f23ff37e576f259926a | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
inline LL sqr(const LL &v) { return v * v; }
struct PT
{
LL x, y;
PT(LL x = 0, LL y = 0) : x(x), y(y) {}
PT operator+(const PT &d) const { return PT(x + d.x, y + d.y); }
PT &operator+=(const PT &d) {
x += d.x, y += d.y;
return ... | #include <iostream>
#include <cstring>
#include <string>
#include <cstdio>
#include <algorithm>
#define ll long long
using namespace std;
const int maxn = 1e5 + 10;
struct Point {
ll x, y;
Point() {}
Point(ll _x, ll _y) : x(_x), y(_y) {}
bool operator<(const Point &P) const { return x < P.x || (x ==... |
6e0f81460d156f03a32a4849dd6e894921352758ed83d59ca58c5aeae07253d7 | d43c9a5b1e64ebcec1d3b9d18df2c7866862eabc9231648518e26113ef570fa2 | 0.107949 | cpp | d43c9a5b1e64ebcec1d3b9d18df2c7866862eabc9231648518e26113ef570fa2 | 6f9968d9ba63c1d9eb7effa7d813eae7267f87850a52f6a28e4dac4efecc6ee6 | PIE_released_gem5_runtime | pie_54274 | p02734 | e2ae386244c9fd36a0848fc350c6c780e1c284ccd39c7f6488590930db75a4c2 | 6f9968d9ba63c1d9eb7effa7d813eae7267f87850a52f6a28e4dac4efecc6ee6 | 0.299997 | 2.779072 | 2-4 | 297997b70dcd26c82c80cce91caa512f7c9a50a93ea5f40c58ae26c64ad6201a | #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <unordered_set>
#include <unordered_map>
#include <numeric>
... | #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <fstream>
#include <cassert>
#include <cstring>
#include <unordered_set>
#include <unordered_map>
#include <numeric>
... |
10c235f21e0b0ee70cf9e1c084fcddb6c11c75b347941b1f3da02f717ec4aecb | 11b38c558ff53899770615907a5d398c42eb43a060b1d07e0acf28bb0481c3c6 | 0.001028 | cpp | 11b38c558ff53899770615907a5d398c42eb43a060b1d07e0acf28bb0481c3c6 | a9be480e3f4997055502f196322b307934ff3d1adfe2619b8a5a8c6a5e2cd0d9 | PIE_released_gem5_runtime | pie_54285 | p03779 | 992a8ffdb0e945c81fb44f5957bfa76e609c15c464ab4d254a3db6bcea19e07f | a9be480e3f4997055502f196322b307934ff3d1adfe2619b8a5a8c6a5e2cd0d9 | 0.002508 | 2.44065 | 2-4 | 7b6a0801ee1f08b228ec4d0815140ee0921207a511d35d8cb8dfbb83132132e6 | #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 is(a, b) a == b
#define len(v) ll(v.size())
template <class T>
void cout_vec(const vector<T> &vec1) {
rep(i, len(ve... | #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... |
e9ce073d55c065caba2660af1215dab067b91a3a2c00c2ed47d99a834a69fd55 | c45650b6380b623ced3f8cb55361bd50716751983cbe78cfd0c5c60f203246f9 | 0.047703 | cpp | c45650b6380b623ced3f8cb55361bd50716751983cbe78cfd0c5c60f203246f9 | cbc32c6a3b97e4f0025872333151b2df2b5b9d9ce5a3433e1943291ce919668b | PIE_released_gem5_runtime | pie_54293 | p02823 | 64d32069b2096a9f883dbd8d7ba576049e1cd39c4b254a66441784a2c892e048 | cbc32c6a3b97e4f0025872333151b2df2b5b9d9ce5a3433e1943291ce919668b | 0.452228 | 9.480091 | 8+ | 85d36e7ae85d03ce7fdc310f46454901393dbf9e761cd1ed2374a45cb39b35ef | #include <bits/stdc++.h>
#define pi 3.1415926535897932384626
using namespace std;
struct vec
{
long double x, y;
bool operator==(const vec &a) const { return x == a.x && y == a.y; }
bool operator<(const vec &a) const {
if (a.x != x)
return x < a.x;
return y < a.y;
}
vec operator+(const... | #include <bits/stdc++.h>
#define pi 3.1415926535897932384626
using namespace std;
struct P {
int x, y;
bool operator<(const P &a) const { return y > a.y; };
};
int a, b, c, d, i, k, n, m, e, dx[10] = {1, 0, -1, 0, 1, 1, -1, -1},
dy[10] = {0, 1, 0, -1, 1, -1, 1, -1};
int o[1];
... |
f0c476516dd2bbf3ab6ba42fcd01a602af4b813fe6e9fa02d3f0f8f7a833da0a | 2dad0e5ca58f6ae31fad4a90b6d2755dad1f5bd0092ef699aa4abfa76b408b32 | 0.018449 | cpp | 2dad0e5ca58f6ae31fad4a90b6d2755dad1f5bd0092ef699aa4abfa76b408b32 | 93f6fdc46d9876f34b72c323559cb5248466e82cb0f130d7c4602cfef7fddceb | PIE_released_gem5_runtime | pie_54294 | p03413 | f92eb2b4256f2c2e815f3459a8729cf00570d5025329ddd852a80a35473e1fbe | 93f6fdc46d9876f34b72c323559cb5248466e82cb0f130d7c4602cfef7fddceb | 0.095797 | 5.192669 | 4-8 | 2940008f7255a6a81cdbf94a8aa2ee60e51ad117a3fd0e2f595655c7bf25eb4b | #include <bits/stdc++.h>
#define F(i, a, b) for (int i = (a); i <= (b); ++i)
#define F2(i, a, b) for (int i = (a); i < (b); ++i)
#define dF(i, a, b) for (int i = (a); i >= (b); --i)
#define dF2(i, a, b) for (int i = (a); i > (b); --i)
#define dF3(i, a, b) for (int i = (a)-1; i >= (b); --i)
using namespace std;
ty... | #include <cstdio>
int a[1005], n, ans[1005], cnt;
long long sum[2];
int main() {
scanf("%d", &n);
bool t = 0;
for (int i = 1; i <= n; ++i)
scanf("%d", a + i), a[i] > 0 ? (t = 1) : 0;
if (n == 2) {
printf("%d\n1\n%d\n", a[1] > a[2] ? a[1] : a[2], a[1] > a[2] ? 2 : 1);
return 0;
}
if (!t) {... |
8ae4caf1319f89f10eec8a3731ca0f57f7c87fd7562fad70d41020a12b722453 | 39953b2866fca9912da9cc70c26643734bdcec9b24c546981da130f84ee93aee | 0.105548 | cpp | 39953b2866fca9912da9cc70c26643734bdcec9b24c546981da130f84ee93aee | 64cb1c1af86fefa68b759d894c4aeb606c7e5698dbf033630ce27ef819268d1d | PIE_released_gem5_runtime | pie_54426 | p03860 | c367b319ea486a4378827ef20188203c07b549ee579499035eeb91a2c3a3970d | 64cb1c1af86fefa68b759d894c4aeb606c7e5698dbf033630ce27ef819268d1d | 0.688422 | 6.522359 | 4-8 | ca58be5000cc9a4e7142ea7ee6b0ac5f115f0f28c5f66ec7e9a5381979e33555 |
#include <bits/stdc++.h>
#define lln long long int
#define llu unsigned lln
#define sc(n) scanf("%d", &n);
#define scl(n) scanf("%lld", &n);
#define scd(n) scanf("%lf", &n);
#define pf(res) printf("%d\n", res);
#define pfl(res) printf("%lld\n", res);
#define pfd(res) printf("%lf\n", res);
#define maxii 20000... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
int main()
{
string a, b, c;
cin >> a >> b >> c;
cout << a[0] << b[0] << c[0];
}
|
5dcb88c7689690e9082c2fcf0293cc7ae9034985ebdcc5f95cfcf4711fb22f9b | c9063ecc1fac3744ae594cfed16f43ab5f564eed9d2b289998f348aeac7131c1 | 0.047368 | cpp | c9063ecc1fac3744ae594cfed16f43ab5f564eed9d2b289998f348aeac7131c1 | 2815c1f24b47f60194e9d83ffd8c02b5413ee93ce2a1bf770beadfe58081f180 | PIE_released_gem5_runtime | pie_54430 | p02845 | 518a0f62769fcd92e46bc5f5062d1632ace549ccfa29185cc87d1ac4b083e327 | 2815c1f24b47f60194e9d83ffd8c02b5413ee93ce2a1bf770beadfe58081f180 | 0.123261 | 2.602185 | 2-4 | 09345bcb3f35148eef89fc5103b7661b1e5751a2082bbdc7809b8f5e32d08bf4 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = (int)1e5 + 5;
const int M = (int)1e9 + 7;
ll powmod(ll a, ll b) {
if (b == 0)
return 1;
ll ans = powmod(a, b / 2);
ans = ans * ans % M;
if (b % 2)
ans = ans * a % M;
return ans;
}
ll f[N], rf[N], n, a[N];
ll ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = (int)1e5 + 5;
const int M = (int)1e9 + 7;
ll n, a[N];
void init() {
cin >> n;
for (int i = 1; i <= n; ++i)
cin >> a[i];
}
void solve() {
int cc[3] = {0};
ll ans = 1;
for (int i = 1; i <= n; ++i) {
int ccc = ... |
0223fc7e3135c9182b3ae53d987f21ec57ffd6fae8fe1dccbee7815e4a8ae3c2 | fcfd95d8002d27b8003dfc57fbdd8704e752deb1685a08874ab56f278b8fc35d | 0.00103 | cpp | fcfd95d8002d27b8003dfc57fbdd8704e752deb1685a08874ab56f278b8fc35d | bcb28016637fe0559973c028335fed117e119bb252b9f810a8ed13399bc98017 | PIE_released_gem5_runtime | pie_54479 | p00481 | d747513110ceaadeb2d9085c0dee9c6bb8a2a8089453a6b627a2a01efe6a6220 | bcb28016637fe0559973c028335fed117e119bb252b9f810a8ed13399bc98017 | 0.013174 | 12.793434 | 8+ | 03cae637bdb1878e0ae314f683711492979b1b41f2c6854640491e08a1b5aead |
#include <iostream>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <string>
#include <queue>
#define CLR(ARR, NUM) memset(ARR, NUM, sizeof(ARR))
#define GETNUM(NUM) scanf("%d", &NUM)
#define faster_io() ios_base::sync_with_stdio(false)
using namespace std;
const int MAXN = 1010;
char map[MA... | #include <iostream>
#include <cstdio>
#include <queue>
#include <algorithm>
#include <cstring>
#include <string>
#include <stack>
#include <stdlib.h>
#include <cctype>
#include <vector>
#include <map>
#include <set>
#include <cmath>
#include <iomanip>
using namespace std;
const int INF = 1000000000;
con... |
794eed61c486288692637bb753ad64891e69eecb4f875e16e5582227cdeaf951 | dbf733531eeccbcb95bd415abe7db4a8d1ae3b9e62fa1fa0bd28516ad56505b7 | 0.048745 | cpp | dbf733531eeccbcb95bd415abe7db4a8d1ae3b9e62fa1fa0bd28516ad56505b7 | 3400bc83b531393d640532b6c2c30f19758031f59fbe4950fffaa846f0f0686a | PIE_released_gem5_runtime | pie_55406 | p03130 | 614c6987e16d0012e2f89afe8cdb8571c651a154e3d24d930f1fc797ff8aa53b | 3400bc83b531393d640532b6c2c30f19758031f59fbe4950fffaa846f0f0686a | 0.463331 | 9.505183 | 8+ | 24614840aff9bc40087c54ba1c20bb355093115ed7764f3b154c924250410c3d | #include <bits/stdc++.h>
#define fi first
#define se second
#define ll long long
using namespace std;
const int N = 3e5 + 7;
const int mod = 1e9 + 7;
int cnt;
bool used[N];
vector<int> v[N];
void dfs(int x)
{
if (used[x]) {
return;
}
used[x] = true;
cnt++;
if (cnt == 4) {
cout << "YES... |
#include <bits/stdc++.h>
#define speedup ios_base::sync_with_stdio(NULL)
#define fin freopen("gymnastics.in", "r", stdin)
#define fout freopen("gymnastics.out", "w", stdout)
#define FILENAME
#define PUBG push_back
#define p_b pop_back
#define mp make_pair
#define fi first
#define se second
#define cls clear... |
d8a693db6f94ec11b01b93af5f4e51eede0ec1f5f6d2b64dce5c60eb6ca95057 | 429a4c46baa7d2b3037a9e9182b329ebe8dd47f0899b68013e383d364f39080e | 0.055825 | cpp | 429a4c46baa7d2b3037a9e9182b329ebe8dd47f0899b68013e383d364f39080e | d6a9f34ae299880981425e1c0308be2165edc2d18aaf14d2c7667e7e0e532b26 | PIE_released_gem5_runtime | pie_55484 | p00645 | af2b19dc716ce3dc710ed2c0efb053b899a3d17d0d44d366ccc9d93256f5db0f | d6a9f34ae299880981425e1c0308be2165edc2d18aaf14d2c7667e7e0e532b26 | 0.47463 | 8.502104 | 8+ | 9ab022baecf5fa185d1332fc588f6cf0594816cb3775e430c6b49b4298561775 | #include <iostream>
#include <vector>
#include <map>
#include <queue>
using namespace std;
inline int upb(int n)
{
return 32 - __builtin_clz(n);
}
int main()
{
vector<bool> close(1 << (5 * 5), false);
vector<int> cls(1000000);
int cls_cnt = 0;
for (int n; cin >> n, !(n == 0);) {
vector<vecto... | #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
static int close[(1 << (5 * 5)) / 32];
static int cls[1000000];
for (int n; scanf("%d", &n), !(n == 0);) {
vector<vector<int> > pats(33);
static int tmp[5][5];
for (int i = 0; i <... |
15d7abfd417442edd43a753e1b208ee1667bb59c304deb86678ab1a9e0b05046 | 9a9f0e258c9a0b0527af1ef573e3e6fb8a2f520dc4f3473190c1c89db207e40a | 0.043986 | cpp | 9a9f0e258c9a0b0527af1ef573e3e6fb8a2f520dc4f3473190c1c89db207e40a | ba36e9b449d36636475ffb755ddd5f3842e40255189e3cdb9ddd7d253f41492f | PIE_released_gem5_runtime | pie_55491 | p03462 | 01af1532fa5edb7ba1a22d33082f79c06ba107f6bc641bcf5c83acd02792e967 | ba36e9b449d36636475ffb755ddd5f3842e40255189e3cdb9ddd7d253f41492f | 0.34711 | 7.891433 | 4-8 | 865d76b3054851e2f0cb65e77869ec23a512eddff31122fa3d5f81d2e2f165f3 | #include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
inline int add(int a, int b) { return a += b, a >= MOD ? a - MOD : a; }
inline int del(int a, int b) { return a -= b, a < 0 ? a + MOD : a; }
inline int mul(int a, int b) { return 1LL * a * b % MOD; }
const int MAXN = 110;
int C[MAXN][MAXN];
... | #include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
#define N 255
#define ll long long
#define mod 1000000007
int n, k, ans, g, Ga, Gb;
int c[N][N], S[N];
char s[N];
void Calc()
{
int ga = g, gb = g, tot = 0;
for (int i = 1; i <= k; i++)
if (s[i] == ... |
98e015f1ba9d4fd3263a1a86257bdef439cbbd9255b3bad57d809a3ca25fe32d | 137efa876e7bf112266df336f45e3568fabd014fd9517d694bf9a17bd796da6e | 0.105429 | cpp | 137efa876e7bf112266df336f45e3568fabd014fd9517d694bf9a17bd796da6e | b491d395d76b07d7b9d835ae47161a771ac53cc02e9b8feb5d2d9d4191560e23 | PIE_released_gem5_runtime | pie_55510 | p03561 | b7a255243cf5c13023148a21ebf0e3e45a57b5d75239df5ec3355bc2ddaa9c11 | b491d395d76b07d7b9d835ae47161a771ac53cc02e9b8feb5d2d9d4191560e23 | 0.230785 | 2.189009 | 2-4 | d1dd8fa04e953ad794cd44a83b38b1a9175e2a13ea5a7523996d978c216d5f00 | #include <bits/stdc++.h>
using namespace std;
long long int N, K, A[364364], B, L;
int main() {
scanf("%lld%lld", &K, &N);
if (K == 1) {
for (int i = 0; i < (N + 1) / 2; ++i)
cout << "1 ";
return 0;
}
if (K & 1) {
fill(A, A + 364364, K / 2 + 1);
B = N / 2;
L = N;
for (i... | #include <bits/stdc++.h>
using namespace std;
long long int K, N, A[303030], L, R;
int main() {
scanf("%lld%lld", &K, &N);
if (K ^ 1) {
if (K & 1) {
fill(A, A + N, (K + 1) / 2);
L = N;
for (R = N / 2 + 1; --R;)
if (--A[--L])
for (; L < N; A[++L] = K)
;
... |
90193c124dd2d76ce2058934e752ebad2e738a8afaaf6264de777d2022fa292b | 6ed15dc9b1260981dd8a4cdc355386c2a9b101a8174defc2ae6ab4912c3ee703 | 0.106567 | cpp | 6ed15dc9b1260981dd8a4cdc355386c2a9b101a8174defc2ae6ab4912c3ee703 | c35ce2704b6407c5c9bb4e18a582e3111cf858e1a1e655bf4bc6b8936c581d28 | PIE_released_gem5_runtime | pie_55517 | p01368 | 3e250e0a492ca06f8316246216b8d8b4b3344be63d70fc46925e2959cc61ccef | c35ce2704b6407c5c9bb4e18a582e3111cf858e1a1e655bf4bc6b8936c581d28 | 1.690689 | 15.864986 | 8+ | cd45ceaebe40bf86b78782f26c0ac3a007a6c2c1361bc231429755e4888e8c12 | #include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
#include <algorithm>
using namespace std;
const int maxn = 1010;
const int inf = 0x3f3f3f3f;
int dis[maxn][maxn];
int n, m, L;
struct node
{
int s, t;
node(int _s, int _t) : s(_s), t(_t) {}
node(){};
bool operator<(cons... | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <cstring>
using namespace std;
const int N = 1010;
const int oo = 1000000000;
struct edge
{
int v, next;
} e[N * N];
int head[N], cnt;
void addedge(int u, int v)
{
e[cnt].v = v;
e[cnt].next = head[u];
head[u] =... |
584109def6667e52885f085ee9547159e18c98b4f2ebecc8edb457530f5ced5e | 96a9581f2edf9e6b3cfac235fc5293b5b07617642cca418570e1d2e5970ab28f | 0.02568 | cpp | 96a9581f2edf9e6b3cfac235fc5293b5b07617642cca418570e1d2e5970ab28f | c94c7c09b00412dc668fff928250b47d749f87bef3007d3099693e5445b1181b | PIE_released_gem5_runtime | pie_55531 | p03186 | b241a76c071d330d1ee51377f90ae22fdda061312a37419310603e58f34e7907 | c94c7c09b00412dc668fff928250b47d749f87bef3007d3099693e5445b1181b | 0.090796 | 3.535608 | 2-4 | 51168c8d09d28233b92cc07cb73db7e7e7f1c59645e6ed6f370548b559464c8a |
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>
using namespace std;
using namespace __gnu_pbds;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#defin... |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int a, b, c;
int ans = 0;
cin >> a >> b >> c;
if (c <= a) {
ans += c;
ans += b;
}
else {
ans = a;
c -= a;
if (c <= b) {
ans += c + b;
}
... |
b68b2b7c0d662e2181e6762e921734f7cc8a47c009f73a6876c50e29bd82ad87 | 5bb969c8d3eb928fa7f1ac213563955948a196c217c05f21915167d663fa1f05 | 0.007212 | cpp | 5bb969c8d3eb928fa7f1ac213563955948a196c217c05f21915167d663fa1f05 | 70ff77c8bbd804eef3591ff03aaadb1c16e5ae28f9df7a452ba0994b91c1cdff | PIE_released_gem5_runtime | pie_55534 | p03491 | 25397d466456fbc00b60944f9bb7aad9f8401ee2d2328f014c511f435ac1e778 | 70ff77c8bbd804eef3591ff03aaadb1c16e5ae28f9df7a452ba0994b91c1cdff | 0.288058 | 39.940104 | 8+ | 0cb00e79fc92b5322c27326116606d8115fe50d6b42e970da81bb45e6616a605 | #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 <cstring>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce... |
46a8b0f76afb2eecb8566f48ec6237a2e3594def6ad718fdcd9a16f0e9ed8912 | b835505309b6506dcb66583ddb0cdd8746ce93dd9ed29c347575ec54fba2f82d | 0.018149 | cpp | b835505309b6506dcb66583ddb0cdd8746ce93dd9ed29c347575ec54fba2f82d | d5e1d0019d1ae4bb3efdb289155e3156acbfe018b80f0b54fef1a9975adf17ce | PIE_released_gem5_runtime | pie_55536 | p00959 | 18fd6fa099500bbe48846c4ee84adb2a2fdb687f6e9db35dd4711983e068ebac | d5e1d0019d1ae4bb3efdb289155e3156acbfe018b80f0b54fef1a9975adf17ce | 0.088575 | 4.880474 | 4-8 | 0a9684724a0656a2c2d13f52f81694190a409f695d060180d9c59a9f69fcc79b | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <sstream>
#include <string>
#include <cstring>
#include <map>
#include <set>
#include <vector>
#include <stack>
#include <queue>
#include <deque>
#include <utility>
#include <algorithm>
#include <cassert>
using namespace ... | #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <algorithm>
using namespace std;
typedef long long LL;
int main()
{
LL n, t;
while (~scanf("%lld%lld", &n, &t)) {
LL sum = 0, MaX = 0;
for (int i = 1; i <= n; i++) {
LL x;
scanf("%lld", &x);
sum += x;
MaX = m... |
023aec36cbcca35e8024f1d50cdeaa17137d2ba448891a1d6b2a2688e6fbbf4c | 184c7329fc51a106f4350d57106896726974351786acf4aadab6623c0c7b0c89 | 0.016503 | cpp | 184c7329fc51a106f4350d57106896726974351786acf4aadab6623c0c7b0c89 | 8e3748e7d76cedee1f90f5cecb56fa6270704e7c8f8c60d294f6eb9f65ac21e0 | PIE_released_gem5_runtime | pie_55605 | p02684 | 4db8241a67174d84369e10cb1bd9b88398e4af8bc3cb3a8e3eaaebb7b882ecc9 | 8e3748e7d76cedee1f90f5cecb56fa6270704e7c8f8c60d294f6eb9f65ac21e0 | 0.230547 | 13.969574 | 8+ | 0133cecfacc1a19e8ec34b1c9ecf9c4e041fefa3ebc686a0183f34a3ad9b1006 | #include <stdio.h>
int main(void)
{
int N, i, j, A[200000] = {0}, check[200000] = {}, move[200000] = {0};
long long K;
i = scanf("%d %lld", &N, &K);
for (i = 0; i < N; i++)
check[i] = -scanf("%d", &A[i]);
for (i = 0, j = 0;; i = A[i] - 1, j++)
if (check[i] < 0)
check[i] = j, move[j] = i;
... | #include <stdio.h>
typedef long long LL;
int N, i, j, x, y = 0, A[200000], town[200000];
LL K;
int main(void)
{
i = scanf("%d %lld", &N, &K);
for (i = 0; i < N; i++)
town[i] = -scanf("%d", &A[i]);
for (i = 0, j = 0;; i = A[i] - 1, j++)
if (town[i] < 0)
town[i] = j;
else {
x = town[i... |
eea9953bac6c41160a873e97efe3d96c61db1e085c5bb0a46a5ce37264328c12 | c3d90fb33abfb38ce7834a8a10b047268de04de3a764d692fdacc36b65592ce2 | 0.016406 | cpp | c3d90fb33abfb38ce7834a8a10b047268de04de3a764d692fdacc36b65592ce2 | d8abcf56e24c9f190ac57fced83bcb26f51b888bd312bde30fe7a71207594c52 | PIE_released_gem5_runtime | pie_55681 | p03819 | f7de84e4b66940353866658a2fae5c0005a67b865b04c86a12e477776ae6b9ce | d8abcf56e24c9f190ac57fced83bcb26f51b888bd312bde30fe7a71207594c52 | 0.798102 | 48.647243 | 8+ | 07098927a022bb61504f27d2888d33a74746004ab58e6464ad7ceb203b62c172 | #include <iostream>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <vector>
#include <map>
#include <cstdlib>
#include <set>
#include <stack>
#include <queue>
using namespace std;
#define X first
#define Y second
#define N 300010
#define M 400010
typedef long long ll... | #include <cstdio>
#include <cstdlib>
#include <algorithm>
using namespace std;
const int N = 300005;
struct BIT {
int maxn, c[N];
inline void init(int n) { maxn = n + 1; }
inline void add(int x, int r) {
x++;
for (int i = x; i <= maxn; i += i & -i)
c[i]++;
}
inline int sum(int x) {
... |
14d9f0b5a743d20a49b62f85b6a3bea35b2c56f7cda7c5e8aa9420fa7bc8ac6e | 458643445a1037adad8ea16d2bd1006cba71930d1b8034d1d01225c4b45f4687 | 0.010495 | cpp | 458643445a1037adad8ea16d2bd1006cba71930d1b8034d1d01225c4b45f4687 | 36ffa49645159b1a1d51a97caf5f3389ae1b0fd9b991c8b139d87fbc0ceea475 | PIE_released_gem5_runtime | pie_55828 | p03666 | e9da9b5823b25c9d8b4ba9f40c36d434c57274287f5de917410e165baca0c394 | 36ffa49645159b1a1d51a97caf5f3389ae1b0fd9b991c8b139d87fbc0ceea475 | 0.064925 | 6.186312 | 4-8 | 0e7d039ecc2d53e57eea5a2aa347bf9c71e11d760c3b45c2b407e6793c7317f5 | #include <bits/stdc++.h>
using namespace std;
#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 ITER(it, a) for (typeof(a.begin()) it = a.begin(); it != a.end(); it++)
#define FILL(a, value) memset(a, value, sizeof(a))
#define SZ(a) (int)a.size... | #include <cstdio>
#include <cstring>
#include <algorithm>
#define ll long long
using namespace std;
inline ll in() {
ll x = 0;
bool f = 0;
char c;
for (; (c = getchar()) < '0' || c > '9'; f = c == '-')
;
for (x = c - '0'; (c = getchar()) >= '0' && c <= '9';
x = (x << 3) + (x << 1) + c - '0'... |
5b317b6b2fc3ef08c4a98be05bef849e7135ef1281d5f722ae9ef83ae1784346 | 394659304454a7f7ee4b3c056ad731ccd04f4f2e6ebfac9bb029ef63b0970fa0 | 0.017664 | cpp | 394659304454a7f7ee4b3c056ad731ccd04f4f2e6ebfac9bb029ef63b0970fa0 | bb85e025c50257baab41e48075929fc39db6e635040dab81704697d9e5456eba | PIE_released_gem5_runtime | pie_55846 | p02919 | bd6bdc4b831ac645b2d3c95238c63f2eb217040fab229e6f165d89c842afb8f3 | bb85e025c50257baab41e48075929fc39db6e635040dab81704697d9e5456eba | 0.191325 | 10.831117 | 8+ | 6f437acc9bf00d4fb2557bef5e96d705ff31cd4c3ea13e88cfc6d36fb5bd8f38 | #include <bits/stdc++.h>
#define ci const int &
#define Updl(x) (t[x].vl = Mrgl(t[x << 1].vl, t[x << 1 | 1].vl))
#define Updr(x) (t[x].vr = Mrgr(t[x << 1].vr, t[x << 1 | 1].vr))
#define pi pair<int, int>
#define f first
#define s second
using namespace std;
struct node {
int l, r;
pi vl, vr;
} t[400010];... |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
#define F first
#define S second
#defin... |
5db867f01d47dc8e748f74a739da255e47eb33b52ef0623fd93a1f52f39a10aa | 9180ef34f053c1a0464c13cf9d4c643a7f83758aeb75c3b43b050bc896d68961 | 0.019322 | cpp | 9180ef34f053c1a0464c13cf9d4c643a7f83758aeb75c3b43b050bc896d68961 | 1031a4017b3165993bac5479f30ed649cc37b302f318fd1f203d9179c323afa4 | PIE_released_gem5_runtime | pie_55857 | p02785 | 867cea11993ccf4b972c1944f3fc326336dae544a52914b9dc45573abae47910 | 1031a4017b3165993bac5479f30ed649cc37b302f318fd1f203d9179c323afa4 | 0.109364 | 5.659933 | 4-8 | e27847ba30e3f0f4e1bb9edfe7784ad4470aa4124fc4b8839dc1065351cf7055 | #include <iostream>
#include <algorithm>
#include <cmath>
using namespace std;
int main()
{
unsigned long long n, k;
unsigned long long arr[200005];
unsigned long long maxm = 1;
unsigned long long cnt = 0;
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> arr[i];
cnt += arr[i];
}
... | #include <stdio.h>
#include <algorithm>
#define ll long long
class FIO
{
public:
template <typename T> FIO &operator>>(T &x) {
_R(x);
return *this;
}
template <typename T> FIO &operator<<(T x) {
_W(x);
return *this;
}
private:
char f, c, a[25], i;
template <typename T>
inline void ... |
c602f7fab9db430d03af99f277c1a0364be37e90fd08ba9601d9eea5ad03df6b | ef74d8c7d55c2a8ff0ab788adc2a2f7d6dcf6e7d5f5dae67d28edb77b8d326db | 0.097384 | cpp | ef74d8c7d55c2a8ff0ab788adc2a2f7d6dcf6e7d5f5dae67d28edb77b8d326db | 9760b0e75da2af69ad3c50ae2afa18a9ca813bc268bf6b5ef339c3cd3243941c | PIE_released_gem5_runtime | pie_5590 | p01422 | e245baa8873a6bebd788bee4f0586a8a7cfb2328e9d1a00503f02b501346d11b | 9760b0e75da2af69ad3c50ae2afa18a9ca813bc268bf6b5ef339c3cd3243941c | 0.331804 | 3.407172 | 2-4 | 63eb7d7b64cb3dfbd736f359ed8bc5ff53ec0ea2a7f7f2035a467c2e2c16b400 | #include <cstdio>
#include <cstring>
inline int gcd(int a, int b) {
while (a != 0) {
int t = b % a;
b = a;
a = t;
}
return b;
}
inline int abs(int x) { return x < 0 ? -x : x; }
struct Frac {
int a, b;
Frac() : a(1), b(1) {}
Frac(int a, int b) : a(a), b(b) { reduce(); }
void reduce... | #include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#define INF 210000000
using namespace std;
int a[300], b[300];
int n;
int abs(int x) { return x < 0 ? -x : x; }
int dfs(int now, double radio, int last) {
int low = (int)ceil(a[now] - a[now] * radio);
int high = (int)ceil(a[now] + ... |
eb4846c2fa618a44c3c2d89d8b540966af3797572ad4a78ae770cf6356c16c37 | 589b1114066e28642fdcdbf0c2aea6fc2e783077e0f3580675cfdaeeeca3fb42 | 0.105518 | cpp | 589b1114066e28642fdcdbf0c2aea6fc2e783077e0f3580675cfdaeeeca3fb42 | c90309f3f2d5a37f7925e2e384df56f4d953ec77e7cf7e1aad66ad5f0554d4bb | PIE_released_gem5_runtime | pie_55927 | p03991 | 5879de4b1d39baa4159a8287e5c186bebf8ec37a1e445ea499401555eee536e4 | c90309f3f2d5a37f7925e2e384df56f4d953ec77e7cf7e1aad66ad5f0554d4bb | 0.405838 | 3.846143 | 2-4 | 013e2c8f1d73935d9bde61bdda9842ce50f4e2a7706f2442d78e24b55e193033 | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
typedef long long lint;
const int N = 262144;
const int mod = 924844033;
int n, cal[N], fac[N], inv[N];
inline int nxi() {
int x = 0;
char c;
while ((c = getchar()) > '9' || c < '0')
;
while (x = x * ... | #include <bits/stdc++.h>
#define maxn 800010
#define P 924844033
#define G 5
using namespace std;
typedef long long ll;
template <typename T>
inline void read(T &x)
{
x = 0;
char c = getchar();
bool flag = false;
while (!isdigit(c)) {
if (c == '-')
flag = true;
c = getchar();
}
while... |
281d90dad972822067708f142a072de4bc37205dab18154ba41a094c436ae37f | 936e4c4966ee6bd068c3658767a1fc6f5ce48b9f13379e3d9447ac8308c09c13 | 0.078514 | cpp | 936e4c4966ee6bd068c3658767a1fc6f5ce48b9f13379e3d9447ac8308c09c13 | 39b16e5f83013629991d1c28b26c09c007fac45577bb90a0e747890402008dd0 | PIE_released_gem5_runtime | pie_55933 | p00602 | 348b38ebe208a3ba53473310de8c1c0a92c8e25ee6cdec948ada68c1c054a5a7 | 39b16e5f83013629991d1c28b26c09c007fac45577bb90a0e747890402008dd0 | 1.064969 | 13.564031 | 8+ | a4cadd30aec8874d6c9e2ac00e3a0f65fe6a19730bdccc342c471897ec777568 | #include <iostream>
#include <cstring>
#include <algorithm>
#define N_F 1010
#define N_CONST 1001
using namespace std;
int v, d, f1, f2;
unsigned long long int f[N_F];
int node[N_CONST + 10][N_CONST + 10];
void rmNode(int i) {
node[i][i] = 0;
for (int j = 0; j < N_CONST; j++) {
if (node[j][j] == 0)
... | #include <iostream>
#include <cstdlib>
#include <set>
using namespace std;
const int N = 1001;
const int SIZE = 1000 + 100;
int parent[SIZE];
int f[SIZE];
int cal(int n) {
if (f[n] > 0)
return f[n];
return f[n] = (cal(n - 1) + cal(n - 2)) % N;
}
int find(int n) {
if (parent[n] == n)
return n;
... |
9e9a9dbd28151c30f22f5e11c6efb26a0490abcc0f8cc56fcd08e7234d4a57fb | 4544a0436bc9ad1eec845bfc37c8796ac74faa9085cbd7858b3a604724b218b3 | 0.001035 | cpp | 4544a0436bc9ad1eec845bfc37c8796ac74faa9085cbd7858b3a604724b218b3 | 9677f6b498e6fa8813a63c3b00df160b7f6cc8223f89b41d6a3f2b86a58ea789 | PIE_released_gem5_runtime | pie_55938 | p03911 | 20552905b225d86d1ff916a74c4d204bfbb491f9537a9e0a43fd55abfef2130c | 9677f6b498e6fa8813a63c3b00df160b7f6cc8223f89b41d6a3f2b86a58ea789 | 0.008626 | 8.332857 | 8+ | 42b20a81bad71f424f0126fc0da7794620035536fb9d1eef66c5b8a35740563e | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
using VI = vector<int>;
const int N = 2e5 + 100;
VI val[N];
struct DSU {
VI sz, par;
DSU(int n) {
par.resize(n);
iota(par.begin(), par.end(), 0);
sz.resize(n, 1);
}
int find(int u) {
if ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define LLMAX (1ll << 60) - 1
#define INTMAX (1 << 30) - 1
#define MOD 1000000007
#define NMAX 1000 * 100 + 1
#define numberOfSetBits(S) __builtin_popcount(S)
#define MSET(x, y) memset(x, y, sizeof(x))
#define gcd(a, b) __gcd(a, b)
#define all... |
9b703979eacbbb7cc3545633b42c3d6a8515c7c007e033ee416fac6e1cae04a9 | 5231cfa6ce83496533f817cb1086680cefdb49073c1e042fa616fdee05319c0a | 0.018839 | cpp | 5231cfa6ce83496533f817cb1086680cefdb49073c1e042fa616fdee05319c0a | 8b0b8f42f54019f7fe04ddb25245452d25df32c2a1b8fb0a85e67bb92e22f95e | PIE_released_gem5_runtime | pie_55949 | p03370 | ed0068184ba9f64b7ae57e6850357af26ee5f294f6028828af58f336aa528c00 | 8b0b8f42f54019f7fe04ddb25245452d25df32c2a1b8fb0a85e67bb92e22f95e | 0.050827 | 2.697965 | 2-4 | 3293e19c3f7b1870a15d7e1e8dbdeb22a6a597d989c6ab2d63cf7cc8b20ab382 | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vi = vector<int>;
using ii = pair<int, int>;
vector<int> v;
int f[3][3];
int main() {
int n, m, x;
cin >> n >> m;
int minn = 10e6 + 100;
for (int i = 0; i < n; ++i) {
cin >> x;
m -= x;
minn = min(minn, x);
}
... | #include <stdio.h>
int main()
{
long long int m[1000000];
long long int sum = 0, q;
int x, i, p, z, o;
scanf("%d %d", &x, &o);
for (i = 0; i < x; i++)
{
scanf("%lld", &m[i]);
sum = sum + m[i];
}
q = 1000000;
for (i = 0; i < x; i++)
{
if (m[i] < q)
{
q = m[i];
... |
32467d52bf0960202a2731d1b72b86437eacfd823e2abb4ce84a660cae6ba4d7 | eb5635a59ee89d8fdbcec0dedde687c68f052f2612541744ab2b683ea20b948e | 0.10489 | cpp | eb5635a59ee89d8fdbcec0dedde687c68f052f2612541744ab2b683ea20b948e | ffa410f82b0ecd4b9cdbde7e335001b68f4017ee2567629a499a08288ed07990 | PIE_released_gem5_runtime | pie_55983 | p02937 | d56178e03e29615881d0f6a099cfd38f1b5b376c1089a7b6803a21bc8fff2c44 | ffa410f82b0ecd4b9cdbde7e335001b68f4017ee2567629a499a08288ed07990 | 1.458095 | 13.9012 | 8+ | 3f141bdec0a8384fa1c3d28f23898477e13f0b07af00f9e97f5ce76cb05010a0 | #include <bits/stdc++.h>
using namespace std;
int dp[100005][30];
int vis[30];
int main()
{
string s;
string t;
cin >> s >> t;
memset(dp, 0x3f, sizeof(dp));
for (int i = 0; i < s.length(); i++)
{
vis[s[i] - 'a'] = 1;
}
for (int i = s.length() - 2; i >= 0; i--)
{
for (int j = 0; ... | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
char s[100005], t[100005];
vector<int> pos[26];
int slen, tlen;
bool have[26];
int main()
{
scanf("%s%s", s, t);
slen = strlen(s);
tlen = strlen(t);
for (int i = 0; i < tlen; ++i) {
have[t[i] - 'a'] = true;
}
for (int i = 0;... |
c929abbc60af7817288eb14e64cb7bb700c6accf93c7640a8b5686b79117a8a2 | a4650bec019307bff0a717e460b82ea76d2b65b26f12026857caa9306fcbf870 | 0.001951 | cpp | a4650bec019307bff0a717e460b82ea76d2b65b26f12026857caa9306fcbf870 | 64880d2aba1f4a90562169a94d7c31d0cbc780531bb08944f270050cf32a931c | PIE_released_gem5_runtime | pie_55999 | p03912 | 98a1dc7c853b660fb1622f6cacf4971a17438e236c3753965033a3d2a8be8e7c | 64880d2aba1f4a90562169a94d7c31d0cbc780531bb08944f270050cf32a931c | 0.003909 | 2.003351 | 2-4 | 8d70e0cf7ca5212378541496d15e3c77b0edb8a623307efd8ec9765127794a67 |
#pragma GCC optimize("Ofast")
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <iostream>
#include <queue>
#include <vector>
#include <bitset>
#include <cmath>
#include <limits>
#include <iostream>
#include <map>
#include <tuple>
using namespace std;
#define INF 3e18 + 7
#define MAX 1... | #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<int, ll> pil;
typedef pair<ll, int> pli;
typedef pair<ll, ll> pll;
template <class T, class U> constexpr bool chmin(T &a, const U b) {
if (a <= b)
return false;
a = ... |
69bcf340dfd3195fad97121ac1544438803a3d63adec4ae25f00fad92eb92b98 | ed1de6e48bb55085ce77770d7484da3594f98f06ddfd1a2e8068d3954bb4ba19 | 0.006712 | cpp | ed1de6e48bb55085ce77770d7484da3594f98f06ddfd1a2e8068d3954bb4ba19 | 511131f4f83636e52e3113f3df8b67bfabe44f7e5d5603d6f29f6295916fe5c3 | PIE_released_gem5_runtime | pie_56023 | p03441 | ef45d47227cdb3289c23d7f5c4d9774b264038f231151b7ddaaac9539f5da214 | 511131f4f83636e52e3113f3df8b67bfabe44f7e5d5603d6f29f6295916fe5c3 | 0.126311 | 18.819297 | 8+ | 1cad45df98a9e30be01ef0b880cbb9cb620aef4ad468893c5c756d7d6dc8d90f |
#include <iostream>
#include <cctype>
#include <queue>
#include <cstdio>
#include <cmath>
#include <sstream>
#include <string>
#include <algorithm>
#include <cstring>
#include <vector>
#include <ctime>
#include <cstdlib>
#include <map>
#include <utility>
#include <iomanip>
#include <set>
#include <sta... | #include <cmath>
#include <cstdio>
#include <algorithm>
using namespace std;
struct node {
int ne, tow;
};
node pth[200000 + 10];
int mp[100000 + 10], szp;
int vis[100000 + 10];
int n;
int deg[100000 + 10];
int root = -1;
int son[100000 + 10];
int bro[100000 + 10];
int dp[100000 + 10];
int left[100000 ... |
19ccea7e329ba5cf15fdd5f4d7227d370813bfbe40946a2646fb3a6215f56d21 | d247a45150fabb38de1512fe6fe6d49f6b5bdc9cdef251d42bb3701cd19fe021 | 0.022025 | cpp | d247a45150fabb38de1512fe6fe6d49f6b5bdc9cdef251d42bb3701cd19fe021 | c3436ebc6a1391def007ad3abdb5527f4241e8a9422965957f2d62879d25f903 | PIE_released_gem5_runtime | pie_56065 | p03172 | 9ee93eeaa013eb56879938c644e77b54bdc2e79d555136de21e37a04e11ce967 | c3436ebc6a1391def007ad3abdb5527f4241e8a9422965957f2d62879d25f903 | 0.065081 | 2.954788 | 2-4 | adc12d7bd876004ac20de887716c17b404af8fbeb3df2907c9e0efd7d67fbb2a | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
using VI = vector<int>;
const int mod = 1e9 + 7;
inline int add(int u, int v) { return u + v >= mod ? u + v - mod : u + v; }
inline int mul(ll u, int v) { return u * v % mod; }
inline int sub(int u, int v) { return a... |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ii = pair<int, int>;
using iii = pair<ii, int>;
#define vt vector
#define pq priority_queue
#define pb push_back
#define mp make_pair
#define fi first
#define se second
const int MOD = 1e9 + 7;
const int INF = 2e9;
const int N = 1e... |
fdecc8fbf6ec119d674977e5cec67c05293e879f20c4099e569fab265ad5bcc4 | 83dce00b45bba9db493144d1d8f2bb833d72b4e198dc9087b97e123ed3e8dc1c | 0.008747 | cpp | 83dce00b45bba9db493144d1d8f2bb833d72b4e198dc9087b97e123ed3e8dc1c | e47d28a7b61f1830b12b830b6e4ed15fb26b5252f33649b66b3239f7d7ca67c3 | PIE_released_gem5_runtime | pie_5609 | p01342 | d8f51b96f8f8a6861860f2e80b01de99f8f6f8709e7b4328d6f945f0454745f8 | e47d28a7b61f1830b12b830b6e4ed15fb26b5252f33649b66b3239f7d7ca67c3 | 0.0357 | 4.081503 | 4-8 | 2914efa1f3e5e5b9d63364f4414d1632b09e95f418a57f3253edfdf2fe6d44bd | #include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <queue>
using namespace std;
bool opx[60][60], opy[60][60];
bool vis[60][60];
int W, H, N;
int dir[4][2] = {1, 0, -1, 0, 0, 1, 0, -1};
s... | #include <stdio.h>
#include <string.h>
#include <math.h>
#include <algorithm>
using namespace std;
#define maxw 55
#define maxn 1010
int n;
int w;
int h;
bool wall[maxw][maxw][4];
int mp[maxw][maxw];
int ix, iy;
int ox, oy;
int que[maxw * maxw][2];
int dir[4][2] = {{0, 1}, {1, 0}, {0, -1}, {-1, 0}};
int... |
1e553f72715a57a1553c6610823db20271d87a327699eb3abd3d5d5a91a3373d | 7cf39148a2aa5110682ed38d359cbb8fa4e5cbb3f5db1d430becce584b11bd05 | 0.017563 | cpp | 7cf39148a2aa5110682ed38d359cbb8fa4e5cbb3f5db1d430becce584b11bd05 | 95b9da3915b19087abf15799c10810bc4d37cc82f1f7119b56c884e5b41f75df | PIE_released_gem5_runtime | pie_561 | p03606 | c8278221cc98161234e17da496402f60124c32a7ae9e16bec2dbdadd1b3b170c | 95b9da3915b19087abf15799c10810bc4d37cc82f1f7119b56c884e5b41f75df | 0.461133 | 26.256291 | 8+ | 042292a8974ec58e2ceeac95cdc461e18a0fde5d636dedfd2d4cfa1b58c18084 | #include <bits/stdc++.h>
using namespace std;
int ans, n, a, b, c[1000001];
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> a >> b;
for (int j = a; j <= b; j++)
c[j] = 1;
}
for (int i = 0; i < 1000001; i++) {
if (c[i] == 1)
ans++;
}
cout << ans << endl;
ret... | #include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
using namespace std;
int l, r, ans, n;
int main() {
scanf("%d", &n);
for (int i = 1; i <= n; ++i) {
scanf("%d%d", &l, &r);
ans += r - l + 1;
}
printf("%d", ans);
return 0;
} |
728f6d9c1fa2af18a623df4f2e4984af700be8f735e453800ceeca5d214cb2f8 | 174501985622a6ed458befa7422708fde23836fc1698e19ec62251d46080565d | 0.046829 | cpp | 174501985622a6ed458befa7422708fde23836fc1698e19ec62251d46080565d | 51de79481d9071f6a9ec56ee7f0b751716fbbc009339bc37b3ccd6b046dd3f56 | PIE_released_gem5_runtime | pie_56168 | p03824 | 3dbed121c8553ec53f9b434685d4628715f44a351b4baa4e6a958d4965d73907 | 51de79481d9071f6a9ec56ee7f0b751716fbbc009339bc37b3ccd6b046dd3f56 | 0.116439 | 2.486481 | 2-4 | f82bc9e98fda6faa0f9ad412c3bc1181305f80c535942435cf52026eea52201f | #include <cstdio>
#include <cstring>
#include <vector>
#include <algorithm>
#define MAXN 100000
using namespace std;
typedef long long LL;
vector<int> G[MAXN + 5];
int N, ans;
int cnt[MAXN + 5][21];
void DFS(int u, int fa)
{
for (int i = 0; i < (int)G[u].size(); i++)
{
int v = G[u][i];
if (v ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for (int i = (a), i##_end_ = (b); i <= i##_end_; ++i)
#define drep(i, a, b) for (int i = (a), i##_end_ = (b); i >= i##_end_; --i)
#define clar(a, b) memset((a), (b), sizeof(a))
#define debug(...) fprintf(stderr, __VA_ARGS__)
template <typename T> ... |
4f9b9e98ceb77439c393b7061d7a9dd5f1aeba405aa75c9d7dd636f3fe42b0df | 00075911efe25f63df6990667ba5980b64f90a5f217313c4d1960263a4e21951 | 0.080404 | cpp | 00075911efe25f63df6990667ba5980b64f90a5f217313c4d1960263a4e21951 | 275db80dc91a15259142dd599d08206c4c4a415168286e99b12886263efcb99f | PIE_released_gem5_runtime | pie_56196 | p03972 | ea214b74be1c8f09c28808512e4104fc4b15d3a5475825db6cde7fdf916d5943 | 275db80dc91a15259142dd599d08206c4c4a415168286e99b12886263efcb99f | 0.210302 | 2.615574 | 2-4 | 2198e15118fb79ac0ae4244cf285c9babf67469f69764e4fdee4872063d5c756 | #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 debug(x) cout << "debug " << x << endl;
#define INF (1 << 29)
using namespace std;
int main() {
int w, h;
vector<long long> a;
vec... | #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;
using namespace std;
int main() {
int w, h;
cin >> w >> h;
vector<long long> x(w), y(h)... |
a6c50e3889483dd745a9f7a15068c1c9347ca763360210f705d2dbcefa5ed296 | 5f521db841eadac16fb8b30f46f740ef989ba8c1efbba8d2cb49ac731835c136 | 0.01951 | cpp | 5f521db841eadac16fb8b30f46f740ef989ba8c1efbba8d2cb49ac731835c136 | 3d2e29c27cc3a9b70f5592fe924959a8f9e7c8fb1571d19d626555130d7489cf | PIE_released_gem5_runtime | pie_56197 | p03955 | 88b3fb299618eeb48c3dc85b5e8c5b1ac050dd556d05512bf6c4f98829fe0bd9 | 3d2e29c27cc3a9b70f5592fe924959a8f9e7c8fb1571d19d626555130d7489cf | 0.11218 | 5.749865 | 4-8 | 25852f34d181f93b93f5be857118a936794784083e0b8f81071c7e129e083ba4 | #include <bits/stdc++.h>
#define no \
{ \
puts("No"); \
return 0; ... | #include <cstdio>
#include <cstring>
#include <cctype>
#include <cmath>
#include <algorithm>
using namespace std;
inline int read(int f = 1, int x = 0, char ch = ' ')
{
while (!isdigit(ch = getchar()))
if (ch == '-')
f = -1;
while (isdigit(ch))
x = x * 10 + ch - '0', ch = getchar();
return... |
a11d425820b87fc2cc6a5710cad8a33099b1e6f9e82799061f4b027ae904785d | 575e43daaf7237c7b31cdad2ae8036bad1f4f90df20d2e89bbad61f611a7f195 | 0.000189 | cpp | 575e43daaf7237c7b31cdad2ae8036bad1f4f90df20d2e89bbad61f611a7f195 | 4c1bdca155aa7f9ba1ca07d2ab8866cf9ec9d9ee557af7a56aeb89940eb3ccce | PIE_released_gem5_runtime | pie_56207 | p03557 | 26b35bfb0bb2bc57cf3c4b46c7741b8d9e718e274231dcff700d36774733310d | 4c1bdca155aa7f9ba1ca07d2ab8866cf9ec9d9ee557af7a56aeb89940eb3ccce | 0.003466 | 18.353769 | 8+ | 1b2fa152a4d327900ecae745e54e8b54b146f974d934d6444e3fa476d3038437 | #include <bits/stdc++.h>
#define ll long long
#define N 100005
using namespace std;
int n, tot, a[N], b[N], c[N], e[N], d[N * 3];
ll ans, v[N * 3];
void add(int x, ll y) {
for (; x <= tot; x += x & (-x))
v[x] += y;
}
ll ask(int x) {
ll s = 0;
for (; x; x -= x & (-x))
s += v[x];
return s;
}
i... | #include <cstdio>
#include <cstring>
#include <algorithm>
#define ll long long
#define N 100005
#define inf (1ll << 60)
#define rep(i, j, k) for (ll i = j; i <= k; ++i)
#define per(i, j, k) for (ll i = j; i >= k; --i)
using namespace std;
inline ll read() {
char ch = getchar();
ll x = 0, f = 1;
while (... |
fb388d5d4a3cf88cb936cbac6661ef954182ff8a707cc27c5946fe07c9f2bdb7 | d00c6647f62540b37b3cae9f1a709144b2eb2b0dbc5d2ce4475cacf64e89b023 | 0.049142 | cpp | d00c6647f62540b37b3cae9f1a709144b2eb2b0dbc5d2ce4475cacf64e89b023 | 5d6c289994cb07a3d0ded06f1708f56774ae74e69f290080adada71bf98ff505 | PIE_released_gem5_runtime | pie_56284 | p03177 | b38d1fe544fb8df31ca1b338bec1704acb47db07cf79e8c0bfa48cff4c2f1b07 | 5d6c289994cb07a3d0ded06f1708f56774ae74e69f290080adada71bf98ff505 | 0.10869 | 2.211736 | 2-4 | 264d20df997eee1e275d7db626b643f2d977714a2d28dc81fa637d1f85a8b24b | #include <bits/stdc++.h>
#define ll long long
#define X first
#define Y second
#define MP make_pair
using namespace std;
const int N = 123;
const ll mod = 1e9 + 7;
int n;
struct mtx {
ll a[N][N], len = n;
mtx() { memset(a, 0, sizeof(a)); }
void operator*=(mtx b) {
int res[N][N];
memset(res, ... | #include <bits/stdc++.h>
#define int long long
#define file(s) \
freopen(s ".in", "r", stdin); \
freopen(s ".out", "w", stdout);
#define forev(i, b, a) for (int i ... |
d8b40c8c14249ba7baae1fb24972cf91d12d4aff3e782fc8f2db9b42727d343c | e87e7e0022b18161d200919b55c3993a4cd92f56e85b75fe7526db2d80aadba9 | 0.000194 | cpp | e87e7e0022b18161d200919b55c3993a4cd92f56e85b75fe7526db2d80aadba9 | a05653a483cdd4e96cfe5128eaf7969004e12dbcde8acdcccd9a22d2af15e20c | PIE_released_gem5_runtime | pie_5632 | p03411 | 5fd16c63303b257bf0edee1fe0cbb1280482e220b9188eb3b9c828c226c45149 | a05653a483cdd4e96cfe5128eaf7969004e12dbcde8acdcccd9a22d2af15e20c | 0.003638 | 18.770512 | 8+ | a1c376aabc9fe09ed51a58a22c7a2d7bd51f205e7737eaa6d89a1a3ccb10e0da | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i, n) for (int i = 0; i < (n); ++i)
#define SIZE(a) ((int)(a).size())
const int N = 100005;
int n1, n2;
vector<int> g[N];
int m1[N], m2[N];
bool in_vc1[N], in_vc2[N];
bool vis[N];
bool dfs(int u) {
if (u < 0)
return true;
... | #include <cstdio>
#include <cstring>
const int N = 100, inf = 0x5FFFFFFF;
struct node
{
int x, y;
} R[N + 5], B[N + 5];
int n, ans;
bool vis[N + 5];
int Ma[N + 5][N + 5], fa[N + 5];
int Dfs(int u)
{
for (int v = 1; v <= n; v++)
if (Ma[u][v] && !vis[v])
{
vis[v] = 1;
if (fa[v] == ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.