#P6850. NOI

NOI

Description

Since Little L cannot do arithmetic, he now tells you his score for each problem and the team cutoff line. Please tell him whether he gets into the team.

The NOI score is calculated as follows:

  1. The written test starts with 5050 points, and for each solved problem, add 11 point.
  2. The final score is the sum of the scores of all problems plus the written test score.
  3. If it is Category A, add another 55 points on top of that total.

Input Format

Input 99 numbers a,b,c,d,e,f,g,h,ia,b,c,d,e,f,g,h,i, representing respectively: the number of problems solved in the written test; the scores of D1T1, D1T2, D1T3, D2T1, D2T2, D2T3; whether it is Category A (yes is 11, no is 00); and the CTT cutoff score.

Output Format

Output one string on one line.

If he gets into the CTT, output AKIOI.

If he does not, output AFO.

50 50 72 56 100 40 0 1 446
AFO
50 95 100 64 100 72 30 0 446
AKIOI

Hint

"Sample Explanation"

In the first sample is retired newbie Little L's NOI2020 result.

In the second sample is some team leader's NOI2020 result.

Isn't this explaining nothing.


"Constraints and Notes"

This problem uses bundled testdata. You can get the score of a subtask only if you pass all test points in that subtask.

  • Subtask 1 (30 points): h=0h = 0, a=50a = 50, i=700i = 700;
  • Subtask 2 (30 points): h=0h = 0, a=50a = 50;
  • Subtask 3 (40 points): no special restrictions.

For all data, 0a500\leq a \leq 50, 0b,c,d,e,f,g1000\leq b,c,d,e,f,g \leq 100, 0h10 \leq h \leq 1, 205i705205\leq i \leq 705.

The tie case for the 5050-th place is not considered here. You may assume that if there is a tie, Little L has priority.

The testdata is not guaranteed to be real results.

Translated by ChatGPT 5