About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

বুধবার, ২ সেপ্টেম্বর, ২০১৫

Regionals 2011 >> Africa/Middle East - Arab Contest (ACM ICPC LIVE ARCHIVE 6008) - Between the Mountains

#include <bits/stdc++.h>
#define sc(a) scanf("%d",&a)
#define scd(a,b) scanf("%d%d",&a,&b)
#define sct(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define READ freopen ("input.txt","r",stdin)
#define MV 20
using namespace std;

int main()
{
 //   READ;
    int test,x,y;
    sc(test);
    int a[10004],b[10004];
    while(test--)
    {
        sc(x);
        for(int i=0; i<x; i++) sc(a[i]);
        sc(y);
        for(int i=0; i<y; i++) sc(b[i]);
        int res=0x7fffffff;
       // cout<<res<<endl;
        for(int i=0; i<x; i++)
        {
            for(int j=0; j<y; j++)
            {
               res=min(res,(abs(a[i]-b[j])));
            }

        }
        cout<<res<<endl;

    }
    return 0;
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন