cn.Hwongfish's blog

By cn.Hwongfish, history, 4 years ago, In English

Understanding Poor Bad English Learner

  • I'm a typical Poor English Learner , and now I want to speak out my experience and hope you can understand us.
  • In this global webside, there are many poeple with different language, but we need to make it unity, so we must use English or Russian,but someone like me is not good at it, some words from us is may provocative or negative so it's a problem for us.
PROBLEMSET
  • I came Codeforces just 5 month ago, and I think this comunity are not friendly for English beginners.
  1. When you said: pleeeeease! or yessir! we are thinking about: "eeeeee" and "ss",so if you want to share some ideas please use offical words(the full spelling), thanks~
  2. Not good at speaking make us feel bored, because we can't let others get our meaning well, and people attack on my "negative" word, then we won't send anything more. This's not good for open comunity surroundings,so if you see someone provocative, think twice when you reply。
  3. If we can't read the messages well we may think he is provocative, we will call his name maybe, remind us please. I hope we can keep this webside prositive always, if you have something to say, speak out below thanks.

Full text and comments »

  • Vote: I like it
  • +18
  • Vote: I do not like it

By cn.Hwongfish, history, 4 years ago, In English
  • Hello!
  • I really love this problem very classic and interesting.
  • (JUST novice coder)
  • 377-A Maze
  • My algorithm has these points need to be careful:
    • 1.If we want to let the maze still connected we can just delete the unit that doesn't have their son
    • 2.dfs's end is the unit that doesn't have their son
    • 3.Put the "X" onto it!
#include<iostream>
using namespace std;
int dx[4] = { 0,0,1,-1 };
int dy[4] = { 1,-1,0,0 };
int n = 0, m = 0, k = 0;
bool st[501][501] = { 0 };
char map[501][501] = { 0 };
bool dfs(int x, int y) {
	st[x][y] = 1;
	for (int i = 0; i < 4; i++)
	{
		int x1 = x + dx[i];
		int y1 = y + dy[i];
		if (!st[x1][y1] && map[x1][y1] == '.')
		{
			dfs(x1, y1);
		}
	}
	if (k > 0) {
		map[x][y] = 'X';
		k--;
	}
	return false;
}
int main() {
	scanf("%d%d%d", &n, &m, &k);
	for (int i = 0; i < n; ++i)
		scanf("%s",map[i]);
	int ti = 0, tj = 0;
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < m; j++)
			if (map[i][j] == '.')
			{
				dfs(i, j);
				for (int i = 0; i < n; ++i) {
					for (int j = 0; j < m; ++j)
						printf("%c", map[i][j]);
					printf("\n");
				}
				return 0;
			}
	}
	return 0;
}

Full text and comments »

  • Vote: I like it
  • -12
  • Vote: I do not like it

By cn.Hwongfish, history, 4 years ago, In English

Tutorial For: 493-C Vasya and Basketball

  • Hello! This is my frist blog of course, my English is not very good, forgive me.
  • (JUST novice coder)
  • 493C - Вася и баскетбол\
  • My algorithm has these points need to be careful:
  • 1: I put the data of to teams together (int c[]).
  • 2: I assume the line is on 0, and team 1 has (3*n) points, team 2 has (3*m).
  • 3: SORT THE DATA
  • 4: I enumeration every distance which we can see it in data of BOTH team.
  • 5: Don't forget to enumeration the distance after the data (the: n+1).
HaHaHa,let me laugh at myself for a minute!
  • code:
  • (if you have some question or hacking, please ask me below)
  1. #include<iostream>
  2. #include<algorithm>
  3. using namespace std;
  4. pair<int, int> a[500000] = { make_pair(0, 0) };
  5. int n = 0, m = 0;
  6. int x = 0, y = 0, mx = 0, my = 0;
  7. int main() {
  8. cin >> n;
  9. for (int i = 0; i < n; ++i)
  10. cin >> a[i].first, a[i].second = 0;
  11. cin >> m;
  12. for (int i = n; i < m + n; ++i)
  13. cin >> a[i].first, a[i].second = 1;
  14. sort(a, a + n + m);
  15. x = n * 3; y = m * 3;
  16. mx = x; my = y;
  17. for (int i = 0; i < n + m; ++i) {
  18. if (a[i].second == 0)x--;
  19. else y--;
  20. if (x &mdash; y > mx &mdash; my)
  21. mx = x, my = y;
  22. }
  23. printf("%d:%d\n", mx, my);
  24. }

Full text and comments »

  • Vote: I like it
  • +4
  • Vote: I do not like it