QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#180727#1. I/O Test5ab100 80ms1752kbC++201.2kb2023-09-16 10:54:432023-09-16 10:54:44

Judging History

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

  • [2023-09-16 10:54:44]
  • 评测
  • 测评结果:100
  • 用时:80ms
  • 内存:1752kb
  • [2023-09-16 10:54:43]
  • 提交

config.txt

10000000 0

input_test

#include <cstdio>
#include <cstring>
using namespace std;

static constexpr size_t buf_size = 1 << 18;
static constexpr size_t integer_size = 20;

static char inbuf[buf_size + 1] = {};

namespace {
size_t pos, end;

void load() {
	end = fread(inbuf, 1, buf_size, stdin);
	inbuf[end] = '\0';
}
void reload() {
	size_t len = end - pos;
	memmove(inbuf, inbuf + pos, len);
	end = len + fread(inbuf + len, 1, buf_size - len, stdin);
	inbuf[end] = '\0';
	pos = 0;
}
void skip_space() {
	while (inbuf[pos] <= ' ') {
		if (__builtin_expect(++pos == end, 0))
			reload();
	}
}
char get_next() { return inbuf[pos++]; }
char get_next_nonspace() {
	skip_space();
	return inbuf[pos++];
}

template<class T>
void scan(T &x) {
	char c = get_next_nonspace();
	if (__builtin_expect(pos + integer_size >= end, 0))
		reload();
	bool neg = false;
	if (c == '-')
		neg = true, x = 0;
	else
		x = c & 15;
	while ((c = get_next()) >= '0')
		x = x * 10 + (c & 15);
	if (neg)
		x = -x;
}
}

int main()
{
	// cin.tie(0)->sync_with_stdio(0);
	
	int x, y;
	long long res = 0;
	
	load();
	scan(x);
	while (x--)
	{
		scan(y);
		res += y;
	}
	printf("%lld\n", res);
	
	return 0;
}

output_test


Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 80ms
memory: 1752kb

input:

10000000
332412194 486382103 753324673 651230533 728642244 644725384 864887221 343699011 312243871 934699627 568798738 229664025 263804226 731036177 976387787 916757657 143115512 730193659 765813016 467261982 729561426 909936518 551316495 730751137 293657915 757387565 910610572 981743865 841860626 6...

output:

5500403368347166

result:

points 1.0 input test passed

Subtask #2:

score: 0
Skipped