QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#60773#1. I/O Testplatelet100 103ms3224kbC++111.2kb2022-11-07 12:33:102022-11-07 12:33:10

Judging History

你现在查看的是最新测评结果

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-11-07 12:33:10]
  • 评测
  • 测评结果:100
  • 用时:103ms
  • 内存:3224kb
  • [2022-11-07 12:33:10]
  • 提交

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 = 1000000; i; i--) {
        #pragma GCC unroll 10
        for(int j = 10; j; 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 = 5; i; i--) fwrite(outBuf, 1, outSZ, stdout);
}

详细

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 103ms
memory: 1720kb

input:

10000000
184114588 488773188 401954371 862989814 595793641 211748687 556756945 658340895 595322914 430679183 443498293 207384698 516980155 666944748 451055681 205323522 454256478 966624405 973111877 977026856 182189680 966567831 481095637 658587676 177214015 121365373 698771290 840870171 625194889 4...

output:

5500954383104408

result:

points 1.0 input test passed

Subtask #2:

score: 0
Wrong Answer

Test #2:

score: 0
Wrong Answer
time: 0ms
memory: 3224kb

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:

wrong output format Unexpected end of file - int32 expected