### Bakry_'s blog

By Bakry_, history, 17 months ago,

Hi, I tried to change my handle to Bakry but it said: "this handle is currently in use"

but this handle didn't participate in any contest or post any comments and it's inactive from 2016.

Also, my friend tried to change his handle to Dr_Evil (which is inactive from 9 years) but he faced the same problem.

MikeMirzayanov

• +28

By Bakry_, history, 2 years ago,

hello, there's something weird happened to me in szkopul website which caused TLE and after small changes to the code, it got AC..it happened to me in 2 problems.

1 — first problem : POI10-sums

I got 90 with this code and got TLE in test case 8 , but after that I got the full score using this code , the only difference between the two codes is that loop in dijkstra which in first code is :

for(int i = 0 ; i < n ; ++i)
{
int now2 = now + arr[i] ;
int cur2 = (cur + arr[i]) % arr[0] ;
if(now2 > 1e9)
continue ;
if(now2 < vis[cur2] && now2 <= 1e9)
{
vis[cur2] = now2 ;
q.push({now2 , cur2}) ;
}
}


but in second code it's :

for(int i = 0 ; i < n ; ++i)
{
int now2 = now + arr[i] ;
int cur2 = (cur + arr[i]) % arr[0] ;
//if(now2 > 1e9)
//    continue ;
if(now2 < vis[cur2] && now2 <= 1e9)
{
vis[cur2] = now2 ;
q.push({now2 , cur2}) ;
}
}


so the only difference is that I put this comment , there's no additional loop or nothing and the condition also was right.

2 — second problem : POI15-seals

I got 56 with this code and got TLE at test case 6, 7, 8, and 9, after that I made a small change and got 100 with this code, the only difference is that I made

char arr[n][m] , arr2[a][b] ;


in the first code , and replaced it with

vector<string>arr(n) ;
vector<string>arr2(a);


in the second code, and I don't think that makes that great difference because it's the same time in taking input.

so I would like to know what makes first codes in this two problems get TLE and after very small differences it got the full score even that these small differences don't affect the time of the codes.

hope the blog wasn't long and hope to know the reason of TLE.

Thanks.

• +12

By Bakry_, history, 2 years ago,

after rating updated in Codeforces....now ratings returned as it was before the last contest...even in contest standing there's no rating changes....so what's the reason for that

UPD : ratings came back

• +45

By Bakry_, history, 3 years ago,

When I opened problem set and sorted it , It showed me palindromic twist is the first!!

Update : It's solved now

• +22

By Bakry_, history, 3 years ago,

• +29

By Bakry_, history, 3 years ago,

Why Wrong Answer in this Problem

I Solved it using Segment tree and lazy propagation

• 0

By Bakry_, history, 3 years ago,

Hello CF Community

They Said That To Compete You must be higher than 18 years

So Is there way to participate in Facebook Hacker Cup For People < 18 ?

At Most For Competing Not For Winning Prizes

• -16

By Bakry_, history, 3 years ago,

I Found This Library on GitHub which is For preparing Tests For Problems and It's written in C++ , I Think It will help Problem Setters For Rounds

https://github.com/ifsmirnov/jngen

• +3

By Bakry_, history, 3 years ago,

Anyone have good resources for tabulation in DP

• -32

By Bakry_, history, 3 years ago,

Hello ,

I saw most of programmers in Codeforces use Tabulation more than Memoization So , Why most of competitive programmers use Tabulation instead of memoization ?

• +6

By Bakry_, history, 4 years ago,

It's the first problem for me to solve with DFS , So I can't understand why it's wrong Answer on test 6 The link of code and submission : http://codeforces.com/contest/580/submission/30840380 Problem link : http://codeforces.com/problemset/problem/580/C

• -3

By Bakry_, history, 4 years ago,

Is there's anyone has good tutorial or Video that describe Bitmask with cases ? In C++

• 0

By Bakry_, history, 4 years ago,

There's Wrong Answer on test case 14 I tried to solve it But What's in Code wrong that lead to print 146 instead of 120 Code : https://ideone.com/gwUN8C Problem : http://codeforces.com/contest/186/problem/B Submission : http://codeforces.com/contest/186/submission/30480217

• +1

By Bakry_, history, 4 years ago,

I want to Know what's the answer for this Problem And What's the technique to solve with ? http://codeforces.com/contest/842/problem/A

• +1

By Bakry_, history, 4 years ago,

I have Problem now in Codeforces when I submit solution for Problem it give me in queue I waited +13 minutes but it's also in queue Any Solution for this Problem ?

• -2

By Bakry_, history, 4 years ago,

What's the needed Math for problem Solving What's necessary To learn in Mathematics in Algebra