Pagini recente » Cod sursa (job #2464981) | Cod sursa (job #2873876) | Cod sursa (job #1352451) | Cod sursa (job #1582249) | Cod sursa (job #2084067)
#include <fstream>
using namespace std;
ifstream cin("adunare.in");
ofstream cout("adunare.out");
int main()
{
int a,b;
cin>>a>>b;
cout<<a+b;
return 0;
}
/**#include <cstdio>
#include <algorithm>
#include <math.h>
using namespace std;
const double eps=1.e-12;
const int nm=120000;
struct point
{
double x,y;
};
point v[nm+5];
int h[nm+5];
point LL;
double cp(point p1,point p2,point p3)///cross product
{
return (p2.x-p1.x)*(p3.y-p2.y)*(p2.y-p1.y)*(p3.x-p2.x);
}
int ccw(point p1,point p2,point p3)
{
double ccp=cp(p1,p2,p3);
if(fabs(ccp)<eps)
return 0;
if(ccp>=eps)
return 1;
return -1;
}
double dist(point p1,point p2)
{
return sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y));
}
bool cmp(point a,point b)
{
double da,db;
int c=ccw(LL,a,b);
if(c==0)
{
da=dist(LL,a);
db=dist(LL,b);
if(da-db<=-eps)
return 1;
return 0;
}
if(c==1)
return 1;
return 0;
}
int main()
{
freopen(".in","r",stdin);
freopen(".out","w",stdout);
int n,i;
point temp;
double a,b;
scanf("%d",&n);
scanf("%lf%lf",&a,&b);
temp.x=a;
temp.y=b;
v[1]=temp;
for(int i=2;i<=n;i++)
{
scanf("%lf%lf",&a,&b);
temp.x=a;
temp.y=b;
v[i]=temp;
if(b-v[1].y<=-eps)
swap(v[1],v[i]);
else
if(fabs(b-v[1].y)<eps)
if(a-v[1].y<=eps)
swap(v[1],v[i]);
}
LL=v[1];
sort(v+1+1,v+n+1,cmp);
n++;
v[n]=v[1];
int top;
top=0;
h[top]=0;
top++;
h[top]=1;
i=3;
while(i<=n)
{
int c=ccw(v[h[top-1]],v[h[top]],v[i]);
if(c==0)
{
h[top]=i;
i++;
}
if(c==1)
{
h[++top]=i;
i++;
}
if(c==-1)
top--;
}
for(int i=0;i<top;i++)
printf("%lld%lld\n",v[h[i]].x,v[h[i]].y);
return 0;
}
**/