Блог пользователя rezaulhsagar

Автор rezaulhsagar, 7 лет назад, По-английски

Hello,

We are sorry to bother you by this post. But currently we don't find any better solution by ourselves.

Recently we(me & rifat_072) were learning matching / flow related topics. But we have found that, these topics are hard nut to crack. We know some algorithms like, Hungarian algorithm for matching, Edmond Karp etc. But we failed to find a friend who knows flow / matching related topics well enough to clear our confusion in some areas. If you have enough time to help us, kindly message in private so that we may discuss the topics over video / voice call over any social networking site.

Thanks in advance for your kind help.

Полный текст и комментарии »

  • Проголосовать: нравится
  • +12
  • Проголосовать: не нравится

Автор rezaulhsagar, история, 7 лет назад, По-английски

Hello! I'm facing some difficulties here in this problem. I thought it would be a straightforward data structure problem. But the memory constraints here made me about to cry. Is there any way to cut the problem down to a 1D BIT?

Problem link: SPOJ — CCOST

Полный текст и комментарии »

  • Проголосовать: нравится
  • +5
  • Проголосовать: не нравится

Автор rezaulhsagar, история, 8 лет назад, По-английски

Hi, In a graph problem, I need to memset a whole 2D array with a large value that denotes INFINITY.

Currently, I am doing this by running a O(N*N) loop.

const int maxx = something;
int grid[maxx+7][maxx+7];
for(int i=0;i<maxx;i++){
   for(int j=0;j<maxx;j++){
      grid[i][j] = large_value;
   }
}

Is there a better way to do this?

Also, I have tried memset function.

memset(grid,127,sizeof grid) resets all values to 2139062143

memset(grid,128,sizeof grid) resets all values to -2139062144

Why memset works like this?

Thanks in advance!

Полный текст и комментарии »

  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится

Автор rezaulhsagar, история, 9 лет назад, По-английски

Hi all!

This is my first entry on Codeforces. Ignore my bad English.

Over the last few weeks my contest performance was terribly poor. It's not the fact that the problems are too much hard. Even I can solve it on paper in less than 10 minutes with implementation. Then after coding, I submitted and and got several WAs.

The mistakes were too funny. Not clearing vector elements, not using parenthesis in an equation, displaying wrong variable, using a[i] instead of i bla blah... :(

I have a strange mentality. During contest time, I feel I need to solve quickly. As my friends are solving Div-2 A in less than 15 minutes, I feel embarrassed to be the lower ranked on the table. So, after seeing WA in a pretest, I want to debug quickly. I use a long long instead of int, resubmit, WA again in same pretest. (Isn't it funny?)

I don't want to quit problem solving. But, this is too frustrating when I make same mistakes over and over again. I hate being gray.

Is there any remedy against it? Should I stop taking part in contests for some time?

Any suggestion?

[frustrated emo]

Полный текст и комментарии »

  • Проголосовать: нравится
  • +47
  • Проголосовать: не нравится