### KimJennie's blog

By KimJennie, history, 2 months ago, Hello, Codeforces!

I was creating a problem and faced with one problem. The task is:

given n, print a, b, c, d > 1 such as a*b*c*d = n. In some cases, there are a lot of choices, how to consider all of them? For example, if n = 80, and my code prints 2*4*5*2, and user prints 10*2*2*2, my code with ncmp checker gives WA. How to fix it? By KimJennie, history, 2 months ago, Hello, Codeforces!

I want to copy one task from problemset to my mashup, not the whole contest. How can I do it? By KimJennie, history, 2 months ago, I have created mashup in gym and loaded task. But then I found mistake and fixed it in polygon and commited changes, but nothing changed in my problem in mashup. What should I do? By KimJennie, history, 2 months ago, Hello, Codeforces!

Since I started learning digit dp, I want to solve problems for it. So, could you provide some tasks for using digit dp? Please, give me links of not so hard digit dp problems.

Thanks! By KimJennie, history, 3 months ago, Now, plenty of account photos are unavailable

Sorry for disturbing MikeMirzayanov, but maybe my post will be useful.

By KimJennie, history, 3 months ago, Was trying to solve this https://codeforces.com/gym/101021/problem/1 but getting Idleness Limit Exceeded. Can you please help me? My code is here:

void solve(){
int n;
int l = 0, r = 1e6, m; cin >> n; string s;

while(l + 1 < r){
m = (l+r)/2;
cout << m << endl;
cin >> s;
if(s == "<")
l = m;
else
r = m;
}
cout << "! " << r << endl;


}

int main(){ int T = 1;

while(T--)
solve();
return 0;


}

By KimJennie, history, 3 months ago, Know, that there will be editorial, but can you pls help to solve this task from today's contest. Is the main idea bipartite graph?

By KimJennie, history, 3 months ago, Hello, Codeforces!

I have next task: given string s and t. And I have to find does s contains t, and if yes, I should print the first i that [i..i+t.size()-1] = t How can I do it? I counted hash from all t in variable(hsh += (t[i] - 'a' + 1) * ppow) and hash from s in array (h[i] = (s[i] - 'a' + 1) * p_pow[i]). So I run from 0 to s.size()-t.size() and count hash in [l;r] using formula h(s[l:r]) = (h[r]-h[l])/p^l. But when s = "ab" and i count hash where l = 0, r = 1, I got 62, not 63. Where is my mistake? Please help me By KimJennie, history, 3 months ago, Hello, Codeforces!

I have to find MST with this algorithm, but got WA. Can you please help me? I would really appreciate that.

My submission: https://pastebin.com/P4nGmhRM Problem: https://codeforces.com/gym/100088/attachments It's in russian, but the idea is:

There are n cities. The mayor of city wants to build a roads, so you were able to visit one city from any another. And there are given n (x; y) coordinates, and you have to find minimum spanning tree. Obviously, in graph i and j (1 <= i,j <= n) are vertices, and the weight of edge is (x[i]-x[j])^2 + (y[i]-y[j])^2. By KimJennie, history, 3 months ago,  