bvd's blog

By bvd, history, 23 months ago, In English,

I'm currently stuck on Sortware Bugs — CTU Open 2012.

Problem Summary:

You're given a string S and a string B (S has at most 107 characters, and B has at most 1000 characters); and you need to remove B from S repeatedly until there is no B in S.

Can you give me some hints? I have been trying to solve this problem for two days, and I cannot figure out any way to solve this problem.

There is a solution on the Internet; however, since it is not in English (and Google Translate didn't help much), I cannot understand it :(.

Thank you :)

Read more »

 
 
 
 

By bvd, history, 2 years ago, In English,

17493195_1919527948281479_2748595590774946471_o.jpg

English version:

The first problem is similar to Problem G — Inverse Factorial in 2016 ICPC North American Qualifier Contest; however, there is a twist: if there is no n for the given value n!, you need to output  - 1.

I think there is a solution for this problem, but I can not find it :)

By the way, a gifted 9-grader in Vietnam has no idea about FFT anything similar to that.

Read more »

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

By bvd, history, 3 years ago, In English,

This is how I normally calculate the determinant of a matrix.

However, the complexity of this algorithm is O(n!).

How to calculate it in polynomial time?

P.S: Why I need to calculate the determinant of a matrix in polynomial time?

Read more »

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

By bvd, history, 3 years ago, In English,

English version

Find all prime numbers between N and M, with 0 < N < M < 1025.

A further classification said that the time limit is 1 second and M - N < 109.

I'm wondering if there is a solution for this problem.

Read more »

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