QOJ.ac

QOJ

満点: 100 出力のみ

#2112. Future Program

統計

In 2047, on the eve of the 64th National Olympiad in Informatics in Provinces (NOIP) Winter Camp, Mr. B found the problems from the 32nd Winter Camp in 2015 to practice.

He opened the third problem, "Future Program": ... This is an answer-submission problem with a total of 10 test cases. For each test case, you will be given the source code of a program and the input for that program. You need to run this program and save its output. Unfortunately, these programs are extremely inefficient and cannot produce output within the 5-hour contest time limit. ...

Mr. B thought for a moment and decided to try running this problem using a computer from 2047. He found a 2015 compiler and quickly obtained the results...

At this point, Mr. B woke up from his dream, only to find himself at the 32nd Winter Camp contest site. Everything before was just a dream, and he actually needed to solve the "Future Program" problem.

However, Mr. B could no longer remember the results of the programs from his dream. He tried to run these programs again, but he found that the computer's performance was much worse than in his dream, and the programs indeed could not produce results within 5 hours.

He needs your help to obtain those results from his dream.

This is an answer-submission problem with a total of 10 test cases. For each test case, you will be given the source code of a program and the input for that program. You need to run this program and save its output. Unfortunately, these programs are extremely inefficient and cannot produce output within the 5-hour contest time limit.

You need to help Mr. B obtain the output of these programs.

Input

There are 10 test cases in total, numbered 1 to 10. In the following, "" is used to represent the test case number. For each test case, there are 4 files: `program.cpp,program.c,program.pas, andprogram.in. You need to use your own methods to obtain the output ofprogram.{cpp, c, pas}usingprogram*.in` as input. You only need to choose one of the three languages to solve this problem. The code in these three languages is semantically similar, and the running results are identical.

Output

For the 10 given test cases, you need to save the output of the programs in program*.out respectively. Specifically, we guarantee that each test case will output exactly 10 lines.

Subtasks

Each test case is scored individually. If one of your output files exceeds 4KB, or the length of any line exceeds 400 characters, that test case will receive 0 points. Otherwise, each line is scored individually. If the line is identical to the standard answer, you receive 1 point. If your output has fewer than 10 lines, we will add empty lines to the end of your output to make it 10 lines. If your output has more than 10 lines, we will take the first 10 lines of your output as the result.

Examples

Sample input can be found in program/example.{in, cpp, c, pas} in the contestant's directory, and sample output can be found in program/example.out in the contestant's directory.


またはファイルを一つずつアップロード:

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 1
IDTypeStatusTitlePosted ByLast UpdatedActions
#96Off-topicOpen这是一个测试讨论qingyu_test2025-12-12 17:47:45View

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.