QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#180734#1. I/O Test5ab100 69ms3712kbC++201.2kb2023-09-16 11:00:442023-09-16 11:00:48

Judging History

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

  • [2023-09-16 11:00:48]
  • 评测
  • 测评结果:100
  • 用时:69ms
  • 内存:3712kb
  • [2023-09-16 11:00:44]
  • 提交

config.txt

10000000 0

input_test

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

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

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

namespace {
size_t pos, end;

void load() {
	end = cin.readsome(inbuf, buf_size);
	inbuf[end] = '\0';
}
void reload() {
	size_t len = end - pos;
	memmove(inbuf, inbuf + pos, len);
	end = len + cin.readsome(inbuf + len, buf_size - len);
	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 - '0';
	while ((c = get_next()) >= '0')
		x = x * 10 + (c - '0');
	// 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;
	}
	cout << res << "\n";
	
	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: 69ms
memory: 3712kb

input:

10000000
985596766 268064251 810988756 527729588 902938591 275702855 185414867 196980547 691474442 596763165 181449490 446597902 132664135 800228010 394878071 767811302 891625175 452464887 715472036 265133026 968641667 616030952 933330084 467460172 968423681 924035327 983457747 401554168 278197783 7...

output:

5499370884992618

result:

points 1.0 input test passed

Subtask #2:

score: 0
Skipped