QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#60782 | #1. I/O Test | platelet | 100 | 2ms | 3236kb | C++98 | 1.2kb | 2022-11-07 12:53:15 | 2022-11-07 12:53:17 |
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;
while((c = *in1++) < 48);
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)) {
auto 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: 0
input_test Judgement Failed
Test #1:
score: 0
input_test Judgement Failed
input:
10000000 948041883 306706060 755993656 507002717 375321006 975366155 607775422 260444821 360714287 419812288 659856789 497321452 238792578 174941185 798659627 144783044 801636523 587568698 592744345 569872947 924363544 121726675 439049838 272923605 947445602 860063762 475645747 112173434 461856019 3...
output:
result:
Subtask #2:
score: 100
Accepted
Test #2:
score: 100
Accepted
time: 2ms
memory: 3236kb
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