QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#516384#1. I/O TestLIUIR200 ✓229ms6632kbC++142.4kb2024-08-12 16:40:292024-08-12 16:40:29

Judging History

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

  • [2024-08-12 16:40:29]
  • 评测
  • 测评结果:200
  • 用时:229ms
  • 内存:6632kb
  • [2024-08-12 16:40:29]
  • 提交

config.txt

10000000 10000000

input_test

#include <bits/stdc++.h>
#define ll long long

namespace IO
{
	char buf[1 << 21], *p1 = buf, *p2 = buf;
	char Gc(){return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++;}
	int Read()
	{
		int x = 0, f = 1;
		char ch = Gc();
		while(ch < '0' || ch > '9')
		{
			if (ch == '-')
				f = -1;
			ch = Gc();
		}
		while(ch >= '0' && ch <= '9')
			x = (x << 1) + (x << 3) + (ch ^ 48), ch = Gc();
		return x * f;
	}
	char pbuf[1 << 21], *pp = pbuf;
	void Flush(){fwrite(pbuf, 1, pp - pbuf, stdout), pp = pbuf;}
	void Pc(char c){if (pp - pbuf == 1 << 21) Flush(); *pp++ = c;}
	void Write(ll x)
	{
		static int top = 0, sta[20];
		if (x < 0)
			Pc('-'), x = -x;
		do
		{
			sta[++top] = x % 10;
			x /= 10;
		}while(x);
		while(top)
			Pc(sta[top--] + '0');
	}
	void Write(ll x, char c){Write(x), Pc(c);}
}

using namespace std;
using namespace IO;

signed main()
{
	//freopen("out.txt", "w", stdout);
	int n = Read();
	ll ans = 0;
	for (int i = 1; i <= n; i++)
		ans += Read();
	Write(ans);
	/*int n = Read(), x = 1e8;
	for (int i = 1; i <= n; i++)
		Write(x, ' ');
	int n = Read(), x = 1e8;
	Write(n, '\n');
	for (int i = 1; i <= n; i++)
		Write(i, ' ');*/
	Flush();
	return 0;
}

output_test

#include <bits/stdc++.h>
#define ll long long

namespace IO
{
	char buf[1 << 21], *p1 = buf, *p2 = buf;
	char Gc(){return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 1 << 21, stdin), p1 == p2) ? EOF : *p1++;}
	int Read()
	{
		int x = 0, f = 1;
		char ch = Gc();
		while(ch < '0' || ch > '9')
		{
			if (ch == '-')
				f = -1;
			ch = Gc();
		}
		while(ch >= '0' && ch <= '9')
			x = (x << 1) + (x << 3) + (ch ^ 48), ch = Gc();
		return x * f;
	}
	char pbuf[1 << 21], *pp = pbuf;
	void Flush(){fwrite(pbuf, 1, pp - pbuf, stdout), pp = pbuf;}
	void Pc(char c){if (pp - pbuf == 1 << 21) Flush(); *pp++ = c;}
	void Write(ll x)
	{
		static int top = 0, sta[20];
		if (x < 0)
			Pc('-'), x = -x;
		do
		{
			sta[++top] = x % 10;
			x /= 10;
		}while(x);
		while(top)
			Pc(sta[top--] + '0');
	}
	void Write(ll x, char c){Write(x), Pc(c);}
}

using namespace std;
using namespace IO;

signed main()
{
	/*int n = Read();
	ll ans = 0;
	for (int i = 1; i <= n; i++)
		ans += Read();
	Write(ans);*/
	int n = Read(), x = 1e8;
	for (int i = 1; i <= n; i++)
		Write(x, ' ');
	Flush();
	return 0;
}

詳細信息

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 78ms
memory: 6452kb

input:

10000000
743802125 852946172 315038549 895006835 707799603 350071587 973227275 368271608 719633509 381503416 174791672 185346854 252609897 464167941 429742527 117988309 744597550 649500701 973597768 618721303 236657513 358014430 881686897 298020709 451862323 495084679 633565279 719497626 669998411 1...

output:

5498482391943724

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 229ms
memory: 6632kb

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