QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#761729#1. I/O Testwly09200 ✓220ms99664kbC++201.3kb2024-11-19 09:38:302024-11-19 09:38:33

Judging History

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

  • [2024-11-19 09:38:33]
  • 评测
  • 测评结果:200
  • 用时:220ms
  • 内存:99664kb
  • [2024-11-19 09:38:30]
  • 提交

config.txt

10000000 10000000

input_test

#include <cstdint>
#include <cstdio>

#define MYBUF (134217728)
char buf[MYBUF], *p1, *p2;
#define gc()                                                                   \
  (p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, MYBUF, stdin), p1 == p2)       \
       ? EOF                                                                   \
       : *p1++)
inline int64_t rd() {
  int64_t x = 0;
  char c = gc();
  while (c < '0' || c > '9')
    c = gc();
  for (; c >= '0' && c <= '9'; c = gc())
    x = x * 10 + (c ^ '0');
  return x;
}
#undef MYBUF

int main() {
  int64_t n = rd();
  int64_t sum = 0;
  while (n--) {
    int64_t x = rd();
    sum += x;
  }
  return printf("%lld", sum), 0;
}

output_test

#include <cstdint>
#include <cstdio>

#define MYBUF (134217728)
char pbuf[MYBUF], *pp = pbuf;
void pc(const char &c) {
  if (pp - pbuf == MYBUF)
    fwrite(pbuf, 1, MYBUF, stdout), pp = pbuf;
  *pp++ = c;
}
void wt(int64_t x) {
  static int sta[35];
  int top = 0;
  do {
    sta[top++] = x % 10, x /= 10;
  } while (x);
  while (top)
    pc(sta[--top] + '0');
}
#undef MYBUF

int main() {
  int64_t n;
  scanf("%lld", &n);
  while (n--)
    pc('1'), pc('0'), pc('0'), pc('0'), pc('0'), pc('0'), pc('0'), pc('0'), pc('0'), pc(' ');
  return fwrite(pbuf, 1, pp - pbuf, stdout), 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 83ms
memory: 99596kb

input:

10000000
492763770 465699039 249018921 297674173 944227298 814028851 207145105 934949249 805580881 917624570 369346878 824773806 139310372 833757031 475805655 631019648 727117522 682909615 409856909 447115283 820102543 382803963 521042711 232800199 870981651 166842868 902860257 245649880 889064964 5...

output:

5501012614888868

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 220ms
memory: 99664kb

input:

10000000

output:

100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 100000000 ...

result:

points 1.0 output test passed