QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#180724 | #1. I/O Test | 5ab | 0 | 0ms | 0kb | C++20 | 1.1kb | 2023-09-16 10:53:09 | 2023-09-16 10:53:10 |
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
Details
Tip: Click on the bar to expand more detailed information
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