The La Salle - Pui Ching Programming Challenge is being intruded by GPT!
Many submissions from different contestants are suspected to be written by the GPT model, so it is believed that GPT has hacked into the judge and submitted source codes that are written by itself in different contestants' name. To recover from the damage caused by GPT, all of the submissions need to be checked, and those that are suspected to be written by GPT need to be removed.
Luckily, since the output length of the GPT model is limited, if the source code it writes exceeds 500 characters, only the first 500 characters will be kept (including spaces and end of line characters), and the rest of the output will be replaced by the sentence "As an AI model, my output is limited to 500 characters." followed by an end of line character.
To reduce the number of submissions to be manually checked, as a contestant, please write a program to check if the given source code is suspected to be written by GPT and exceeds its output length.
The first line of the input contains an integer $$$N$$$ ($$$1 \leq N \leq 500$$$), the number of lines of the given source code .
The $$$i^{th}$$$ of the remaining $$$N$$$ lines of the input contains a string $$$S_i$$$ ($$$1 \leq |S_i| \leq 1000$$$) of ASCII printable characters, the $$$i^{th}$$$ line of the given source code.
It is guaranteed that the sum of $$$|S_i|$$$ doesn't exceed $$$1000$$$.
$$$|S_i|$$$ is the length of string $$$S_i$$$ (including spaces and the end of line character).
Output Yes if the source code given is suspected to be written by GPT and exceeds its output length, otherwise output No.
6
#include <cstdio>
using namespace std;
int main() {
printf("No\n");
return 0;
}
No
15
#include <iostream>
#include <string>
// The main function of the program
int main(int argc, char *argv[]) {
// Declares an integer n
int n;
// Reads an integer from the standard input stream,
// and store the value into the integer variable n
std::cin >> n;
// Declares an array of strings s, with a size of 1000.
std::string s[1000];
// A for-loop that loops from 0 to n - 1,
// looping a total of n times
for (int i = 0; i < n; i++) {
// Reads a strAs an AI model, my output is limited to 500 characters.
Yes
16
#include <iostream>
#include <string>
// The main function of the program
int main(int argc, char *argv[]) {
// Declares an integer n
int n;
// Reads an integer from the standard input stream,
// and store the value into the integer variable n
std::cin >> n;
// Declares an array of strings s, with a size of 1000.
std::string s[1000];
// A for-loop that loops from 0 to n - 1,
// looping a total of n times
for (int i = 0; i < n; i++) {
// Reads a strAs an AI model,
my output is limited to 500 characters.
No
Any deviations from the behaviour stated above will be deemed as human produced code.
| Name |
|---|


