Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- For c and c++ try this-
- Create a file named input.txt in the same folder as your solution program(.c or .cpp file) is in.
- Then modify your code this way-
- // your include statemnts
- #include<time.h>
- #include<stdio.h>
- int main()
- {
- freopen("input.txt","r",stdin);
- double start=clock();
- /*
- your solution code here
- */
- double end=clock();
- printf("\n\nTotal runtime = %lf ms",(end-start)*1000/CLOCKS_PER_SEC);
- return 0;
- }
- Now compile and run the program.
- # Don't forget to remove the freopen(...) statement before submitting your code
Add Comment
Please, Sign In to add comment