Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <cstdlib>
- #include <ctime>
- #include <vector>
- using namespace std;
- /************************/
- long long seed = time(NULL)+87;
- long long random_(){
- return seed = (seed * 0xdefaced + 1) % 1298951;
- }
- int main(){
- int t1=time(NULL);
- vector<long long*> p;
- long long *tmp;
- printf("電腦毀滅中......請稍等\n");
- while((tmp= (long long*)calloc(1,sizeof(long long)) )!= NULL){
- *tmp = random_();
- p.emplace_back(tmp);
- }
- int t2=time(NULL);
- printf("你的電腦活了:%lf\n",difftime(t2,t1));
- while(!p.empty()){
- free(p.back());
- p.pop_back();
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement