Advertisement
shahil_005

Execution time of program

Feb 10th, 2021
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. #define debug(...) fprintf(stderr, __VA_ARGS__), fflush(stderr)
  5. #define time__(d) \
  6.     for ( \
  7.         auto blockTime = make_pair(chrono::high_resolution_clock::now(), true); \
  8.         blockTime.second; \
  9.         debug("%s: %lld ms\n", d, chrono::duration_cast<chrono::milliseconds>(chrono::high_resolution_clock::now() - blockTime.first).count()), blockTime.second = false \
  10. )
  11. void solve()
  12. {
  13. }          
  14. int32_t main()
  15. {
  16.         int tc=1;
  17.         // cin>>tc;
  18.         while(tc--){
  19.                 time__("solve"){
  20.                     solve();
  21.             }
  22.         }
  23.    
  24.         return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement