問題一覧 > ネタ問題

No.8012 Catch C code

レベル : / 実行時間制限 : 1ケース 1.500秒 / メモリ制限 : 256 MB / スペシャルジャッジ問題 (複数の解が存在する可能性があります)
タグ : (AC するまで非表示) / 解いたユーザー数 22
作問者 : ciel
お気に入りにしたユーザー ProblemId : 732 / 自分の提出
問題文最終更新日: 2020-04-01 19:09:38
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original

Problem Statement

There is the following C code.

#include <stdio.h>
void catch(){
	puts("FLAG_***");
}
OutputSubmit as Text a C++ program that calls this catch().
(Note: most C programs can also be compiled as C++ as long as the includes are properly written. The program above can also be compiled as C++ if the function name is changed.)

However, if the first line of the program starts with "//", the part of the first line from the 3rd character onward is treated as options specified to g++ (they are appended after g++ prog.cpp catch???.o).
(However, for security reasons, g++ is invoked in array form, so the parsing is a simple whitespace-delimited one that ignores quotation marks.)

Fix on 150901: The file name catch.o is now randomized. This file name cannot be known except from the judge code.

Input

No input is given.

Output

A C++ program that satisfies the requirements of the problem.
Since you are outputting a program, submitting as Text is recommended. The program must not produce any output at all (other than by the catch() function).

An example is given below, but it does not satisfy the requirements of the problem.

//-static
//above will be passed to g++.

#include <stdio.h>
int main(){
  //your code goes here
}

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。