We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int t;
scanf("%d",&t);
while(t--)
{
int n,x[10],y[10],i,minx=10000,maxx=-10000,miny=10000,maxy=-10000;
int flag=0;
scanf("%d",&n);
for(i=0;i=x[i])
minx=x[i];
if(maxx<=x[i])
maxx=x[i];
if(miny>=y[i])
miny=y[i];
if(maxy<=y[i])
maxy=y[i];
}
//printf("%d\t%d\t%d\t%d\n",minx,maxx,miny,maxy);
for(i=0;i
Points on a Rectangle
You are viewing a single comment's thread. Return to all comments →
include
include
include
include
int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int t; scanf("%d",&t); while(t--) { int n,x[10],y[10],i,minx=10000,maxx=-10000,miny=10000,maxy=-10000; int flag=0; scanf("%d",&n); for(i=0;i=x[i]) minx=x[i]; if(maxx<=x[i]) maxx=x[i]; if(miny>=y[i]) miny=y[i]; if(maxy<=y[i]) maxy=y[i]; } //printf("%d\t%d\t%d\t%d\n",minx,maxx,miny,maxy); for(i=0;i
}