-
-
Save key-moon/089e58fd7291e5f0ad3d0b36304f143e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
using ll = long long; | |
int main(){ | |
bitset<50000> bs; | |
bs[0] = 1; | |
ll t = (ll)1e6; | |
for (ll i = 0; i < t; i++) { | |
bs ^= bs >> 12; | |
bs ^= bs << 30; | |
} | |
cout << bs.count() << endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma GCC target("arch=x86-64-v4") | |
#pragma GCC optimize("Ofast") | |
#include<bits/stdc++.h> | |
using namespace std; | |
using ll = long long; | |
int main(){ | |
bitset<50000> bs; | |
bs[0] = 1; | |
ll t = (ll)1e6; | |
for (ll i = 0; i < t; i++) { | |
bs ^= bs >> 12; | |
bs ^= bs << 30; | |
} | |
cout << bs.count() << endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma GCC target("arch=x86-64-v4") | |
#pragma GCC optimize("Ofast") | |
#include<bits/stdc++.h> | |
using namespace std; | |
using ll = long long; | |
int main(){ | |
ll s = 1; | |
ll t = (ll)1e3; | |
ll b = (ll)1e4; | |
set<ll> st; | |
for (ll i = 0; i < t; i++) { | |
st.clear(); | |
for (int i = 0; i < b; i++) { | |
s *= 0xcafebabedeadbeef; | |
st.emplace(s); | |
} | |
} | |
_exit(0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma GCC target("arch=x86-64-v4") | |
#pragma GCC optimize("Ofast") | |
#include<bits/stdc++.h> | |
using namespace std; | |
using ll = long long; | |
int main(){ | |
ll s = 1; | |
ll t = (ll)1e3; | |
ll b = (ll)1e4; | |
unordered_set<ll> st; | |
for (ll i = 0; i < t; i++) { | |
st.clear(); | |
for (int i = 0; i < b; i++) { | |
s *= 0xcafebabedeadbeef; | |
st.emplace(s); | |
} | |
} | |
_exit(0); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
int main() { | |
int size = 100000; | |
vector<int> hoge(size); | |
iota(hoge.begin(), hoge.end(), 0); | |
for (int j = 0; j < size; j++) | |
for (int i = 0; i < 1e5; i++) | |
hoge[j] ^= hoge[j] << 10; | |
int res = accumulate(hoge.begin(), hoge.end(), 0); | |
cout << res << endl; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma GCC target("arch=x86-64-v4") | |
#pragma GCC optimize("Ofast") | |
#include<bits/stdc++.h> | |
using namespace std; | |
int main() { | |
int size = 100000; | |
vector<int> hoge(size); | |
iota(hoge.begin(), hoge.end(), 0); | |
for (int j = 0; j < size; j++) | |
for (int i = 0; i < 1e5; i++) | |
hoge[j] ^= hoge[j] << 10; | |
int res = accumulate(hoge.begin(), hoge.end(), 0); | |
cout << res << endl; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment