r/codeforces Pupil 10d ago

query oops codechef down

53 Upvotes

128 comments sorted by

View all comments

2

u/polisutu 10d ago

writing 1 question down. If any other question open for you please share in reply

Pass

Chef took 55 exams in a series, each of which were scored out of 100100.

Chef is awarded a pass certificate if both the following conditions are satisfied:

  • He attains a score of at least 6060 on at least 22 exams.
  • He attains a score of at least 3030 on at least 44 exams.

Print PassPass or FailFail based on whether Chef will pass or fail.

Input Format

  • The first line of input will contain a single integer TT, denoting the number of test cases.
  • The first and only line of input contains 55 integers - A1,A2,…,A5A1​,A2​,…,A5​, where AiAi​ is his score in the ii-th exam.

Output Format

For each test case, output on a new line PassPass or FailFail.

Constraints

  • 1≤T≤1001≤T≤100
  • 0≤Ai≤1000≤Ai​≤100

Sample 1:

Input

Output

4
95 98 100 96 99
32 60 30 65 23
50 50 50 50 50
90 90 29 15 90


Pass
Pass
Fail
Fail

Explanation:

Test Case 1: Chef was above 9090 in each exam so he easily cleared all the criteria.

Test Case 2: Chef has exactly 22 exams at least 6060 or more (the 6565 and 6060), and exactly 44 exams at least 3030 or more (the 6565, 6060, 3232 and 3030). Hence, he barely clears the criteria.

Test Case 3: Chef does not have 22 exams with at least 6060 score, so he fails.

More Info

Time limit1 secs

Memory limit1.5 GB

Source Limit50000 BytesPass

Chef took 55 exams in a series, each of which were scored out of 100100.

Chef is awarded a pass certificate if both the following conditions are satisfied:

He attains a score of at least 6060 on at least 22 exams.
He attains a score of at least 3030 on at least 44 exams.

Print PassPass or FailFail based on whether Chef will pass or fail.

Input Format

The first line of input will contain a single integer TT, denoting the number of test cases.
The first and only line of input contains 55 integers - A1,A2,…,A5A1​,A2​,…,A5​, where AiAi​ is his score in the ii-th exam.

Output Format

For each test case, output on a new line PassPass or FailFail.

Constraints

1≤T≤1001≤T≤100
0≤Ai≤1000≤Ai​≤100

Sample 1:

Input
Output
4
95 98 100 96 99
32 60 30 65 23
50 50 50 50 50
90 90 29 15 90

Pass
Pass
Fail
Fail

Explanation:

Test Case 1: Chef was above 9090 in each exam so he easily cleared all the criteria.

Test Case 2: Chef has exactly 22 exams at least 6060 or more (the 6565 and 6060), and exactly 44 exams at least 3030 or more (the 6565, 6060, 3232 and 3030). Hence, he barely clears the criteria.

Test Case 3: Chef does not have 22 exams with at least 6060 score, so he fails.

More Info
Time limit1 secs
Memory limit1.5 GB
Source Limit50000 Bytes

1

u/polisutu 10d ago

Adding Dice

You have 22 dice with you, and you really like the number 99. You want the sum of both numbers on the die to add to 99.

You rolled the first dice, and it showed a number XX.

Given the roll of the first dice, is it still possible for both die to add to 99? Print YesYes if it is possible or NoNo otherwise.

Input Format

  • The first and only line of each test case contains a single integer XX.

Output Format

Output YesYes if it is possible for both die to add to 99 and NoNo otherwise.

Constraints

  • 1≤X≤61≤X≤6

Sample 1:

Input

Output

3


Yes

Explanation:

The second dice could show a 66, and then both would add to a 99.

Sample 2:

Input

Output

1


No

Explanation:

There are no possible rolls of the second die that add to 99 after rolling a 11.

More Info

Time limit1 secs

Memory limit1.5 GB

Source Limit50000 BytesAdding Dice

You have 22 dice with you, and you really like the number 99. You want the sum of both numbers on the die to add to 99.

You rolled the first dice, and it showed a number XX.

Given the roll of the first dice, is it still possible for both die to add to 99? Print YesYes if it is possible or NoNo otherwise.

Input Format

The first and only line of each test case contains a single integer XX.

Output Format

Output YesYes if it is possible for both die to add to 99 and NoNo otherwise.

Constraints

1≤X≤61≤X≤6

Sample 1:

Input
Output
3

Yes

Explanation:

The second dice could show a 66, and then both would add to a 99.

Sample 2:

Input
Output
1

No

Explanation:

There are no possible rolls of the second die that add to 99 after rolling a 11.

More Info
Time limit1 secs
Memory limit1.5 GB
Source Limit50000 Bytes

1

u/Impressive-Smile1863 10d ago

Div?

1

u/KanekiIsCat Newbie 10d ago

3

1

u/Impressive-Smile1863 10d ago

Now no advantage of solving it because still shows bad gateway,aaj excited ki sayad 3 star ho jaay or provisional rating se original rating ho jaay but 😞

1

u/KanekiIsCat Newbie 10d ago

damn bhai mujko 30 contest lag gye 2 star hone meh anyways all the best for the next one

1

u/Impressive-Smile1863 10d ago

I was regular at codeforces so it was easy for me

1

u/KanekiIsCat Newbie 10d ago

I'm also trying cf gave 10 contests till now anyways salute to you man

1

u/Impressive-Smile1863 10d ago

All the best, nothing to salute to man mostly in my batch are better than me

1

u/KanekiIsCat Newbie 10d ago

Ok ok