Pagini recente » Cod sursa (job #2470006) | Cod sursa (job #811083) | Cod sursa (job #760156) | Profil Pepelea_Flaviu | Cod sursa (job #420968)
Cod sursa(job #420968)
#include <stdio.h>
FILE *f=fopen("kdrum.in","r");
FILE *g=fopen("kdrum.out","w");
int n,m,k,xi,xj,yi,yj,a[51][51],i,j,s;
int main()
{
fscanf(f,"%d %d %d",&n,&m,&k);
fscanf(f,"%d %d %d %d",&xi,&xj,&yi,&yj);
for(i=1;i<=n;i++)
for(j=1;j<=m;j++)
fscanf(f,"%d",&a[i][j]);
s=(yi-xi)+(yj-xj)+1;
fprintf(g,"%d",s);
fclose(f);
fclose(g);
return 0;
}