Rating changes for last rounds are temporarily rolled back. They will be returned soon. ×

Boring_Day's blog

By Boring_Day, history, 19 months ago, In English

Lets say you have a matrix. Write a function which takes cell points and a number k. (It returns sum from rows).

for ex: func(i, j, k) here i and j are cell position. And k is a number. // I want sum from continuous rows.

I want sum from mat[i][j-k] to mat[i][j+k] + sum from mat[i-1][j-(k-1)] to mat[i-1][j+(k-1)] + sum from mat[i-2][j-(k-2)] to mat[i-2][j+(k-2)] and so on. If you go out of border add zero (do nothing).

Help me please Tell me if i clearly explai the problem or not.

Full text and comments »

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

By Boring_Day, history, 19 months ago, In English

If it is possible to create a vector of class then it should not be an issue to create vector of segment tree in c++.

Can you help me in these two things.

1st) when the size of segment tree at each index is same.

2nd) when the sizes at different indices are different.

Even if you help me solve the 1st thing i will be thankful to you.

Full text and comments »

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

By Boring_Day, history, 20 months ago, In English

Can someone help me solve this task?

You are given mysql workbench and as you know that there is an option of auto increment in workbench for primary key which takes the maximum used number adds 1 to it for new row generations. But your task is to take the minimum value which is not present in the table as primary key for newly formed row.

So, how will you solve this task? Help

Full text and comments »

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

By Boring_Day, 21 month(s) ago, In English

Yeah i am talking about the same thing happened in previous contest but don't you think that those guys who reached expert/CM tag don't deserve it. It is really unfair.

That round must be unrated. You can say ratings doesn't matter but then making the round unrated should not be an issue.

Full text and comments »

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

By Boring_Day, history, 21 month(s) ago, In English

As we can see that some people have habit of directly using recursive dp even for the easiest of the problems. But it becomes very problematic. You can't solve problems in which you need to save memory by knowing the previous row, and also in some prolems like recent E "Sum over zero" where you will face some issue related to time and memory. And i don't think it's possible to solve it with recursive dp. So i would suggest you guys to solve problems with iterative dp. Make a habit of using iterative dp. It will be beneficial for you guys in future.

Full text and comments »

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

By Boring_Day, history, 22 months ago, In English

Why next cf contest is coinciding with leetcode contest. I am so confused. In which contest must i participate?

Full text and comments »

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

By Boring_Day, 22 months ago, In English

You are given a tree. Each node has a value. You need to choose three distinct paths in the tree. Let's suppose that

P1= sum of path 1, p2 = sum of path 2, P3 = sum of path 3

Print minimum and maximum possible value of

|P1-P2| + |P2-P3| + |P3-P1|

Constraints 3<= n <= 2e5

Full text and comments »

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

By Boring_Day, history, 22 months ago, In English

I have seen many of my smart friends not getting a job where many dumb girls are getting it easily. What's the matter. Can someone explain?

Full text and comments »

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

By Boring_Day, history, 22 months ago, In English

I can't see any div3-div4 in contest. I have been waiting since a long time now. Is there anyone who can guess a date on which we expect a div-3 or div 4

Full text and comments »

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

By Boring_Day, 2 years ago, In English

This person Sneh_Patel_0701 has cheated very badly that now he is going to become expert. you can see for G even the template is not same. Sir, MikeMirzayanov some people are trying hard to reach that blue colour and some are just getting it for no efforts. please ban these people so that the cheaters will think twice before cheating. A humble request!

This person sneh_patel_0701 cheats in almost all the rounds but still didn't get caught. and now he is going to become expert. That's the reason i have written the blog.

Thank you

Full text and comments »

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

By Boring_Day, history, 2 years ago, In English

They have removed my participation of round G from certificate. Can you guys confirm that it's not only me.

Can you see your round G participation in the certificate tell.

Full text and comments »

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

By Boring_Day, history, 2 years ago, In English

So today i was learning about c++ lambda functions. and i have some doubts.

Q.1) See this

why the output is 2?

Q.2) another question

This is giving me runtime error why?

tell me

Full text and comments »

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

By Boring_Day, history, 2 years ago, In English

hey i want to calculate something i needed some attention so i wrote must read blog.

let's say i want to calculate a*b % P where 0<= a,b <= 1e9 and p = 1e9+7

how to calculate this by using only integer number i don't want to use long long as many stupid people do.

Full text and comments »

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

By Boring_Day, history, 2 years ago, In English

I was solving yesterday's c with a different approach. To solve it with my technique what i need to know is:

Let's say we have a string 's' of length 'n' with parenthesis ('(' or ')') and we have queries with 'L' and 'R' (1<=L<=R<=N).

we need to tell whether the substring from L to R is balanced or not.

Is there any way to solve the queries in constant time or lets say log(n) time?

Please Help.

Full text and comments »

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