QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#180746#1. I/O Test5ab0 0ms0kbC++201.2kb2023-09-16 11:15:472023-09-16 11:15:48

Judging History

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

  • [2023-09-16 11:15:48]
  • 评测
  • 测评结果:0
  • 用时:0ms
  • 内存:0kb
  • [2023-09-16 11:15:47]
  • 提交

config.txt

10000000 0

input_test

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

static constexpr size_t buf_size = 1 << 18;

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

namespace {
char *pos, *end;

void load() {
	end = inbuf + cin.readsome(inbuf, buf_size);
	*end = '\0';
}
void reload() {
	size_t len = end - pos;
	memmove(inbuf, pos, len);
	end = inbuf + len + cin.readsome(inbuf + len, buf_size - len);
	*end = '\0';
	pos = inbuf;
}
void skip_space() {
	while (*pos <= ' ') {
		if (__builtin_expect(++pos == end, 0))
			reload();
	}
}
char get_next() { return *(pos++); }
char get_next_nonspace() {
	skip_space();
	return *(pos++);
}

template<class T>
void scan(T &x) {
	char c = get_next_nonspace();
	if (__builtin_expect(pos + numeric_limits<T>::digits10 + 1 >= 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;
	}
	cout << res << "\n";
	
	return 0;
}

output_test


Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
input_test Runtime Error

Test #1:

score: 0
input_test Runtime Error

input:

10000000
317160812 193937045 907436875 627034241 145187973 557295597 746231380 751565011 434424425 731255445 994527666 582965819 840857183 735940806 467207990 766730415 742380171 706887566 173196296 206555948 126195223 178055643 519363150 484349645 855866426 239134213 420530835 599340579 319355611 9...

output:


result:


Subtask #2:

score: 0
Skipped