Madaraa_uchia's blog

By Madaraa_uchia, history, 2 months ago, In English

Problem Link:

Contest
Question

Author & Testor: Sarvesh_Powar
Editorialist:Madara_Uchia

DIFFICULTY:

CAKEWALK

PREREQUISITES:

Basic Arithmatics

PROBLEM:

For the Survival of PANDORA planet, Pandora creatures have to play two football matches with Humans.

For that, you have given 4 integers A, B, C, and D.

In which A and B denotes the Score of PANDORA creatures and human respectively in match 1.

Similarly, C, and D denotes the Score of PANDORA creatures and human respectively in match 2.

You have to decide whether PANDORA creatures will survive in this domination or not.

EXPLANATION:

      In this problem, They are having 2 matches each and we are provided with their scores. A and C are the scores of PANDORA creatures whereas B and D are the scores of humans in matches 1 and 2 respectively.
      Therefore, Pandora creatures have to score more than humans to survive, i.e. A+C should be greater than B+D then the output should be "SURVIVED" (without the quotation marks and in upper case)
And if humans scored more than PANDORA creatures, i.e. B+D is greater than A+C then the output should be "NOT SURVIVED" (without the quotation marks and in upper case)
else both humans and creatures scored the same goals in both matches aggregately i.e. A + C == B + D, it'll be tied and the output should be "NA" (without the quotation marks and in upper case)

TIME COMPLEXITY:

O(1) per test case.

CODE:

Editorialist's Code(C++)
  • Vote: I like it
  • +1
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Auto comment: topic has been updated by Madaraa_uchia (previous revision, new revision, compare).

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Nice explanation bro

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

When was the contest organized?

  • »
    »
    2 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    It was organised on last week, we also have organised more interesting contests and lots more, make sure thay u'll check our site nsccpccoe.web.app once