Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.

book
Completing Mario Adventures Together

There is a game called Mario Adventures, consisting of n levels. Bill and his friend Bob are addicted to the game. Each of them wants to pass the whole game. Bill can complete certain levels on his own and Bob can complete certain levels on his own. If they combine their skills, can they complete all levels together?

Given an integer n - the total number of levels, list of integers bill_levels - the number of levels Bill can complete and Another list of integers bob_levels - the number of levels Bob can complete. Return string I become the hero! If they can complete all levels together, in the opposite case Oh, no! The castle is locked!

Example 1

Input:

n = 5; bill_levels = [3, 1, 2, 3]; bob_levels = [2, 2, 4]

Output:

Oh, no! The castle is locked!
main.cpp

main.cpp

C++

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt