From 661d50d5da1c564ecc7b58fe0102b4250559722c Mon Sep 17 00:00:00 2001 From: Hizenberg Date: Fri, 15 Mar 2024 22:28:49 +0530 Subject: [PATCH] Runtime snippet added --- cpadv.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpadv.cpp b/cpadv.cpp index 8a1afbf..72e1eee 100644 --- a/cpadv.cpp +++ b/cpadv.cpp @@ -40,6 +40,8 @@ using namespace std; #define loop(i,s,e,weight) for(auto i = s ; (weight>=0? i <= e : i >= e ) ; i+=weight ) #define read(n) ll n; cin>>n #define endl '\n' +#define ALGO_START clock_t z = clock() +#define ALGO_END cout << "RUN TIME : " << fixed << setprecision(6) << ((double)(clock() - z))/CLOCKS_PER_SEC //endl -> cout << '\n' << flush;//hence,slower. //for interactive problem. @@ -170,4 +172,4 @@ int32_t main() // cerr << "Run Time : " << ((double)(clock() - z) / CLOCKS_PER_SEC); //cerr= c error. return 0; -} \ No newline at end of file +}