# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
12661 | dohyun0324 | Min-cost GCD (GA9_mcg) | C++98 | 306 ms | 1084 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
#define M 922337203685477580LL
int t,w;
long long x,y,p,q,dap;
struct data
{
long long x,y;
}a[101];
struct data2
{
long long mi,ma;
}d[101];
void gcd(long long x,long long y)
{
w++; a[w].x=x; a[w].y=y;
if(x%y==0) return;
gcd(y,x%y);
}
int main()
{
int i,j;
scanf("%d",&t);
for(i=1;i<=t;i++)
{
dap=M; w=0;
for(j=1;j<=100;j++) d[j].ma=M, d[j].mi=M;
scanf("%lld %lld %lld %lld",&x,&y,&p,&q);
if(x==y){
if(p>q) printf("%lld\n",q);
else printf("%lld\n",p);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |