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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5a16221ec770bbe49ab3c2feb4488aa6660ca968b66da4f1b5449d6a0196408c | 3681d1900137855b66c1a958e7ae5ca71fd11eb03d61ae60cd0c6270d25da3e1 | 0.145243 | cpp | 3681d1900137855b66c1a958e7ae5ca71fd11eb03d61ae60cd0c6270d25da3e1 | af2901123f6f2e3dae8e65035478c13bbf9de38bf7da22453be82aab70f7341b | PIE_released_gem5_runtime | pie_26346 | p03468 | a74eed0c99f8f3e0560d03c9f423ac55d288e141e7e1cf649bb6d3685fdeb477 | af2901123f6f2e3dae8e65035478c13bbf9de38bf7da22453be82aab70f7341b | 0.514338 | 3.541232 | 2-4 | 7b06fa43405764e095b3bf23b41f0ba3e0daefeeddd45f666ee02b2e409f53ed | #include <cstdio>
#include <cstring>
#include <algorithm>
#define inlien inline
#define retrun return
#define cpnst const
typedef long double ld;
int a[111], n, c;
ld dp[555][555];
inline int min(int x, int y)
{
return (x < y) ? x : y;
}
inline int max(int x, int y)
{
return (x > y) ? x : y;
}
int main... | #include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
int n, c;
const int N = 505;
int l[N];
double f[N][2 << 7], ans, t;
int main() {
cin >> n >> c;
for (int i = 0; i < n; i++)
cin >> l[i];
sort(l, l + n);
do {
memset(f, 0, s... |
0f006bcc135e8e2a014b4abef8b30ecd8431f85d940a497f33344941bf295b61 | 713d0b3a975ac55a8534b05c0f50c3680416982e9ebb606af5475aefd8f4ea1c | 0.081223 | cpp | 713d0b3a975ac55a8534b05c0f50c3680416982e9ebb606af5475aefd8f4ea1c | b172ecb8fa50a407ea65b1d21020da594309578b3548594d7086b4ca98169d10 | PIE_released_gem5_runtime | pie_26392 | p00437 | a6d803fa567c839a073813cd89603599f0e6bdc05659e905afff52980e7853c1 | b172ecb8fa50a407ea65b1d21020da594309578b3548594d7086b4ca98169d10 | 0.185065 | 2.278486 | 2-4 | d8c3501d4f5f7fab53cb41b0f399f1d6f4b9cbbce1c40d152374ddd4cd4f7560 | #include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
int a, b, c, n;
while (cin >> a >> b >> c, a || b || c) {
cin >> n;
int f[300];
fill(f, f + 300, 2);
int m = a + b + c;
int x[1000], y[1000], z[1000];
bool r[1000];
for (int i = 0; i... | #include <bits/stdc++.h>
using namespace std;
bool solve() {
int A, B, C, N, t[1000][3], r[1000];
cin >> A >> B >> C;
if (A == 0 && B == 0 && C == 0)
return false;
cin >> N;
for (int i = 0; i < N; i++) {
for (int j = 0; j < 3; j++) {
cin >> t[i][j];
t[i][j]--;
}
cin >> r... |
8b2e3576fac28fa2ce8d5f6649b7b324923684cb77ad6036628ae121a8144bb7 | b33cad688af920ee0d37bc65401699d282979b4fe06c1fcd618166a31ac67cb4 | 0.063678 | cpp | b33cad688af920ee0d37bc65401699d282979b4fe06c1fcd618166a31ac67cb4 | 2bbf86f715acdb9c892021505ad1772cf3a7ca021e57e8be6753ea00bb48a9fa | PIE_released_gem5_runtime | pie_26393 | p02350 | 737ad60285803e153b3bb1f9f155876dac2a5ad496e36b25069d034ed9fc9dce | 2bbf86f715acdb9c892021505ad1772cf3a7ca021e57e8be6753ea00bb48a9fa | 0.175472 | 2.755634 | 2-4 | d8b322e41fc82c2298ffe84b6dd45e8d9631b0523c3b808a4be4151e94f3ba58 | #include <cstdio>
#include <climits>
#include <algorithm>
using namespace std;
const int SIZE = 1 << 17;
template <typename T>
struct lazysegtree {
T node[2 * SIZE], lazy[2 * SIZE], I;
bool need_upd[2 * SIZE];
T (*upd_f)(T, T, int, int), (*qry_f)(T, T);
lazysegtree(T (*op1)(T, T, int, int), T (*op2)(T... | #include <cstdio>
#include <vector>
#include <climits>
using namespace std;
using ll = long long int;
template <typename Type>
struct SqrtDecomp {
int SIZE;
vector<Type> node, bucket, lazy, need_upd;
Type (*op1)(Type x, Type y, int sz);
Type (*op2)(Type x, Type y);
Type I_op1, I_op2;
SqrtDecomp(... |
db6713c6a52a9fdaed4c8e88974c7901988a92e887adf06cf16b471fc0a8a53a | 8afd845a87ce80aca27812ec83fad51e5d4aa95d330efc88bccd0f1c9915667c | 0.105787 | cpp | 8afd845a87ce80aca27812ec83fad51e5d4aa95d330efc88bccd0f1c9915667c | e550791473070d1bdc2811ec1db1282501e85c713b9ff4f5b96f2f3ee092a03c | PIE_released_gem5_runtime | pie_26417 | p03374 | b3a730e1d9a91ac91c9812a37388c00d0f42aa77d61f543e799444a912f582b0 | e550791473070d1bdc2811ec1db1282501e85c713b9ff4f5b96f2f3ee092a03c | 0.451461 | 4.267656 | 4-8 | 02dfc850f37d88ed445fe4a504d2f92514a95b52626934b90fdd6744cb77099a | #include <iostream>
#include <string.h>
#include <stdio.h>
using namespace std;
long long c, x[100005], maxx, shun[100005], ni[100005];
long long v[100005], val[100005], rval[100005];
int main()
{
int i, j, n;
while (scanf("%d%lld", &n, &c) != EOF)
{
memset(shun, 0, sizeof(shun));
memset(ni, 0... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 0x3f3f3f3f
#define Max int(1e5 + 10)
ll x[Max], v[Max], a[Max], b[Max];
int main()
{
ll n, c;
while (~scanf("%lld%lld", &n, &c))
{
for (ll i = 1; i <= n; i++)
{
scanf("%lld%lld", &x[i], &v[i]);
a[i] =... |
2bc0f41a2ab1119f7432b257b8b46195515aa3d874c88269f2ffc6e3476f5d13 | 304a65a17ea58410b4067bafa51c431266f303f9be7ecb676b1be358a1fc9e45 | 0.039811 | cpp | 304a65a17ea58410b4067bafa51c431266f303f9be7ecb676b1be358a1fc9e45 | f2471edaef692221a36a025aa8711b89d56659b28e04ab0f0afad83553e0c202 | PIE_released_gem5_runtime | pie_26461 | p02257 | 4e6349e8e335434db4569989c68227d2b9bb28a9abd865224abb5e106143e20e | f2471edaef692221a36a025aa8711b89d56659b28e04ab0f0afad83553e0c202 | 0.105364 | 2.646627 | 2-4 | 5b113bb0a74550fca7dfea47c3dbb999b5044f9557ac07442ce3f259c5c86c92 | #include <bits/stdc++.h>
using namespace std;
int n, x, c;
main() {
cin >> n;
for (int i = 0; i < n; i++) {
cin >> x;
for (int j = 2; j <= (int)pow(x, 0.5); j++) {
if (x % j == 0) {
c++;
break;
}
}
}
cout << n - c << endl;
} | #include <cstdio>
#include <cmath>
using namespace std;
int prime[10000];
int p[10000];
int c[10000];
int main() {
for (int i = 2; i * i < 10000; i++) {
for (int j = i * i; j < 10000; j += i)
prime[j] = 1;
}
int cnt = 0;
for (int i = 2; i < 10000; i++) {
if (prime[i] == 0) {
p[cn... |
fb7c7bf5d25b14ef832200b2910fa65ac3c50c0f7c7211a646e69ec4ffe1930a | 90c5ace49a770324398a1cab1c53a9fe109c2c641ee4e76b9916f329e487cb0f | 0.105826 | cpp | 90c5ace49a770324398a1cab1c53a9fe109c2c641ee4e76b9916f329e487cb0f | 85d96470fc85c8a1c830dff9a6ce940462808d93fe2c77ed3488277adcc3f87a | PIE_released_gem5_runtime | pie_26717 | p02969 | dbc64da6abd3317f8886e62e07ff65f561a79c040ea493d680b9f12b70a68194 | 85d96470fc85c8a1c830dff9a6ce940462808d93fe2c77ed3488277adcc3f87a | 0.375206 | 3.545515 | 2-4 | 4f8a9674a3b9479734d1957580b5833d94c3460df72c0c0f8be879186a806cf9 |
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include... | #include <bits/stdc++.h>
#define f(i, n) for (int i = 0; i < (n); i++)
#define inf (int)(3e18)
#define int long long
#define mod (int)(1000000007)
#define intt long long
#define P pair<int, int>
using namespace std;
int modpow(int x, int y, int m = mod) {
int res = 1;
while (y) {
if (y % 2) {
... |
3adb5703787887b1023fe8a29afb0fadbb08709230bc6565e4bf298898b00aea | 107831dcd6497e6a2adc0dc74475e6fc1f2aaf47a6356545a9514d9a94e58482 | 0.107514 | cpp | 107831dcd6497e6a2adc0dc74475e6fc1f2aaf47a6356545a9514d9a94e58482 | a5a31e68224eef3813c0df853a68415534d75acc24e589026a742d3a36d9f03f | PIE_released_gem5_runtime | pie_26776 | p02580 | d2a2b74a412e73c1ee80020c2940a02db53fb2c6f0dfbf766e91cd9c47456345 | a5a31e68224eef3813c0df853a68415534d75acc24e589026a742d3a36d9f03f | 0.45764 | 4.256583 | 4-8 | bfee4bfc5ce16b6b8c3e5b9da50ae26fb1bee2968211b644b8b7c731be77f780 | #include <iostream>
#include <cstdio>
#include <stdio.h>
#include <algorithm>
#include <cstring>
#include <string>
#include <cmath>
#include <cstdlib>
#include <queue>
#include <map>
#include <vector>
#include <bits/stdc++.h>
#include <set>
#define ll long long
#define IO ... |
#include <bits/stdc++.h>
#define f(i, a, b) for (register int i = a; i <= b; ++i)
#define ff(i, a, b) for (register int i = a; i >= b; --i)
#define debug(x) cerr << #x << " : " << x << " " << endl
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
typedef pair<i... |
e9009d71516c455d9d007befaf26dd94fe7d9b7f9533e40fdf3c2ad14692c05f | 2d5bb6096083c5269396d832da72a38c85851782de49a06c65bc1b4a7b3bb01d | 0.106004 | cpp | 2d5bb6096083c5269396d832da72a38c85851782de49a06c65bc1b4a7b3bb01d | 2882697c80899e52663c79a626cd761bd345f36325bcb36da72d6d2acb79f4ff | PIE_released_gem5_runtime | pie_26782 | p02664 | c77a4c382e70be05e491c3dea853c1018ac6e4180eda799af72c8c3ecaa49591 | 2882697c80899e52663c79a626cd761bd345f36325bcb36da72d6d2acb79f4ff | 0.274655 | 2.590995 | 2-4 | c9bef0c8640264c41beaeb5b7caf55cfdb5fc07189d6be3be461b86b7d69b999 | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int memo[N][2];
string s;
int solve(int i, bool b) {
if (i == s.size())
return 0;
int &ret = memo[i][b];
if (~ret)
return ret;
ret = 0;
if (s[i] == 'P' || s[i] == '?')
ret = solve(i + 1, 0);
if (s[i] == 'D' || s[i... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
string s;
cin >> s;
for (char &c : s)
if (c == '?')
c = 'D';
cout << s;
}
|
e52cf0b82ca314196f032c93e3bc846ae1b3bfc23f64d232e347859485394024 | 0bd895c91485db522b33fc2a6d03eeefda5f950a8312ab248669362a804487f6 | 0.015302 | cpp | 0bd895c91485db522b33fc2a6d03eeefda5f950a8312ab248669362a804487f6 | 606ada351f2ca309016335cbc0722a4e624e8b9ff2aa581b9f56c9feda4fe0ef | PIE_released_gem5_runtime | pie_26815 | p02690 | a5812a1f0e71ca4aecd462f329af5571d67f91af5690ebbc9a5c3902bbfa6770 | 606ada351f2ca309016335cbc0722a4e624e8b9ff2aa581b9f56c9feda4fe0ef | 0.036147 | 2.362273 | 2-4 | 0ef2eff7409adc0e9aed12f71ec5dda5736714aa249cc499f0a1c03436552bfc | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define big 1000000007
#define all(a) sort((a).begin(), (a).end())
#define Re(a) reverse((a).begin(), (a).end())
#define YN(a) ... | #include <bits/stdc++.h>
using namespace std;
#define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define big 1000000007
#define all(a) sort((a).begin(), (a).end())
#define Re(a) reverse((a).begin(), (a).end())
#define YN(a) ... |
30d1f42fd63352b0f19bef2cbffbda60fac1cf8fc10459724b491d4e210f0a51 | 52a241a2b94f62f10ccab7726ab854c53d7c12552be833e2fcb406f5f6a360e8 | 0.019304 | cpp | 52a241a2b94f62f10ccab7726ab854c53d7c12552be833e2fcb406f5f6a360e8 | ff0edab521dbf49cc633051307979f9e45fb87d60e1b33f1af9f6d5539ec52ef | PIE_released_gem5_runtime | pie_26909 | p03835 | ad869fb08176c154addbd669b22eef5407833164dd944774e4f91e23cf6efa39 | ff0edab521dbf49cc633051307979f9e45fb87d60e1b33f1af9f6d5539ec52ef | 0.109336 | 5.663979 | 4-8 | 1eb6f5d3934cb8ac92fe781e50ec913ddbe83e8485f28ad4620cc95911e1495e | #include <iostream>
using namespace std;
const int maxi = 8000;
int main()
{
long long k, s, i, j, a[maxi], count, sum;
while (cin >> k >> s)
{
for (i = 0; i <= 7500; i++)
a[i] = 0;
count = 0;
for (i = 0; i <= k; i++)
{
for (j = 0; j <= k; j++)
{
a[i + j]++... | #include <cstdio>
#include <algorithm>
using namespace std;
int main()
{
int k, s;
scanf("%d%d", &k, &s);
long long res = 0;
for (int x = 0; x <= min(k, s); x++)
{
int a1 = max(0, s - x - k);
int a2 = min(k, s - x);
if (a1 > k)
continue;
res += a2 - a1 + 1;
}
printf("%l... |
8f732396e841d0093ebd31c599a5f94c10622b5afa4994c167d619a13c75e99a | a8f3d67d31297e23a2c8404f7a15bda2240aee245b81d82210037fbbcd486398 | 0.019209 | cpp | a8f3d67d31297e23a2c8404f7a15bda2240aee245b81d82210037fbbcd486398 | 39d92437f19aa171d3ceb17f59b972836e262e8268141e3b7f43e092bd51b7c3 | PIE_released_gem5_runtime | pie_27363 | p03954 | ba5407482fc9b2acddfd9a17b8e57fd86a39d988c99ec81dcdbe56640e76a530 | 39d92437f19aa171d3ceb17f59b972836e262e8268141e3b7f43e092bd51b7c3 | 0.45466 | 23.669001 | 8+ | 972fa95aadad9aa6e078fa38d4ff05f509635b765f42182066ecb7a357d46124 |
#include <bits/stdc++.h>
#define reg register
using namespace std;
const int N = 2e5 + 7;
int m, n, ans = 0, sum = 0, p, q;
int a[N], b[N];
inline int read() {
reg int s = 0, t = 0;
reg char ch = getchar();
while (ch > '9' || ch < '0')
t |= ch == '-', ch = getchar();
while (ch >= '0' && ch <= '9'... | #include <cstring>
#include <algorithm>
#include <cctype>
#include <cstdio>
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 f * x;
}
const i... |
55e26b497b84e2154a346ff1f46c895869cc96df3ec015ee31633bcc8b6e94a0 | 54b3ff440238922cdf866499c64765636f8e25f27f6b792c99b67f8d82cd9134 | 0.106536 | cpp | 54b3ff440238922cdf866499c64765636f8e25f27f6b792c99b67f8d82cd9134 | 173479b2882d8fdaf7335e9b7c362328d7350aadf5a34797db510c2ae079e0dc | PIE_released_gem5_runtime | pie_27472 | p03762 | c0a63ced5d9363ab120c1bcea8afe0edf5b948d8956a840a4adeca8f50db094d | 173479b2882d8fdaf7335e9b7c362328d7350aadf5a34797db510c2ae079e0dc | 0.636677 | 5.97619 | 4-8 | ae6f1b7327af793ce91595682fb5db53f6564e5449ecff19dde393f0dfecbf48 | #include <bits/stdc++.h>
using namespace std;
typedef pair<int, int> P;
typedef long long ll;
typedef long double ld;
const int inf = 1e9 + 7;
const ll longinf = 1LL << 60;
#define REP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define rep(i, n) REP(i, 0, n)
#define F first
#define S second
const int... | #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <math.h>
#include <complex>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <bitset>
#include <functional>
#include <assert.h>
#include <numeric>
using names... |
c200ef49533f201ad63707bb7fb44d34f91b6a273033f4bd36b1117d9cad52fd | 3b59347fc0c07a28faa9533236c0231d7be9ef234b194f9379234396c9687838 | 0.019132 | cpp | 3b59347fc0c07a28faa9533236c0231d7be9ef234b194f9379234396c9687838 | 87a3c6e5f4d7ce8dfafcfcc3d30fab2be89288d8aa3e15e5940cda33bf6bb611 | PIE_released_gem5_runtime | pie_27530 | p02627 | ad837e28017abc8009bf6b0e31082d659a2424c16998269fd2503f2e60f89675 | 87a3c6e5f4d7ce8dfafcfcc3d30fab2be89288d8aa3e15e5940cda33bf6bb611 | 0.103666 | 5.418329 | 4-8 | 04849479f0f666a81d82d73eabf800fb56dc15ee928ae7a356b53af75efca97b | #include <bits/stdc++.h>
using namespace std;
int main()
{
char c;
cin >> c;
if (c >= 'A' && c <= 'Z')
cout << 'A';
else
cout << 'a';
return 0;
}
| #include <stdio.h>
int main() {
char s;
scanf("%c", &s);
if (s >= 'a' && s <= 'z') {
printf("a");
}
else if (s >= 'A' && s <= 'Z') {
printf("A");
}
return 0;
} |
02bc94e27dbb3fe0232208ca29dee94542b0a9dd8d1acab0f78135068e8b0148 | 5a7c23c6755b33aff11eaaccac529d63fc8a4e3d34b81447fcd7398cde6c3494 | 0.01931 | cpp | 5a7c23c6755b33aff11eaaccac529d63fc8a4e3d34b81447fcd7398cde6c3494 | 400dff6b8176ae515891ce73dc95b847df84b3514414f42e4355f66caad3adb4 | PIE_released_gem5_runtime | pie_2758 | p03889 | 1bf5d5e5c787b5aab7e753f36fd67495f31d06c48ff555617c9e2cc37811267e | 400dff6b8176ae515891ce73dc95b847df84b3514414f42e4355f66caad3adb4 | 0.039913 | 2.066898 | 2-4 | 15a8c3bf2352381ce60021594fb97e8d20e3582c2c4e14180d3af4221991890f | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
char s[100001], ss[100001];
int main() {
scanf("%s", s);
memcpy(ss, s, sizeof(s));
int n = strlen(s);
reverse(s, s + n);
for (int i = 0; i < n; ++i)
switch (s[i]) {
case 'd':
s[i] = 'b';
break;
... | #include <algorithm>
#include <cstdlib>
#include <cstring>
#include <cstdio>
#include <string>
#include <queue>
#include <cmath>
#include <set>
#include <map>
const int oo = 2139063143;
const int N = 1010000;
const int P = 1000000007;
using namespace std;
typedef long long LL;
typedef double db;
typedef ... |
2ca72348a15ed9407e591b5f98aea14ba6f1f5917010b7986d77f108b62fa6ac | 377078e672b9d86638d335f48c6c4ed832364333639de10498b31114f84fc590 | 0.017253 | cpp | 377078e672b9d86638d335f48c6c4ed832364333639de10498b31114f84fc590 | 16c52c2c5575d994df1a15ef77bca4dc9c3fa5a7f19541e59f1f47eea70af2d5 | PIE_released_gem5_runtime | pie_27882 | p02819 | 63b8770c5b19bb5434e29fae8f568d12f25ff934e033b180b877064a7d478f09 | 16c52c2c5575d994df1a15ef77bca4dc9c3fa5a7f19541e59f1f47eea70af2d5 | 0.588673 | 34.119643 | 8+ | 2ea9232f269537f497ab5669ab6e8e795916265b4f1866c1b59183b518ebdbd8 | #include <bits/stdc++.h>
#define n 200005
using namespace std;
vector<long long> v(n, 0);
vector<long long> prime;
long long i, j;
void sieve()
{
for (i = 3; i * i <= n; i += 2)
{
for (j = i * i; j <= n; j += (i + i))
{
v[j - 1] = 1;
}
}
prime.push_back(2);
for (i = 3; i < n; i... | #include <stdio.h>
int isPrime(int x)
{
int i;
if (x == 2)
return 1;
if (x % 2 == 0)
return 0;
for (i = 3; i <= x / 2; i += 2)
{
if (x % i == 0)
return 0;
}
return 1;
}
int main()
{
int n, i;
scanf("%d", &n);
for (i = n; i <= 1000000; i++)
{
if (isPrime(i))... |
250e3d56f700e7176b0c84faa3c82a798b343c31941c4432261d34f46e0fb254 | 2d7bf6849d646e7b85eefe9e835bf3ca3e0520d25b104dfd972593efd7c98be3 | 0.000394 | cpp | 2d7bf6849d646e7b85eefe9e835bf3ca3e0520d25b104dfd972593efd7c98be3 | 8d8083724ca5d08f55f231e228b180023bdd7f5e166ce31c7546d0961dc38eb1 | PIE_released_gem5_runtime | pie_2843 | p02279 | 6c12380634a0c6e32ef0170b8c9b7e5e09da18fdaa6d63ba700bcd9d8b7c1dc5 | 8d8083724ca5d08f55f231e228b180023bdd7f5e166ce31c7546d0961dc38eb1 | 0.018901 | 48.004951 | 8+ | e5734a941f38e66f8fb3b721a4eef0150b6da688e7e5e47d7ab6a4d38c1e667c | #include <iostream>
#include <vector>
#include <string>
using namespace std;
typedef long long int llint;
struct Node {
llint parent;
llint depth;
string state;
vector<llint> children;
Node() : parent(-1), depth(0) {}
};
struct faster_io {
faster_io() {
cin.tie(0);
ios::sync_with_stdio... | #include <cstdio>
#define NIL -1
const int MAX_N = 100000 + 5;
struct Node {
int p, lc, rs;
};
Node node[MAX_N];
int n;
int id, k, c;
int d[MAX_N];
void setDepth(int i, int num) {
d[i] = num;
if (node[i].rs != NIL)
setDepth(node[i].rs, num);
if (node[i].lc != NIL)
setDepth(node[i].lc, num + ... |
4265930d5a95c2bc7d16006989fb594c95d0b42c73e4531fd693697e05a4f699 | 4be52811e623a0285b683ce0fb076c1f8cbfc947c892f461e6de16c556b6a789 | 0.069789 | cpp | 4be52811e623a0285b683ce0fb076c1f8cbfc947c892f461e6de16c556b6a789 | b3c5c0c36f434b20904f2ac1b93fd5c973bc0fd49052032af090bf4bb84201fa | PIE_released_gem5_runtime | pie_29608 | p03164 | 1d82c8fffb41f682de51e32bf73c278a8c99999c40c917bb4d20b41bfa3690bb | b3c5c0c36f434b20904f2ac1b93fd5c973bc0fd49052032af090bf4bb84201fa | 0.759412 | 10.88159 | 8+ | 024d0e835200e00169094f3799017c9173d3661010c2562774fe874888d529b5 | #include <iostream>
#include <cstring>
#include <cstdio>
using namespace std;
typedef long long ll;
const int maxn = 1000010;
const int inf = 0x3f3f3f3f;
ll dp[maxn];
ll n, W;
ll v[maxn];
ll w[maxn];
inline ll max(ll x, ll y) { return x > y ? x : y; }
inline ll min(ll x, ll y) { return x < y ? x : y; }
int... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long N, W, V = 0;
cin >> N >> W;
vector<int> w(N), v(N);
for (int i = 0; i < N; i++) {
cin >> w[i] >> v[i];
V += v[i];
}
vector<long long> ks(V + 1, INT_MAX);
ks[0] = 0;
for (int i = 0; i < N; i++)
for (int j = V; j ... |
1690115bbc38b00d187bf1b172a8f1d0ec40f458eaa985dcc5fc2c48cfc5a3dc | fa56897d600b4316c3a708a1c28f71ea5fee09ffcb5e83bbc0cbdd36917e6cf0 | 0.105643 | cpp | fa56897d600b4316c3a708a1c28f71ea5fee09ffcb5e83bbc0cbdd36917e6cf0 | 764c7c8925a459930a908e5fb9a14b962a07252562f3639f55e5474cc4961a98 | PIE_released_gem5_runtime | pie_29772 | p02705 | 07b0fe942476bc7fdc3e046e35f48019c6f8711755f10f9c61bf4c4c8eeb291b | 764c7c8925a459930a908e5fb9a14b962a07252562f3639f55e5474cc4961a98 | 0.993275 | 9.402212 | 8+ | 6ef7ec080e127b97b8102fd4904c2d137809249a6e7ce6c7e16a69fb79c857bf | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define gc getchar_unlocked
#define fo(i, n) for (i = 0; i < n; i++)
#define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1)
#define ll long long
#define si(x) scanf("%d", &x)
#define sll(x) scanf("%lld", &x)
#define ss(s... | #include <iostream>
#include <bits/stdc++.h>
using namespace std;
#define PI 3.1415926535897932384626
int main() {
int n;
cin >> n;
cout << (2 * n) * PI;
return 0;
} |
d547a2e018ba642676cc6b1984e35610715767b2ba34dbf969c0e3d314c1ef37 | a8135085a09486deb6aa2f5fda91aeb0e49f7a7666fc5f2ae38020728d8e2baa | 0.092247 | cpp | a8135085a09486deb6aa2f5fda91aeb0e49f7a7666fc5f2ae38020728d8e2baa | 860b57132d73bb1ea88894d628dc43e4729e3a025a6efb50598ca1948fba25a2 | PIE_released_gem5_runtime | pie_29806 | p02755 | 6b0b668fd8a13daca7bce4fb7dce2d36d5e76b2c09ff43fe9d4b06280d8297e6 | 860b57132d73bb1ea88894d628dc43e4729e3a025a6efb50598ca1948fba25a2 | 0.215788 | 2.339236 | 2-4 | 2b8b9efd684ffc8dc78d46d267f97cfddf8d62fb9d25122e4aeefe9314433fad | #include <bits/stdc++.h>
using namespace std;
typedef vector<vector<int> > vvi;
typedef vector<vector<bool> > vvb;
typedef vector<vector<char> > vvc;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef long long ll;
int main() {
int a, b;
cin >> a >> b;
int m, n;
for (... | #include <bits/stdc++.h>
using namespace std;
typedef vector<vector<int> > vvi;
typedef vector<vector<bool> > vvb;
typedef vector<vector<char> > vvc;
typedef vector<int> vi;
typedef vector<bool> vb;
typedef vector<char> vc;
typedef long long ll;
int main() {
int a, b;
cin >> a >> b;
int m, n;
m = a... |
52e48b75f830c11cf87fd6aef942e870541a52abd1c933f639efe5b3ed795e6c | 6faf358be2c009ddd9beb1b8cb4a33300574259a12dea9e8fb7531ad28e8cd28 | 0.087202 | cpp | 6faf358be2c009ddd9beb1b8cb4a33300574259a12dea9e8fb7531ad28e8cd28 | a6d47fc055c9f2ad8fae78950804f559f327c4ee9dd9b885efb0323b75838483 | PIE_released_gem5_runtime | pie_29820 | p02821 | 7b8ce0e87b7d03c44e204b4be4eb62e5e5cf8a3dc30647cc85fe1e3ccb216df5 | a6d47fc055c9f2ad8fae78950804f559f327c4ee9dd9b885efb0323b75838483 | 0.185747 | 2.130086 | 2-4 | 37a064de5fba2246adb9a7e2863675e70b2972d56ab3babf6b0db37de15112a3 | #include <iostream>
#include <vector>
#include <math.h>
#include <complex>
double PI = acos(-1);
template <typename T>
class FFT {
private:
using Complex = std::complex<long double>;
std::vector<Complex> C;
void DFT(std::vector<Complex> &F, int n, int sig = 1) {
if (n == 1)
return;
std::v... | #include <bits/stdc++.h>
#define REP(i, n) for (int i = 0, i##_len = int(n); i < i##_len; ++i)
#define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define rep(i, a, b) for (int i = int(a); i < int(b); ++i)
#define rrep(i, a, b) for (int i = int(a) - 1; i >= int(b); --i)
#define All(x) (x).begin(), (x).end()
... |
dd5fa00b040683d137c36e4301b53eacd066d3dc795a04fce10accf1fa765c33 | 01769fb19a3df392b159b49eb4299d1c872e76204f4ea2a7edb0bf7b719e1cea | 0.000114 | cpp | 01769fb19a3df392b159b49eb4299d1c872e76204f4ea2a7edb0bf7b719e1cea | f18868b7d039d844b31d319640bf1726d9e6be167ab7673350b501f594d8b21f | PIE_released_gem5_runtime | pie_29855 | p02920 | 60963c70c600bf7091d508239f689b3e43ce2d4f99396a23dfde4f013dc3f76b | f18868b7d039d844b31d319640bf1726d9e6be167ab7673350b501f594d8b21f | 0.00097 | 8.474827 | 8+ | 101ae8735f68b181f2b60f3a36832ad470ec26270f4b97274a070b1a2156c180 | #include <cstdio>
#include <algorithm>
#include <functional>
#include <set>
int n;
int S[1 << 18];
int main() {
std::multiset<int, std::greater<int> > S, T;
scanf("%d", &n);
for (int i = 0; i < (1 << n); i++) {
int x;
scanf("%d", &x);
S.insert(x);
}
T.insert(*(S.begin()));
S.erase(... | #include <unistd.h>
#include <algorithm>
#include <functional>
char ibuf[4000000];
char *ibufe = ibuf - 1;
void readall() {
int k, t = 0;
while ((k = read(STDIN_FILENO, ibuf + t, sizeof(ibuf) - t)) > 0)
t += k;
}
int read_uint() {
int x = 0;
while (*(++ibufe) < '0')
;
do {
x *= 10;
... |
db7a97f9e1bdd2c1a8e63d2312db802a4aee6df62f04a146022f0c109162a1ce | 3c9d00d8959ee04e4a72da4066eb725267f84c3ed7ca92ea40ee266f3d416106 | 0.010124 | cpp | 3c9d00d8959ee04e4a72da4066eb725267f84c3ed7ca92ea40ee266f3d416106 | 89abc0af4d0565e46668ff70ea76a4cb9c3e3cb8206c016f020404b933a6d90e | PIE_released_gem5_runtime | pie_2994 | p04008 | f967b81185368efd4cb9e9e3da01ce7889d6d7f3571ecaa8ba15159570c8d5d0 | 89abc0af4d0565e46668ff70ea76a4cb9c3e3cb8206c016f020404b933a6d90e | 0.196605 | 19.419211 | 8+ | 15b52c97fcf665ca8610bc15f3f9a0673c4ae250db7b95ea09c9f9f44cea1fa1 | #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... |
57700c41d7d9d457df65217c208440cd1d83b5b76b592d5de2ba51d5b72af469 | 4d6fd54984a7991b94e5822612491a95372cf67c9ed42d40d15d6931f66d4527 | 0.086468 | cpp | 4d6fd54984a7991b94e5822612491a95372cf67c9ed42d40d15d6931f66d4527 | 0571e670d1bf175e834a9c194eb2f16b5be8b6f7352b6a45e5eea0c731f91bc4 | PIE_released_gem5_runtime | pie_30223 | p03957 | dc19b2d0ea7c15d8e362233ae697b3ba96d810b15cdd36fd87489f0098fa999f | 0571e670d1bf175e834a9c194eb2f16b5be8b6f7352b6a45e5eea0c731f91bc4 | 0.30468 | 3.523632 | 2-4 | 3ae7ce2770786f0b7a15aa7a2007fe8e476ec42408e42ab0faa8943154f7b5a7 | #include <bits/stdc++.h>
#define pb push_back
using namespace std;
void debug_out() { cerr << '\n'; }
template <typename Head, typename... Tail> void debug_out(Head H, Tail... T) {
cerr << " " << H;
debug_out(T...);
}
#define dbg(...) cerr << #__VA_ARGS__ << " ->", debug_out(__VA_ARGS__)
#define dbg_v(x, n) ... | #include <bits/stdc++.h>
#define NMAX 100005
using namespace std;
int i, ok1, ok2;
int main() {
ios_base::sync_with_stdio(false);
string sir;
cin >> sir;
for (i = 0; i < sir.size(); ++i) {
if (sir[i] == 'C')
ok1 = 1;
if (sir[i] == 'F' && ok1 == 1) {
ok2 = 1;
break;
}
... |
164470bb63c11db6a217be8ba0d265f662f30e1c76802f59d91b8ad09bc5536a | 2266be32567a60fe14f014924359cccbc8372eef13d8d33470a3c48ed1ff7322 | 0.006063 | cpp | 2266be32567a60fe14f014924359cccbc8372eef13d8d33470a3c48ed1ff7322 | 6c9e6b78dd4850840ed1e8395c90f97ec5ccab04febb61cc7351da07989d9ee5 | PIE_released_gem5_runtime | pie_30261 | p03862 | d51f9a54b5ca6f01d81ea79b9343f9ce2b09d60a7a0d8abdace601e631596f7e | 6c9e6b78dd4850840ed1e8395c90f97ec5ccab04febb61cc7351da07989d9ee5 | 0.054924 | 9.05949 | 8+ | 3ada768e01121f79735252d007ce6e3254cce4499b0451d2b0ea5afed07c8784 | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cctype>
#include <map>
#include <list>
#include <stack>
#include <queue>
#include <vector>
#include <set>
#define mem(a, b) memset((a), (b), sizeof(a))
using name... | #include <stdio.h>
int main()
{
int a[100005];
int n, x;
while (~scanf("%d%d", &n, &x))
{
int i, j;
for (i = 0; i < n; i++)
scanf("%d", &a[i]);
long long sum = 0;
if (a[0] > x)
{
sum += a[0] - x;
a[0] = x;
}
for (i = 1; i < n; i++)
{
int temp ... |
d4c6dcf97fb57f967ec4567b0f9c03561792f98a36d6113cc1d0a108959c2928 | 18019a8050900ebe033456ae88edd97389581934e5aa340bcf9dd7717b72f4c6 | 0.092541 | cpp | 18019a8050900ebe033456ae88edd97389581934e5aa340bcf9dd7717b72f4c6 | 19950a3c9b186bfae842f08c84d781db43f8df6638aabc0df417ad962302f476 | PIE_released_gem5_runtime | pie_30342 | p02788 | 6cce5ef7d65ee740154e0702de8d37ccc8a9e631a64d80d3d19d72e7ad87d56e | 19950a3c9b186bfae842f08c84d781db43f8df6638aabc0df417ad962302f476 | 0.395945 | 4.278578 | 4-8 | 8186402649b9940d12771093decbc497dee0b8e2616ce809aea76fd108e5e4ef | #include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int main()
{
long long n, d, a;
long long ans = 0, cur = 0;
vector<pair<long long, long long>> monsters(N);
queue<pair<long long, long long>> q;
cin >> n >> d >> a;
d *= 2;
for (int i = 0; i < n; ++i)
cin >> monsters[i].f... | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <cmath>
using namespace std;
#define max(a, b) ((a > b) ? a : b)
#define min(a, b) ((a < b) ? a : b)
#define fori(i, n) for (ll i = 0; i < n; ++i)
typedef long long ll;
ll n, d, a, x, h;
int main() {
scanf("%lli%lli%lli"... |
f6c428e9423fa3e30553dbf007a4e0802457fc0488e992fb22dd0ebf05a21c41 | e87104af7e13c0a74a63347a5b88ce5277a0e152da7d7c480f659bef9e57e1ba | 0.010357 | cpp | e87104af7e13c0a74a63347a5b88ce5277a0e152da7d7c480f659bef9e57e1ba | ec177f76bc1e2ad4992fbdfae00f3a02bf392baa81282a5dfb8dec50acb72653 | PIE_released_gem5_runtime | pie_30356 | p02761 | ae777e4014bb534f95a6ba9d7d6b0670cf280333204d0b1f070f94bae2e86862 | ec177f76bc1e2ad4992fbdfae00f3a02bf392baa81282a5dfb8dec50acb72653 | 0.055281 | 5.337398 | 4-8 | cdd4e35fee53e443916665e751fcdcfd181f30b95b742ecb3502475ffa4e1d8c | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n, m, a[10], s, c;
map<int, int> q;
cin >> n >> m;
int flag = 1;
memset(a, -1, sizeof(a));
while (m--) {
cin >> s >> c;
if (q.count(s) == 0) {
q[s] = c;
a[s] = c;
}
else {
i... | #include <stdio.h>
int a[5];
int main() {
int n, m, i, s, c;
scanf("%d%d", &n, &m);
for (i = 1; i <= n; i++)
a[i] = -1;
for (i = 1; i <= m; i++) {
scanf("%d%d", &s, &c);
if (a[s] != -1 && a[s] != c) {
printf("-1\n");
return 0;
} else {
a[s] = c;
}
}
if (n >... |
3a2592979d0e338cc8253e8027496e9c4991f67b5ed72df5e2c3490347cbc8ae | d7bef18df4990c0aeb2bc1ed29b070ed9b6a7298e13dd17365c3af45d7c92f80 | 0.034494 | cpp | d7bef18df4990c0aeb2bc1ed29b070ed9b6a7298e13dd17365c3af45d7c92f80 | 42080ea394b3e22b71a8570a6a0c2a57d02163a4e083cc2671c033ccc4a10629 | PIE_released_gem5_runtime | pie_30411 | p02596 | 55d3a7466aaac6fd26992127f4b0f1f6ac71db3bca6c6911170816c0013c8a56 | 42080ea394b3e22b71a8570a6a0c2a57d02163a4e083cc2671c033ccc4a10629 | 0.069509 | 2.015113 | 2-4 | 224c1932c69ea25102407ff28054684bcf71815918f2613be639d022fcc96d4b | #include <iostream>
#include <cstring>
#define MAXN 1000007
using namespace std;
bool vis[MAXN];
int main()
{
int ans = -1;
int now = 7;
int k;
cin >> k;
vis[now % k] = 1;
memset(vis, 0, sizeof vis);
if (now % k == 0) {
cout << "1\n";
} else {
int i = 2;
while (now) {
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll p[1000005];
int main()
{
ll a, b, c, d;
cin >> a;
ll k = 7;
ll ans = 1;
while (1)
{
if (k < a)
{
ans++;
k *= 10;
k += 7;
}
else
{
k = k % a;
if (k == 0)
{
... |
7cdc96cbcb0fba0deab76bb8a76f73ae2df235e1a121e6013ad66fef0f9a7516 | 362a21675eb739ea405857f6747e5fd903ad86099abcc6734222e5d7c5004ab4 | 0.008971 | cpp | 362a21675eb739ea405857f6747e5fd903ad86099abcc6734222e5d7c5004ab4 | add5eecdf7556124816cbaf34270fc76a9cf1a73c92624e2deac3030f97d7435 | PIE_released_gem5_runtime | pie_3042 | p02957 | 9ffa7165fb28c304e4fdc2e7e0c31e4ba8807d789e52fbef4ed4e3c4d599106f | add5eecdf7556124816cbaf34270fc76a9cf1a73c92624e2deac3030f97d7435 | 0.050812 | 5.664228 | 4-8 | 1938c1f3029a684bb15774412580ec04ba9f09d82f14563ae6604bafa7c8d747 | #include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int a;
int b;
int i;
int res = 0;
cin >> a;
cin >> b;
for (i = 0; i < 1000000000; i++) {
if (abs(a - i) == abs(b - i)) {
res = i;
break;
}
}
if (res > 0) {
cout << i;
}
else
cout... | #include <stdio.h>
#include <math.h>
int main()
{
int a, b, k;
int c = 0;
scanf("%d%d", &a, &b);
if ((a + b) % 2 == 0)
{
k = (a + b) / 2;
printf("%d", k);
}
else
{
printf("IMPOSSIBLE");
}
return 0;
}
|
df604355d95f93ffcb3002de7ef0bcf987ea6def2bb69cac71cfc321e8e2d99c | dd782fd70175475ca76eba9534e14419f7e41766712b89eba9938b34956c8960 | 0.009737 | cpp | dd782fd70175475ca76eba9534e14419f7e41766712b89eba9938b34956c8960 | 74172efd22dae94863f2eb2c9d34e3ac194b946865cc0505675dc89d69656559 | PIE_released_gem5_runtime | pie_30451 | p02924 | 5dd3d160068ff4ba1c04d99d77da5af998a8e0e223c2385a71d6253ce1f68f9f | 74172efd22dae94863f2eb2c9d34e3ac194b946865cc0505675dc89d69656559 | 0.343196 | 35.246329 | 8+ | 5952024b38438debce63a4c97d520a06b3bca1c75c396725c6e7b8ab6378be44 | #include <bits/stdc++.h>
using namespace std;
#define el '\n'
#define sz(v) ((int)((v).size()))
#define all(v) ((v).begin()), ((v).end())
#define clr(v, d) memset(v, d, sizeof(v))
double const EPS = 1e-8, PI = acos(-1);
const int N = 2e5 + 9, M = 50 + 9, OO = (int)1e9 + 1;
const long long MOD = 1e9 + 7;
typede... |
#include <cmath>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
typedef long long ll;
#define For(i, x, y) for (int i = x; i < y; ++i)
#define mem(x, y) memset(x, y, sizeof(x))
#define ALL(a) a.begin(), a.end()
#define PII pair<int, int>
#define INF 0x3f3f3f3f
#define DOF 0x... |
4290ee7bac6d8fdecc91837227f736fa4c18cbeb4ad1b0f37af8fbbf10006522 | c1af82c3c250ba5dbf36fc4e166f511bccd6aae1b2184ba1e57462a20a03fd51 | 0.077446 | cpp | c1af82c3c250ba5dbf36fc4e166f511bccd6aae1b2184ba1e57462a20a03fd51 | cf8aa91debeb153365192f52b6a608320eafc887ba368f89c487bd54ecc48da2 | PIE_released_gem5_runtime | pie_30466 | p03734 | 90fa7d2c6dbb641ad8ff6fad900075e2361d49e2137340c17d7fd85ab97d22b8 | cf8aa91debeb153365192f52b6a608320eafc887ba368f89c487bd54ecc48da2 | 0.188998 | 2.440392 | 2-4 | 5f457e12ebab287309c59a9d1b51b37be7067fd1954dfbe5bd40a417c45b00f8 | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define fbo find_by_order
#define ook order_of_key
typedef long long ll;
typede... | #include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
using namespace std;
int n, m, a, b, c, d;
long long sum, ans;
struct node
{
int w, v;
} g[110];
bool cmp(node a, node b)
{
return a.v > b.v;
}
node A[110], B[110], C[110], D[110];
long long swa[110], swb[110], swc[110], sw... |
b4886c044b23db6d5494229ad20b0907cf6940c003cc693a12fc07be46a092a9 | b03125fdeab91b3e28725123671c9a5a43879613af597aca3aeba04c1631079e | 0.020014 | cpp | b03125fdeab91b3e28725123671c9a5a43879613af597aca3aeba04c1631079e | cc94ee110f2be33f1c30018bf8ac9a95c5fe85c0cffa34180d0a24044eda9522 | PIE_released_gem5_runtime | pie_30546 | p03745 | 1fa1643358035a492c098f36053c9d76d4a9bf69c952dee883ac5665313559f6 | cc94ee110f2be33f1c30018bf8ac9a95c5fe85c0cffa34180d0a24044eda9522 | 0.148563 | 7.423032 | 4-8 | 867d829ef3714d83e934d8d561dc07fb578ffa5a6dfda242d6c6f6628e7fe129 | #include <iostream>
#include <cstring>
using namespace std;
int pd[100010], arr[100010];
int main()
{
int n, m, ans = 0, T = 0;
memset(pd, 0, sizeof(pd));
cin >> n;
for (int i = 1; i <= n; i++)
{
cin >> arr[i];
}
T = arr[2] - arr[1];
for (int i = 3; i <= n; i++) {
if (T == 0)
... |
#include <cstdio>
#include <cstring>
#include <algorithm>
typedef long long LL;
using namespace std;
#define max_n 100005
int a[max_n];
int main()
{
int n, k = 1, ans, i;
bool flag, res = false;
scanf("%d", &n);
scanf("%d", &a[0]);
if (n == 1)
{
printf("1\n");
return 0;
}
ans ... |
b3bfa6157625820e20344669228384871394aba605467c3c6fe9a2a705c4882c | 6ec202d116e3271f48522a5a93e3630ec6774d191c834b33bc93650dd968a9ca | 0.081389 | cpp | 6ec202d116e3271f48522a5a93e3630ec6774d191c834b33bc93650dd968a9ca | c7e3a0254a0a6b6edcaa93541ccffb69067a66a038092b97564f832d6014ad7a | PIE_released_gem5_runtime | pie_30587 | p02708 | 3950a36391fdf2c9595494cc0c7c899859071e1d1852c86abcd61481312c2633 | c7e3a0254a0a6b6edcaa93541ccffb69067a66a038092b97564f832d6014ad7a | 0.342072 | 4.202953 | 4-8 | 69574f0dcce2d8d22dc341c8eb2c13594d85e3fa54b5ccec01bcfe1a53d0a856 | #include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimization("unroll-loops")
#pragma GCC optimize("O2")
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define prec(n) fixed << setprecision(n)
#define n_l '\n'... | #include <bits/stdc++.h>
using namespace std;
#pragma GCC target("avx2")
#pragma GCC optimization("unroll-loops")
#pragma GCC optimize("O2")
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define all(v) v.begin(), v.end()
#define prec(n) fixed << setprecision(n)
#define n_l '\n'... |
63e4dea025d5c06c2893d521aa05528ed9dd1efa50e46798a726e53b442e45be | 9141cc761d499ea264291e3834ddd5e0a9545a36cb41c232f348e46ef4cb93d5 | 0.020993 | cpp | 9141cc761d499ea264291e3834ddd5e0a9545a36cb41c232f348e46ef4cb93d5 | cb3c45272f44a417a13ce8f8050a750e06801633593ffb83962ed14bc70e9a26 | PIE_released_gem5_runtime | pie_30645 | p02971 | 73bc47aeac3f4d964d97cf5576ee8280a85259f5a03910187a50be3bc9996fbe | cb3c45272f44a417a13ce8f8050a750e06801633593ffb83962ed14bc70e9a26 | 0.279654 | 13.321422 | 8+ | 65b9b6dfcb7efc3e589f5d00408d0e892a1543b10881e4f28e11b4c030bef4ef | #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... |
0cd78f6469fd9a706480fe3becfbc57eb174683e182673135d6b68aa850e1f6a | f392a13a459c0125c117f8d4cd89d522e0c9b47c634a6c6cc6015a922b2bba2e | 0.108848 | cpp | f392a13a459c0125c117f8d4cd89d522e0c9b47c634a6c6cc6015a922b2bba2e | 21a008ed7d173c210d413fb5180c138c03a788b36dca4288eb7e9a3676dc7bc6 | PIE_released_gem5_runtime | pie_30699 | p03408 | 7c23156e82f5851ca4d9c74e0bf0ae5eeb4c775430bc111c0063ac43c10d30c8 | 21a008ed7d173c210d413fb5180c138c03a788b36dca4288eb7e9a3676dc7bc6 | 0.253316 | 2.327253 | 2-4 | 14ced82696774b8bc86d61788376515c3fe77103dac9418e267296d1d4268557 | #include <bits/stdc++.h>
#define ll long long int
#define sz 20010
using namespace std;
string ss[sz];
string sx[sz];
map<string, ll> mp;
map<string, ll> mp2;
set<string> st;
set<string>::iterator it;
int main()
{
ll n, m, i, j, a, b, p;
cin >> n;
for (i = 1; i <= n; i++)
{
cin >> ss[i];
... | #include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
ll n, m, i, j;
cin >> n;
string a;
map<string, ll> ma;
map<string, ll>::iterator it;
for (i = 0; i < n; i++)
{
cin >> a;
ma[a]++;
}
cin >> m;
for (i = 0; i < m; i++)
{
cin >> a;
ma... |
8488e9c86209c7d91259a1757d7f23ae0435604e01a5b53118552bba3c62b0d6 | 2e8be4eeea8a3fbf4dced460e603c04b417d18336c40718f1514f4ed67048452 | 0.021051 | cpp | 2e8be4eeea8a3fbf4dced460e603c04b417d18336c40718f1514f4ed67048452 | 6cefc6c8361b0fd2314ac1d47fc4d4743919aafcd4ba1d91a54e1595911fa82c | PIE_released_gem5_runtime | pie_30703 | p03851 | 56e9223bdfa8b04848977fce7cb6a05b054f760ccf93e3521240fbb25b9dc2e6 | 6cefc6c8361b0fd2314ac1d47fc4d4743919aafcd4ba1d91a54e1595911fa82c | 0.274364 | 13.033537 | 8+ | bdafa7ec914d51b705c1cdb35414c3f6474cb51c7d698ac4d7b8c852de3fd740 | #include <cstdio>
#include <cstring>
#include <algorithm>
#define MAXN 300000
#define INF 1000000000000000000LL
using namespace std;
typedef long long LL;
int N;
LL T[MAXN + 5], sum[MAXN + 5];
LL L[MAXN + 5], R[MAXN + 5];
int que[MAXN + 5];
LL f[MAXN + 5], h[MAXN + 5], g[MAXN + 5], ans[MAXN + 5];
LL GetY(in... | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
#define MAXN 300010
#define LL long long
#define INF 1e16
int n, m, a[MAXN], st[MAXN], r;
LL f[MAXN], g[MAXN], h[MAXN], ans[MAXN], sum[MAXN], tmp[MAXN], t[MAXN];
double K(int x, int y)
{
return (t[x] - t[y] + 1LL * x * (x - 1) /... |
9644dc7f5f24e3544fb6209fbde6f3a86c152c798b17710529c9c53c8e2be8b6 | 16a35be4e1d6e0c8c75a4140bd473ccee30c6ce1fcfd91ab4c45459de7c508e2 | 0.020052 | cpp | 16a35be4e1d6e0c8c75a4140bd473ccee30c6ce1fcfd91ab4c45459de7c508e2 | bee095bd26f3ebf2d580ca87bcd396ddd4dba68c93a81528ae6dec241d7469c9 | PIE_released_gem5_runtime | pie_30737 | p03759 | 43ca370773b4c51a3712603a5206d55f606b150d7a074c0cb9d6f68409d09dcc | bee095bd26f3ebf2d580ca87bcd396ddd4dba68c93a81528ae6dec241d7469c9 | 0.105696 | 5.271134 | 4-8 | 76fb0907fbfe1ad51520782ebb2c27b55c42608dbeea6ce62b38f9f49a69f0d6 | #include <bits/stdc++.h>
using namespace std;
int main()
{
int a, b, c;
cin >> a >> b >> c;
if (b - a == c - b)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| #include <stdio.h>
#include <stdlib.h>
int main(void) {
int a, b, c;
scanf("%d%d%d", &a, &b, &c);
if ((b - a) == (c - b)) {
printf("YES\n");
} else {
printf("NO\n");
}
system("pause");
} |
6c5b1ff3ea576ffa58dd057f6e073723a8e9868f5a0215030b9bf929c5b3fd00 | 3bb696afb12e93d7aec9879e45191fc6c0896c4637d6e93169f35b0e9112cdb7 | 0.018377 | cpp | 3bb696afb12e93d7aec9879e45191fc6c0896c4637d6e93169f35b0e9112cdb7 | 656f16906234043c10f638f2fa6ab3bea4fe386e7c553fc7dc976d7065ab5f4d | PIE_released_gem5_runtime | pie_30747 | p03662 | 9ee6c97b859746531a88ca9837b7b878d8f7436ea4b13a1fb626d6ba3bb377ce | 656f16906234043c10f638f2fa6ab3bea4fe386e7c553fc7dc976d7065ab5f4d | 0.373171 | 20.306268 | 8+ | 0a511f1d7e69bc51ef1fa89dcf7efb68621f56615ce8973831ae0fd4fcaeb66e | #include <iostream>
#include <string>
#include <cmath>
#include <cstdio>
#include <cctype>
#include <cstring>
#include <iomanip>
#include <cstdlib>
#include <ctime>
#include <set>
#include <map>
#include <utility>
#include <queue>
#include <vector>
#include <stack>
#include <sstream>
#include <algorithm... | #include <cstdio>
#define N 100005
int n;
struct edge {
int to, next;
} e[N << 1];
int head[N], cnt;
void add(int u, int v) {
e[++cnt] = (edge){v, head[u]};
head[u] = cnt;
}
int son[N];
int path[N], len;
bool dfs(int x, int fa) {
bool p = x == n;
for (int i = head[x]; i; i = e[i].next) {
in... |
bbbd61e064f71b3bb0d2bc587b08d6afb238a00714f9d352d3edd74855e88c36 | e5bc4135dc079dc3d3aedf773f0cc16895616de56d19857845e457de4b598d22 | 0.105331 | cpp | e5bc4135dc079dc3d3aedf773f0cc16895616de56d19857845e457de4b598d22 | 3da3ec7896b4aa0af687345df555012e1e236f58895ad402c60fee810f0e3cf7 | PIE_released_gem5_runtime | pie_30907 | p02873 | 7111d470666d00343b033eb6789455c8f27b29b97cb5512d4e696268bbf8240f | 3da3ec7896b4aa0af687345df555012e1e236f58895ad402c60fee810f0e3cf7 | 0.31932 | 3.031585 | 2-4 | 0f77d59ee6e70bc03e04e6aea6b62cb22e3c614eae9ca997a632806d556cf64d | #include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main() {
string a;
int seq[500005], n, x = -1;
long long final = 0;
cin >> a;
n = a.size();
seq[0] = 0;
memset(seq, 0, sizeof(seq));
for (int i = 0; i < n; i++) {
if (a[i] == '<') {
seq[i + 1] = seq... | #include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
string s;
cin >> s;
n = s.size();
int pos = 0;
long long int ans = 0;
while (pos < n)
{
int coun1 = 0;
while (s[pos] == '<' && pos < n) {
++pos;
coun1++;
}
int coun2 = 0;
while (s[pos] == '... |
1991bad4e94bfd6797b291c7be16f9d1841fff73cbcb2b6a6631f4ec1fbf1fec | 66085265de3a601083d5cd9cc7501eea4d0f400474436aa43efd80f70b79b445 | 0.09774 | cpp | 66085265de3a601083d5cd9cc7501eea4d0f400474436aa43efd80f70b79b445 | 357430c4ed740d8e841f200ea59aa87ab708a12fa5d08ba2b02516e079dcc2f2 | PIE_released_gem5_runtime | pie_30916 | p02651 | bedb3a7d0d322091cdb8f06096ccd1b1916451cf1f2746448ae3c11b4c706d45 | 357430c4ed740d8e841f200ea59aa87ab708a12fa5d08ba2b02516e079dcc2f2 | 0.979008 | 10.016448 | 8+ | dc88b72b0e9812ec6684167fb0f33abf269c4dbf6f20ec26722ea1c0206f9a9e | #include <iostream>
#include <string>
#include <cstdio>
#include <vector>
#include <cmath>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <queue>
#include <ciso646>
#include <random>
#include <map>
#include <set>
#include <bitset>
#include <stack>
#include <unordered_map>
#includ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 210;
int _w;
int n;
ll a[N];
char s[N];
namespace Basis {
ll b[62];
void init() { memset(b, 0, sizeof b); }
void insert(ll x) {
for (ll i = 61; i >= 0; --i)
if (x & (1LL << i)) {
if (b[i])
x ^= b[i];
... |
ec482643859e32e0ccc702a77e758ebad551d1272e0edebb6087d2dbab70d0c7 | cc1df10b666fd0bcba820b767c84eb30e2247a8386c0c106413150c762063af2 | 0.040321 | cpp | cc1df10b666fd0bcba820b767c84eb30e2247a8386c0c106413150c762063af2 | b94c073d7420c4d9c74eae06e33e9b22fee8e86adb3f053988d7d5be28521dd1 | PIE_released_gem5_runtime | pie_30918 | p02579 | 7c030931ac78b24b18d02fd91f6fdeda0601aa9fff8d34ca2357d6a10346cd4a | b94c073d7420c4d9c74eae06e33e9b22fee8e86adb3f053988d7d5be28521dd1 | 0.376669 | 9.341818 | 8+ | b12182e02fddf8869a70637bdadcd89bbb14bc078e49158a7bf0ef095ca5228c | #include <bits/stdc++.h>
using namespace std;
#define REP(i, p, n) for (ll i = p; i < ll(n); ++i)
#define rep(i, n) REP(i, 0, n)
using ll = long long;
using pll = pair<ll, ll>;
const ll MAXN = 1002;
ll C[MAXN][MAXN];
int main()
{
ll H, W;
cin >> H >> W;
ll CH, CW, DH, DW;
cin >> CH >> CW >> DH >> D... | #include <bits/stdc++.h>
using namespace std;
int main()
{
int H, W, CH, CW, DH, DW;
cin >> H >> W >> CH >> CW >> DH >> DW;
--CH;
--CW;
--DH;
--DW;
vector<string> S(H);
for (int i = 0; i < H; ++i) {
cin >> S[i];
}
vector<int> Cost(H * W, 1000001);
deque<pair<int, int> > Q;
cons... |
ca16a1e0cd337647a456eb99efc768c06dedf67d5082625c3c0834c96e0b1fac | 29f747f67082b9bcdfdfcc66854a7200e1f28d270ec93a13e73426543ee16165 | 0.126571 | cpp | 29f747f67082b9bcdfdfcc66854a7200e1f28d270ec93a13e73426543ee16165 | b15937ae288d964e3190ea9f7a7e61d7f67057bda2bb29fb8689981428b18da0 | PIE_released_gem5_runtime | pie_30960 | p02956 | d43209e164453f84cc4e518ce528d68a677d625e9a7e749478eec179c46b8329 | b15937ae288d964e3190ea9f7a7e61d7f67057bda2bb29fb8689981428b18da0 | 0.85003 | 6.715819 | 4-8 | 2f77b256ff3c2442306507f0afb492f8878e1c82a8ce118f00eeefd6cb660dc8 | #include <iostream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <list>
#include <set>
#include <string>
using namespace std;
int gcd(int a, int b) {
int c = a % b;
while (c != 0) {
a = b;
b = c;
c = a % b;
}
return b;
}
struct UnionFind {
vect... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
#define rep2(i, x, n) for (int i = x; i <= n; i++)
#define rep3(i, x, n) for (int i = x; i >= n; i--)
#define elif else if
typedef long long ll;
typedef pair<ll, ll> P;
const ll MOD = 1e9 + 7;
const ll MOD2 = 998244353;... |
2b5a385037a0005ee9f60cfa992fbfd9e28637b886c140ae6eef59f42cdb75d1 | edf21f40d89cff2d33382d3dd12a7cf0364fc589154637fbee44069f37557bd0 | 0.020804 | cpp | edf21f40d89cff2d33382d3dd12a7cf0364fc589154637fbee44069f37557bd0 | 9d17cd44e3cde19f9724a284285a671ac0d9596a0c32b04f42f21268517dabea | PIE_released_gem5_runtime | pie_30972 | p00650 | 85ebd76d2b53f5a83649672de50b4c68c211754d6f29aefe82ea3f3c9caeec8f | 9d17cd44e3cde19f9724a284285a671ac0d9596a0c32b04f42f21268517dabea | 0.087234 | 4.193232 | 4-8 | 1b7ba78f18ef5dfa764672df14951b74018b37e3051aaa369147fb8b4f19a47e | #include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <queue>
#include <cmath>
#include <string>
#include <cctype>
#include <map>
#include <iomanip>
using namespace std;
#define eps 1e-8
#define pi acos(-1.0)
#define inf 1 << 30
#define linf 1LL << 60
#... | #include <stdio.h>
#include <string.h>
#include <algorithm>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxw = 1000;
int g[105][105], w[105];
int a[105], v[105], na[105];
int n, m;
int mincut(int n) {
int i, j, pv, zj;
int best = inf;
for (i = 0; i < n; i++) {
v[i] = i;
}
whil... |
0a95c242d3858d13734da13936ff245469e2855b344cf5b7a6a16b2e11e2f5f8 | a50a328b835e3896aa9fbb50433dc2d994f4df36a0c5b9c962471dcbfeeea997 | 0.019603 | cpp | a50a328b835e3896aa9fbb50433dc2d994f4df36a0c5b9c962471dcbfeeea997 | ea77bfeb8da7ab9ea095f71bafe57a92220a40a839d795efbd4db244bbd0c006 | PIE_released_gem5_runtime | pie_31053 | p01366 | eab5e49ed68db32b157d8f29db55d4c36d12cbb7ec974ee6fa9f606735a5bae6 | ea77bfeb8da7ab9ea095f71bafe57a92220a40a839d795efbd4db244bbd0c006 | 0.314383 | 16.037182 | 8+ | 2885194982608697b326a1278eded659c4141bc2510c4a4e2d0367078fa66d75 | #include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <vector>
#include <queue>
#include <cstdio>
#include <cmath>
#include <string>
#include <stack>
#define PI acos(-1.0)
#define inf 0x3f3f3f3f
#define E exp(double(1))
#define maxn 51000
using namespace std;
struct Edge... | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
constexpr int maxN = 10005;
constexpr int maxM = 400005;
int N, M;
int adj[maxN], gto[maxM], gnxt[maxM], length[maxM], cost[maxM], e;
void add_edge(int u, int v, int d, int c) {
gto[e] = v;
length[e] = d;
cost[e] = c;
gnxt[e... |
681ec84f3636dd710b8ad054aa730bf71d0098d7a66f0779bc91da2adb6faf23 | 28a6d459cacd5babfe7dfadfd9a0944e24492f120c98a385abe8368a66b9968f | 0.083513 | cpp | 28a6d459cacd5babfe7dfadfd9a0944e24492f120c98a385abe8368a66b9968f | 4818da498104359bc5f6386686ffc0f92680174e31cf5d7e2526201f5f28820a | PIE_released_gem5_runtime | pie_3116 | p02359 | 189af417f1b6a72153f6171f3298afd29fb2edcea523863ee304f060a370b70c | 4818da498104359bc5f6386686ffc0f92680174e31cf5d7e2526201f5f28820a | 0.186001 | 2.227203 | 2-4 | ec8d87b689d6a45b962022b2023cb4b1391299016c8758247ebeacfc39726a6a | #include <iostream>
#include <vector>
#include <algorithm>
#include <cctype>
#include <utility>
#include <string>
#include <cmath>
#include <cstring>
#include <queue>
#include <map>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i ... | #include <iostream>
#include <vector>
#include <algorithm>
#include <cctype>
#include <utility>
#include <string>
#include <cmath>
#include <cstring>
#include <queue>
#include <map>
#include <set>
#include <climits>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i-... |
6724c0293851c90ca1252a3632f27f63a90d974acbc21ebef6feaf4c3c35e8ec | f23fc98f6d9af2f620110621a3e2c7291e92e0837d860f900d2b4d78b7cf59d3 | 0.000193 | cpp | f23fc98f6d9af2f620110621a3e2c7291e92e0837d860f900d2b4d78b7cf59d3 | 4bdcf652581a666db42936102af2ae8421d4e8e35dec6f289ed6831fd06d8f18 | PIE_released_gem5_runtime | pie_3121 | p02997 | b9b79ab37584648cd5101defd038919d27fe70179c5e661cd87e8ac1f8968b08 | 4bdcf652581a666db42936102af2ae8421d4e8e35dec6f289ed6831fd06d8f18 | 0.001859 | 9.623404 | 8+ | a1edd875b278395b960822da0e63c9dc0a89dbf8f1065a29e2b7d3a3819e7740 | #include <bits/stdc++.h>
using namespace std;
#define pi acos(0.0)
#define ll long long
#define f first
#define s second
#define gap ' '
#define pb push_back
int main()
{
int n, k;
cin >> n >> k;
if (((n - 2) * (n - 1)) / 2 < k)
{
cout << -1;
return 0;
}
pair<int, int> ara[100005];
... | #include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int main()
{
int n, k;
scanf("%d %d", &n, &k);
int ans = (n - 1) * (n - 2) / 2;
if (ans < k)
{
printf("-1");
}
else
{
printf("%d\n", n - 1 + ans - k);
for (int i = 2; i <= n; i++)
printf("%d... |
5ce5fa4688bc0f1e20b16c978539b80df5fbe6b63d74f9b5a8b44b1d59074b81 | 711b9317324e1a65d96df877932c202f67ca22b1c49b7418b4b6892a6a068b14 | 0.001188 | cpp | 711b9317324e1a65d96df877932c202f67ca22b1c49b7418b4b6892a6a068b14 | febbe5a28880831cbf3304743f02d3ab2bf6ceb7cb37e4c06e435c469d0f30d1 | PIE_released_gem5_runtime | pie_3128 | p03224 | 70d355e9289cec5d12ea2b1a949c525f59b357e452745084f3e16211739a39e5 | febbe5a28880831cbf3304743f02d3ab2bf6ceb7cb37e4c06e435c469d0f30d1 | 0.002754 | 2.317261 | 2-4 | d36def673b21065e9744c2bd09dbfc99aba3f08633335ed3d431905592c4f647 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define P pair<ll, ll>
#define FOR(I, A, B) for (ll I = (A); I < (B); ++I)
#define FORR(I, A, B) for (ll I = ((B)-1); I >= (A); --I)
#define TO(x, t, f) ((x) ? (t) : (f))
#define SORT(x) (sort(x.begin(), x.end()))
#define REV(x) (reverse(x.begi... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define P pair<ll, ll>
#define FOR(I, A, B) for (ll I = (A); I < (B); ++I)
#define FORR(I, A, B) for (ll I = ((B)-1); I >= (A); --I)
#define TO(x, t, f) ((x) ? (t) : (f))
#define SORT(x) (sort(x.begin(), x.end()))
#define REV(x) (reverse(x.begi... |
81ca609f37c126f40448411ca7a98c4e17baae6fa62de345719f9e52cf987344 | 543baf7d842531192716f75d8b58e571bfa7ab70e129394f7e763628321847e4 | 0.077973 | cpp | 543baf7d842531192716f75d8b58e571bfa7ab70e129394f7e763628321847e4 | 8031612c0adac4d5b3bf403c372b7a84cc51db11564fd80210109501d3f54787 | PIE_released_gem5_runtime | pie_3131 | p01090 | f786f48860db9c8fa60fc9c3c86060377717c1c1f7017c2652d9500b57a38df1 | 8031612c0adac4d5b3bf403c372b7a84cc51db11564fd80210109501d3f54787 | 0.188315 | 2.415118 | 2-4 | fc0dc3efde36de95e81ced1dcc66a6ad8903311630cd1fd669dacfab13d80187 | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
struct Kruskal {
struct UnionFind {
Int n;
vector<Int> r, p;
UnionFind() {}
UnionFind(Int sz) : n(sz), r(sz, 1), p(sz, 0) { iota(p.begin(), p.end(), 0); }
Int find(Int x) { return (x == p[x] ? x : p[x] = find(p[x])); }
... | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
struct UnionFind {
Int n;
vector<Int> r, p;
UnionFind() {}
UnionFind(Int sz) : n(sz), r(sz, 1), p(sz, 0) { iota(p.begin(), p.end(), 0); }
Int find(Int x) { return (x == p[x] ? x : p[x] = find(p[x])); }
bool same(Int x, Int y) { re... |
19f5fa7c8a4ff8c4fc2dbb6b6f04b603f4d47978e3cc422d97d8dbdf253ce436 | 929716d7cdd427f91732da6b39681b7e351a721360deae43fc6dfa0c7711afa8 | 0.019431 | cpp | 929716d7cdd427f91732da6b39681b7e351a721360deae43fc6dfa0c7711afa8 | ccff975a9b347fd505ef7945770636a5f71ee7372d7a8a641fd75537e4c0d387 | PIE_released_gem5_runtime | pie_31622 | p03096 | 1ed342e1b4b7c3eee82b51533be15f02cdfa796eb318d12cb34b1b5d24f7edd5 | ccff975a9b347fd505ef7945770636a5f71ee7372d7a8a641fd75537e4c0d387 | 1.055827 | 54.337112 | 8+ | fa82f4627f071e082d65470feaef90109a89a47b88a6da7c5b7495ef0d431e4f | #include <bits/stdc++.h>
using namespace std;
#define REPP(i, a, b, c) for (int i = a; i <= b; i += c)
#define REP(i, a, b) REPP(i, a, b, 1)
#define REVV(i, a, b, c) for (int i = a; i >= b; i -= c)
#define REV(i, a, b) REVV(i, a, b, 1)
#define FOR(i, a) REP(i, 0, (int)a - 1)
#define FORD(i, a) REV(i, (int)a - 1,... | #include <cstdio>
using namespace std;
int n, x, las, ans, c[200013];
int main() {
scanf("%d", &n);
ans = 1;
las = -1;
for (register int i = 0; i < n; ++i) {
scanf("%d", &x);
if (x == las)
continue;
las = x;
ans = (1LL * ans + c[x]) % 1000000007;
c[x] = ans;
}
printf("%... |
21e40535edc4e10f34b7ea433e328953ee356d159609cf553a9d0083fc1ce1e4 | 77d332166623ff226a04b2375a4d2a29bd59a75ab75093f0b21c7b7d83ee1a82 | 0.001006 | cpp | 77d332166623ff226a04b2375a4d2a29bd59a75ab75093f0b21c7b7d83ee1a82 | bc5ae2e2a26ddc7ba6d970bd78d50f17e81c25117a02cc873498acb611dd6883 | PIE_released_gem5_runtime | pie_31634 | p03551 | ccd9cb5172d30ef38bab1e092268c300b4882e7675e3d5ddefdc9a03a1f4e162 | bc5ae2e2a26ddc7ba6d970bd78d50f17e81c25117a02cc873498acb611dd6883 | 0.008156 | 8.10984 | 8+ | c015124a6ab836b188c6171099caeec4446201514e3af4d34ecb8afc1ca23410 | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int N, M;
double t1 = 1900, t2 = 100;
void Solve()
{
t1 *= M;
double ans = 0;
int a = (N - M) * t2;
int p = 1 << M;
double pp = 1;
for (int i = 1; i <= 1000000; ++i) {
ans += (a + t1) * i / p * pp;
pp = pp * (p - 1) / ... | #include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int N, M;
void Solve()
{
int tot = 1900 * M + 100 * (N - M);
int p = 1 << M;
int ans = tot * p;
printf("%d\n", ans);
}
int main()
{
#ifdef linjian
freopen("in", "r", stdin);
#endif
scanf("%d%d", &N, &M);
Solve();
return... |
c9e53f18c7b7a02d1cdfbfc4a5ec2c23ac30605583867f66621d96bc5ae88303 | dd46a2e30806c5a5612c243c3c9e2900a1f19ce5c38b0882409b78a97ab78090 | 0.143169 | cpp | dd46a2e30806c5a5612c243c3c9e2900a1f19ce5c38b0882409b78a97ab78090 | b7e00c116f6a7e638ca8cdf2c0d086a340522679a5b5239fcd767b4c4330933e | PIE_released_gem5_runtime | pie_31635 | p00854 | 174926cb49af0ad1f58daa36a2b4d3d8dfe24bf95dbd4931c11be67d0de2a17b | b7e00c116f6a7e638ca8cdf2c0d086a340522679a5b5239fcd767b4c4330933e | 0.307721 | 2.149353 | 2-4 | a3868b250c4c78219858c01c1f45fa37a26d3ec529232877aa17c102ead6f463 | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#incl... | #define _USE_MATH_DEFINES
#include <algorithm>
#include <cstdio>
#include <functional>
#include <iostream>
#include <cfloat>
#include <climits>
#include <cstring>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <time.h>
#incl... |
27ab840120bad8aabf3a77fe132ad4c2f5e62887c3b73d2e22bab7363b691612 | 23d18d064d8c792529a8bed76b2d3d81ccd2e68eb2c2a22244349447bb658bec | 0.019922 | cpp | 23d18d064d8c792529a8bed76b2d3d81ccd2e68eb2c2a22244349447bb658bec | 62848eda6bdc7e223e217c3f97ce20bf2b52fe655d8df575b8c5da17c3ea405c | PIE_released_gem5_runtime | pie_31694 | p03652 | ab31ccb7fb28e5ab5623467902a08965c25dbfa140eee57685b73e8f07788705 | 62848eda6bdc7e223e217c3f97ce20bf2b52fe655d8df575b8c5da17c3ea405c | 0.114667 | 5.755814 | 4-8 | 0c4ec9631d19ba460ceacd41a5020dcffa4d869227b2f5fd23366dd4ca7c553c | #include <bits/stdc++.h>
using namespace std;
const int N = 305;
int a[N][N];
bool b[N];
queue<int> f[N];
int n, m;
int main()
{
scanf("%d%d", &n, &m);
for (int i = 1; i <= n; i++)
for (int j = 1; j <= m; j++)
scanf("%d", &a[i][j]);
for (int i = 1; i <= n; i++)
f[a[i][1]].push(i), a[i]... | #include <stdio.h>
#include <cstring>
#include <algorithm>
using namespace std;
#define N 305
int n, m, i, j, l, r, mid, Max, ans;
int a[N][N], num[N], pos[N];
bool vis[N];
void get() {
Max = 0;
for (int i = 1; i <= m; i++)
if (num[i] > num[Max])
Max = i;
}
bool check1(int x) {
memset(num, 0... |
b539379def2e81f66345ba90ff912180c25e053392465cea53d567b0b6209453 | 8498cf48c32569eef292700c1bd2397bf5a8811c288f876784acc8aebe9e3772 | 0.020668 | cpp | 8498cf48c32569eef292700c1bd2397bf5a8811c288f876784acc8aebe9e3772 | ab0c8191807627e5bb59371d9025dfb8368f68a0d76bc1e2ef53b63e17f91e39 | PIE_released_gem5_runtime | pie_31715 | p03839 | 9a369fcf2fd91fce04c80c8efb2a18e456a475ad6becd882407b56c041620b27 | ab0c8191807627e5bb59371d9025dfb8368f68a0d76bc1e2ef53b63e17f91e39 | 0.155631 | 7.529976 | 4-8 | 78920567b6aa2c382e4d5bdc9b42d70e813c9997c381cb52fa6e26b5f86e02ac | #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 ... |
5b5a3d5a2c7f04d012a4958103af3da7bd8445f4c2613aecc85c1250924aaa27 | faf18a3583c655e8efa1f472d2ba9634d3e03ddfe17894ff6c3cae4b025806ca | 0.079538 | cpp | faf18a3583c655e8efa1f472d2ba9634d3e03ddfe17894ff6c3cae4b025806ca | 2963007247cd323ac413396b650ed42b8f9ab006ed6259e0e58db278d844fdaa | PIE_released_gem5_runtime | pie_31724 | p02304 | 8ca79db49fcd1e59c09d9eb3fe4aa754ffb3db8bf1b9831a20257331be3e9b0a | 2963007247cd323ac413396b650ed42b8f9ab006ed6259e0e58db278d844fdaa | 0.337296 | 4.240695 | 4-8 | 3ee4efbd48021a342b017cb7c52496a0c7c7cc35140bd1c3529b8e5007e61cf6 | #include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
#define clr(a, b) memset(a, b, sizeof(a))
#define pb(a) push_back(a)
#define il inline
#define reg register
typedef long long ll;
typedef double db;
const int maxn = 10000;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 1e5 + 10;
struct point {
int x, y;
point() {}
point(int x, int y) : x(x), y(y) {}
};
struct segment {
point a, b;
int c;
segment(point a, point b, int c) : a(a), b(b), c(c) {}
bool operator<(const segment &p) ... |
4796e8aa8bf22a510fdcb2d4d0fc4898c92fc01130bc5aa05b40b7399f38b0de | 2c0343b67979710779842a069f7a1c9789abccdd9bfbbf46b05ceece2397847f | 0.066527 | cpp | 2c0343b67979710779842a069f7a1c9789abccdd9bfbbf46b05ceece2397847f | dfaf95e12908bcedb1ba6f4cf88e818b9ff022ae475609b5adf06255958eab58 | PIE_released_gem5_runtime | pie_31733 | p03263 | 937b23957f9d4cb709b32fc61f459a707e50e80a50bfc8562fb9b962d1a81a97 | dfaf95e12908bcedb1ba6f4cf88e818b9ff022ae475609b5adf06255958eab58 | 0.141216 | 2.122679 | 2-4 | 352762dc4393e6c54e5585549f50f4b6361cd25b383fa8a2f4a7d28a233f9de2 | #include <iostream>
#include <stdio.h>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <stack>
#include <queue>
#include <algorithm>
#include <string.h>
#include <string>
#include <math.h>
#include <iomanip>
using namespace std;
#define SORT(v) s... |
#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#define ll long long
#define pb push_back
#define mp make_pair
#define loop(i, a, n) for (int i = a; i <= n; ++i)
#define clr(x) memset(x, 0, sizeof x)
#define min3(a, b, c) min(a, min(b, c))
#define max3(a... |
ad3975bcbd775623efb8093e90a0eff2dbb78505f4036f41b997c712e03e2c66 | e8b6529674a58de2d200dd86c096f52ac1e83d49dfc90e586a3adcfa6cd3718b | 0.005474 | cpp | e8b6529674a58de2d200dd86c096f52ac1e83d49dfc90e586a3adcfa6cd3718b | e0999ec4323009c4bcfc3ddad964795f5f9f602ba4c2329c9e4caa9c1e1083a4 | PIE_released_gem5_runtime | pie_31742 | p04024 | b61378fcbce623c6715abd8b7e83ee06015a977c24b5b3bafcebf749a3fbf276 | e0999ec4323009c4bcfc3ddad964795f5f9f602ba4c2329c9e4caa9c1e1083a4 | 0.0304 | 5.553799 | 4-8 | 4f9203b366391394bbe8e05786123e4a68e5784d3f14687a425793052faa340b | #define _CRT_SECURE_NO_WARNINGS
#pragma comment(linker, "/stack:16777216")
#include <string>
#include <vector>
#include <map>
#include <list>
#include <iterator>
#include <cassert>
#include <set>
#include <queue>
#include <iostream>
#include <sstream>
#include <stack>
#include <deque>
#include <cmath>
#i... | #include <cstdio>
#include <algorithm>
using namespace std;
typedef long long ll;
const int MAXN = 1000;
const int MOD = int(1E9) + 7;
inline int add(int x, int y) { return (x + y >= MOD ? x + y - MOD : x + y); }
inline int sub(int x, int y) { return (x - y < 0 ? x - y + MOD : x - y); }
inline int mul(int x, in... |
e07fb53d5a0d1ae17e3acbd9e3f3524cadd23eb54866c690f110ee7d9cfd611e | 8817a9bf75c456bf89717e3166991d2418abd11e3c79f50568ab249d5f74ea99 | 0.103953 | cpp | 8817a9bf75c456bf89717e3166991d2418abd11e3c79f50568ab249d5f74ea99 | 4e5606f6859d30981df5f9139496ddd3eb4df6c7bb57e3fea9126e9c4c56d534 | PIE_released_gem5_runtime | pie_3176 | p03103 | 2a7bca8a0ee02969b508d06504bd46919659286d5d4ad36e9fa67881b3d27daa | 4e5606f6859d30981df5f9139496ddd3eb4df6c7bb57e3fea9126e9c4c56d534 | 0.361357 | 3.476145 | 2-4 | 184b01b30d4e548b089f6947bc4d379739cb219f7a1dd4896146ea5a50aa76c7 |
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include... |
#include <bits/stdc++.h>
#define f(i, n) for (int i = 0; i < (n); i++)
#define int long long
#define mod (int)((1e9) + 7)
#ifdef int
#define inf (int)(3e18)
#else
#define inf (int)(5e8)
#endif
#define intt long long
#define itn long long
#define P pair<long long, long long>
#define rep(i, n) for (int i = ... |
d5828b1082656028cb5e0df3eaea08f7a1b2871a55fd860f7c7f9b585f920d56 | e715f67220adfb308fe4334b1233f2ba04c9bd1269377bf609e8297ea7da529e | 0.001007 | cpp | e715f67220adfb308fe4334b1233f2ba04c9bd1269377bf609e8297ea7da529e | a391b9474c70a34073af587f0d32318bf53fe51d9adb59f64b9e999e1f4fdbd7 | PIE_released_gem5_runtime | pie_31760 | p03764 | ba502c6d70f6b77ffa0c3d1287a8f83e192b9fb4602a468d9263b2d11091631d | a391b9474c70a34073af587f0d32318bf53fe51d9adb59f64b9e999e1f4fdbd7 | 0.012537 | 12.449045 | 8+ | 4d4b8ea3596c0cd658a76e475eaa0c1a357595f80106e588a8ee82c0e0138891 | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define pii pair<int, int>
map<pii, int> m;
vector<int> adjb[200005], adjr[200005];
#define MOD 1000000007
int main()
{
ll n, m, i, ANS = 0, ans = 0, ans2 = 0;
cin >> n >> m;
ll ara[n], arb[m];
for (i = 0; i < n... | #include <bits/stdc++.h>
#define ll long long
using namespace std;
const int MAXN = 1e5 + 7;
const int mod = 1e9 + 7;
ll x[MAXN], y[MAXN];
inline ll add(ll x, ll y) { return (x + y) % mod; }
inline ll mul(ll x, ll y) { return (x * y) % mod; }
int main()
{
int n, m;
scanf("%d%d", &n, &m);
ll sum = 0;
... |
a3f22598afa0ad2217fa9f461dc9043eda8e1fd9c1387c5d57e78c2075d0294f | 984f3dad0926067fbc4fa6f0468886e82372f9f11491bcb17f72fd65b93993b7 | 0.008797 | cpp | 984f3dad0926067fbc4fa6f0468886e82372f9f11491bcb17f72fd65b93993b7 | d45844c77d775bf259f94740bc6b417939ccede37f5544728142d54833837161 | PIE_released_gem5_runtime | pie_31766 | p03281 | c801cb29b647d62b8c519c3efbb4c9c647baae1ae7c0f939a696bbf6662cdf2c | d45844c77d775bf259f94740bc6b417939ccede37f5544728142d54833837161 | 0.048579 | 5.522407 | 4-8 | 4708c4b3534df60a92f526b93cc7e9bd576f01199e7c773f62a906b9ce58a972 | #include <iostream>
using namespace std;
typedef long long LL;
#define F(i) for (int i = 0; i < n; i++)
int main() {
int n;
cin >> n;
int r = 0;
for (int i = 1; i <= n; i++) {
int c = 0;
for (int j = 1; j <= i; j++)
if (i % j == 0)
c++;
if (i % 2 == 1 && c == 8)
r++;
... | #include <cstdio>
#define N 100005
#define P pair<int, int>
#define int long long
inline int read() {
int x = 0;
char ch = getchar();
for (; ch < 48 || ch > 57; ch = getchar())
;
for (; ch > 47 && ch < 58; ch = getchar())
x = (x << 1) + (x << 3) + (ch ^ 48);
return x;
}
using namespace std;
... |
826da05ba75764d023ea152b8248d6af108b9c20ece786e3b760f6431235979d | e831fb10a60de2a109b957488b7854981940d5a82385f270e48bcc0c4cb380cf | 0.021591 | cpp | e831fb10a60de2a109b957488b7854981940d5a82385f270e48bcc0c4cb380cf | f8b819874416f3d8b62fdfef3d0b656aa711cad741240ceb11da69d945707352 | PIE_released_gem5_runtime | pie_3177 | p02467 | 94ad6a9b606e1e6d5b96340bda18faa02aaee84ece061d367ea1c516e82f6576 | f8b819874416f3d8b62fdfef3d0b656aa711cad741240ceb11da69d945707352 | 0.103657 | 4.80098 | 4-8 | 678da7bc98f65419ffc2bb981da173f9cb54420c8a38d4ded07ffa7e8c5b0b28 | #include <bits/stdc++.h>
using namespace std;
void p(int x)
{
int i, j;
for (i = 2; i <= 1000000; i++)
{
if (x == 1) {
printf("\n");
return;
}
while (x % i == 0)
{
printf(" %d", i);
x = x / i;
}
}
printf(" %d\n", x);
}
int main()
{
int x;
scanf("... | #include <stdio.h>
#include <math.h>
int prime(int num)
{
if (num == 1)
{
return 0;
}
int tmp = sqrt(num) + 1;
for (int i = 2; i < tmp; i++)
{
if (num % i == 0)
{
return 0;
}
}
return 1;
}
int main()
{
int n, i, j, k;
scanf("%d", &n);
printf("%d:", n);
if... |
aee8f91b3b198b929684075a2051031fa8f05cf5448cf463a6d57ee32b4ad095 | a7857426e5f05042c7ecc156694d629360969f2aa920bc15c7cb7baed32e8c0d | 0.050257 | cpp | a7857426e5f05042c7ecc156694d629360969f2aa920bc15c7cb7baed32e8c0d | c725cef419ac8160db1f0be395601a8803777436bb4f4d9abdc4cb637c5c852a | PIE_released_gem5_runtime | pie_31777 | p03239 | 0e1b6b9d270d70521d36806afd9ba87c9aad45b29900d949cff7c227d70b1513 | c725cef419ac8160db1f0be395601a8803777436bb4f4d9abdc4cb637c5c852a | 0.479404 | 9.539079 | 8+ | f4cb9b1fd04dfbca91d7e054bf49a551f8e5585d14196f6c0785b66dc500c44d |
#include <bits/stdc++.h>
#define LL long long
#define ll long long
#define SL(n) scanf("%lld", &n)
#define LF double
#define SF(n) scanf("%lf", &n)
#define pb push_back
#define mp make_pair
#define ON(n, i) (n | (1LL << i))
#define OFF(n, i) (n & (~(1LL << i)))
#define CHK(n, i) (n & (1LL << i))
#define ff... |
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
#include <string>
#include <stack>
#include <map>
using namespace std;
int main() {
int N;
int T;
cin >> N;
cin >> T;
vector<int> primero;
vector<int> segundo;
for (int i = 0; i < N; i++) {
... |
2f48f214b28d367d1f968de071cbe5ce21b0ce5430a7ba0284993975e512258f | b1b01ec9afb73f537f49f8935b50019ddfec0080f14fff8e06b1f702365267ff | 0.090318 | cpp | b1b01ec9afb73f537f49f8935b50019ddfec0080f14fff8e06b1f702365267ff | fd29335932f5bb5fc46858d14b178d02b60c6e03a2ab91a78cd5721cc9eaa69c | PIE_released_gem5_runtime | pie_31781 | p02623 | 265f7cb75b8a2965f791ba07da611042794903a742eacbcbc9c9dfa648ea360c | fd29335932f5bb5fc46858d14b178d02b60c6e03a2ab91a78cd5721cc9eaa69c | 0.389069 | 4.307758 | 4-8 | 31e34315df25ba195eea23e19fc08cd673166846e75a6c1feb7c118025331578 |
#include <iostream>
int main()
{
using namespace std;
int n, m, k, f = 0, books = 0, ans = 0, f2 = 0;
long long int ab[2][200000], prefixs_sum[2][200001] = {{0}};
cin >> n >> m >> k;
for (int i = 0; i < n; i++) {
cin >> ab[0][i];
prefixs_sum[0][i + 1] += (ab[0][i] + prefixs_sum[0][i]);
... | #include <iostream>
#include <algorithm>
#include <set>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <sstream>
#include <map>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
cout.tie(NULL);
int n, m;
long long k;
cin >> n >> m >> ... |
abbc89e0b1d5abc3f36b2a145f53ffc3a1a3a9faedb16356363e52cb7a75999b | d080e174ac8c2b54b35d3d35d27ea529abcb2e552774db84d5c851dfbe7c4ba5 | 0.003892 | cpp | d080e174ac8c2b54b35d3d35d27ea529abcb2e552774db84d5c851dfbe7c4ba5 | 9e36bdd19e108114b3c289c9d925e143d9cee128d2e2b1b146ecd512302d9e3d | PIE_released_gem5_runtime | pie_31799 | p03843 | 3ea4a3e7c32b4a899b9b0052a058c28acd2a01808a7b058c59b8a5745da8bed9 | 9e36bdd19e108114b3c289c9d925e143d9cee128d2e2b1b146ecd512302d9e3d | 0.132093 | 33.940797 | 8+ | 4700461a233a5f1238023ed4f2580f2c5ac8d6ef4145376976fc82ff7faca694 |
#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 <iterato... | #include <cstdio>
#include <cstring>
#include <algorithm>
#define maxn 200005
#define INF 2147483640
#define LL long long
using namespace std;
int n, sum, l[maxn], r[maxn], mx[maxn], sx[maxn], siz[maxn];
LL ans;
char s[maxn];
struct node {
int v;
node *nxt;
} edge[maxn * 2], *head[maxn], *ncnt;
void adde... |
6a6dfa7cae711a15df2fd0abdd500b5c66aac51ab55dfd1f5f66dd40f8bd24ef | a014c491a79058f4749998e9c5ab11821a423a3c0e30d16f4b72fad751e61d1f | 0.03822 | cpp | a014c491a79058f4749998e9c5ab11821a423a3c0e30d16f4b72fad751e61d1f | 5fabaee2d0ea65afee691c8a764b8683be397c0a5e0dcba9fc5bcd212c0c0683 | PIE_released_gem5_runtime | pie_31809 | p00265 | 25618e8feb7dca06c4328e0add01f84b4b204d4b35a5bbc70a7fb269422401e3 | 5fabaee2d0ea65afee691c8a764b8683be397c0a5e0dcba9fc5bcd212c0c0683 | 0.083661 | 2.188925 | 2-4 | 779781d852db67cbac9fb9547e4bcff0f99b805820a14bd637a479bdb8f91cbc | #include <iostream>
#define C 300000
using namespace std;
int main() {
int n, q;
int c[300000], query[100000];
bool has_c[C + 1];
cin >> n >> q;
for (int i = 0; i < n; i++) {
cin >> c[i];
}
for (int i = 0; i < q; i++) {
cin >> query[i];
}
for (int i = 0; i <= C; i++) {
has_c[i... | #include <cstdio>
#include <algorithm>
#define C 300000
using namespace std;
int main() {
int n, q;
int c[300000], query[100000];
bool has_c[C + 1];
scanf("%d%d", &n, &q);
for (int i = 0; i < n; i++) {
scanf("%d", &c[i]);
}
for (int i = 0; i < q; i++) {
scanf("%d", &query[i]);
}
f... |
f9f5fcea4e9c5ed7328e673eb236d38612fd130e417578a5c6c11dd86f58002b | 115b1c1d1dedc0378fafb3856449cf96b5dfef7321c4480afb3a76cda619cb58 | 0.00021 | cpp | 115b1c1d1dedc0378fafb3856449cf96b5dfef7321c4480afb3a76cda619cb58 | a2d763733c872895410edd875a17f0c39637760701ba9b36bc8103eece0e100f | PIE_released_gem5_runtime | pie_31812 | p03831 | 538a6b4176b9696840386b8a2c4393f243cad3ca7b2942c6c5c1bd65396cabda | a2d763733c872895410edd875a17f0c39637760701ba9b36bc8103eece0e100f | 0.001012 | 4.814943 | 4-8 | 446adcfa70cbdde4338a87d1f014de73da42d913af99ef391351144ee3bae954 | #include <bits/stdc++.h>
using namespace std;
long long g[1000100];
int main()
{
long long n, a, b, ans;
cin >> n >> a >> b;
for (int j = 1; j <= n; j++)
cin >> g[j];
for (int i = 1; i < n; i++)
{
if ((g[i + 1] - g[i]) * a >= b)
ans += b;
else if ((g[i + 1] - g[i]) * a < b)
... | #include <stdio.h>
int main()
{
long long int N, A, B, a[100005], i, sum = 0;
scanf("%lld%lld%lld", &N, &A, &B);
for (i = 0; i < N; i++)
scanf("%lld", &a[i]);
for (i = 0; i < N - 1; i++)
{
if ((a[i + 1] - a[i]) * A < B)
sum += (a[i + 1] - a[i]) * A;
else
sum += B;
}
pr... |
6513e31316604edf7d53323e2636955bee3773e2924c78a89eb676d3ccabb146 | c8e3accce21769e024448666d4abd90d4a1ccd4914311dd1237fb3d500da1998 | 0.109054 | cpp | c8e3accce21769e024448666d4abd90d4a1ccd4914311dd1237fb3d500da1998 | d8756965788fc8d0147e6aae8dcfb14f3cda2d2d6bed7200b099f021894cf61f | PIE_released_gem5_runtime | pie_3183 | p03414 | 60fbf102b1ef2015961517c23fd38d1333cef5881220e7b04f4d5245016e7f57 | d8756965788fc8d0147e6aae8dcfb14f3cda2d2d6bed7200b099f021894cf61f | 0.967451 | 8.871329 | 8+ | 2ade0cc0f0a17e5ae8b4d47d335ae225d5d627ca00334735138c8570031016bd | #include <bits/stdc++.h>
using namespace std;
namespace SCC {
const int N = 110000;
vector<int> con[N], rcon[N];
int n, vis[N], visT;
int id[N], idn;
void init(int nn = 0) {
n = nn, visT = idn = 0;
for (int i = 1; i <= n; i++)
con[i].clear(), rcon[i].clear();
}
void add_edge(int u, int v) {
con[u].... | #include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
const int maxn = 1000 + 50;
const int maxm = 200000 + 50;
int N, M;
int p[maxn];
int q[maxn];
int c[maxn][maxn];
bool an[maxm];
struct edge
{
int to, id;
edge(int to = 0, int id = 0) : to(to), id(id) {}
};... |
8ca59a47c6ce0b9f890b7accc2f9e9fbd90ebde32c3ab13b8729f17847c32860 | a7717dfeeabc648597c3f28cf72c02e590de75c561b0d41c4a442dc3d68891f2 | 0.106762 | cpp | a7717dfeeabc648597c3f28cf72c02e590de75c561b0d41c4a442dc3d68891f2 | 9f46c9981e86d9063094be22c1cb6ace097ddb508f38a15458db8c1b17262df3 | PIE_released_gem5_runtime | pie_31880 | p00452 | bb3c97a98621ff6b4c24ec2b89b3f53b9f0c495e2179b04ec7eb0c21bae29a90 | 9f46c9981e86d9063094be22c1cb6ace097ddb508f38a15458db8c1b17262df3 | 1.065617 | 9.981267 | 8+ | c4d901d020ff94d502681302ef22439d633115c1f090710ef62c5230c6105b50 | #include "bits/stdc++.h"
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, s, t) for (int i = s; i <= t; i++)
#define dump(x) cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000
int kk[110000... | #include "bits/stdc++.h"
using namespace std;
#define ll long long int
#define rep(i, n) for (int i = 0; i < n; i++)
#define REP(i, s, t) for (int i = s; i <= t; i++)
#define dump(x) cerr << #x << " = " << (x) << endl;
#define INF 2000000000
#define mod 1000000007
#define INF2 1000000000000000000
int main(void... |
e43b3545036606bc553459719b7c37c050f2bedfe815b749fbc8604e57e50c99 | b15d648cf28abfe92231c6c72c4145a04ec3d4efd3097daa2be85726ce67f1f4 | 0.013303 | cpp | b15d648cf28abfe92231c6c72c4145a04ec3d4efd3097daa2be85726ce67f1f4 | 78ec467634da838698cbe95923c3ec9040cd40e4e157f573c2fd0b2a5436d20d | PIE_released_gem5_runtime | pie_3243 | p03770 | fc83efb86cb2dc2f675e360cddf483ff6789ea9219e21b27c5075901cf1000a6 | 78ec467634da838698cbe95923c3ec9040cd40e4e157f573c2fd0b2a5436d20d | 0.450286 | 33.848838 | 8+ | 05138647e030c723e77e3ec41694fc400093341f853031d029516973ce1770df | #include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
using namespace std;
typedef long long LL;
typedef pair<int, int> pr;
const int N = 2e5 + 10;
const int INF = 2e9;
const LL mod = 1e9 + 7;
inline LL power(LL a, LL n, LL mod)
{
LL Ans = 1;
... | #include <algorithm>
#include <cstdio>
#include <cstring>
typedef long long LL;
const int MAXN = 200000;
const int MOD = 1000000007;
const int INF = 1000000001;
int N, X, Y, C[MAXN + 5], W[MAXN + 5];
int Min[MAXN + 5], Cnt[MAXN + 5];
int Fac[MAXN + 5], Inv[MAXN + 5];
int Pow(int x, int y) {
int ret = 1;
... |
371849eadf7da39dc1c8a711bc53f93868378a5182c10fbde4e96e06cbf6ca41 | 1192795ef4a0061039a939d1273893b3626faa07ad0b9e74cb27cdc31c4e7898 | 0.006017 | cpp | 1192795ef4a0061039a939d1273893b3626faa07ad0b9e74cb27cdc31c4e7898 | f17b51b3b6d52e56abe2e5871dd4b27c1a02ddf01388e1a2e95ce9606e7debf8 | PIE_released_gem5_runtime | pie_32444 | p02727 | 850888a059178e5c146ea4748aecb4c46e7be471767cd18346f472c78ec2e8fc | f17b51b3b6d52e56abe2e5871dd4b27c1a02ddf01388e1a2e95ce9606e7debf8 | 0.027588 | 4.584816 | 4-8 | 1ec959e90f7b034bebe843f84c68ce2c4be702008f54c1c7d7326b08b1b341a8 | #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>
#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 << ... |
a158de9c163f66486680951c2264efda349601403663b64c532062fa906e8eb3 | d059019ce4022708aaae87c18607daa4e0dd798946940dae70f4d816c0ef81b5 | 0.004981 | cpp | d059019ce4022708aaae87c18607daa4e0dd798946940dae70f4d816c0ef81b5 | 8beab6b965cd1697c5fb5fe3c37a4326c6223c991999b6a707fd57dbfeb323ba | PIE_released_gem5_runtime | pie_32498 | p02583 | d974adfcd0ea5350223d32ad1da4f3c864db5dd78f7abc4c704101e33f84102d | 8beab6b965cd1697c5fb5fe3c37a4326c6223c991999b6a707fd57dbfeb323ba | 0.026185 | 5.256921 | 4-8 | d8269a6e5c3470d537ed1fdf783c9cd1ff76cd2ea00235764af9584d3e5a9133 | #include <bits/stdc++.h>
using namespace std;
const int N = 105;
int n, a[N], ans;
int main()
{
scanf("%d", &n);
for (int i = 1; i <= n; i++)
scanf("%d", &a[i]);
sort(a + 1, a + n + 1);
for (int i = 1; i <= n; i++)
for (int j = i + 1; j <= n; j++)
for (int k = j + 1; k <= n; k++)
... | #include <stdio.h>
int main() {
int n, ans = 0;
scanf("%d", &n);
int arr[n];
for (int i = 0; i < n; i++) {
scanf("%d", &arr[i]);
}
for (int i = 0; i < n; i++) {
for (int j = i + 1; j < n; j++) {
for (int k = j + 1; k < n; k++) {
if (arr[i] != arr[j] && arr[j] != arr[k] && arr... |
697bf9da1e45376e06d530bc394beb150cbeb49578ea61332bb31825eb867225 | bd58253d4f48122b0c0ba7af3c41dee09b90b169c96fded00356c911892c133d | 0.042562 | cpp | bd58253d4f48122b0c0ba7af3c41dee09b90b169c96fded00356c911892c133d | bf242c608a0de55cab21c3bdb619f6324c256084c5745933a951f2431bdfb02a | PIE_released_gem5_runtime | pie_32501 | p03444 | 84f6e7c7d5677b2a51b073847380099584b668eaf1255ab0351b0620961efb86 | bf242c608a0de55cab21c3bdb619f6324c256084c5745933a951f2431bdfb02a | 0.170094 | 3.996379 | 2-4 | 02532398da6d1ebbd12352b536a65796be863b712ec57fc1031196e41d2c48ac | #include <bits/stdc++.h>
using namespace std;
int const N = 123456;
int ac = 0;
int ans[N], p[N], where[N], a[N], blocked[N];
vector<int> edges[N];
void shift(int start) {
int v = start;
int tmp = a[v];
while (v != 0) {
v = p[v];
int ntmp = a[v];
a[v] = tmp;
where[a[v]] = v;
tmp ... | #include <bits/stdc++.h>
using namespace std;
#define X first
#define Y second
#define mp make_pair
#define pb push_back
#define Debug(...) fprintf(stderr, __VA_ARGS__)
typedef long long LL;
typedef long double LD;
typedef unsigned int uint;
typedef pair <int, int> pii;
typedef unsigned long long uLL;
... |
1ada081476e046ee58f0d0b58e6cd472e7dcd35bd250b28e7146cc528fb5fc0a | 33177dd936a1baea4013c79349c1ff61a0f51541e691e378458d0284ce49911a | 0.111756 | cpp | 33177dd936a1baea4013c79349c1ff61a0f51541e691e378458d0284ce49911a | fd89676c20fc3192655e2b5b0239d7ac831f1cb56f792b8b5c91537c9a0a39a3 | PIE_released_gem5_runtime | pie_3251 | p00763 | 658fa4dbeb4ca6c171a0d464d6d9f260be69e7431fcd23fbf148c857d40e98fc | fd89676c20fc3192655e2b5b0239d7ac831f1cb56f792b8b5c91537c9a0a39a3 | 0.468977 | 4.196449 | 4-8 | b032be756fd7e617933e4f7016edcef98406da9f6cac3ad7ee6703584d811432 | #include <cstdio>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <queue>
#define reps(i, f, n) for (int i = f; i < int(n); i++)
#define rep(i, n) reps(i, 0, n)
class L {
public:
int to, coop, dist;
L(int to, int coop, int dist) : to(to), coop(coop), dist(dist) {}
};
... | #include <cstdio>
#include <iostream>
#include <vector>
#include <string>
#include <queue>
#include <complex>
#include <set>
#include <map>
#include <algorithm>
using namespace std;
#define reps(i, f, n) for (int i = f; i < int(n); i++)
#define rep(i, n) reps(i, 0, n)
const int R = 22;
const int N = 101;
... |
93ce874a8dd54168c8555b3959122c8bf55527d80b0a18110466d760b217510f | 7fb8fb039d039e8f7dd6c28539a5df7cb5ab8faeaf5a60dac1f58d0c7d467749 | 0.008047 | cpp | 7fb8fb039d039e8f7dd6c28539a5df7cb5ab8faeaf5a60dac1f58d0c7d467749 | d6c7a0737b4f59e429ecb6c4d1d295a1c0de8eeaa78a25be0dc8c7c5fd677fff | PIE_released_gem5_runtime | pie_32511 | p02762 | d3af05c78942d872d6f7c6ca8f165b36579c6dc6f38b29da40d121896b8e9742 | d6c7a0737b4f59e429ecb6c4d1d295a1c0de8eeaa78a25be0dc8c7c5fd677fff | 0.291746 | 36.255398 | 8+ | 1c6ab925f92822f24c55ae4a76f1aec73597082be1f7a813d9ff9baa710cdd1c | #include <stdio.h>
#include <vector>
#include <queue>
using namespace std;
queue<int> Q;
vector<int> v[111111], p[111111];
int parent[111111], visit[111111], group[111111];
void bfs(int start)
{
int i;
Q.push(start);
visit[start] = 1;
parent[start] = start;
while (!Q.empty())
{
int t = Q.... | #include <cstdio>
int freind[111111], block[111111], group[111111];
int Find(int x)
{
if (freind[x] == x)
return x;
else
return freind[x] = Find(freind[x]);
}
int main(void)
{
int n, m, k, i;
scanf("%d %d %d", &n, &m, &k);
for (i = 1; i <= n; i++)
freind[i] = i, group[i] = 1;
while... |
1ffdcdc6133a732cfdbcff2fab86b961c653fe6d566308e46d0042a2de43704d | 950db0601e62d2d8ec7eecc0fc69b98157ea9bb3e1ca40a55ae6526930cd0671 | 0.109443 | cpp | 950db0601e62d2d8ec7eecc0fc69b98157ea9bb3e1ca40a55ae6526930cd0671 | 34c32f5a926b53255c7b95209c7a435899f9031d509984627c687a7b6970ecb9 | PIE_released_gem5_runtime | pie_3253 | p03515 | ab0b0e84b0a70a74b7d192750378178efe60ae08e0349357764e70a9824dfdaf | 34c32f5a926b53255c7b95209c7a435899f9031d509984627c687a7b6970ecb9 | 0.379316 | 3.465858 | 2-4 | 98d7df86d41f111801a5528bf3cbd601bb08edec3f782c16249c7b7ce1bbe8a4 | #include <bits/stdc++.h>
using namespace std;
#define int long long
const int N = 1e5 + 5;
int n, pset[N], lazy[N], ans[N];
vector<int> child[N];
vector<pair<int, pair<int, int > > > edge;
void joinset(int u, int v, int w) {
if (child[pset[u]].size() > child[pset[v]].size())
swap(u, v);
int pau = pset[... | #include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
struct edge {
int u, v;
long long w;
edge(int a, int b, long long c) : u(a), v(b), w(c) {}
};
long long lazy[N], res[N];
int n, p[N];
vector<vector<int> > sets;
vector<edge> E;
bool cmp(edge &a, edge &b) { return a.w < b.w; }
void ds... |
80a2e2cf6beeb32f1adb0d17110943bea57c97ab667270584213d8ca963363ea | a7cd77cd4d195f8f2820aa76f42a06fbd43bca872015c2a0ede6486becc539d6 | 0.032783 | cpp | a7cd77cd4d195f8f2820aa76f42a06fbd43bca872015c2a0ede6486becc539d6 | fb00d511459b4410b132cf5b77d30daacb02b9a1ad4a4ef71de7739cb5403da9 | PIE_released_gem5_runtime | pie_32611 | p00092 | 26709ee313fa5fc437f1c417e0893c3d9cfa4e1d5bb048456dd6152142d9436b | fb00d511459b4410b132cf5b77d30daacb02b9a1ad4a4ef71de7739cb5403da9 | 0.237435 | 7.242674 | 4-8 | e8ae21d34282774b31931b85af0b350f1b87c9b25fa8c75346244fa6ae521c58 |
#include <stdio.h>
#include <queue>
using namespace std;
int ifield[1001][1001] = {0};
int main()
{
queue<int> x, y, longth;
int n, memlongth, ans;
int dx1[9] = {-1, -1, -1, 0, 0, 0, 1, 1, 1},
dy1[9] = {-1, 0, 1, -1, 0, 1, -1, 0, 1}, dx2[3] = {1, 0, 1},
dy2[3] = {0, 1, 1};
while (1)
{
... | #include <stdio.h>
#include <algorithm>
using namespace std;
int main()
{
int n, ans = 0;
int dp[1100][1100];
char field;
while (scanf("%d", &n), n)
{
for (int i = 0; i < n; i++)
for (int j = 0; j < n; j++)
{
scanf(" %c", &field);
dp[j + 1][i + 1] = 0;
if... |
d75d37ee901528a0c1c5e51ff8158989832bc417334bfff121d01eefd2330d48 | a1956b96e051816579fd0b6f9f259e5a8c7135d9e62d7810735d5892c1f5306c | 0.060395 | cpp | a1956b96e051816579fd0b6f9f259e5a8c7135d9e62d7810735d5892c1f5306c | 8daff0fd24739d44e0a8e86fc795c3ec6d1a2c5a6ca765b37a81fc56cf6f5d97 | PIE_released_gem5_runtime | pie_3262 | p01812 | aecc0224e68ff1401d180c2d97e27ae99da26cfc3765010e12c42df0ec8c1cd9 | 8daff0fd24739d44e0a8e86fc795c3ec6d1a2c5a6ca765b37a81fc56cf6f5d97 | 0.183972 | 3.046172 | 2-4 | 76176411c3ac76c4cfa0ab9ac2e8aba3b336c8f5d7b1f9d17dfe0c9bdf45a76b | #include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
... |
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>... |
cfbcc6c9286769bfc7863046adb483990cb8c236ebc9052ea4039f153c298022 | a7d8ed89ce84bd1b7cfc83a87f2c8d80981c6e957af803dff6d6918af6450168 | 0.004426 | cpp | a7d8ed89ce84bd1b7cfc83a87f2c8d80981c6e957af803dff6d6918af6450168 | 21189340bd659523439953775e0bd7f87ee76c36130c3def305e353362677a22 | PIE_released_gem5_runtime | pie_32629 | p03167 | af57337ee8a0c4ebb3e68fc7f7dc2f9dab570c3a8f32f83760407e12914c1907 | 21189340bd659523439953775e0bd7f87ee76c36130c3def305e353362677a22 | 0.241566 | 54.577756 | 8+ | 08f199ee1e35843e8dad643d707540f7e82bed291d504e8172bae10448f184a8 | #include <bits/stdc++.h>
using namespace std;
#define N 1050
typedef long long ll;
int ir, ic, grid[N][N];
ll memo[N][N];
const ll m = (ll)1e9 + 7;
bool inside(int r, int c) { return r >= 1 && r <= ir && c >= 1 && c <= ic; }
ll add(ll a, ll b) { return ((a % m) + (b % m)) % m; }
ll dp(int r, int c) {
if (r ... | #include <cstdio>
#include <cstring>
const int maxn = 1e3 + 5;
const int inf = 1e9 + 7;
char G[maxn][maxn];
bool vis[maxn][maxn];
long long dp[maxn][maxn];
long long step;
int n, m;
long long dfs(int x, int y) {
if (vis[x][y])
return dp[x][y];
if (x == n && y == m - 1)
return 1;
vis[x][y] = 1;... |
1bfb28d8372b8aef9eaffcfa8ad2cadbd32fb1459f68a26b96bebcf174b136d1 | 3806890704117c7ccc57c9ec317a496fc21b0f89ba2fc63747c59098c3580ab9 | 0.021806 | cpp | 3806890704117c7ccc57c9ec317a496fc21b0f89ba2fc63747c59098c3580ab9 | b4191b98591a575b13ce5190f8134378ba42f130b5af0e9f01b6cd5a1b58b2d8 | PIE_released_gem5_runtime | pie_3264 | p02665 | c79653db30d855549e002fd6b972a1d80aa12d128cb209c2af1bcde0729850a7 | b4191b98591a575b13ce5190f8134378ba42f130b5af0e9f01b6cd5a1b58b2d8 | 0.107553 | 4.932199 | 4-8 | 0d1c63667f38ae5887a73a1d7e0dee0536f09ec52dac8346baeb11a76503039d | #pragma GCC optimize("O3")
#pragma GCC target("avx2")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << ... | #pragma GCC optimize("O3")
#pragma GCC target("avx2")
#include <cstdio>
#include <algorithm>
#include <cstring>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout <<... |
cba4c39a514518698a44bd5527a6064faea1d72e24909c49ed3b73c803f986b3 | f590712aaa2716decd0cdbde0e98c8072ffdbf731c40a601edd7073bbca220c2 | 0.038798 | cpp | f590712aaa2716decd0cdbde0e98c8072ffdbf731c40a601edd7073bbca220c2 | c58e096800a01c0eeeb763df8f7ae0dc59efadc2d5d2e692bacbad79f8bd891e | PIE_released_gem5_runtime | pie_3329 | p02289 | 8bfc0d0c8d087d2cb110aa45489cacae4ac11e37982db233925cbf83092d0bf1 | c58e096800a01c0eeeb763df8f7ae0dc59efadc2d5d2e692bacbad79f8bd891e | 0.122927 | 3.168386 | 2-4 | 7c7edd9d4e65bd7fef811edcdc1cbca8d94203602bb9df1f84c8c0143e5bd9fe | #include <iostream>
using namespace std;
#include <stdio.h>
#include <string>
void max_heapify(int *A, int i, int H)
{
int l = 2 * i, r = 2 * i + 1;
if (l > H && r > H)
return;
int maxid = i, x;
if (l <= H)
maxid = (A[l] > A[maxid] ? l : maxid);
if (r <= H)
maxid = (A[r] > A[maxid] ? r :... | #include <stdio.h>
#include <string>
void max_heapify(int *A, int i, int H)
{
int l = 2 * i, r = 2 * i + 1;
if (l > H && r > H)
return;
int maxid = i, x;
if (l <= H)
maxid = (A[l] > A[maxid] ? l : maxid);
if (r <= H)
maxid = (A[r] > A[maxid] ? r : maxid);
if (maxid == i)
return;
... |
a6f57dacb55c180029c8558c4d9e6f8e969bf1cdae0e667a79dd2c4266f392a8 | eecf30a952df3e23b43752c08084370de26e0a7b4dec7e7d33cf367ae0803b0f | 0.000191 | cpp | eecf30a952df3e23b43752c08084370de26e0a7b4dec7e7d33cf367ae0803b0f | 04b39af84d6cc3c2d97795aaa98c8197973e59fe6c20c20eb013954344346809 | PIE_released_gem5_runtime | pie_3336 | p03800 | 184379e92c24a6931c424ed532b9546a0936723e1f8d1e6ab7e1afbc313d7b7c | 04b39af84d6cc3c2d97795aaa98c8197973e59fe6c20c20eb013954344346809 | 0.001428 | 7.460118 | 4-8 | 28b2d40da411d7de947e30d200f19fa435b059c3dc2498072bf37917379d09a6 | #include <iostream>
#include <cstring>
using namespace std;
int an[4][2] = {{2, 2}, {2, 1}, {1, 1}, {1, 2}};
int i, j, kind[100005], n;
char ans[100005];
int main()
{
while (cin >> n && (n >= 3))
{
int flag = 0;
memset(kind, 0, sizeof(kind));
for (i = 1; i <= n; i++)
{
cin >> ans... | #include <cstdio>
#include <cstdlib>
const int MAXN = 100011;
int N;
char str[MAXN];
bool isWolf[MAXN];
void Shift() {
for (int i = 2; i < N; ++i) {
if (isWolf[i - 1]) {
if (str[i - 1] == 'x')
isWolf[i] = isWolf[i - 2];
else
isWolf[i] = !isWolf[i - 2];
}
else {
... |
53a50eaf04a28600b1e7cb6e6f6f8d07d9a0594cffdb8b9298367c43302b0b81 | d0cc97b8715d1e2d2a466d6d4e0d4ebb672e77353eb80059c76b0bd11c2c7223 | 0.020105 | cpp | d0cc97b8715d1e2d2a466d6d4e0d4ebb672e77353eb80059c76b0bd11c2c7223 | e008a6fc20a199a10ba46038c5adba606ff8780b15293d8b98f532c6212da3e1 | PIE_released_gem5_runtime | pie_3349 | p02584 | 7cdc42ed9871e52279e40ea99bb9f42950637c711f0d2fe2d7c8e2a8740868fd | e008a6fc20a199a10ba46038c5adba606ff8780b15293d8b98f532c6212da3e1 | 0.106825 | 5.313285 | 4-8 | 781e3f2d0c511bf52da3c87837724fe5819aeb36ce99c2e6fa5cbef7f0d68ce0 | #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 PI 3.14159265358979323846
#define lp(i, n) for (int i = 0; i < n; i++)
#define rlp(i, n) for (int i = int(n); i >= 0; i--)
#define range1(i, a, b, c) fo... | #include <stdio.h>
typedef long long LL;
int main()
{
LL x, k, d, y, z;
scanf("%lld%lld%lld", &x, &k, &d);
if (x < 0)
x = -x;
y = x / d;
if (y >= k)
z = x - d * k;
else {
z = x % d;
if ((k - y) & 1)
z = d - z;
}
printf("%lld\n", z);
return 0;
} |
c4df9de4bf986561ae692f6c0b1c99471e6a462a094d99d5d902c9eeb8a4a4cc | e66fa3a7fa93cf228f7cec41fbb386adb469657492d73f5f78c15d017c66ee00 | 0.10677 | cpp | e66fa3a7fa93cf228f7cec41fbb386adb469657492d73f5f78c15d017c66ee00 | a2535703cd3621f9cd75c030d6067feb4d40eeea5a6a59f38b753a8f1dbaf876 | PIE_released_gem5_runtime | pie_3366 | p02780 | 1a3b65acb0c71bc99986e4f644fde508282d77872b5894c2b09015de8528f43f | a2535703cd3621f9cd75c030d6067feb4d40eeea5a6a59f38b753a8f1dbaf876 | 0.284114 | 2.660996 | 2-4 | 6784ffd86e0bed9614ad6f975791c82fa2339bc98089dfec4524b8dd25ee5905 | #include <iostream>
#include <iomanip>
int main()
{
using namespace std;
int n, k;
double prefix_sum[200001] = {0}, p[200000], ans = 0;
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> p[i];
prefix_sum[i + 1] += ((p[i] + 1) / 2 + prefix_sum[i]);
}
for (int i = 0; i <= n - k; i++) {
... | #include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double pos[1001];
double total = 0, sum = 0, maxi = 0;
for (int i = 1; i <= 1000; i++)
{
total += i;
pos[i] = total / i;
}
int n, k;
cin >> n >> k;
int a[n];
for (int i = 0; i < n; i++)
{
cin >> a[i]... |
9b58fa0edd5d1a790621144f321b102cf12c20b0532dc532f10b73bb60c600c0 | a7c9df05b3cd9b18472569d4d15be7c9725c8244df01de0a7887ade7e9f5683f | 0.017666 | cpp | a7c9df05b3cd9b18472569d4d15be7c9725c8244df01de0a7887ade7e9f5683f | c147f39e4433d0cca558367442882416f6ff59599a524f6dc53d6f3ea1647589 | PIE_released_gem5_runtime | pie_3372 | p03743 | c17f4a3b3cfe3287890eb5212dd52590497732120caa4317802ab8ca86c07677 | c147f39e4433d0cca558367442882416f6ff59599a524f6dc53d6f3ea1647589 | 0.07405 | 4.191801 | 4-8 | 12b5ce6b1e9bc4ad552f2dc8391560f7ac19a813e7614355df914678e66ba960 | #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 ... |
73dcf967683431f69e78a19d77c2927080b65dc7f03f799016b7cadd6f932100 | 8665933f203c9d07ba1a0aa333121e7f15627c21c9e69ca15a1aea86ad3ed254 | 0.087384 | cpp | 8665933f203c9d07ba1a0aa333121e7f15627c21c9e69ca15a1aea86ad3ed254 | fe7ce59389b12dc274dd0d9029823b98c7f3e6c8e6477effcd8b3b47bdd9b1c3 | PIE_released_gem5_runtime | pie_3406 | p03235 | 91f072101362212a8018f610d6a5807918caa71c56322b561d6d6730f0893439 | fe7ce59389b12dc274dd0d9029823b98c7f3e6c8e6477effcd8b3b47bdd9b1c3 | 0.366785 | 4.197374 | 4-8 | 4f9912cdca5964b7fc26421bdf70c3b15cfe4a0119c7f0c4e3a873ad299b8888 | #include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <cmath>
#include <ctime>
#include <queue>
#include <map>
#include <set>
#define LL __int128
#define db double
using namespace std;
const int N = 2e5 + 10;
int rd()
{
int x = 0, ... | #include <bits/stdc++.h>
using namespace std;
int gi() {
int res = 0, w = 1;
char ch = getchar();
while (ch != '-' && !isdigit(ch))
ch = getchar();
if (ch == '-')
w = -1, ch = getchar();
while (isdigit(ch))
res = res * 10 + ch - '0', ch = getchar();
return res * w;
}
const int INF = 1e9... |
f2c52986eff5b325ca5fb1534ad61edfdfed59716a83dcbe2acf7176ec8b10a2 | 712b907c82edb93e894a33ae8fc53bc7b5e1b9821f43f2e83c63f6c8565a06e6 | 0.009877 | cpp | 712b907c82edb93e894a33ae8fc53bc7b5e1b9821f43f2e83c63f6c8565a06e6 | 20e0629e2abbf8ec7b43cd287d7a8920384c8357efdd9ba47791b183719eabf7 | PIE_released_gem5_runtime | pie_3410 | p03760 | c07d8592b98ed0b80c0e2a07598ef2263c2227b16cefd90d2f45446877a25041 | 20e0629e2abbf8ec7b43cd287d7a8920384c8357efdd9ba47791b183719eabf7 | 0.052178 | 5.282559 | 4-8 | 1385fd75cc76516ec4cc1fb68f9405ce620a24761dbf6f6c6450c598b1c713b4 | #include <stdio.h>
#include <string.h>
#include <iostream>
using namespace std;
int main()
{
char o[110], e[110];
int i, j;
int lo, le;
scanf("%s", &o);
scanf("%s", &e);
lo = strlen(o);
le = strlen(e);
if (lo == le)
{
for (i = 0; i <= lo - 1; i++)
{
if (i != lo - 1)
... | #include <stdio.h>
int main() {
char o[51], s[51];
scanf("%s%s", o, s);
int i, j, so = 1, ss = 1;
while (o[so] != '\0') {
so++;
}
while (s[ss] != '\0') {
ss++;
}
if (so == ss) {
for (i = 0; i < so; i++) {
printf("%c", o[i]);
printf("%c", s[i]);
}
}
else if (so... |
fb87512b0ef6f54a4c9c0ea520f598754e77d9d4a3210d10af36dc877f62cba7 | 497a66d2de7d131a6abb520fd2635fdeace1c1b3c4234ef2a5ddaeb71ff259c6 | 0.080744 | cpp | 497a66d2de7d131a6abb520fd2635fdeace1c1b3c4234ef2a5ddaeb71ff259c6 | 83d25177980b150f4e482f7bb3b3b2988380bf403e9c08e4a3bc4a7d59131683 | PIE_released_gem5_runtime | pie_3415 | p02370 | cf90527c11beb374d6b9cb37add2f1cc38a01c9a626a0312bb8e84f54427fbd3 | 83d25177980b150f4e482f7bb3b3b2988380bf403e9c08e4a3bc4a7d59131683 | 0.241899 | 2.995889 | 2-4 | 2b31258edb119ef7f1309a7378e9a9bf3571ecc9ffedc203eec7b19a9614cf55 | #include <iostream>
#include <cstdio>
#include <algorithm>
#include <list>
#include <vector>
using namespace std;
static const int MAX = 100000;
vector<int> G[MAX];
int N;
list<int> out;
bool V[MAX];
void dfs(int u)
{
V[u] = true;
for (int i = 0; i < G[u].size(); i++)
{
int v = G[u][i];
i... | #include <queue>
#include <vector>
#include <cstdio>
#include <algorithm>
int v, e, in[10005];
std::queue<int> q;
std::vector<int> g[10005];
int main()
{
scanf("%d%d", &v, &e);
while (e--)
{
int x, y;
scanf("%d%d", &x, &y);
g[x].push_back(y);
in[y]++;
}
for (int i = 0; i < v; i... |
0c336733ff4b756f2036a3cdbf11dcf337116f000bba0d25aac901a8f013498d | 5506927a605e2db5e2021f406155973aa5583bc9505e5e56e80696719d1cd3fa | 0.029015 | cpp | 5506927a605e2db5e2021f406155973aa5583bc9505e5e56e80696719d1cd3fa | ab5510abdc32641bff00664e3cff29b270554d04c842e63067e3183c16e29a66 | PIE_released_gem5_runtime | pie_3451 | p03503 | 7f525d50118d4dc6e0e57231692a33d4aa43cfc2ee07fe31742f53c3f7e72f5e | ab5510abdc32641bff00664e3cff29b270554d04c842e63067e3183c16e29a66 | 0.109473 | 3.772977 | 2-4 | be7f05158fd2f38db30ce9521ce0cd436612e35f130fa5e8ee1a16b69e54cb7d | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
const int INF = 1 << 30;
const ll LINF = 1LL << 50;
const int NIL = -1;
const int MAX = 10000;
const int mod = 1000000007;
const double pi = 3.141592653589;
int main() {
int N;
cin >> N;
vector<int> v(N);
... | #include <cstdio>
int N;
int F[100][14];
int P[100][15];
int main() {
scanf("%d", &N);
for (int i = 0; i < N; i++) {
for (int j = 0; j < 10; j++)
scanf("%d", &F[i][j]);
}
for (int i = 0; i < N; i++) {
for (int j = 0; j < 11; j++)
scanf("%d", &P[i][j]);
}
int res = -(1 << 30);
... |
6648ac5852466b16b0048565d8ad29813bbfe419b7c1c34a0880c6aa8d911f05 | 9f11ae7eaf1bc38e74376b19446fc17567c0e7ad7181e8efadf942e9f9fc550e | 0.001042 | cpp | 9f11ae7eaf1bc38e74376b19446fc17567c0e7ad7181e8efadf942e9f9fc550e | 3ad261f24361022cf164a5fd7577039b8f2039f38943a2f5c1fe61b2696cc479 | PIE_released_gem5_runtime | pie_3459 | p01718 | 792960d1db1b3883cb6be1c77bfc843b9ab3bcdc503797cd5f28fa784dacd795 | 3ad261f24361022cf164a5fd7577039b8f2039f38943a2f5c1fe61b2696cc479 | 0.00268 | 2.5723 | 2-4 | d1fdbcbe96f340d2e4d54dbb69a8466cbf8598612e07cb070802e55f3fc452a0 | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define MOD 1000000007
#define MAX_N 100000
#define MAX_P 200005
int fact[MAX_P];
int extgcd(int a, int b, int &x, int &y) {
int d = a;
if (b != 0) {
d = extgcd(b, a % b, y, x);
y -= (a / b) * x;
} else {
x = 1;
y = 0... | #include <bits/stdc++.h>
using namespace std;
using Int = long long;
template <typename T1, typename T2> inline void chmin(T1 &a, T2 b) {
if (a > b)
a = b;
}
template <typename T1, typename T2> inline void chmax(T1 &a, T2 b) {
if (a < b)
a = b;
}
template <typename T>
struct SegmentTree {
using F =... |
a1faaf8d96dc27bedd8fc02d7819065186f7ece172ad75440961e9518b94a063 | 19a4f5b022e54a45ea76026da162c6d48ffc8618bc0a45d0a3f2dbff76cac016 | 0.036269 | cpp | 19a4f5b022e54a45ea76026da162c6d48ffc8618bc0a45d0a3f2dbff76cac016 | 3d7ea2b584ee47c8b3b2ea3f28ecd68719a3a4632d276b231cfb69741e9e8166 | PIE_released_gem5_runtime | pie_34691 | p02867 | b8d9d2aa943d32ac123b083d06d3a3b5643b6330da3dac208bd83c3a40265e05 | 3d7ea2b584ee47c8b3b2ea3f28ecd68719a3a4632d276b231cfb69741e9e8166 | 0.232605 | 6.413383 | 4-8 | 6c9371dfb3a720864aeb72c5e7e001b41e8cfebe3741ff4614d2d896c7a653ab | #include <bits/stdc++.h>
#define ll long long
using namespace std;
#define maxn 100010
#define mod 1000000007
struct cv {
int x, y;
} a[maxn];
int b[maxn];
int cnt;
set<int> s[maxn];
int dp[maxn], du[maxn];
bool cmp(cv p, cv q) {
if (p.x != q.x)
return p.x < q.x;
return p.y < q.y;
}
int main() ... | #include <bits/stdc++.h>
using namespace std;
namespace TYC
{
typedef long long ll;
typedef pair<int, int> pii;
const int N = 1e5 + 5;
int n, A[N], B[N], P[N];
map<int, int> idA, idB;
inline int read()
{
int x = 0, f = 0, ch = getchar();
while (!isdigit(ch))
f |= (ch == '-'), ch = getchar();
whi... |
d5069244a1f4293e2abd9125bb6e61b5d7db2216c1aeb3eb096cb0dedc726079 | 2c173dc8ce45a271c2c201eed0483c61ecfc3ebcdf2aedaeddfc0f110bca2887 | 0.020004 | cpp | 2c173dc8ce45a271c2c201eed0483c61ecfc3ebcdf2aedaeddfc0f110bca2887 | 6fd8f78ff9b8f4e7f0c9b2b58f70ac76af99c271d4000fde5de3f1bb1b020cae | PIE_released_gem5_runtime | pie_3473 | p03060 | d62154045c3cd91e13b62a5f4755d960c8f20c4cb0bf42bd5d330ca77c0279cc | 6fd8f78ff9b8f4e7f0c9b2b58f70ac76af99c271d4000fde5de3f1bb1b020cae | 0.105512 | 5.274481 | 4-8 | 24dcc5530975aa8f1645214b5f3366405a5336dc229a7be4832bd1a04a77fbc5 | #include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <string>
#include <set>
#include <map>
#include <list>
#include <time.h>
#include <math.h>
#include <random>
#include <deque>
#include <queue>
#include <cassert>
#include <unordered_map>
#include <unordered_set>
#includ... | #include <stdio.h>
#include <string.h>
#include <math.h>
int main()
{
int n, p = 0;
scanf("%d", &n);
int v[n], c[n];
for (int i = 0; i < n; i++)
scanf("%d", &v[i]);
for (int j = 0; j < n; j++) {
scanf("%d", &c[j]);
if (c[j] <= v[j])
p = p + v[j] - c[j];
}
if (p > 0)
print... |
71468ad140d7adb5f531c23c87a4269a358e56d908d6a2ff58736356861b00b2 | 892216ae8764703eb367dab867240bc6248320857dfecef6ad78853a7c42a0c3 | 0.000192 | cpp | 892216ae8764703eb367dab867240bc6248320857dfecef6ad78853a7c42a0c3 | e144d3c37f95e02f07e8b3245937f3b32d76416fff289c795177da9f81215933 | PIE_released_gem5_runtime | pie_34753 | p03339 | 6c1e5f6f087d0df5ed0b51a8fe8313c9de871b8c86312c586ddfb5b05252ac70 | e144d3c37f95e02f07e8b3245937f3b32d76416fff289c795177da9f81215933 | 0.009484 | 49.514768 | 8+ | a2733560e9551366b5850706fb7ede26871b6144dec3e4377c3e32913f2a7fba |
#include <iostream>
#include <cstring>
#include <cstdio>
#include <string>
using namespace std;
const int maxn = 1e6 + 10;
int n;
int l[maxn], r[maxn];
char str[maxn];
int maxx = 0;
int main()
{
scanf("%d", &n);
scanf("%s", str);
memset(l, 0, sizeof(l));
memset(r, 0, sizeof(r));
for (int i =... | #include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
int n, ans = 400000;
char a[300010];
int cnt[300010];
int main()
{
scanf("%d%s", &n, a);
if (a[0] == 'E')
cnt[0] = 1;
for (int i = 1; i < n; i++)
{
if (a[i] == 'E')
cnt[i] = cnt[i - 1] + 1;
else
cn... |
68c97dd22080c532306f77a8de56afac41d09e6a43179c39e6c2df7245941db6 | 4316cc043a6ae565dbc83a760a8e59ab53fe3fa539e15f710337567c4605d28e | 0.085049 | cpp | 4316cc043a6ae565dbc83a760a8e59ab53fe3fa539e15f710337567c4605d28e | cd89fa073e03a03c6caaa9fd9dcf1829cfc0084945222836b8b971c161958145 | PIE_released_gem5_runtime | pie_34777 | p02614 | 26e0110547fb04ffbb958e6fe53090f87e1c3d4a9b1a8c071640faa6b0c72ba3 | cd89fa073e03a03c6caaa9fd9dcf1829cfc0084945222836b8b971c161958145 | 0.297574 | 3.498846 | 2-4 | 6bc9984ad217fcf9b09f14e763b35d784ec9ba7cc72f98d68d29edeac8cec936 | #include <bits/stdc++.h>
#define rep(i, n) for (long long i = 0; i < n; i++)
#define Rep(i, n) for (long long i = 1; i < n; i++)
#define ll long long
#include <math.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace... | #include <bits/stdc++.h>
#define rep(i, n) for (long long i = 0; i < n; i++)
#define Rep(i, n) for (long long i = 1; i < n; i++)
#define ll long long
#include <math.h>
#include <cmath>
#include <iomanip>
#include <iostream>
#include <numeric>
#include <queue>
#include <set>
#include <vector>
using namespace... |
14e01b511d8e658c6fbdd6356ab5e652d4cd296dbddc6a8e55964d97cd463195 | bf646a71b9e535d8945ab4503ffb0ad5e1cb8c75e2ddf73b79aa0dc496fa834c | 0.011182 | cpp | bf646a71b9e535d8945ab4503ffb0ad5e1cb8c75e2ddf73b79aa0dc496fa834c | 79aabef05205091719c7e16aceb92e2eb470b0a6efd29526ba2712aa6513c705 | PIE_released_gem5_runtime | pie_34788 | p02735 | aefbcd93fcabc8e1fc8ac17422de1be078f4f26db07ed75e17cf8fc4d80c131b | 79aabef05205091719c7e16aceb92e2eb470b0a6efd29526ba2712aa6513c705 | 0.181339 | 16.216946 | 8+ | 2343de308c6edf77235b5079343e791cc7478710c7340a10bfbd2eeb5feebb47 | #include <cstdio>
#include <iostream>
#include <algorithm>
#include <cstring>
#include <vector>
#include <map>
#include <queue>
using namespace std;
typedef long long LL;
const LL INF = 0x3f3f3f3f3f3f3f3f;
LL n, m;
LL dp[505][505];
char ch[505][505];
int main() {
ios::sync_with_stdio(false);
memset(d... |
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
char s[110][110];
int H, W, f[110][110];
int main() {
scanf("%d%d", &H, &W);
for (int i = 1; i <= H; ++i)
scanf("%s", s[i] + 1);
f[1][1] = s[1][1] == '#';
for (int i = 2; i <= W; ++i)
f[1][i] = f[1][i - 1] + (s[1... |
d7a18904cf89f72ccded96cd063095e0cfb51bbe04c860d3218433ad060685c0 | ad28c5e67bb59cedd61c4357b6abbcf45188f710e79bf954d7fc516cd6869c6a | 0.022894 | cpp | ad28c5e67bb59cedd61c4357b6abbcf45188f710e79bf954d7fc516cd6869c6a | 8b557e4a7bb251582727378808b434ff61d9922231432517f4974b4f7e2499c9 | PIE_released_gem5_runtime | pie_34818 | p03040 | 573ab6827fff3983731dad7422067f9ddab9a5498d8550a58b7d75d3b584abbb | 8b557e4a7bb251582727378808b434ff61d9922231432517f4974b4f7e2499c9 | 0.240525 | 10.50604 | 8+ | 10bf5768e424a41c9392ce2a774a079dcee787821078d3947ffe833979f29917 | #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 ... |
9f9c1d38b430d9b753210f0a648dfd0dc2ace38b5754e5ec88d147095e86565c | dc8604b11c1723c2bc55cd68b30afc702437a18a0ab37ee00199796b252dee7b | 0.100261 | cpp | dc8604b11c1723c2bc55cd68b30afc702437a18a0ab37ee00199796b252dee7b | 10eab2ed8750bdb91b54429755726faa514bce8b42027cc842818772f13c75ff | PIE_released_gem5_runtime | pie_34853 | p03722 | 52ebcf789628e9956f885b90535b7030e298ed60f7c11fd656b1dc2bd47fa125 | 10eab2ed8750bdb91b54429755726faa514bce8b42027cc842818772f13c75ff | 0.378937 | 3.779518 | 2-4 | 1bab386c867fd80132982f20250feeb8929b2667c7950a070b8b796c0b2c02b4 | #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <cmath>
#include <algorithm>
#include <bitset>
#include <map>
#include <functional>
#include <set>
#pragma region
using namespace std;
#define FOR(i, r, n) for (ll i = (ll)(r); i < (ll)(n); i++)
#define RFOR... | #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <string>
#include <cmath>
#include <algorithm>
#include <bitset>
#include <map>
#include <functional>
#include <set>
#pragma region
using namespace std;
#define FOR(i, r, n) for (ll i = (ll)(r); i < (ll)(n); i++)
#define rep(... |
d8bf83783e10f7bb8a8d4f404e6b463961f617a96d74d243bea38b873d9c8334 | 8d9451993d9443ef75537f662029cd7faee7c96c66ab141ab4ec111d7ab03291 | 0.053473 | cpp | 8d9451993d9443ef75537f662029cd7faee7c96c66ab141ab4ec111d7ab03291 | 36eefa877e88470fb88f31cb43fc42dcd3c2b3408671749750897d464a7d1539 | PIE_released_gem5_runtime | pie_3487 | p03604 | 3121ee4f96b1fc58565dc269fae8ab2fb99823e1125d26258f62b3197b3f6961 | 36eefa877e88470fb88f31cb43fc42dcd3c2b3408671749750897d464a7d1539 | 0.34956 | 6.537131 | 4-8 | 7a0baacd0ac80dd305c9e61b3510f226ca3de4a70b7fd563279d2b45b89007a3 | #include <bits/stdc++.h>
#define il inline
#define stt static
#define rg register
#define ll long long
#define db double
#define pii pair<int, int>
#define mp make_pair
#define fst first
#define snd second
#define pb push_back
#define y1 substitute_of_y1
#define DEBUG(x) cerr << #x " = " << x << endl;
usin... | #include <bits/stdc++.h>
char buf[1 << 20], *p1, *p2;
#define getchar() \
((p1 == p2) && (p2 = (p1 = buf) + fread(buf, 1, 1 << 20, stdin), p1 == p2) \
? EOF \
: *p1++)
temp... |
9917a36542a9ac34683963878e7ec16cd953e718353a71c25450f8bcee94c509 | 495246e269756d4e599dd2deb1dcbbfacbe52bf43b7e1b026786c8e15e45b922 | 0.017011 | cpp | 495246e269756d4e599dd2deb1dcbbfacbe52bf43b7e1b026786c8e15e45b922 | f7e274f09aac15fe14d1d5d3f465660e98028763cbaf3b4810edb1358e6cb287 | PIE_released_gem5_runtime | pie_34871 | p03153 | 11db828c14911e5cca4ee2a29dc23fbdc765905060b64aa0548051595feb5693 | f7e274f09aac15fe14d1d5d3f465660e98028763cbaf3b4810edb1358e6cb287 | 0.330739 | 19.442811 | 8+ | fbef9f110d2ebeb74320929c06ce99e77c15e5654653592a5d89e917b962c3e8 | #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 ... |
1539d4356c4aa39acf6e6132db407e4d9729a587df749c3774ce31572877d3ff | 14183585367adaede89e2017e67437c711d3d7d0b8cb246cbd45213c17457091 | 0.063265 | cpp | 14183585367adaede89e2017e67437c711d3d7d0b8cb246cbd45213c17457091 | d80cb7be0c616552edbe035a08c7da14ba8f606322baaeb38484d1a7f497b3ff | PIE_released_gem5_runtime | pie_34928 | p04003 | e0058c5a91f276d4ce2da2b317f8e57217352c2d4e3b951850929e2c61fa18b9 | d80cb7be0c616552edbe035a08c7da14ba8f606322baaeb38484d1a7f497b3ff | 0.732458 | 11.57754 | 8+ | 072a41a0109538ceed26bdcf10d606a2297433cedfa6ef1f35a6a4ba293f6bbc | #include <queue>
#include <cstdio>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;
const int MAXM = 200000;
const int MAXN = 300000;
struct edge {
int u, v, c;
} edges[MAXM + 5];
bool operator<(edge a, edge b) { return a.c < b.c; }
vector<int> G[MAXN + 5];
void addedge(int ... | #include <cstdio>
#include <algorithm>
#include <queue>
#include <vector>
using namespace std;
#define MAXN 100010
#define MAXM 200010
#define MAXK 2000100
#define INF 1000000000
struct edge
{
int u, v, c;
} e[MAXM];
bool cmp(edge a, edge b)
{
return a.c < b.c;
}
int fa[MAXN], n, N, m, u, v, c, im[M... |
278ac0198972287d693fa339b3b5e0a66ea93f4d28058fa32b2aeae990bda2df | 673a6af3ada410d8ce9b392508f41f05692f9f6c7b70aac51e17de5516e00081 | 0.019969 | cpp | 673a6af3ada410d8ce9b392508f41f05692f9f6c7b70aac51e17de5516e00081 | cb577ec5e82fb2c1e9971afa93cbeb9cfe00246acd7b4765e8099df9b152c58b | PIE_released_gem5_runtime | pie_34940 | p03072 | 2f43f1b338ebd62b92490396e2d1b38cc4c0f977e1c2dca22829ac4d07db2456 | cb577ec5e82fb2c1e9971afa93cbeb9cfe00246acd7b4765e8099df9b152c58b | 0.105484 | 5.282354 | 4-8 | 19b29fe0b1247ed623b5367d0991702cc5744e0375a7925030ce4e8c0002cd09 | #include <cstdio>
#include <algorithm>
#include <iostream>
typedef long long LL;
using namespace std;
int main()
{
int n, ans, h[200];
cin >> n;
ans = n;
for (int i = 1; i <= n; i++)
cin >> h[i];
for (int i = 1; i <= n; i++)
for (int j = 1; j < i; j++)
{
if (h[j] > h[i])
... | #include <cstdio>
#include <cmath>
using namespace std;
const int N = 205;
int n;
int a[N];
int ans, chk;
int main()
{
scanf("%d", &n);
for (int i = 1; i <= n; i++)
{
scanf("%d", &a[i]);
chk = 1;
for (int j = 1; j < i; j++)
chk &= (a[j] <= a[i]);
ans += chk;
}
printf("%d... |
fad4cee6c0b7ad2b03d554d69d10acfc21541dfb9b516ad840e97d3d66466050 | 07611fc93865dbbbb10a46aca804c3db806432b1347482741636bd49e05fcdd7 | 0.005414 | cpp | 07611fc93865dbbbb10a46aca804c3db806432b1347482741636bd49e05fcdd7 | 2b8892751008aefc8c3830fe0d7b86f7f4d830ba9b92be733fa861e5ae81ed34 | PIE_released_gem5_runtime | pie_34951 | p03728 | 02d19f16c33fba7e9c9c44cebd751cccf0a1dcf674c58b786cac334e1b2726e9 | 2b8892751008aefc8c3830fe0d7b86f7f4d830ba9b92be733fa861e5ae81ed34 | 0.116096 | 21.44452 | 8+ | 309b0ecac8c1bb640ccc737c992686e01e51197cae4e32db4d5e7878931e5dba | #include <bits/stdc++.h>
using namespace std;
long long int N, p[364364], id[364364], dp[364364], x, i;
int main() {
iota(p, p + 364364, 1);
scanf("%lld", &N);
for (; i < N; ++i) {
scanf("%lld", p + i);
id[p[i]] = i;
}
dp[N] = 0;
x = N;
for (; --i;) {
if (dp[i + 1]) {
dp[i] ... | #import <cstdio>
template <typename...> static inline int gc(void) { return getchar(); }
static inline void read(int &x) {
int k, m = 0;
x = 0;
for (;;) {
k = gc();
if (48 <= k && k <= 57) {
x = k - 48;
break;
}
}
for (;;) {
k = gc();
if (k < 48 || k > 57)
break;
x ... |
3e7b1d52562d1c2eba002ced013487bd7456ae5b96ceb9954a309459bd59c2f7 | 196c3d78d122ad4dead46d1470e44ae829406086e1976e34568da168f91d5ead | 0.107537 | cpp | 196c3d78d122ad4dead46d1470e44ae829406086e1976e34568da168f91d5ead | 2caa451a1d63611350020add5d5ee3fb7626bf76a7e7a78151dea8f53a25c708 | PIE_released_gem5_runtime | pie_34978 | p03176 | 63c78c10fdd24dc874d7cee05fd226e55b7f17e1ae7e8df337574521555edd47 | 2caa451a1d63611350020add5d5ee3fb7626bf76a7e7a78151dea8f53a25c708 | 0.824627 | 7.668278 | 4-8 | 7ee0ac5dbc38528ac18902ed0fe6cfc55c14b7f559c68fad5b90b8a5ef2b6277 |
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <stack>
#include <queue>
#include <deque>
#include <iterator>
#... |
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <stack>
#include <queue>
#include <deque>
#include <iterator>
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.