Cod sursa(job #1257930)
Utilizator | Data | 8 noiembrie 2014 12:23:04 | |
---|---|---|---|
Problema | Rj | Scor | 0 |
Compilator | cpp | Status | done |
Runda | Arhiva de probleme | Marime | 0.92 kb |
#include <iostream>
#include <fstream>
#include <conio.h>
using namespace std;
const int dx[]={7,-1,-1,0,1,1,1,0,-1};
const int dy[]={7,0,1,1,1,0,-1,-1,-1};
int mr[102][102],mj[102][102],n,m,xj,yj,xr,yr;
void citit()
{
int i,j;
char s[101];
ifstream f("rj.in");
f>>n>>m;
f.getline(s,3,'\n');
for(i=1;i<n;i++)
{
f.getline(s,100,'\n');
for(j=0;j<m;j++)
{
if(s[j]=='r')
{
xr=i;
yr=j+1;
}
else
{
if(s[j]=='j')
{
xj=i;
yj=j+1;
}
else
{
s[j]=='x';
mr[i][j+1]=mj;
mj[i][j+1]=1;
}
}
fclose(;);
}
}
}
int main()
{
return 0;
}