-
Notifications
You must be signed in to change notification settings - Fork 156
Added Bangla Tutorial for LOJ-1012 Guilty Prince #415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @walleeva2018. Great efforts. The picture is really nice!
However, I feel that the tutorial consists mostly about implementation plans i.e. how you would write the code to solve it. It's better if you lose them and re-write as if you were summarize the solution without the codes and all; in plain sentences.
I see that there is already an existing tutorial in English (#108) and it's a good one. So what you could also do instead, is translate that one.
1012/bn.md
Outdated
আমরা প্রথমে একটি nxm ক্যারেক্টার অ্যারে তে আমাদের পুরো গ্রিড স্টোর করবো | ||
নিচের উদাহরণ এর মত একটি 2D অ্যারে তে আমরা ক্যারেক্টার গুলা নিব | ||
|
||
 | ||
|
||
ইনপুট টা কে অ্যারে তে স্টোর করার কোড | ||
``` | ||
cin>>m>>n; | ||
string s; | ||
for(int i=0; i<n; i++) | ||
{ | ||
cin>>s; | ||
for(int j=0; j<s.size(); j++) | ||
{ | ||
A[i][j]=s[j]; | ||
} | ||
} | ||
``` | ||
|
||
যেহেতু আমাদের @ থেকে শুরু করতে হবে সুতরাং আমাদের কোন সেল এ @ আছে টা কিছু একটা তে স্টোর করে রাখলাম । উদাহরণ হিসাবে উপরের চিত্রে (১,১) সেল টা আমাদের যাত্রা শুরুর সেল | ||
``` | ||
for(int i=0; i<n; i++) | ||
{ | ||
cin>>s; | ||
for(int j=0; j<s.size(); j++) | ||
{ | ||
A[i][j]=s[j]; | ||
if(A[i][j]=='@') | ||
{ | ||
x=i; | ||
y=j; | ||
} | ||
} | ||
} | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation plans.
1012/bn.md
Outdated
void dfs(int x,int y) | ||
{ | ||
if(x==n || y==m ||x==-1 || y==-1) | ||
return; | ||
if(vis[x][y]==1) | ||
return ; | ||
if(A[x][y]=='#') | ||
return ; | ||
cnt++; | ||
vis[x][y]=1; | ||
dfs(x+1,y); | ||
dfs(x,y+1); | ||
dfs(x-1,y); | ||
dfs(x,y-1); | ||
} | ||
``` | ||
### কিছু সতর্কতা | ||
প্রতি কেস এর পর vis এবং cnt ক্লিয়ার করতে হবে |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Implementation plans.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay Sir , I am fixing it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to fix it Sir. Can you review it and tell me what to do next
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks!
No description provided.