Skip to content

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

Merged
merged 19 commits into from
Feb 4, 2023

Conversation

walleeva2018
Copy link
Contributor

No description provided.

Copy link
Member

@rebornplusplus rebornplusplus left a 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
Comment on lines 15 to 50
আমরা প্রথমে একটি nxm ক্যারেক্টার অ্যারে তে আমাদের পুরো গ্রিড স্টোর করবো
নিচের উদাহরণ এর মত একটি 2D অ্যারে তে আমরা ক্যারেক্টার গুলা নিব

![alt text](https://user-images.githubusercontent.com/72943111/202870913-02f03555-4222-4eed-a889-b6aee8117c38.png)

ইনপুট টা কে অ্যারে তে স্টোর করার কোড
```
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;
}
}
}
```

Copy link
Member

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
Comment on lines 62 to 79
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 ক্লিয়ার করতে হবে
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation plans.

Copy link
Contributor Author

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

Copy link
Contributor Author

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

Copy link
Member

@rebornplusplus rebornplusplus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks!

@rebornplusplus rebornplusplus merged commit dad33d9 into lightoj-dev:main Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants