QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#761719#1. I/O Testwly09200 ✓240ms17708kbC++202.1kb2024-11-19 09:32:212024-11-19 09:32:21

Judging History

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

  • [2024-11-19 09:32:21]
  • 评测
  • 测评结果:200
  • 用时:240ms
  • 内存:17708kb
  • [2024-11-19 09:32:21]
  • 提交

config.txt

10000000 10000000

input_test

#include <cstdint>
#include <cstdio>

#define MYBUF (1 << 24 | 3)
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;
}
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 = rd();
  int64_t sum = 0;
  while (n--) {
    int64_t x = rd();
    sum += x;
  }
  wt(sum);
  return fwrite(pbuf, 1, pp - pbuf, stdout), 0;
}

output_test

#include <cstdint>
#include <cstdio>

#define MYBUF (1 << 24 | 3)
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;
}
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

const int64_t ST = 1e8 + 3;

int main() {
  int64_t n = rd();
  while (n--)
    wt(ST + n), pc(' ');
  return fwrite(pbuf, 1, pp - pbuf, stdout), 0;
}

詳細信息

Subtask #1:

score: 100
Accepted

Test #1:

score: 100
Accepted
time: 85ms
memory: 17620kb

input:

10000000
317076307 703222701 913197678 501687785 950060990 234396222 714414351 267815686 141454277 849240641 984924203 394724085 933330208 820085870 881553312 471412153 548802539 121690746 920168406 459121627 999401530 613569541 833055886 210594012 804178775 399980582 846854803 155738732 867217386 1...

output:

5500307974960313

result:

points 1.0 input test passed

Subtask #2:

score: 100
Accepted

Test #2:

score: 100
Accepted
time: 240ms
memory: 17708kb

input:

10000000

output:

110000002 110000001 110000000 109999999 109999998 109999997 109999996 109999995 109999994 109999993 109999992 109999991 109999990 109999989 109999988 109999987 109999986 109999985 109999984 109999983 109999982 109999981 109999980 109999979 109999978 109999977 109999976 109999975 109999974 109999973 ...

result:

points 1.0 output test passed