QOJ.ac

QOJ

Time Limit: 1 s Memory Limit: 2048 MB Total points: 200 Difficulty: [show]

#1. I/O Test

统计

这是一道用于测试输入与输出效率的测试题,你可以通过本题来测试你的输入与输出方式的效率。

具体地,你的程序将执行以下两种任务之一:

  • 读入 $N$ 个整数 $a_1,a_2,\cdots, a_N$,输出这 $N$ 个整数之和。
  • 读入一个整数 $N$,任意输出 $N$ 个在 $[10^8,10^9)$ 内的整数。

实现细节

你需要提交三个文件。

config

你需要提交的第一个文件为 config,其为一个文本文件,描述你想要进行测试的 $N$ 的大小。具体地,其应包含恰好一行两个整数 $N_{\mathrm{in}}, N_{\mathrm{out}}$,描述你想要进行输入测试与输出测试的大小。特别地,如果你不想要进行对应的测试,则只需将对应的 $N_*$ 置为 $0$

为了方便你的测试,你可以任意指定 $1 \leq N \leq 10^7$。但如果你想要使得你的提交记录出现在题目统计页面的排名中,则必须指定 $N=10^7$。

input_test

你需要提交的第二个文件为 input_test,其为一个程序源代码,描述进行输入测试的程序。

该程序将从标准输入中读取以下格式的输入数据:

输入的第一行包含一个整数 $N$,接下来一行包含 $N$ 个整数 $a_1,a_2,\cdots, a_N$,保证 $1 \leq a_i \leq 10^9$。

你需要向标准输出中输出一行一个整数,表示所有 $N$ 个整数之和。

output_test

你需要提交的第三个文件为 output_test,其为一个程序源代码,描述进行输出测试的程序。

该程序将从标准输入中读取以下格式的输入数据:

输入只有一行,包含一个整数 $N$。

你需要向标准输出中输出一行,包含恰好 $N$ 个在 $[10^8,10^9)$ 内的整数。任意符合条件的输出均会被判为正确

评分规则

本题共有 $2$ 个测试点,每个测试点各 $100$ 分,总分 $200$ 分。其中第一个测试点将运行程序 input_test,第二个测试点将运行程序 output_test

在进行评测时,评测系统将尝试从 config 中读取整数 $N_{\mathrm{in}}, N_{\mathrm{out}}$。你必须保证 $0 \leq N_{\mathrm{in}}, N_{\mathrm{out}} \leq 10^7$。若该文件所包含的信息不合法,则系统将终止评测并立刻返回 Compile Error

随后,如果对应的 $N_*$ 的值不为 $0$,则评测系统将编译对应的 input_testoutput_test。若发生了编译错误,则系统将终止评测并立刻返回 Compile Error

在编译完成后,系统将根据每组测试中对应的 $N$ 的值生成测试数据。

在每个测试点中,如果你输出的答案错误,发生了运行时错误,或超出了时间(1.0 秒)与空间(2.0 GiB)的限制,则得到 $0$ 分。否则,将得到 $\frac{N}{10^5}$ 分。

在题目统计页面中,只会统计在两组测试中均得到了满分的提交记录。

About Issues

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.