QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#666144#1. I/O TestChenJiarun12345200 ✓223ms82112kbC++143.1kb2024-10-22 16:48:592024-10-22 16:49:05

Judging History

你现在查看的是最新测评结果

  • [2024-10-22 16:49:05]
  • 评测
  • 测评结果:200
  • 用时:223ms
  • 内存:82112kb
  • [2024-10-22 16:48:59]
  • 提交

config.txt

10000000
10000000

input_test

/*
想到二分就做完了
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 0x3f3f3f3f3f3f3f3fll
#define For(i,l,r) for(register int i=(l);i<=(r);i++)
#define Rof(i,l,r) for(register int i=(l);i>=(r);i--)
#define bug cout<<"Ln:"<<__LINE__<<'\n'
bool M_S;
namespace IO{
    const int BS=200000;
    char ob[BS],*z=ob,ib[BS],*x=ib,*y=ib;
    char gc(){if(x==y) y=(x=ib)+fread(ib,1,BS,stdin);if(x==y) return EOF;return *x++;}
    template<class T> void rd(T &x){
		x=0;char c=gc();bool flag=false;
		while(!isdigit(c)&&c!='-') c=gc();
        if(c=='-') flag=1,c=gc();
		while(isdigit(c)) x=x*10+c-'0',c=gc();
		if(flag) x=-x;
	}
	inline void flush(){fwrite(ob,1,z-ob,stdout),z=ob;} 
	inline void pc(char x){if(z==ob+BS-1)flush();*z=x,++z;}
	#define kg pc(' ')
	#define dn pc('\n')
	template<class T> void wr(T x){
        if(x==0) return pc('0'),void();
		if(x<0) pc('-'),x=-x;
		int stk[30],top=0;
		do stk[++top]=x%10,x/=10; while(x);
		while(top) pc(stk[top--]+'0');
	}
	struct _Flusher{~_Flusher(){flush();}}_flusher;
}
using namespace IO;
const int N=10000005;
int n,a[N];
void MAIN(int TEST){
	rd(n);int sum=0;
	For(i,1,n) rd(a[i]),sum+=a[i];
	wr(sum);
}

bool M_T;
signed main(){
	// freopen(".in","r",stdin);
	// freopen(".out","w",stdout);
	double T_S=clock();
	// cerr<<"Memory: "<<1.0*(&M_S-&M_T)/1048576<<"MiB\n";

	int test=1;
	// cin>>test;
	For(TEST,1,test) MAIN(TEST);
	
	double T_T=clock();
	// cerr<<"Time: "<<1.0*(T_T-T_S)/CLOCKS_PER_SEC<<"ms\n";
	return 0;
}

output_test

/*
想到二分就做完了
*/
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define inf 0x3f3f3f3f3f3f3f3fll
#define For(i,l,r) for(register int i=(l);i<=(r);i++)
#define Rof(i,l,r) for(register int i=(l);i>=(r);i--)
#define bug cout<<"Ln:"<<__LINE__<<'\n'
bool M_S;
namespace IO{
    const int BS=200000;
    char ob[BS],*z=ob,ib[BS],*x=ib,*y=ib;
    char gc(){if(x==y) y=(x=ib)+fread(ib,1,BS,stdin);if(x==y) return EOF;return *x++;}
    template<class T> void rd(T &x){
		x=0;char c=gc();bool flag=false;
		while(!isdigit(c)&&c!='-') c=gc();
        if(c=='-') flag=1,c=gc();
		while(isdigit(c)) x=x*10+c-'0',c=gc();
		if(flag) x=-x;
	}
	inline void flush(){fwrite(ob,1,z-ob,stdout),z=ob;} 
	inline void pc(char x){if(z==ob+BS-1)flush();*z=x,++z;}
	#define kg pc(' ')
	#define dn pc('\n')
	template<class T> void wr(T x){
        if(x==0) return pc('0'),void();
		if(x<0) pc('-'),x=-x;
		int stk[30],top=0;
		do stk[++top]=x%10,x/=10; while(x);
		while(top) pc(stk[top--]+'0');
	}
	struct _Flusher{~_Flusher(){flush();}}_flusher;
}
using namespace IO;
const int N=10000005;
int n,a[N];
void MAIN(int TEST){
	rd(n);
	For(i,1,n) wr(100000000),kg;
}

bool M_T;
signed main(){
	// freopen(".in","r",stdin);
	// freopen(".out","w",stdout);
	double T_S=clock();
	// cerr<<"Memory: "<<1.0*(&M_S-&M_T)/1048576<<"MiB\n";

	int test=1;
	// cin>>test;
	For(TEST,1,test) MAIN(TEST);
	
	double T_T=clock();
	// cerr<<"Time: "<<1.0*(T_T-T_S)/CLOCKS_PER_SEC<<"ms\n";
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 193ms
memory: 82112kb

input:

10000000
556439211 174095722 825317012 673888854 126848783 830909024 501465167 579737645 870226568 728351327 846135673 941069909 106724647 477745382 159159761 927928899 266903763 227233990 763057762 985311037 243974924 590155474 560099218 824581232 225698633 366213804 427661547 552791790 114782151 4...

output:

5500478184796708

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 223ms
memory: 5980kb

input:

10000000

output:

100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 ...

result:

points 1.0 output test passed