Pagini recente » Cod sursa (job #134159) | Cod sursa (job #1389658) | Cod sursa (job #3190221) | Cod sursa (job #2999966) | Cod sursa (job #1788087)
// anti unordered_* generator
#include <bits/stdc++.h>
using namespace std;
int main() {
ifstream cin("hashuri.in");
ofstream cout("hashuri.out");
cin.tie(0);
ios_base::sync_with_stdio(false);
const vector<int> MOD = {2, 5, 11, 23, 47, 97, 199, 409, 823, 1741, 3739, 7517, 15173, 30727, 62233, 126271, 256279, 520241, 1056323, 2144977, 4355707, 8844859, 17961079};
int n; cin >> n;
int mod = *upper_bound(MOD.begin(), MOD.end(), n - 1);
unordered_set<int> hash_set;
for (int iter = 0; iter < n; iter += 1) {
hash_set.insert(mod * iter);
}
return 0;
}