Algorithm template or conclusion

explain 1. The efficiency of all the following algorithms shows that most of them are measured by themselves or through OJ on the network 2. Some (about 80%) codes come from OJ of other bloggers or networks 3. Update as soon as you think of it 4. It is applicable to xcpc, blue bridge and other algorithm competitions 5. I'm a konjaku, wh ...

Posted by groundwar on Fri, 28 Jan 2022 20:45:07 +0100

2022 winter vacation training week1

Day 1 AcWing 2041. Haystack Simple prefix and, plus a little bit of read in optimization int main() { n = read() , k = read(); for( int i = 1 , l , r ; i <= k ; i ++ ) { l = read() , r = read(); a[ l ] ++ , a[ r + 1 ] --; } for( int i = 1 ; i <= n ; i ++ ) a[i] += a[ i - 1 ]; sort( a + 1 , a + 1 + ...

Posted by EagerWolf on Sun, 16 Jan 2022 21:48:58 +0100