có lẽ bài này testcase hơi lạ, các bạn có thể làm theo cách đơn giản là tính tổng diện tích của 3 hình chữ nhật
nếu sqrt(s) là số nguyên thì chứng tỏ nó ghép đc thành hình vuông
otcutie
#include
#define ll long long int
#define ull unsigned long long int
#define llb long double
#define fast ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define el cout<<"\n"
#define mod 1000000007
using namespace std;
int main()
{
fast
int n=3;
ull res=0;
while(n--)
{
ull a,b;
cin>>a>>b;
res+=a*b;
}
llb x=sqrt(res);
if (x*x== res)
{
cout<
Chi tiết bài tập - Luyện Code Online
https://luyencode.net/problem/PTIT031