Loading

timer

看本地机子的大概速度代码

#include<bits/stdc++.h>
#define now_time ((int)(((double)clock()/CLOCKS_PER_SEC)*1000))

using namespace std;
using ll=long long;
using ull=unsigned long long;

auto rnd=mt19937_64(chrono::steady_clock::now().time_since_epoch().count());

int main(){
    ll all_cnt=0,all=10;
    for(ll _=1;_<=all;++_){
        ll cnt=0;
        ll st=now_time;
        ull tot=1;
        for(ll $=1;$<=50000000;++$){
            tot*=rnd();
            tot%=rnd();
        }
        ll ed=now_time;
        cnt=100000000000ll/(ed-st);
        cout<<"_ : "<<cnt<<"\n";
        all_cnt+=cnt;
    }
    cout<<"all: "<<all_cnt/all<<"\n";
    return 0;
}
posted @ 2026-11-10 16:28  FallInDream  阅读(15)  评论(0)    收藏  举报