Cod sursa(job #639123)
| Utilizator | Data | 22 noiembrie 2011 15:39:10 | |
|---|---|---|---|
| Problema | DreptPal | Scor | 0 |
| Compilator | cpp | Status | done |
| Runda | Arhiva de probleme | Marime | 0.37 kb |
#include<stdio.h>
int a[1001][1001],b[1001][1001],i,j,n,m,k,l,s;
FILE *f,*g;
int main()
{
freopen("dreptpal.in","r",stdin);
freopen("dreptpal.out","w",stdout);
scanf("%d%d",&n,&m);
for(i=0;i<n;i++)
for(j=0;j<m;j++)
scanf("%d",&a[i][j]);
for(i=0;i<n;i++)
for(j=1;j<m-1;j++)
{k=1;
while(a[i][j-k]==a[i][j+k]&&k<=j&&k<n-j) k++;
b[i][j]=2*k-1;
}
}
