C++temp
unknown
c_cpp
a year ago
1.2 kB
11
Indexable
#include <bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
using namespace std;
//SIEVE
// ll sv[50000] = {0};
// void sieve(){
// memset(sv, false, sizeof(sv));
// sv[0] = sv[1] = true;
// for (int i = 4; i < sizeof(sv); i += 2) {
// sv[i] = true;
// }
// for (int i = 3; i * i <= sizeof(sv); i += 2){
// if (!sv[i]) continue;
// for (int j = i * i ; j < sizeof(sv) ; j += i + i) {
// sv[j] = true;
// }
// }
// }
//SIEVE
//Euler’s totient
// void phi_1_to_n(int n) {
// vector<int> phi(n + 1);
// for (int i = 0; i <= n; i++) {
// phi[i] = i;
// }
// for (int i = 2; i <= n; i++) {
// if (phi[i] == i) {
// for (int j = i; j <= n; j += i) {
// phi[j] -= phi[j] / i;
// }
// }
// }
// }
//Euler’s totient
void solve()
{
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(NULL);
#ifndef ONLINE_JUDGE
freopen("input.txt", "r", stdin);
freopen("output.txt", "w", stdout);
#endif
ll tc;
cin >> tc;
while (tc--)
{
solve();
}
return 0;
}Editor is loading...
Leave a Comment