#include using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 10000000000000000 unsigned long xor128() { static unsigned long x=123456789, y=362436069, z=521288629, w=88675123; unsigned long t=(x^(x<<11)); x=y; y=z; z=w; return (w=(w^(w>>19))^(t^(t>>8))); } int main(){ double time; chrono::system_clock::time_point start_time; start_time = chrono::system_clock::now(); double LIMIT = 1900.0; int N; cin>>N; vector a(N); for(int i=0;i>a[i]; } sort(a.begin(),a.end()); long long ans = 0; while(true){ chrono::system_clock::time_point now_time = chrono::system_clock::now(); double time = static_cast(chrono::duration_cast(now_time - start_time).count()/1000.0); if(time>=LIMIT)break; int m = xor128()%N; long long score = 0; for(int i=0;i