Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#include
int main() { //Leitura da entrada int A, B, C, troca; scanf("%d %d %d", &A, &B, &C); int H, L; scanf("%d %d", &H, &L); //Ordenando as dimensões if(B < A){ troca = A; A = B; B = troca; } if(C < A){ troca = A; A = C; C = troca; } if(C < B){ troca = B; B = C; C = troca; } //(A,B,C) está ordenado //ou seja, A e B são as menores dimensões //tentaremos passar o colchão com essas duas dimensões //se não der certo, é impossível passsar o colchão pela porta if(A <= H && B <= L){ printf("S"); } else if(B <= H && A <= L){ printf("S"); } else{ printf("N"); } }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)