fork(1) download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. typedef long long ll;
  4. #define all(x) begin(x), end(x)
  5.  
  6. const int N = 1e4;
  7. mt19937 rnd;
  8. int a[N], b[N];
  9.  
  10. int main() {
  11. for (int i = 0; i < N; ++i) {
  12. a[i] = rnd();
  13. }
  14. for (int i = 0; i < N; ++i) {
  15. b[i] = rnd();
  16. }
  17.  
  18. auto st = chrono::system_clock::now();
  19.  
  20. int h = 0;
  21. for (int it = 0; it < N; ++it) {
  22. for (int i = 0; i < N; ++i) {
  23. int cur = a[i] / b[i];
  24. h += cur;
  25. }
  26. }
  27.  
  28. auto fn = chrono::system_clock::now();
  29.  
  30. assert(h != 19);
  31.  
  32. cout << fixed << setprecision(1) << 1000 * chrono::duration<double>(fn - st).count() << endl;
  33.  
  34. return 0;
  35. }
  36.  
Success #stdin #stdout 0.24s 4500KB
stdin
Standard input is empty
stdout
236.5