QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#60785 | #1. I/O Test | platelet | 200 ✓ | 94ms | 3180kb | C++20 | 1.2kb | 2022-11-07 12:55:21 | 2022-11-07 12:55:23 |
Judging History
config.txt
10000000 10000000
input_test
#include <cstring>
#include <cstdio>
const int inSZ = 1 << 17;
unsigned char inBuf[inSZ], *in1, *in2;
inline __attribute((always_inline))
unsigned read() {
unsigned res = 0;
unsigned char c = *in1++;
while(res = res * 10 + c - 48, (c = *in1++) >= 48);
return res;
}
inline __attribute((always_inline))
void refresh() {
if(__builtin_expect(in1 > inBuf + inSZ - 128, 0)) {
unsigned long len = in2 - in1;
memcpy(inBuf, in1, len);
in1 = inBuf, in2 = inBuf + len;
in2 += fread(in2, 1, inSZ - len, stdin);
if(in2 != inBuf + inSZ) *in2 = 0;
}
}
int main() {
in1 = inBuf;
in2 = in1 + fread(in1, 1, inSZ, stdin);
read();
unsigned long sum = 0;
for(int i = 0; i < 1000000; i++) {
#pragma GCC unroll 10
for(int j = 0; j < 10; j++) sum += read();
refresh();
}
printf("%lu\n", sum);
}
output_test
#include <cstring>
#include <cstdio>
const int outSZ = 2e6;
unsigned char outBuf[outSZ];
int main() {
memset(outBuf, '9', outSZ);
for(int i = 9; i < outSZ; i += 10) outBuf[i] = ' ';
for(int i = 50; i; i--) fwrite(outBuf, 1, outSZ, stdout);
}
詳細信息
Subtask #1:
score: 100
Accepted
Test #1:
score: 100
Accepted
time: 94ms
memory: 1684kb
input:
10000000 487896337 608720897 554047535 587086399 395164046 455310035 493052928 892917218 201623991 102336064 717438420 340782580 593099754 280402216 645136494 182006222 389154248 794864379 160689618 528385954 260652766 654056229 309400481 421868987 459724630 779860397 471145845 518728929 955087108 8...
output:
5499381831873851
result:
points 1.0 input test passed
Subtask #2:
score: 100
Accepted
Test #2:
score: 100
Accepted
time: 3ms
memory: 3180kb
input:
10000000
output:
999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 999999999 ...
result:
points 1.0 output test passed