QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#180712 | #1. I/O Test | 5ab | 100 | 70ms | 1744kb | C++20 | 1.4kb | 2023-09-16 10:40:08 | 2023-09-16 10:40:09 |
Judging History
config.txt
10000000 0
input_test
#include <cstdio>
#include <cstring>
using namespace std;
static constexpr size_t buf_size = 1 << 18;
static constexpr size_t integer_size = 20;
static char inbuf[buf_size + 1] = {};
size_t pos, end;
void load() {
end = fread(inbuf, 1, buf_size, stdin);
inbuf[end] = '\0';
}
void reload() {
size_t len = end - pos;
memmove(inbuf, inbuf + pos, len);
end = len + fread(inbuf + len, 1, buf_size - len, stdin);
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++];
}
void scan(int &x) {
char c = get_next_nonspace();
if (__builtin_expect(pos + 10 >= 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;
}
void scan(long long &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 & 15;
while ((c = get_next()) >= '0')
x = x * 10 + (c & 15);
if (neg)
x = -x;
}
int main()
{
int x, y;
long long res = 0;
load();
scan(x);
while (x--)
{
scan(y);
res += y;
}
printf("%lld\n", res);
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: 70ms
memory: 1744kb
input:
10000000 677661992 372104451 570712255 852757585 346954095 126724533 350246483 661971339 121925306 145880244 584139519 577317497 529999941 886950089 499801745 116570564 194370456 828731364 491673040 588876417 794828058 894021363 171137003 662670003 606789670 708898329 224301004 320643296 577315927 6...
output:
5500330425340886
result:
points 1.0 input test passed
Subtask #2:
score: 0
Skipped