Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <ctime>
- #include <cstdlib>
- using namespace std;
- ofstream ofs("problema.in");
- int main()
- {
- double d=clock();
- int minim=-100, maxim=100, n=1000000;
- srand(time(NULL));
- ofs<<n<<"\n";
- for(int i=0; i<n; i++)
- {
- int l = rand()*rand();
- l=minim+l%(maxim-minim+1);
- ofs<<l<<" ";
- }
- cout<<(clock()-d)/CLOCKS_PER_SEC<<"s";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement