A - Weird Function
题意:给一个方程,求值
#include<bits/stdc++.h>
#define ios ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
const int mod=1000000007;
const double eps=1e-8;
ll f(ll x)
{
return x*x + 2 * x + 3;
}
ll t;
int main(){
cin>>t;
cout<<f(f(f(t) + t) + f(f(t)));
return 0;
}
B - Longest Segment
题意:给一些二维平面的点,求两点间的最长距离
#include<bits/stdc++.h>
#define ios ios::sync_with_stdio(false),cin.tie(0),cout.tie(0);
typedef long long ll;
typedef unsigned long long ull;
using namespace std;
const int mod=1000000007;
const double eps=1e-8;
struct node
{
double x,y;
}no[110];
double dis(double a,double b,double a1,double b1)
{
return pow((a-a1)