Problem hidden
|This problem was hidden by Editorial Board member probably because it has incorrect language|version or invalid test data, or description of the problem is not clear.|

RGB7002 - Гурвалжин

Өгөгдсөн гурвалжны периметрийг ол.

Input

Гурвалжны талууд бүхэл тоогоор нэг мөрөнд зайгаар тусгаарлагдан өгөгдөнө.

Output

Гурвалжны периметр.

Example

Input:
3 4 5

Output:
12


Нэмсэн:Bataa
Огноо:2011-01-15
Хугацааны хязгаарлалт:1s
Эх кодын хэмжээний хязгаарлалт:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Програмчлалын хэлүүд:ADA95 ASM32 BASH BF C NCSHARP CSHARP C++ 4.3.2 CPP C99 CLPS LISP sbcl LISP clisp D ERL FORTRAN HASK ICON ICK JAVA JS-RHINO JULIA LUA NEM NICE OCAML PAS-GPC PAS-FPC PERL PHP PIKE PRLG-swi PYTHON PYPY3 PYTHON3 RUBY SCALA SCM guile ST TCL WHITESPACE

hide comments
2019-10-27 05:57:47
lol

Last edit: 2019-10-27 06:55:24
2019-10-26 07:45:56
so suck!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
;p
2019-10-26 07:18:28
#include <cstdio>
#include<cmath>

using namespace std;

int main() {
int a , b , c , d , e , f , q , w , r , t , y , u;
double hemjeest1,hemjeest2, hemjeest3;
scanf("%d%d",&a,&b);
scanf("%d%d%d%d",&c,&d,&e,&f);
scanf("%d%d%d%d%d%d",&q,&w,&r,&t,&y,&u);
henjeest1= b - a;
if(hemjeest1<0) hemjeest1=hemjeest1*(-1);
printf("%.3lf",hemjeest1);
hemjeest2=sqrt(pow(e-c,2)+pow(f-d,2));
printf("\n%.3lf",hemjeest2);
hemjeest3=sqrt(pow(t-q,2)+pow(y-w,2)+pow(u-r,2));
printf("\n%.3lf",hemjeest3);
}
2019-10-26 06:14:10
#include <cstdio>
int main(){
int a , b , c;
scanf("%d%d%d" , &a , &b , &c);
printf("%d" , a + b + c);
}
SUPER

Last edit: 2019-10-26 06:14:44
2019-10-20 08:54:30
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;


int main() {
int n;
scanf("%d,&n");
if(n%2==0){
for(int i=2;i<=n;i+=2){
for(int j=2;j<=i;j+=2){
printf("%d",j);
}
printf("/n");
}
}else{
for(int i=1;i<=n:i+=2){
for(int j=1;j<=i;j+=2)
printf("%d",j);
}
printf("/n");
}
}
2019-10-20 08:31:30
#include <cstdio>
int main(){
int n;
scanf("%d",&n);
int sum=0;
for(int i=1;i<=n;i++){
if(i%2==0){
sum+=i;
}
}
printf("%d",sum);
}
2019-10-19 08:19:38
#include <cstdio>
int main()
{
int a,b,c;
scanf("%d%d%d", &a, &b, &c);
if(a>b && a>c){
if(a*a==b*b+c*c) printf("Right");
if(a*a>(b*b+c*c)) printf("Obtuse");
if(a*a<(b*b+c*c)) printf("Acute");
}
if(b>a && b>c)
{
if(b*b==(a*a+c*c))
printf("Right");
if(b*b<(a*a+c*c))
printf("Acute");
if(b*b>(a*a+c*c))
printf("Obtuse");
}
if(c>a && c>b)
{
if(c*c==(a*a+b*b))
printf("Right");
if(c*c<(a*a+b*b))
printf("Acute");
if(c*c>(a*a+b*b))
printf("Obtuse");
}
return 0;
}
2019-10-19 08:17:15
#include<cstdio>

int main ()
{
int n,i,j;
scanf("%d",&n);
for(i = 1; i <= n; i++)
{
for(j = n; j >= i; j--) printf("%d ", j);
printf("\n");
}
return 0;
}
2019-10-17 04:30:36
imma sakana desu.
2019-10-16 09:55:06
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define pb push_back
#define lw lower_bound
#define mk make_pair
#define F first
#define S second
ll a,b,c[1234567],d[1234567],e[1234567],ans1,i,j,n,ans;
pair<ll,ll> p[1234567];
vector<ll> v[1234567];
set<ll> s,s1;
map<ll,ll> m;
int main(){
ios_base::sync_with_stdio(NULL);
cin.tie(NULL);
cout.tie(NULL);
cin>>n;
for(i=1;i<=n;i++){
cin>>p[i].first>>p[i].second;
}
sort(p+1,p+n+1);
for(i=1;i<=n;i++){
s.insert(p[i].F);
s.insert(p[i].S);
}
a=1;
for(auto i:s){
m[i]=a;
a++;
}
for(i=1;i<=n;i++){
p[i].first=m[p[i].first];
p[i].second=m[p[i].second];
//cout<<p[i].first<<" "<<p[i].second<<endl;
}
for(i=1;i<=n;i++){
v[p[i].first].pb(p[i].S);
}
c[0]=0;
for(i=1;i<=m.size();i++){
c[i]=max(c[i],c[i-1]);
for(j=0;j<v[i].size();j++){
c[v[i][j]]=max(c[i]+1,c[v[i][j]]);
}
//cout<<c[i]<<" ";
}
cout<<c[m.size()];
}
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.