Hi everyone.
JUST COMMENT CODE EDITOR USED BY YOU IN THE COMMENT SECTION.
I promise to come up with results IN 2 DAYS.
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Hi everyone.
JUST COMMENT CODE EDITOR USED BY YOU IN THE COMMENT SECTION.
I promise to come up with results IN 2 DAYS.
Can someone tell all important algorithms and all important concepts required for COMPETITIVE PROGRAMMING...
There is a great need for some guidance...I googled it but it tells the things that I already know. Thanks to all in advance. All comments are invited. Anyone can post any informative link.
[problem:1420 D] I dont know how to calculate N(c,r) by LOGIC applied in given below Mod_Inverse FUNCTION. Without this logic, this problem can't be solved. In the below code all factorials were precalculated till 3e6.
Tell me what problem was there in directly doing n! / ( r! * (n-r)! )....instead of using Mod_Inverse FUNCTION ...
((below code is not my code . I have got it from submissions.))
below is a code segment only to calculate N(c,r)...
(((( Fact[i] means (factorial i) or i! ))))
ll NCR (ll n, ll r, ll p)
{
if (r == 0)
{
return 1;
}
return (( Fact[n] * Mod_Inverse(Fact[n - r], p) ) % p * Mod_Inverse(Fact[r], p) ) % p ;
}
ll Mod_Inverse(ll a, ll m)
{
// m is A prime NUMBER.
return Fast_Mod(a, m - 2, m);
}
ll Fast_Mod(ll a, ll b, ll m)
{
ll Result = 1;
while (b > 0)
{
if (b & 1)
Result = (Result * a) % m;
a = (a * a) % m;
b = b >> 1;
}
return Result;
}
You need to have a lot of patience when you start your coding journey. At first,you need to learn basics like for loops,basic math etc. After 6 months you need to start solving questions on code-forces and other platforms. You need to have a lot of patience in order to increase ratings. It is a long process. First solve easy problems then increase levels, 1 step at a time.
After learning basics of a language like c++(preference) or any other language ,you need to start learning data structures topic wise. Again you need to give time to each topic. Then after many days you will self realize that you have come a long way ahead .
Название |
---|