QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#180724#1. I/O Test5ab0 0ms0kbC++201.1kb2023-09-16 10:53:092023-09-16 10:53:10

Judging History

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

  • [2023-09-16 10:53:10]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-09-16 10:53:09]
  • 提交

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();
	x = c & 15;
	while ((c = get_next()) >= '0')
		x = x * 10 + (c & 15);
	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


详细

Subtask #1:

score: 0
input_test Dangerous Syscalls

Test #1:

score: 0
input_test Dangerous Syscalls

input:

10000000
150976803 701994219 352591266 801564904 414861159 673260837 783768549 452908335 853569884 740382696 647305198 578784001 514382692 180695389 101083787 245927398 462948456 841358611 760198372 838934961 665859444 511876094 475121987 703842453 913448795 379225039 498166938 633167196 129118109 9...

output:


result:


Subtask #2:

score: 0
Skipped