QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#180747 | #1. I/O Test | 5ab | 100 | 66ms | 3752kb | C++20 | 1.2kb | 2023-09-16 11:16:22 | 2023-09-16 11:16:23 |
Judging History
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() {
pos = inbuf;
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: 100
Accepted
Test #1:
score: 100
Accepted
time: 66ms
memory: 3752kb
input:
10000000 110245649 843834338 201290464 195145414 674515253 602538105 836518794 312757486 962865662 415113965 635803696 951692343 767129720 282881357 807306164 976725817 196910038 106202792 417166598 456776804 620368232 226017586 372445883 607236096 964187420 802534613 119720631 761668891 266285293 3...
output:
5498672793847945
result:
points 1.0 input test passed
Subtask #2:
score: 0
Skipped