hi there <3 share your style of training i mean when you go on more virtual contests , solve hard problems , time you give to problem , what you do when you want to break new rate I hope this blog are useful for me and others
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
hi there <3 share your style of training i mean when you go on more virtual contests , solve hard problems , time you give to problem , what you do when you want to break new rate I hope this blog are useful for me and others
hey there ! i don’t know many people in the field of cp. I would like to participate in the IEEE competition this year and am looking for someone from Egypt who is interested in joining me.
i tried to solve this problem but i have WA 19 , many trials without result so i hope some one can help me <3
my solutin idea :
for each u we preprocess it that we store for it the 1<<k elemnt after u in valid sequence dp[u][k] and sum untill this elemnt sum[u][k] >> so we can ans queryies about u in log time
submission : 268374991
i don't know if this work for all contests ! but if u want to see the wrong case in your code in GYM (if the test cases are hidden) clone the contest and u can see the test cases for your submission .
https://mirror.codeforces.com/edu/course/2/lesson/5/4/practice/contest/280801/problem/F
this the lst problem at edu >>segment tree >>part2 the submissions are closed so i need hint !
UPD :
finaly I got AC !
i'm not good enough to write educational blogs but i write this part as i didn't a lot of sources that explain dynamic segtree . this problem need a dynamic segtree . the idea is that when you have large array (1...1e9)
it's difficult to make the normal segment tree because this need large space but in the same time time complexity is ok and the number of nodes that i visit over all queries are q*(log N) so why we need all this space ?
we can just start from the root nd and iterate on we just need and remark nodes by map such that u will give each node u visit unique id (if it doesn't have one ) and by this id u can for this nd all the information you need but this still take a lot of time and space !
so we will do the same but making each nd holds :
1. ( it's information , lft child pointer , rght pointer , lx , rx ) 2. function extend that create the two child (lft , rght )
so we can start our basic operation from the root ( it's informaion , lft ,rght , 0,sz) and each nd we visit we extend two childs from and update thier information
code : struct node{ // description bool op = 0 ; int oper =0 ; item val ;
//intialize nd node (){ oper = 0; val = {0,0} ; } node * lft =NULL , *rght=NULL ; //create my two childs void extend() { int md = (lx+rx)/2; if (lft==NULL){ lft = new node; lft ->lx =lx; lft->rx =md; } if (rght==NULL){ rght = new node; rght->lx= md; rght->rx = rx; } }
}
my submission for the problem (it needs more optimiztion ) : https://www.ideone.com/mhb2PB
hey there ! /* . if u have a mentor or your rate > 1400 this blog isn't for u <3 . this roadmap is mine and isn't the best but i think it will be useful for u (better than nothing XD) .I'm not english native so my english isn't very good and the sources of topics i'll mention is arabic so i hope people mention english sources for this topics and sheets to practise on it ._anything you don't know search on youtube 'll find alot of videos
*/ in our start at training we need to balance between : 1.solving general problems (u don't topics needed to solve it 2. learning new topic and practise on it untill you be able to solve it's problems 3. contests (div 4, 3, 2, 1 ...etc) so our roadmap : 1. C+ basics ( conditions , loops , arrays ,functions ) and practise on it . 2. from this ladder enter handle >> div2 >>A and you will get 100 problem , solve the first 50 from them link : /*https://a2oj.netlify.app/ladders*/ 3 . learn STLS ( u don't need to learn how they work just learn thier basic functions ). 4. solve from the same ladder >>div2>>a the rest 50 problem 5. learn binary search , two pointers , static range queries 6 . from the same ladder div2>>B solve the first 50 7. now i guess u have the ability to solve A div2 and maybe B so it's time to know that problem on codeforces are divided according to difficulty (800 .. 3500 ) so we will start from 1000 and for each difficulty we will solve untill we able to solve it's problems (no matter time cause higher problems will make it easy ) and i think that 30 problems of each difficulty is enough and then from one to higher.
from problemset >> choose difficulty >> solve from 1000 as explained above untill 1200 and then learn recursion
solve untill 1400 and then learn graph (BFS, DFS ,Dijkstra )
10 . solve untill 1600 and then learn DP , then 1700 ,1800
12 .another 15 problem and then learn segment tree from EDU part at codeforces
15.waiting .....
general notes : _never see tags of problem and you can hide tags from the settings _ after step 1 u will always enter contests and some times when you stop entering contests for some time you maybe need to enter virtual contests _always try to up solve after contests _ there's topics like number theory and bitmasking these topics won't take time from you and you will learn it from problem or from searching _ read others codes _hv fun XD
link : https://csacademy.com/app/graph_editor/
if u are in a contest and u need to save time you can copy the edges (u , v , w) and this site will draw graph for u
i need fast lCA fuction for a tree ( normal problems constraints) to add it to my library untill i learn topics like (sparse table , ..etc)
in this problem : / *https://mirror.codeforces.com/contest/1614/problem/C */
can any body explain why ((in the editorial he multiplied x at 2 to power n-1 to get the sum of (The Xoring of each subsequence). I understand until this part ("Thus, the i -th bit is included in exactly 2|A|⋅2|B|−1=2n−1 subsequences, which was required to be proved.")
nowadays some channels at Youtube solve contest while the contest running the idea that the problems they solve aren't the most difficult problems like A,B Div2 and solving these problem i think will affect a newbie like me who try to be pupil i hope that this problem take some focus from us and codeforces admisions
/* the idea is to take the k smallest elements in vector and by prefix array check all the choices to find the mi answer */
Name |
---|