Sunday, April 24, 2016

Published April 24, 2016 by with 3 comments

UVA 11364: Parking -Solution

#include <stdio.h>
int main()
{
    int t, n, p,i, max,min,d;
    scanf("%d",&t);
    while (t--)
    {
        scanf("%d",&n);
        max=0;
        min=50000;
        for (i=0;i<n;i++)
        {
            scanf("%d",&p);
            if (max<p) max=p;
            if (min>p) min=p;
        }
        d=(max-min)*2;
        printf("%d\n",d);
    }
    return 0;
}
      edit

3 comments:

  1. আসসালামু আলাইকুম, ভাই, এ প্রশ্নটা বুঝাই দেয়া যাবে, প্লিজ?

    ReplyDelete
  2. I appreciate the hassle-free use of disposable vapes. Boutiq carts

    ReplyDelete