Datasets:
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6503235e2ed1aeb76cf82e78625582c15e3841c654ad650c6534ce2c8de91033 | c889f83c4952dc23fd2f04fdda1dd4628b2136c34b58d3ca47f7cc041bb41f14 | 0.017954 | cpp | c889f83c4952dc23fd2f04fdda1dd4628b2136c34b58d3ca47f7cc041bb41f14 | e7d027f7954fe67d8c9c56d39bc4f18c31847726565d4df641d0ea5cce783092 | PIE_released_gem5_runtime | pie_10033 | p04040 | 78359b56a8205b18363eccd9861fbf6d616bfbe9eb44387ef6ca94ecb9e89c85 | e7d027f7954fe67d8c9c56d39bc4f18c31847726565d4df641d0ea5cce783092 | 0.400695 | 22.31775 | 8+ | 106accddb666834d185018582115e9574efdb70a1daa2498bd23555cc3b607f0 | #include <iostream>
#include <cstdio>
#define int long long
#define N 200002
using namespace std;
const int mod = 1000000007;
int a, b, x, y, i, j, f[N], inv[N];
int poww(int a, int b)
{
int ans = 1, base = a;
while (b) {
if (b & 1)
ans = ans * base % mod;
base = base * base % mod;
b ... | #include <cstdio>
#include <algorithm>
using namespace std;
#define MOD 1000000007
#define MAXN 200005
#define LL long long
LL inv[MAXN], s[MAXN];
int N;
int n, m, x, y;
LL Pow(LL a, int b)
{
LL ans = 1;
while (b)
{
if (b & 1)
ans = ans * a % MOD;
a = a * a % MOD;
b >>= 1;
}
... |
2c793dbe4b840bf21560370ebc6fd9d0586394fac8661209b4b1466d6b688413 | af85ff90099f356749dc45a90f8d208bb94c40d50d767f26705cd6d8b745e5b8 | 0.10459 | cpp | af85ff90099f356749dc45a90f8d208bb94c40d50d767f26705cd6d8b745e5b8 | 9a7f72758e4c969d9cc99ba3eb5eb21c0cfa002d72262a754051b19ee769d03e | PIE_released_gem5_runtime | pie_10112 | p02573 | a3fb58771c8949e75fa52e4d3dd805f9ec8fafab7e65e2043ddaf164ea4bda6f | 9a7f72758e4c969d9cc99ba3eb5eb21c0cfa002d72262a754051b19ee769d03e | 1.259351 | 12.040879 | 8+ | b98ed5b11fa768651f94c7e8b0d9eb3c1a69d8d9ee732b90f9a1062867b06208 | #include <iostream>
#include <set>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>
using namespace std;
using ll = long long;
#define rep(i, a, b) for (ll i = a; i < ll(b); i++)
#define repr(i, a, b) for (ll i = a; i >= ll(b); i--)
#define endl "\n"
#define ALL(x) x.begin(), x.end()... | #include <iostream>
#include <vector>
using namespace std;
using ll = long long;
#define rep(i, a, b) for (ll i = a; i < ll(b); i++)
#define endl "\n"
struct UnionFind {
vector<int> data;
UnionFind(int size = 0) : data(size, -1) {}
int root(int x) {
if (data[x] < 0)
return x;
return x = r... |
bc3b2a44632ab7bdf5b79be06ccfa4d371b95ba6b5f2975f481cba99718a3101 | 6fc57d3099722b85aae2a32c2f7ba263bee7963c406266a2a1fd148c21274ccd | 0.081147 | cpp | 6fc57d3099722b85aae2a32c2f7ba263bee7963c406266a2a1fd148c21274ccd | 0f770f6c133495a7edc3b6c68297963f84cd822658c30a1f3bf2ed7c02bfc45d | PIE_released_gem5_runtime | pie_10118 | p03184 | 16ab07ec4ecbbb48c83e87e91d1e6e9fba7dae85bc1d1558cdb440982ba73205 | 0f770f6c133495a7edc3b6c68297963f84cd822658c30a1f3bf2ed7c02bfc45d | 0.548043 | 6.753712 | 4-8 | 28b56969c1ce10e58ba13cc4a07fac5e5616493718d60ea174648378a9d16327 | #include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <string>
#include <map>
#include <set>
#include <tuple>
#include <deque>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cassert>
#include <chrono>
#include <random>
#include <limits>
... | #include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <queue>
#include <string>
#include <map>
#include <set>
#include <stack>
#include <tuple>
#include <deque>
#include <numeric>
#include <bitset>
#include <iomanip>
#include <cassert>
#include <chrono>
#include <random>
... |
7feb4f36a8b52ccd2b7c7ca2682b7889109f3d42cce02db965b4c182f6a1cb1d | 77dbadc25352098089b91dcc483b3c73047de54b77c178306d7e17f8283a4a3d | 0.159319 | cpp | 77dbadc25352098089b91dcc483b3c73047de54b77c178306d7e17f8283a4a3d | d2a25a39d9762a6cfca0b8fb4d3691f50c41af0b81f4c0ba00b653210504bad0 | PIE_released_gem5_runtime | pie_1051 | p03362 | cae5fce4661158d7faa613ce86a2ded57cbea8094ca90692b288eb269a3cded7 | d2a25a39d9762a6cfca0b8fb4d3691f50c41af0b81f4c0ba00b653210504bad0 | 0.333276 | 2.09187 | 2-4 | 174c45f96f4ffd32bb99a3408fa1cd2b8551ddd015eb85422497ede6cc19e7c3 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
vector<int> calc(int n)
{
const int sz = 55556;
vector<int> sieve(sz, 1);
sieve[0] = sieve[1] = 0;
for (int i = 2; i < (int)sieve.size(); ++i) {
for (int m = 2; i * m < sz; ++m) {
sieve[i * m] = 0;
}
}
int cnt = 0;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int INF = 1000000000;
void sieve(vector<int> &primes)
{
int n = primes.size();
primes[0] = primes[1] = 0;
for (int i = 2; i * i < n; ++i) {
if (not primes[i]) {
continue;
}
for (int j = i * i; j < n; j += i) {
... |
7868335e6bd3219cb60933b75e87b601cfc7dd91cabe7ebb91e792d579109ba9 | 606584b546256bd319712e420af9fa40a00cd43e260485006797f68c0680abd1 | 0.010832 | cpp | 606584b546256bd319712e420af9fa40a00cd43e260485006797f68c0680abd1 | 1dc8f2d03912916593f7cbb1a1872f261fb7d65fbe67de240eed19cace5d6b68 | PIE_released_gem5_runtime | pie_108 | p03440 | 4116ee63417236f0ad881f40abe62aff171a82cff42071138a94a0b3eca0b083 | 1dc8f2d03912916593f7cbb1a1872f261fb7d65fbe67de240eed19cace5d6b68 | 0.36841 | 34.012738 | 8+ | 018e09f292f4b70975823fa0104db8efb84a0b10a1c1cd3eaa03aca530dc1c0d | #include <bits/stdc++.h>
typedef long long LL;
const int MAXN = 1e5 + 5;
int n, m, w[MAXN];
std::multiset<int> st[MAXN];
std::set<std::pair<int, int> > spec;
int fa[MAXN], part;
int Find(int x) { return fa[x] == x ? x : fa[x] = Find(fa[x]); }
void merge(int u, int v) {
if (Find(u) == Find(v))
return;
... | #include <cstdio>
#include <algorithm>
#define F(i, a, b) for (int i = (a); i <= (b); ++i)
using namespace std;
typedef long long ll;
int n, m;
int a[100001], b[100001], t;
int fa[100001];
int ff(int x) { return fa[x] ? fa[x] = ff(fa[x]) : x; }
ll Sum;
int main() {
int x, y;
scanf("%d%d", &n, &m);
if... |
884d8bc3b1937f4a297314bd0f1c6d3981d7bdcebae2d54bcabcec85864aca0b | b6e46d95ded4207bc8f61629dcdf87fd85b7be148f134139f3da5ab3f0e25759 | 0.005552 | cpp | b6e46d95ded4207bc8f61629dcdf87fd85b7be148f134139f3da5ab3f0e25759 | fd0acee7f6769aa1467111dbe68902cdcda4a5722c2296fde97a7368453300c2 | PIE_released_gem5_runtime | pie_11033 | p03294 | b1efa96e45e94c78065ba0ba5c136b9cc9592a7e32a6eb6020c21931bdb89330 | fd0acee7f6769aa1467111dbe68902cdcda4a5722c2296fde97a7368453300c2 | 0.02919 | 5.257492 | 4-8 | 0e8ab6631007c453c816d98c16ff519683d80b0b0a7263754f2b69bd46627d42 | #include <iostream>
#include <cstdio>
using namespace std;
const int maxn = 3010;
int a[maxn];
int main()
{
int n;
scanf("%d", &n);
int sum = 0;
for (int i = 0; i < n; i++) {
int t;
scanf("%d", &t);
sum += (t - 1);
}
printf("%d\n", sum);
return 0;
} | #include <cstdio>
#include <algorithm>
using namespace std;
typedef long long ll;
ll num[3010];
int main()
{
int n;
scanf("%d", &n);
for (int i = 0; i < n; i++)
{
scanf("%lld", &num[i]);
num[i]--;
}
ll res = 0;
for (int i = 0; i < n; i++)
{
res += num[i];
}
printf("%lld"... |
528533f6f0516a79d69199a44b59c106f354af65a750652bb44fbbd8c219cdfd | 438d4fbd76a150c7d9621f288f2fdd3f0076a1d1fe24e9d76b9c50d9449a11d3 | 0.02364 | cpp | 438d4fbd76a150c7d9621f288f2fdd3f0076a1d1fe24e9d76b9c50d9449a11d3 | 9cefd0600b965ca0ff9015734292d5200a2e7dc65b88a0ed012c7134477dae06 | PIE_released_gem5_runtime | pie_11075 | p02796 | ff4271998ef8e29b730dc16d35d836f0f6edbeb81f9b14959ccef2609d7fe7f2 | 9cefd0600b965ca0ff9015734292d5200a2e7dc65b88a0ed012c7134477dae06 | 0.19349 | 8.184782 | 8+ | 11e645df4acf34c44962622f2086d581ab38218395f76b26d9db89ba6547e425 | #pragma GCC optimize("O3")
#pragma GCC target("avx")
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (... | #pragma GCC optimize("O3")
#pragma GCC target("avx")
#include <cstdio>
using namespace std;
typedef long long ll;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "... |
434b8b759e506915f6656050976a4c8b332ddbd56da7ecab8a81a03b26079fb4 | b0b88cb2733513cdb828cb277e978d9be413e4c3a12fb8e9845cf213e3944347 | 0.105083 | cpp | b0b88cb2733513cdb828cb277e978d9be413e4c3a12fb8e9845cf213e3944347 | e7ab9fce74c66c34b2e177f0b152249cbf43bc74a7b1088af372a25ad442637b | PIE_released_gem5_runtime | pie_11141 | p02373 | 3e2f8c3b96ec27ab48bb517c43a4223b2de33b82ad86a4a0c46dbf94c6c244f0 | e7ab9fce74c66c34b2e177f0b152249cbf43bc74a7b1088af372a25ad442637b | 0.410215 | 3.903708 | 2-4 | 01b66d7489b262b7d7f9afa23ee85ffae75c14b231db576fb68b5dd3236da9bc | #include <iostream>
#include <vector>
#include <map>
#include <string.h>
#include <algorithm>
#define P pair<int, int>
#define INF (1 << 30)
using namespace std;
vector<int> Ind(100010);
vector<bool> f(100010, false);
vector<vector<int>> T(100010);
vector<P> ET;
void dfs(int n, int dep) {
f[n] = true;
... | #include "bits/stdc++.h"
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define INF 1 << 30
#define LINF 1LL << 60
class LCA {
public:
ll V;
vector<vector<ll>> T;
vector<pll> ET;
vector<int> visited;
vector<ll> Ind;
ll N;
vector<pll> node;
... |
1cf3aa9c851cf40249a007ead37a63aa2a011f05eebe380e279fd6dcca65f570 | d38ff829217f893214f20364cd88c7bc0e7810d3cdef9ce1ad4f64ae2b2db4cd | 0.107837 | cpp | d38ff829217f893214f20364cd88c7bc0e7810d3cdef9ce1ad4f64ae2b2db4cd | 7405d61b472e468886b08ee4a51201c86388887d1351a55c86dbb59137a9767c | PIE_released_gem5_runtime | pie_11144 | p03740 | fabf8e8835ffd192327d2424d56c3aa2d0580f42c5a84eda81880adcd7a0cbbe | 7405d61b472e468886b08ee4a51201c86388887d1351a55c86dbb59137a9767c | 0.675037 | 6.259759 | 4-8 | f1ae725909d7a4e7d06d789bf9052dffda1e0b7aac4c6e782fb1325350d29b9e | #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define reprrev(i, a, b) for (int i = b - 1; i >= a; i--)
#define reprev(i, n) reprrev(i, 0, n)
typedef long long ll;
typedef unsigned long long ull;
template <class T> i... | #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
#define reprrev(i, a, b) for (int i = b - 1; i >= a; i--)
#define reprev(i, n) reprrev(i, 0, n)
typedef long long ll;
typedef unsigned long long ull;
template <class T> i... |
87f6c0d52238ea1a1e2fdbe7f6e5d1c8c6b61198bcb9705beb7170b0462411ca | 2bd865bcfd883b7b18ded1b983de578c0bbb2d72a83476588ab03a01ce16a276 | 0.105596 | cpp | 2bd865bcfd883b7b18ded1b983de578c0bbb2d72a83476588ab03a01ce16a276 | 872bf32630e90398de2463898c7ff05476043ffbfaee9ff9b8ab8740a5117816 | PIE_released_gem5_runtime | pie_11146 | p02328 | 7cdf246ef6e6b1785026c5d63a698dbe40c6b9b3a778b63d4506f0d62c34eedb | 872bf32630e90398de2463898c7ff05476043ffbfaee9ff9b8ab8740a5117816 | 0.400079 | 3.788758 | 2-4 | 3da0dfb1d6e9f788a4055968c8d66ae86b5c6944b3d29bafbc9793f039b981b2 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 1 << 17;
const ll INF = (1e9) + 10;
class RMQ {
public:
ll n, dat[2 * N - 1];
RMQ() {
n = N;
for (int i = 0; i < 2 * n - 1; i++)
dat[i] = INF;
}
void update(int k, ll a) {
k += n - 1;
dat[k] = a;
... | #include <bits/stdc++.h>
#define int long long
#define N 200000
using namespace std;
int n;
struct dat {
int h, i;
};
int calc(int A[]) {
stack<dat> S;
int res = 0;
for (int i = 0; i <= n; i++) {
int h = A[i];
if (S.empty() || S.top().h < h)
S.push((dat){h, i});
else if (S.top().h ... |
b5c717a50a3200a22ef4297847b69bc9076e5fc4f30ccb19d7e8bdac8b85decd | b08a9c3cd7bdcbc6290c3cb45f98281d5b3b6c22063c84514c562eceeebfa37f | 0.055447 | cpp | b08a9c3cd7bdcbc6290c3cb45f98281d5b3b6c22063c84514c562eceeebfa37f | 78ad2998d59e62275c1ab24a70fdc83b5194c9276e98b0875730c4e6162b3593 | PIE_released_gem5_runtime | pie_11148 | p01980 | d27e54e2795f29cb2fd92c0dd26e1375b94549144ae2bda0835fff054a75ca16 | 78ad2998d59e62275c1ab24a70fdc83b5194c9276e98b0875730c4e6162b3593 | 0.169175 | 3.051099 | 2-4 | 1e30ece7b4368638e99ce86745e8e552422fa893a200a78092a9a4607d623182 |
#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 <bits/stdc++.h>
using namespace std;
#define int long long
#define all(v) (v).begin(), (v).end()
#define resz(v, ...) (v).clear(), (v).resize(__VA_ARGS__)
#define reps(i, m, n) for (int i = (int)(m); i < (int)(n); i++)
#define rep(i, n) reps(i, 0, n)
template <class T1, class T2> void chmin(T1 &a, T2 b)... |
15db54d9dac4868fbc1fb0017dcc8fe4674b7be2a9054d2fbba463f11c04314e | 65750488906e8dce6b425a5a2708438516c3178ecf66e9d1bc0308254c4f340d | 0.105519 | cpp | 65750488906e8dce6b425a5a2708438516c3178ecf66e9d1bc0308254c4f340d | c9bb14ba03272e52bbc0591ec870bcfccce933da047fb0e740794c9d3e41d14b | PIE_released_gem5_runtime | pie_11359 | p03330 | 76281808a2d90a37836c09831273dec1654b8a43ff81b845cd008276342f98a9 | c9bb14ba03272e52bbc0591ec870bcfccce933da047fb0e740794c9d3e41d14b | 0.330333 | 3.130553 | 2-4 | 8322b91e1d804cd1dd8a8566b52ad1bfe4682e14fbf0c7f248fdd26f74c63f49 | #include <iostream>
#include <algorithm>
using namespace std;
using int64 = int64_t;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define print(x) cout << (x) << '\n'
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n, c;
cin >> n >> c;
int64 D[40][40] = {};
int64 C[51... | #include <iostream>
#include <algorithm>
using namespace std;
inline void fastin(int &num) {
int c;
num = 0;
c = getchar_unlocked();
for (; (c > 47 && c < 58); c = getchar_unlocked())
num = (num << 3) + (num << 1) + c - 48;
}
inline void fastout(int n) {
int N = n, rev, count = 0;
rev = N;
... |
447e9248211fcd4085a7df5f57f24c9f8324960a4ffa89a7fbd9789cd31d7d45 | 1a00c16d648ab0bd4b1422fc6a1e49abec44fce7dee6168daa28ce4722809705 | 0.104926 | cpp | 1a00c16d648ab0bd4b1422fc6a1e49abec44fce7dee6168daa28ce4722809705 | 90078b49849536552f1006837c319e0b7e53ee991655247c5c3186c873286b94 | PIE_released_gem5_runtime | pie_11368 | p02607 | 987d72f1326f7b5a0c11c74fa7538036f65b03dc0f66d563ce5bd9c20f8e6828 | 90078b49849536552f1006837c319e0b7e53ee991655247c5c3186c873286b94 | 0.276003 | 2.630441 | 2-4 | 13b8a0ea67f1a26989b17bc33664e5814127bdc3000be4db330a7c4245cce2e0 | #include <bits/stdc++.h>
using namespace std;
#define oo (long long)1e18
#define ll long long
#define setdp memset(dp, -1, sizeof(dp))
const ll mod = 1e9 + 7;
void _IOS() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin.sync_with_stdio(0);
}
#define PI 3.14159265359
int n, l, r, x;
vector<int> b... | #include <iostream>
using namespace std;
int main()
{
int n, j = 1, c = 0;
cin >> n;
int a[n];
for (int i = 0; i < n; i++) {
cin >> a[i];
if (a[i] % 2 != 0 && j % 2 != 0)
c = c + 1;
j = j + 1;
}
cout << c << endl;
return 0;
}
|
8777cab31281f569aa6603544836662c10b9338878c93c743049304bb0221bfe | a7cf5602153cc57d258f0363bb0f5ea6dcc5d38b5eeaf54b3e0c9b91a0a27a11 | 0.009304 | cpp | a7cf5602153cc57d258f0363bb0f5ea6dcc5d38b5eeaf54b3e0c9b91a0a27a11 | 3b89a72643d86901303962ba4f52ccb5a1507bb51746673e952b72dedcd6fd7b | PIE_released_gem5_runtime | pie_11394 | p03842 | 4fef653961bb12940b3446b79c443a5d3ab512919c2eeb7f811d390b816e60c2 | 3b89a72643d86901303962ba4f52ccb5a1507bb51746673e952b72dedcd6fd7b | 0.061467 | 6.606194 | 4-8 | 031dc0b5459e13523f08d645d5e5ef8ff88aca77273007793b61d6d252d8a578 | #include <cstdio>
#include <cstring>
#include <cstdlib>
using namespace std;
int p1[110000], p2[110000];
int a[110000];
int lb[110000];
inline void jio() {
puts("0");
exit(0);
}
bool lowb[110000];
long long ff[110000];
int ljrose[110000];
long long renleizhihui[110000];
int main()
{
int n;
scanf("... | #include <cstdio>
#include <cctype>
#define RI register int
#define g (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, size, stdin), p1 == p2) ? EOF : *p1++)
using namespace std;
typedef long long ll;
const int mod = 1e9 + 7, N = 1e5 + 10, size = N << 2;
char buf[size], *p1 = buf, *p2 = buf;
void qr(int &x) {
c... |
eba3576bfc91ab3e37fba46f845fd716b5277d669f8992e4b01f10b68bbc5f5c | 2bed5f5927fc75950c7e07b0abaf3231de37443974c72ca47c8119c6ab3593fa | 0.001052 | cpp | 2bed5f5927fc75950c7e07b0abaf3231de37443974c72ca47c8119c6ab3593fa | b9a249ef5d43539fe8494a27d6d75763116717a6d6ac3e916e6c384f4af90cd5 | PIE_released_gem5_runtime | pie_11427 | p03277 | 4b0610cf1e4edbf95920f6aeedf98aafc58d2bdb5cc3fc836386f9f8df93c7cb | b9a249ef5d43539fe8494a27d6d75763116717a6d6ac3e916e6c384f4af90cd5 | 0.014014 | 13.32001 | 8+ | 8622e4a0f8c24949952accd4396d6a3b3deec9fdab8e12a181e56f99f34976e1 | #include <bits/stdc++.h>
#define fi first
#define se second
#define ll long long
#define pb push_back
#define mp make_pair
#define mt make_tuple
using namespace std;
const int N = 1e5;
int niz[N + 10];
int binNiz[N + 10];
int odnos[N + 10];
set<int> Set;
vector<int> brojevi;
ll n;
int seg[15 * N + 10];
... | #include <bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
using namespace std;
using namespace __gnu_pbds;
template <typename T>
using ordered_set =
tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename T>
us... |
239271fd7deb1d01fc934ec2a2d066aaf771859c2693190b3317449ae6d8704f | 1a28f9087ce6125fbafcd02956609ee6b001b0ae1310e31d001e225a98bee2bc | 0.066173 | cpp | 1a28f9087ce6125fbafcd02956609ee6b001b0ae1310e31d001e225a98bee2bc | a98e65c2cc39c8e49ca406cfd72e39a4d69471eb444eaeaeece9a2da36b0cb33 | PIE_released_gem5_runtime | pie_11442 | p01622 | 5ab4992d749839c1b86382e1b6b2800461f42bd67b8fdbc357079d03261cd5e2 | a98e65c2cc39c8e49ca406cfd72e39a4d69471eb444eaeaeece9a2da36b0cb33 | 0.145414 | 2.197471 | 2-4 | 0fdadee8c4f748f7b0540cd816bea0e5f90a426c153cdd05022935742daaaf14 | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <queue>
#include <cctype>
#include <climits>
#include <stack>
using namespace std;
int main() {
int n;
in... | #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <queue>
#include <cctype>
#include <climits>
#include <stack>
using namespace std;
int main() {
int n;
in... |
77c5b38d0a7e94e08fd7b36ec1e63ee5539ba0815364082ffedcb196a8093c45 | d0ef48a9dd7a6d3065f64f6c5491c0b180cab411f39944d14ffd4d645e6f08c3 | 0.019229 | cpp | d0ef48a9dd7a6d3065f64f6c5491c0b180cab411f39944d14ffd4d645e6f08c3 | a49ca54bae6005ffd6e1605229ade254cfc03f6494b718bcf2575a5b60373b70 | PIE_released_gem5_runtime | pie_11462 | p03257 | 65602af61ac682d757900f0ec6c54b7089bc2d98715972316e5792b21f0c3c52 | a49ca54bae6005ffd6e1605229ade254cfc03f6494b718bcf2575a5b60373b70 | 0.051969 | 2.702565 | 2-4 | 9c31b33177e0c7044368d80ed0af310056626e0b99815441ea32ba42225a7bd1 | #include <bits/stdc++.h>
using namespace std;
int n, cnt = 2;
long long res[507][507];
map<int, int> a, b;
int nxt()
{
while (1)
{
bool ok = 1;
for (int i = 2; i * i <= cnt && ok; i++)
if (cnt % i == 0)
ok = 0;
if (ok)
return cnt++;
cnt++;
}
return 0;
}
long lo... | #include <cstdio>
#include <algorithm>
#define int long long
using namespace std;
int n, a[1100][1100];
int tot, p[110000];
bool vis[110000];
void init() {
vis[1] = true;
for (int i = 2; i <= 10000; i++) {
if (!vis[i])
p[++tot] = i;
if (tot == 1000)
break;
for (int j = 1; j <= tot... |
6e0e2ba495a98b22239eb5fad606406ccd9950eb80b1d1569d44c57b3be5b2bf | d26dcc8b24dddb019c58d9eb3e88c5cbffba83dcef41fcbb599d064261f316dd | 0.081582 | cpp | d26dcc8b24dddb019c58d9eb3e88c5cbffba83dcef41fcbb599d064261f316dd | fb3c1fb0cee54ce3a137085083d8d840d6c5cb83285f329fdbccee5c8cea040c | PIE_released_gem5_runtime | pie_11473 | p03031 | 5e65410d741d1996fcbe353c6acb6aeacf3551e1e1a06400d8c4de6cc63b5429 | fb3c1fb0cee54ce3a137085083d8d840d6c5cb83285f329fdbccee5c8cea040c | 0.288989 | 3.542324 | 2-4 | 19dd71cd9db63a2220edfddca0cb2197d72a970b65492a83ff11d1e93d86d37e |
#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) {
... |
79d2268b85c78c155b93393679ca7f1976550a45b1583c10391d5c5ccb89243d | 57741927b63193dd2ef43e95bece568e195441a2064c13eadcb0a2d33c132011 | 0.072605 | cpp | 57741927b63193dd2ef43e95bece568e195441a2064c13eadcb0a2d33c132011 | 3038d624cc3f1725b4745160cc435912047fc9b727c8e69cfe13132c66c14c20 | PIE_released_gem5_runtime | pie_11474 | p03286 | 0bd3700a6ad67d85c2dca4e3db123df2ab746a51d80100bcf09965040512a6c3 | 3038d624cc3f1725b4745160cc435912047fc9b727c8e69cfe13132c66c14c20 | 0.253256 | 3.488116 | 2-4 | 3ee47a44465b5e1f5525dfbd389d60a8eae67a26ab749b04ee47ce3298eea2bd | #include <stdio.h>
#include <sstream>
#include <string.h>
#include <vector>
#include <map>
#include <algorithm>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <deque>
#include <limits>
#include <iomanip... | #include <stdio.h>
#include <sstream>
#include <string.h>
#include <vector>
#include <map>
#include <algorithm>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <deque>
#include <limits>
#include <iomanip... |
cee9210fba3cd8d5103f0a8b03eef2a4e3fe7d4d55b7d09203797cb0038c2280 | 370691dc67835c538e21802f571381c363c04a496db8207f3dfa0d53aecae903 | 0.019348 | cpp | 370691dc67835c538e21802f571381c363c04a496db8207f3dfa0d53aecae903 | 05479d6c68941e42eb7a7c5ee15510cb926f7414774d1caf35b328fb81bcd61b | PIE_released_gem5_runtime | pie_11501 | p03147 | e2306bc7a85786a184fc53392ec5d0d825e4609ae1d0f374879f0381923cf7e8 | 05479d6c68941e42eb7a7c5ee15510cb926f7414774d1caf35b328fb81bcd61b | 0.088848 | 4.592034 | 4-8 | e0f2fb6b7c3c91ecb8a2b5362b85b36e22fca4826dd1b74728af52865ef3f31a | #include <cstdio>
#include <vector>
#include <algorithm>
int main() {
int N;
scanf("%d", &N);
char *map[101];
for (int i = 0; i < 101; i++) {
map[i] = new char[N + 1];
map[i][0] = 0;
}
int tmp;
for (int i = 1; i < N + 1; i++) {
scanf("%d", &tmp);
for (int j = 0; j < 101; j++) ... | #include <cstdio>
#include <cstring>
int main() {
int N;
scanf("%d", &N);
char map[100][100 + 1];
memset(map, 0, sizeof(map));
int tmp;
for (int i = 1; i < N + 1; i++) {
scanf("%d", &tmp);
for (int j = 0; j < 100; j++) {
map[j][i] = (j < tmp) ? 1 : 0;
}
}
int count = 0;
... |
8af1e73fc92464604de159b143e92a83b1b6411c1b3ae484ca7476af33881a98 | db36ac389e19ba6e72fc3e6a0da0474dabc0e189305d8627e39f7192949ba6f2 | 0.106602 | cpp | db36ac389e19ba6e72fc3e6a0da0474dabc0e189305d8627e39f7192949ba6f2 | d949aa518cd2ef6f0937a3f161e3ca3bc1ea06e038ba1ba0cc980fd2ca5d930a | PIE_released_gem5_runtime | pie_11589 | p02678 | 580ec58d04c34aaa2cc4a320cbe0854f4e7f0500a0890f96f4b6f654d0289c7e | d949aa518cd2ef6f0937a3f161e3ca3bc1ea06e038ba1ba0cc980fd2ca5d930a | 1.178499 | 11.055096 | 8+ | 2da10ddc206743ca958ea0ee2258b6c569ad8898d6ba526e03bf7aa6075558cd | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll inf = 1e9;
#define sz 300005
#define Fast \
ios_base::sync_with_stdio(false); \
cin.t... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
ll n;
int visited[200005], high[200005];
typedef struct ANode {
long long adjvex;
struct ANode *nextarc;
} ArcNode;
typedef struct Vnode {
int count;
ArcNode *firstarc;
} VNode;
typedef struct node {
VNode adjlist[100005];
} Ad... |
e5894ae56b56ac1bfdaa77342d3fdd4baa5157a012a691de5dbc8d0e017c4eb2 | 42aba6d1bd026837fb9f0af46d094595f8b83c534cbed0649338d8eb591b76e3 | 0.020104 | cpp | 42aba6d1bd026837fb9f0af46d094595f8b83c534cbed0649338d8eb591b76e3 | 787a7be6a9f4be732c74f38c2a5f3da095bbb14884fc7f72cba67bbcda3fa335 | PIE_released_gem5_runtime | pie_11638 | p03684 | 165df3ae9ad4ac9893f454b369461a0c10af082d155b77c1cb6a0adcefb33097 | 787a7be6a9f4be732c74f38c2a5f3da095bbb14884fc7f72cba67bbcda3fa335 | 0.375012 | 18.653808 | 8+ | 60289534e07c5747333de43ca928c4cba4718ce37552927ec4ef63b45c9685a6 | #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 <stdio.h>
#include <stdlib.h>
#include <algorithm>
const int N = 100010, M = N + N;
int x[N], y[N], id[N], n;
typedef struct ufset *UFset;
struct ufset
{
int *parent;
int *root;
};
UFset UFinit(int size)
{
int e;
UFset U = (UFset)malloc(sizeof *U);
U->parent = (int *)malloc((size + 1) *... |
18baba4fbfb4c76846cfde8f64e8f203657bf68a2ad9aa0f3e72736bc7c471dc | 29e08bc06e1c44efbccbf7f2cb420e2030c4f5311f22fca38fb6b472b0eed876 | 0.019856 | cpp | 29e08bc06e1c44efbccbf7f2cb420e2030c4f5311f22fca38fb6b472b0eed876 | 5659ec34740aa665ebe04d6bb292e8de64889d9086d26d46b89c63bfb1c8d9dc | PIE_released_gem5_runtime | pie_11806 | p02728 | af1b94471e06bff5532e6101b158df333b97232b4938b0561e67c539b055ed24 | 5659ec34740aa665ebe04d6bb292e8de64889d9086d26d46b89c63bfb1c8d9dc | 0.625223 | 31.487494 | 8+ | 377310889c332ee7fed3b84af057d3d14f2a7b4fb262956dd13f878ce0e7756f | #include <iostream>
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cstring>
#include <complex>
#include <deque>
#include <functional>
#include <initializer_list>
#include <math.h>
#include <map>
#include <random>
#include <set>
#include <stack>
#include <tuple>
#inc... | #include <stdio.h>
#include <utility>
constexpr unsigned int MAX_INPUT_SIZE = 3'000'000;
char Input[MAX_INPUT_SIZE];
char *input = Input;
inline unsigned int get(void) {
unsigned int res = 0;
char c;
while ((c = *(input++) - '0') >= 0)
res = 10 * res + c;
return res;
}
constexpr unsigned int MAX_OU... |
17ff174c265cf330c3320dee3f95d22e178472c73a3c6dbae4218c6ded9ca94a | ab228e43742f4d1b68b9f5d6647a84297eba4aa536046d8140135bcbfaeaf881 | 0.043502 | cpp | ab228e43742f4d1b68b9f5d6647a84297eba4aa536046d8140135bcbfaeaf881 | 60f733f2491efee3931b5c3953e7e977e66ba6b65c61d67343d248e35a6d084a | PIE_released_gem5_runtime | pie_11858 | p00215 | a3b09beb4d88ff20c105e5540dc58e68eb0ab5403e8ac235012e282be09c271d | 60f733f2491efee3931b5c3953e7e977e66ba6b65c61d67343d248e35a6d084a | 0.119784 | 2.753537 | 2-4 | 854e2bcc28da81410c1724704dffe449b5d9db96031605cc7d0078f2932cc737 | #include <vector>
#include <map>
#include <algorithm>
#include <cstring>
#include <cstdio>
#define INF 1 << 28
using namespace std;
int sx, sy, gx, gy;
typedef pair<int, int> P;
vector<P> p[5];
int memo[5][5][1111];
int a, b;
int solve(int k, int t, int q) {
if (k == 4)
return abs(p[t][q].first - gx)... | #include <algorithm>
#include <cstring>
#include <cstdio>
#define INF 1 << 28
using namespace std;
int sx, sy, gx, gy;
int dx[5][1111], dy[5][1111], dn[5];
int memo[5][5][1111];
int a, b;
int solve(int k, int t, int q) {
if (k == 4)
return abs(dx[t][q] - gx) + abs(dy[t][q] - gy);
if (memo[k][t][q])
... |
06d4bac8c5900d4d488fcb6644300e03b4b774b878188b4eadfc6283070b7cc9 | f3551a99f3a82f4060322f1989e05b4f0d5d727b51e317dcee60427fba4f695d | 0.020055 | cpp | f3551a99f3a82f4060322f1989e05b4f0d5d727b51e317dcee60427fba4f695d | 68e171a1ecd6188b822777a650ed13b5507758f7699531e097bf107a8bba6227 | PIE_released_gem5_runtime | pie_12024 | p02777 | 1729b561b2a964e425e1d26e7622c3734d40f26c8234a80a90b4d2763a5c20fe | 68e171a1ecd6188b822777a650ed13b5507758f7699531e097bf107a8bba6227 | 0.105497 | 5.260265 | 4-8 | 0108237aa7a7eb74d4f49a02628086fd08971ab92a12ec85264ca7de5db60122 | #include <iostream>
using namespace std;
int main() {
string s, t, u;
int A, B;
cin >> s >> t;
cin >> A >> B;
cin >> u;
if (s == u) {
A--;
} else
B--;
cout << A << " " << B;
return 0;
} | #include <stdio.h>
#include <string.h>
int main()
{
int A, B;
char S[11];
char T[11];
char U[11];
scanf("%s %s", &S, &T);
scanf("%d %d", &A, &B);
scanf("%s", &U);
if (strcmp(S, U) == 0) {
A--;
printf("%d %d", A, B);
} else if (strcmp(T, U) == 0) {
B--;
printf("%d %d", A... |
86c7af143f1749d632b608358550df392f55b090fb8ea47371f6a40c2f492107 | b13268f0bb2f1c374d786a1f53169261de2f32c0deca0b3225989d3ee5350787 | 0.020162 | cpp | b13268f0bb2f1c374d786a1f53169261de2f32c0deca0b3225989d3ee5350787 | be2040d0a0f4a290387e74ae9bc85dba32827034a6d1fdefcea7c87ecde282ea | PIE_released_gem5_runtime | pie_12224 | p03221 | 9c9a1b3c093266ecbec6c9c84212fc03ad0b2b68c8f9ae0bb2a8057050117450 | be2040d0a0f4a290387e74ae9bc85dba32827034a6d1fdefcea7c87ecde282ea | 0.683466 | 33.897903 | 8+ | 320b2d4f758f659972261fdb9340bfec0743ba291a2f4627ca15e45a0ac077aa | #include <iostream>
#include <algorithm>
#include <cstring>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <cstdlib>
#include <iomanip>
#include <cmath>
#include <cassert>
#include <ctime>
#include <cstdlib>
#include <map>
#include <set>
using namespace std;
#pragma comme... | #include <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;
const int maxn = 1e5 + 5;
typedef struct Node {
int id, p, y, s;
} Node;
Node node[maxn] = {0};
bool cmp(Node &a, Node &b) {
if (a.p == b.p)
return a.y < b.y;
return a.p < b.p;
}
bool cov(Node &a, Node &b) { return a.id <... |
c9d1899eeee077dc5842e718ed548f0e803f1b82853610f5ca6c4ea0294a4f4c | 394bca5dd8d97abfcced30ba8bb5b9e5630ca38aaaddec6510d7a872e5261022 | 0.000186 | cpp | 394bca5dd8d97abfcced30ba8bb5b9e5630ca38aaaddec6510d7a872e5261022 | 132560ef44709a479f92288fade9934d1469682c360919ae1dd99e034984eaec | PIE_released_gem5_runtime | pie_12263 | p03731 | d0cc07ad0dadd4537098223052b06b3206cd5f76528ae44ce2b49e760de6012b | 132560ef44709a479f92288fade9934d1469682c360919ae1dd99e034984eaec | 0.001048 | 5.632897 | 4-8 | 5a8d235ff783f0f34ae1a46f60f454f9ecdb37bb5776a9016bf6d149b39f9444 | #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 ... |
72d0dc9b055126bb6b95a4cb1fceb5f5b55108941688eafe4109b6899687c6c0 | 417c7fc2f5915fc848258ba47c92ecca4a55a97bf1f17d0b9338041b19e6b330 | 0.015434 | cpp | 417c7fc2f5915fc848258ba47c92ecca4a55a97bf1f17d0b9338041b19e6b330 | b6812212bda411fed5a435434f3ab179efd73a7dcf68939942c015ef7c8854b6 | PIE_released_gem5_runtime | pie_12266 | p03143 | 5ef919e5155cd74dd3fb4610c9198b46f3fb3331b5ef173ba9c56ecce8105c6b | b6812212bda411fed5a435434f3ab179efd73a7dcf68939942c015ef7c8854b6 | 0.107119 | 6.940585 | 4-8 | 87ea39d025bca370493917d0e150641897ad5da274e12a05d31c89be5052d936 | #include <stdio.h>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
struct node {
node *l = nullptr;
node *r = nullptr;
node *p = nullptr;
long long val = 0;
long long sum = 0;
node() {}
};
void fix(node *x) {
x->sum = x->val;
if (x->l)
x->sum += x->l->sum;
... | #include <stdio.h>
#include <vector>
#include <algorithm>
#include <map>
using namespace std;
struct union_find {
int uf[100000];
long long sum[100000];
int id_[200000];
int uf_[200000];
long long sum_[200000];
int k;
int find(int x) {
while (uf[x] >= 0)
x = uf[x];
return x;
... |
1d3fade5fe5ceba2c306ee1cbf17fd343fb74f4e68205ac7db65f05d6ce118bd | 33825d124c73e58ebb30e892fcdad4b9de2d23dec644f40bf087fb2f49a91606 | 0.022134 | cpp | 33825d124c73e58ebb30e892fcdad4b9de2d23dec644f40bf087fb2f49a91606 | 8939fe20001a184692358cd7134cfa2c8299c04ee6781e5d76fbf8741bc80732 | PIE_released_gem5_runtime | pie_12274 | p01159 | a40e0e10dfbfc665028e6e7f1b19029684a4142220e28ab1276aa9e8ebd392ec | 8939fe20001a184692358cd7134cfa2c8299c04ee6781e5d76fbf8741bc80732 | 0.102132 | 4.614265 | 4-8 | 8d24618caf357409654f253577e1b10372e59651141490dd1f8f91cbe433b90a | #include <cstdio>
#include <vector>
#include <complex>
#include <algorithm>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
typedef complex<double> Point;
const double EPS = 1e-9;
namespace std {
bool operator<(const Point &a, const Point &b) {
return abs(a.real() - b.real()) < EPS ? (a... | #include <cstdio>
#include <algorithm>
#define rep(i, n) for (int i = 0; i < (n); i++)
using namespace std;
const double EPS = 1e-9;
struct Point {
double x, y;
};
int n;
Point _f[100], _g[100];
double f(double x) {
if (x < _f[0].x)
return 0;
rep(i, n - 1) {
double x1 = _f[i].x, x2 = _f[i + 1].... |
4fbd8c267eddace97751fedd4b403bd14192708b34abf2fec5278136973a2d72 | 7a64d925443a662e55742078e36307e61cba60b7f325363b6e272ea67e7bf752 | 0.111524 | cpp | 7a64d925443a662e55742078e36307e61cba60b7f325363b6e272ea67e7bf752 | e3e316deaaaf5d25bea0ebbc24257796299369b81ac12f8dc5d60fe0bca76246 | PIE_released_gem5_runtime | pie_12283 | p02549 | dab18090588a70f47a577bc6f8e2a3a6ed8438e0f2db554fcdd78c695b2e77a5 | e3e316deaaaf5d25bea0ebbc24257796299369b81ac12f8dc5d60fe0bca76246 | 0.814588 | 7.304152 | 4-8 | 17c926d768945da509dfbae9354556650f8f7e59486e347c8b0f49713555aa1d | #include <iostream>
#include <vector>
#include <deque>
#include <algorithm>
#include <numeric>
#include <string>
#include <cstring>
#include <list>
#include <unordered_set>
#include <tuple>
#include <cmath>
#include <limits>
#include <type_traits>
#include <iomanip>
#include <map>
#include <unordered_map... | #include <iostream>
#include <vector>
#include <deque>
#include <algorithm>
#include <numeric>
#include <string>
#include <cstring>
#include <list>
#include <unordered_set>
#include <tuple>
#include <cmath>
#include <limits>
#include <type_traits>
#include <iomanip>
#include <map>
#include <unordered_map... |
b29ce1a232f0ca1962639f594e4df8a9f399e39ff07483defa54d48db8cf648a | 9d5515731ea0bf45dc04c1bf1ed4444dffb412430f5835a5b3bffbfae8af88e0 | 0.008895 | cpp | 9d5515731ea0bf45dc04c1bf1ed4444dffb412430f5835a5b3bffbfae8af88e0 | 553e4fb16f8674b02781c37eae409f1b23febf51e151f97bcc5e1238f188ad5f | PIE_released_gem5_runtime | pie_12301 | p03283 | 388bdb7178e0036cbca4ab1e2f764d71d35a23695febf7390764ec310a4789f2 | 553e4fb16f8674b02781c37eae409f1b23febf51e151f97bcc5e1238f188ad5f | 0.237339 | 26.682625 | 8+ | 3792685de681d1cc871cf3165e51202431c3bd11b8749cd4748283289a738d2b | #include <bits/stdc++.h>
using namespace std;
int dp[1010][1010];
int main()
{
int n, m, q, i, x, y, j, k;
scanf("%d%d%d", &n, &m, &q);
memset(dp, 0, sizeof(dp));
for (i = 1; i <= m; i++)
{
scanf("%d%d", &x, &y);
dp[x][y]++;
}
for (j = 1; j < n; j++)
for (i = 1; i + j <= n; i++)
... |
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int NN = 700;
int x, y, ans, n, m, q, a[NN][NN], b[NN][NN], c[NN][NN];
int main() {
scanf("%d%d%d", &n, &m, &q);
for (int i = 1; i <= m; i++) {
scanf("%d%d", &x, &y);
a[x][y]++;
}
for (int i = 1; i <= n; i+... |
End of preview. Expand in Data Studio
Program Pair Data
This dataset contains 2,700 main-evaluation program pairs. Each language has
one test split with 900 pairs.
| Configuration | Pairs | Problems | Maximum pairs per problem |
|---|---|---|---|
cpp |
900 | 900 | 1 |
python |
900 | 221 | 5 |
java |
900 | 320 | 5 |
Each language contains 300 pairs in each slow-to-fast execution-cost ratio range: [2, 4), [4, 8), and [8, infinity).
Fields
language,problem_id,pair_id: language, task and comparison identifiers.slow_code,fast_code: exact model-facing program text, ordered by the saved efficiency labels.slow_code_id,fast_code_id: SHA-256 hashes of the displayed source text.measured_slow_code_id,measured_fast_code_id: SHA-256 identifiers of the measured source programs, which can differ from the displayed source.slow_id,fast_id: measured implementation identifiers.speedup: the saved slow-to-fast execution-cost ratio.measurement_metric: PIE released gem5 runtime for C++, CPU instruction count for Python, or elapsed execution time for Java.stratum,sampling_key: ratio stratum and deterministic sampling key.slow_time,fast_time: released aggregate costs, present for C++.
The Python and Java ratios aggregate per-input measurement ratios; they are not reconstructed as ratios of aggregate times. Test inputs, expected outputs, per-run measurements and original measured-source text are not included. This dataset provides the program pairs and saved efficiency labels used in the main evaluation.
Loading
from datasets import load_dataset
data = load_dataset("JinNian0072/program-pair-data", "python", split="test")
assert len(data) == 900
print(data[0]["slow_code"], data[0]["fast_code"])
Use cpp or java for the other languages. The JSONL files are uncompressed.
RELEASE.json contains record counts and file checksums. Upstream code and
data retain their respective terms.
- Downloads last month
- 422