QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#180746 | #1. I/O Test | 5ab | 0 | 0ms | 0kb | C++20 | 1.2kb | 2023-09-16 11:15:47 | 2023-09-16 11:15:48 |
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
詳細信息
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