浅谈吸氧对 OI 的作用
本人的 CPU 配置为四核八线程 11th Gen Intel(R) Core(TM) [email protected],RAM 为 16 GB。标准为 C++14。
测试
P2261 暴力版。
Code:
int main() {
auto tm = clock();
srand(time(0));
F(T, 1, 5) {
int ans = 0, k = rand();
F(i, 1, 1000000000) { ans += i % k; }
writeln(ans);
}
printf("Cost Time: %d ms", (int)(clock() - tm));
EXIT;
}
厌氧:共
吸氧:共
臭氧:共
测试
int main() {
auto tm = clock();
srand(time(0));
F(T, 1, 5) {
long long ans = 1, k = rand(), r = rand();
F(i, 1, 1000000000 - r)(ans *= k) %= 998244353;
printf("%lld\n", ans);
}
printf("Cost Time: %d ms", (int)(clock() - tm));
EXIT;
}
厌氧:共
吸氧:共
臭氧:共