Untitled
unknown
c_cpp
a year ago
1.6 kB
13
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
//DFS
// vector<vector<int>> adj;
// vector<bool> visited;
// void dfs(int v) {
// visited[v] = true;
// for (int u : adj[v]) {
// if (!visited[u])
// dfs(u);
// }
// }
//DFS
//Bitwise
// #define BIT_SET(a,b) ((a) |= (1ULL<<(b)))
// #define BIT_CLEAR(a,b) ((a) &= ~(1ULL<<(b)))
// #define BIT_FLIP(a,b) ((a) ^= (1ULL<<(b)))
//Bitwise
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