QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#60784#1. I/O Testplatelet200 ✓86ms3232kbC++1.2kb2022-11-07 12:55:002022-11-07 12:55:01

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:55:01]
  • 评测
  • 测评结果:200
  • 用时:86ms
  • 内存:3232kb
  • [2022-11-07 12:55:00]
  • 提交

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);
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 86ms
memory: 1608kb

input:

10000000
801894861 292720040 736954798 185552278 648175214 864598209 398728153 469487950 338811179 166187913 994813399 199582515 810379551 472291749 661914122 774059667 169891054 385851542 768079525 424607667 539523571 732750637 425691129 212257395 781600833 148310153 873286593 362505635 487951959 1...

output:

5501287097057746

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 4ms
memory: 3232kb

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