Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
¡Arriba, Papalotes, Arriba! v2
Language:
Ada
Assembly
Bash
C#
C++ (gcc)
C++ (clang)
C++ (vc++)
C (gcc)
C (clang)
C (vc)
Client Side
Clojure
Common Lisp
D
Elixir
Erlang
F#
Fortran
Go
Haskell
Java
Javascript
Kotlin
Lua
MySql
Node.js
Ocaml
Octave
Objective-C
Oracle
Pascal
Perl
Php
PostgreSQL
Prolog
Python
Python 3
R
Rust
Ruby
Scala
Scheme
Sql Server
Swift
Tcl
Visual Basic
Layout:
Vertical
Horizontal
//g++ 5.4.0 #include <iostream> #include <math.h> #include <set> using namespace std; int main() { int casos; double AB,BC,AC,CM,CN; double BN,AM,S; double AMAC; double CNBC; double A_ABC2,A_BMC2,A_ABM2,A_BMN2,A_MNC2; set<double> resultados; cin>>casos; while(casos--){ cin>>AB>>BC>>AC>>CM>>CN; AM=AC-CM; BN=BC-CN; S=((AB+BC+AC)/2); A_ABC2=sqrt(S*(S-AB)*(S-BC)*(S-AC)); AMAC=AM/AC; CNBC=CN/BC; A_ABM2=A_ABC2*AMAC; A_BMC2=A_ABC2-A_ABM2; A_MNC2=A_BMC2*CNBC; A_BMN2=A_BMC2-A_MNC2; resultados.insert(A_ABM2); resultados.insert(A_BMN2); resultados.insert(A_MNC2); for(auto a: resultados){ cout<<a<<"\n"; } resultados.clear(); } }
g++
1 13 4 15 6 1
Show compiler warnings
[
+
] Compiler args
[
-
]
Show input
Compilation time: 0.88 sec, absolute running time: 0.37 sec, cpu time: 0.29 sec, memory peak: 3 Mb, absolute service time: 1,25 sec
edit mode
|
history
|
discussion
2.4 7.2 14.4