8.13ÉÏÎç
This commit is contained in:
parent
65b6b8310f
commit
78c5fe402c
46
8.13/E-VasyaTriangle/E-VasyaTriangle2.cpp
Normal file
46
8.13/E-VasyaTriangle/E-VasyaTriangle2.cpp
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
#include<iostream>
|
||||||
|
#include<cstdio>
|
||||||
|
#include<algorithm>
|
||||||
|
#include<cmath>
|
||||||
|
using namespace std;
|
||||||
|
int n,m,k;
|
||||||
|
int s,d,x;
|
||||||
|
|
||||||
|
int baoli()
|
||||||
|
{
|
||||||
|
int len=sqrt(s);
|
||||||
|
for(int i=1;i<=len;i++)
|
||||||
|
{
|
||||||
|
if(s%i==0)
|
||||||
|
{
|
||||||
|
if(x>=i&&d>=s/i)
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
scanf("%d%d%d",&n,&m,&k);
|
||||||
|
s=n*m/k*2;
|
||||||
|
d=m>n? m:n,x=m<n? m:n;
|
||||||
|
if(n*m*2%k!=0)
|
||||||
|
{
|
||||||
|
printf("NO");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
int i=baoli();
|
||||||
|
// printf("%d %d",d,x);
|
||||||
|
if(i>0)
|
||||||
|
{
|
||||||
|
if(x==n)printf("YES\n0 0\n%d 0\n0 %d",i,s/i);
|
||||||
|
else printf("YES\n0 0\n%d 0\n0 %d",s/i,i);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
printf("NO");
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user