delete pics to save space

This commit is contained in:
2023-08-03 09:22:52 +08:00
commit de60cd6ed4
1334 changed files with 66221 additions and 0 deletions

24
2.839.cpp Normal file
View File

@ -0,0 +1,24 @@
#include<iostream>
using namespace std;
bool solve(int& w)
{
int w1,w2,d1,d2;
bool b1=1,b2=1;
cin>>w1>>d1>>w2>>d2;
if(!w1) b1=solve(w1);
if(!w2) b2=solve(w2);
w=w1+w2;
return b1&b2&&(w1*d1==w2*d2);
}
int main()
{
int t,w;
cin>>t;
while(t--)
{
if(solve(w)) cout<<"YES"<<endl;
else cout<<"NO"<<endl;
if(t) cout<<endl;
}
return 0;
}