QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#524646#1. I/O TestCHD200 ✓195ms2276kbC++142.6kb2024-08-19 22:12:032024-08-19 22:12:04

Judging History

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

  • [2024-08-19 22:12:04]
  • 评测
  • 测评结果:200
  • 用时:195ms
  • 内存:2276kb
  • [2024-08-19 22:12:03]
  • 提交

config.txt

10000000 10000000

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: 100
Accepted

Test #1:

score: 100
Accepted
time: 195ms
memory: 2220kb

input:

10000000
375919738 793677740 483440897 685777349 158167798 412416192 747157420 423550579 497219522 558452348 320796631 899590160 414119013 238659621 124188608 955779591 552364841 158563552 991134319 340266233 298510146 848509740 363801363 738656491 101886412 130924113 628033033 396651080 262842734 2...

output:

5500359952461854

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 178ms
memory: 2276kb

input:

10000000

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 1.0 output test passed