# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
913800 | daoquanglinh2007 | Energetic turtle (IZhO11_turtle) | C++17 | 810 ms | 28140 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define pii pair <int, int>
#define fi first
#define se second
#define mp make_pair
#define isz(a) (int)(a).size()
const int NM = 6e5, KM = 20;
int N, M, K, T, Z;
pii P[KM+5];
int pfac[NM+5], cnt[NM+5];
vector <int> have;
int C[KM+5][KM+5], f[KM+5][KM+5], dp[KM+5][KM+5], ans = 0;
int nCk(int n, int k){
if (k < 0 || k > n) return 0;
for (int i = n-k+1; i <= n; i++){
int x = i;
while (x > 1){
cnt[pfac[x]]++;
if (cnt[pfac[x]] == 1) have.push_back(pfac[x]);
x /= pfac[x];
}
}
for (int i = 2; i <= k; i++){
int x = i;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |