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 "grader.h"
void Rescue(int r, int c, int x, int y, int h) {
int i,j,p,k;
p=y;
for(i=r;i>=x;i--)
{
for(j=p;j<=c;j++)
{
k=Measure(i,j);
if(k==h) Pinpoint(i,j);
if(k<h) break;
}
p=j;
}
p=y;
for(i=1;i<=x;i++)
{
for(j=p;j<=c;j++)
{
k=Measure(i,j);
if(k==h) Pinpoint(i,j);
if(k<h) break;
}
p=j;
}
p=y;
for(i=1;i<=x;i++)
{
for(j=p;j>=1;j--)
{
k=Measure(i,j);
if(k==h) Pinpoint(i,j);
if(k<h) break;
}
p=j;
}
p=y;
for(i=r;i>=x;i--)
{
for(j=p;j>=1;j--)
{
k=Measure(i,j);
if(k==h) Pinpoint(i,j);
if(k<h) break;
}
p=j;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |