A Not https://vjudge.net/problem/AtCoder-abc178_a
签到
#include<iostream>
#include<string>
#include<queue>
#include<algorithm>
#include<cstdlib>
#define inf 0x3f3f3f3f
typedef long long ll;
using namespace std;
const int maxn=1e5+5;
int n,k;
ll a[maxn];
ll mp[maxn];
int main()
{
int n;
cin>>n;
if(n==1) cout<<0<<endl;
else cout<<1<<endl;
return 0;
}
B Product Max https://vjudge.net/problem/AtCoder-abc178_b
签到
#include<iostream>
#include<string>
#include<queue>
#include<algorithm>
#include<cstdlib>
#define inf 0x3f3f3f3f
typedef long long ll;
using namespace std;
const int maxn=1e5+5;
int n,k;
int main()
{
ll a,b,c,d;
cin>>a>>b>>c>>d;
ll maxx=0;
ll a1=a*c;
ll b1=a*d;
ll c1=b*c;
ll d1=b*d;
cout<<max(max(a1,b1),max(c1,d1))<<endl;
system("pause");
return 0;
}
C Ubiquity https://vjudge.net/problem/AtCoder-abc178_c
快速幂
#include