QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#524645#1. I/O TestCHD20 20ms2300kbC++142.6kb2024-08-19 22:11:072024-08-19 22:11:08

Judging History

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

  • [2024-08-19 22:11:08]
  • 评测
  • 测评结果:20
  • 用时:20ms
  • 内存:2300kb
  • [2024-08-19 22:11:07]
  • 提交

config.txt

1000000 1000000

input_test

#include<cstdio>
using namespace std;
namespace my_fastIO
{
	const int st_max=1000000;
	int top_in,num_in,top_out;
	char in_stack[st_max+100],out_stack[st_max+100];
	char input()
	{
		if(top_in>=num_in)
		{
			top_in=0;
			num_in=fread(in_stack,1,st_max,stdin);
		}
		if(num_in==0)
		return 0;
		return in_stack[top_in++];
	}
	void output(char c)
	{
		if(top_out==st_max)
		{
			fwrite(out_stack,1,top_out,stdout);
			top_out=0;
		}
		out_stack[top_out++]=c;
	}
	void read(){}
	template<typename T>void read(T &x)
	{
		char c=input();
		while(c<'0'||c>'9')
		c=input();
		x=c-'0';
		while(1)
		{
			c=input();
			if(c<'0'||c>'9')
			return;
			x=x*10+c-'0';
		}
	}
	template<typename T,typename ...Ts>void read(T &a,Ts &...ts)
	{
		read(a);
		read(ts...);
	}
	void print(){}
	template<typename T>void print(T x)
	{
		if(x<10)
		output((char)(x+'0'));
		else
		{
			print(x/10);
			output((char)(x%10+'0'));
		}
	}
	template<typename T,typename ...Ts>void print(T a,Ts ...ts)
	{
		print(a);
		output(' ');
		print(ts...);
	}
	void fwrap()
	{
		output('\n');
		fwrite(out_stack,1,top_out,stdout);
		top_out=0;
	}
}
using namespace my_fastIO;
int n,i,a;
long long sum;
main()
{
	read(n);
	for(i=1;i<=n;i++)
	{
		read(a);
		sum+=a;
	}
	print(sum);
	fwrap();
}

output_test

#include<cstdio>
using namespace std;
namespace my_fastIO
{
	const int st_max=1000000;
	int top_in,num_in,top_out;
	char in_stack[st_max+100],out_stack[st_max+100];
	char input()
	{
		if(top_in>=num_in)
		{
			top_in=0;
			num_in=fread(in_stack,1,st_max,stdin);
		}
		if(num_in==0)
		return 0;
		return in_stack[top_in++];
	}
	void output(char c)
	{
		if(top_out==st_max)
		{
			fwrite(out_stack,1,top_out,stdout);
			top_out=0;
		}
		out_stack[top_out++]=c;
	}
	void read(){}
	template<typename T>void read(T &x)
	{
		char c=input();
		while(c<'0'||c>'9')
		c=input();
		x=c-'0';
		while(1)
		{
			c=input();
			if(c<'0'||c>'9')
			return;
			x=x*10+c-'0';
		}
	}
	template<typename T,typename ...Ts>void read(T &a,Ts &...ts)
	{
		read(a);
		read(ts...);
	}
	void print(){}
	template<typename T>void print(T x)
	{
		if(x<10)
		output((char)(x+'0'));
		else
		{
			print(x/10);
			output((char)(x%10+'0'));
		}
	}
	template<typename T,typename ...Ts>void print(T a,Ts ...ts)
	{
		print(a);
		output(' ');
		print(ts...);
	}
	void fwrap()
	{
		output('\n');
		fwrite(out_stack,1,top_out,stdout);
		top_out=0;
	}
}
using namespace my_fastIO;
int n,i,z;
long long sum;
main()
{
	read(n);
	for(i=1;i<=n;i++)
	{
		print(i+100000000);
		output(' ');
	}
	fwrap();
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 10
Acceptable Answer

Test #1:

score: 10
Acceptable Answer
time: 20ms
memory: 2264kb

input:

1000000
937810401 625398731 273030861 725922910 104300681 138740949 290429841 396070282 856186842 177354138 844787732 139102041 861383994 183198313 530362314 111583619 615789157 273302027 383842416 440548741 664355740 322507015 850564272 789621751 324451082 580111890 543042633 103167551 177823347 66...

output:

549881870831409

result:

points 0.10 input test passed

Subtask #2:

score: 10
Acceptable Answer

Test #2:

score: 10
Acceptable Answer
time: 13ms
memory: 2300kb

input:

1000000

output:

100000001 100000002 100000003 100000004 100000005 100000006 100000007 100000008 100000009 100000010 100000011 100000012 100000013 100000014 100000015 100000016 100000017 100000018 100000019 100000020 100000021 100000022 100000023 100000024 100000025 100000026 100000027 100000028 100000029 100000030 ...

result:

points 0.10 output test passed