QOJ.ac

QOJ

Time Limit: 2 s Memory Limit: 1024 MB

#23970. Regreso a casa 2

Statistics

El castor Bitaro ha decidido regresar a su pueblo natal. Para regresar a su pueblo, Bitaro necesita $X$ yenes si toma el tren y $Y$ yenes si toma el autobús. Además, Bitaro no puede regresar a su pueblo sin tomar el tren o el autobús. Cuando Bitaro tiene $Z$ yenes, imprime $1$ si puede regresar a su pueblo con el dinero que tiene, y $0$ en caso contrario.

Restricciones

  • $1 \le X \le 100$.
  • $1 \le Y \le 100$.
  • $1 \le Z \le 100$.
  • Todos los valores de entrada son números enteros.

Entrada

La entrada se proporciona en el siguiente formato:

X
Y
Z

Salida

Imprime $1$ si Bitaro puede regresar a su pueblo, y $0$ en caso contrario.

No imprimas nada más que la respuesta. (No imprimas frases solicitando la entrada ni nada similar.)

Ejemplos

Entrada 1

7
2
3

Salida 1

1

Nota 1

  • Regresar en tren requiere $7$ yenes, pero como Bitaro tiene $3$ yenes, no puede regresar en tren.
  • Regresar en autobús requiere $2$ yenes, y como Bitaro tiene $3$ yenes, puede regresar en autobús.

Bitaro puede regresar a su pueblo. Por lo tanto, se imprime $1$.

Entrada 2

10
20
1

Salida 2

0

Nota 2

  • Regresar en tren requiere $10$ yenes, pero como Bitaro tiene $1$ yen, no puede regresar en tren.
  • Regresar en autobús requiere $20$ yenes, pero como Bitaro tiene $1$ yen, no puede regresar en autobús.

Bitaro no puede regresar a su pueblo. Por lo tanto, se imprime $0$.

Entrada 3

3
5
3

Salida 3

1

Nota 3

  • Regresar en tren requiere $3$ yenes, y como Bitaro tiene $3$ yenes, puede regresar en tren.
  • Regresar en autobús requiere $5$ yenes, pero como Bitaro tiene $3$ yenes, no puede regresar en autobús.

Bitaro puede regresar a su pueblo. Por lo tanto, se imprime $1$.

Entrada 4

1
1
10

Salida 4

1

Nota 4

  • Regresar en tren requiere $1$ yen, y como Bitaro tiene $10$ yenes, puede regresar en tren.
  • Regresar en autobús requiere $1$ yen, y como Bitaro tiene $10$ yenes, puede regresar en autobús.

Bitaro puede regresar a su pueblo. Por lo tanto, se imprime $1$.

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.