توجه: سوال‌ها لزوما به ترتیب سختی مرتب نشده‌اند و ترتیب آن‌ها (تقریبا!) اتفاقی است. استفاده از منابع از پیش آماده شده و دیکشنری‌ها در حین مسابقه مجاز است.

برای سرعت بیشتر برنامه‌ها، بجای پایتون می‌توانید با PyPy کدتان را ارسال کنید.

لینک‌های مفید برای شرکت در مسابقه:

می‌توانید سوال‌های خود را از بخش "سوال بپرسید" مطرح کنید.

The Departed (2006)


  • Memory Limit: 256MB
  • Time Limit: 1sec

Sina and Nima are USVAJAK agents tracking the movements of an unnamed corrupt government official. Anonymous sources have informed them about his upcoming escape attempt. They now know he plans to use his diplomatic contacts to try and hitch a ride on a CIA jet leaving from Jabolgha airport.

It’s well-known that all CIA jets have the string FBI somewhere in their registration codes. They gathered a list of all jets scheduled for the designated day. There are exactly five jets on the list. Write a program that will find out all CIA jets.

Input🔗

There are exactly 55 rows of input, each row representing exactly one jet registration code from the list. A registration code is a sequence of at most 1010 uppercase English letters, digits 0 to 9, or dashes -.

Output🔗

The only line of output must contain a list of integers, indicating the corresponding input rows containing registrations of CIA jets, sorted in increasing order.

If there are no CIA jets, output the string HE GOT AWAY!.

Note: Uppercase and Lowercase letters are considered different, so He Got Away! is wrong!

Sample Input 1🔗

A-FBI2
9A-IRKOK
RE-KGB3
I-NTERPOL
GM-MI6
Plain text

Sample Output 1🔗

1
Plain text

Sample Input 2🔗

N323-CIA
F5-B13I
F-BI-32
MPM-DU-CIA
HAKHFSHT
Plain text

Sample Output 2🔗

HE GOT AWAY!
Plain text

Sample Input 3🔗

45-FBI
BOND-007
DT-FBI14
S1N4-13
N1M4-FBILL
Plain text

Sample Output 3🔗

1 3 5
Plain text
ارسال پاسخ برای این سؤال
در حال حاضر شما دسترسی ندارید.