btme's blog

By btme, history, 3 years ago, In English

can someone help me :( I solved almost 950 problems on codeforces of difficulty level till 2000 but still I am not able to perform well at contest.. where I am going wrong

Full text and comments »

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

By btme, history, 4 years ago, In English

POST LINK

WHY I AM GETTING DOWNVOTE ON THIS POST. I HAVE JUST ASKED A PROBLEM AND EXPLAINED IT PROPERLY? CAN ANYONE TELL MY MISTAKE??

IS ASKING QUESTION ON CODEFORCES POST IS NOT ALLOWED? OR IS IT THE WRONG METHOD OF ASKING PROBLEM?

Full text and comments »

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

By btme, history, 4 years ago, In English

CAN ANY ONE HELP ME WITH THIS PROBLEM?

There are N people in a country and everyone needs to be given two doses of covid vaccination. The government provided two arrays X and Y, of length M.

*Xi denotes that exactly Xi people should be vaccinated with the first dose on the ith day of vaccination 
*Yi denotes that no more than Yi people should be vaccinated with the second dose on the ith day

It is given that if a person is vaccinated with the first dose on a jth day, then the second dose should be on day j or later.

Find the total no of ways in which government can assign day of two doses to each of the n people such that all the people are vaccinated in M days. Since the answer can be very large, return it modulo 10^9+7.

Note: It is given that the sum of all Xi is equal to N. Also it is guaranteed that Xi<=Yi

1<=N<=1000 1<=M<=100 0<=Xi<=100 0<=Yi<=100

Example: N 3 M 2 X-> 1,2 Y-> 2,2

OUTPUT=3

Full text and comments »

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

By btme, history, 4 years ago, In English

image1 image2 can anyone help how to solve it?

Full text and comments »

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

By btme, history, 4 years ago, In English

problem link- I am not able to understand the editorial also .... help... its an interesting problem

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By btme, history, 4 years ago, In English

Let n be an integer. Consider all permutations on integers 1 to n in lexicographic order, and concatenate them into one big sequence p. For example, if n=3, then p=[1,2,3,1,3,2,2,1,3,2,3,1,3,1,2,3,2,1] . You are given n. Find the number of subarrays of p of length n having sum n(n+1)2. Since this number may be large, output it modulo 998244353 problem link

I AM NOT ABLE TO GET THE PART WHICH I HAVE MARKED WITH RECTANGLE. HOW THE FORMULA N!/K! CAME????????????

Full text and comments »

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

By btme, history, 4 years ago, In English

Q — there is a N*N square matrix cosisting of three char A,B and C … how many pairs of cells can we select so that if that pair of cells is removed from the sqaure matrix and then it is possible to cover the remaining portion(all remaining cells) of square by 1 X 2 tiles constrain — 1≤N≤1000 problem link —

Full text and comments »

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

By btme, history, 4 years ago, In English

How to solve problem D any help would be appreciated

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it