<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ibrahim</title>
    <description>The latest articles on DEV Community by Ibrahim (@tmshbai).</description>
    <link>https://dev.to/tmshbai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2783113%2F8ff9ab85-52c3-4052-ac99-0407eb98fecd.png</url>
      <title>DEV Community: Ibrahim</title>
      <link>https://dev.to/tmshbai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tmshbai"/>
    <language>en</language>
    <item>
      <title>Day 2</title>
      <dc:creator>Ibrahim</dc:creator>
      <pubDate>Sun, 02 Feb 2025 16:27:25 +0000</pubDate>
      <link>https://dev.to/tmshbai/day-2-390k</link>
      <guid>https://dev.to/tmshbai/day-2-390k</guid>
      <description>&lt;p&gt;&lt;a href="https://codeforces.com/problemset/problem/1480/B" rel="noopener noreferrer"&gt;https://codeforces.com/problemset/problem/1480/B&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I solved this without AI and web&lt;/p&gt;

&lt;p&gt;Code:&lt;/p&gt;

&lt;h1&gt;
  
  
  include 
&lt;/h1&gt;

&lt;h1&gt;
  
  
  include 
&lt;/h1&gt;

&lt;h1&gt;
  
  
  include 
&lt;/h1&gt;

&lt;h1&gt;
  
  
  include 
&lt;/h1&gt;

&lt;p&gt;using namespace std;&lt;/p&gt;

&lt;p&gt;int main() {&lt;br&gt;
    srand(time(0));&lt;br&gt;
    int A, B, n, c =0, z =0;&lt;br&gt;
    cin&amp;gt;&amp;gt;A&amp;gt;&amp;gt;B&amp;gt;&amp;gt;n;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;int a[n], b[n];
for(int i = 0; i &amp;lt; n; i++){
    cin&amp;gt;&amp;gt;a[i];
}
for(int i = 0; i &amp;lt; n; i++){
    cin&amp;gt;&amp;gt;b[i];
}
for(int i = 0; i &amp;lt; n; i++){
    int x = rand() % (0 - n);
    while(1&amp;gt;0 == true){
        B = B - a[x];
        b[x] = b[x]-A;
        if(b[x]&amp;lt;=0){z++; break;}
        if((B &amp;lt;= 0)){break;}
    }
    if(z == n){ cout&amp;lt;&amp;lt;"Yes";}
    if((B &amp;lt;= 0)&amp;amp;&amp;amp;(z!=n)){ cout&amp;lt;&amp;lt;"NO"; break;}
}

return 0;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>programming</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>Plan and main algorithms</title>
      <dc:creator>Ibrahim</dc:creator>
      <pubDate>Fri, 31 Jan 2025 18:47:57 +0000</pubDate>
      <link>https://dev.to/tmshbai/plan-and-main-algorithms-2c28</link>
      <guid>https://dev.to/tmshbai/plan-and-main-algorithms-2c28</guid>
      <description>&lt;p&gt;Thank, DeepSeek&lt;/p&gt;

&lt;p&gt;Sure! Competitive programming is a separate field where it's not only important to know how to write code but also to understand key algorithms and data structures that are frequently used in competitions. Here's a list of essential algorithms and topics you need to learn to perform well in serious programming contests:&lt;/p&gt;




&lt;h3&gt;
  
  
  1. &lt;strong&gt;Basic Algorithms and Data Structures&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sorting&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Quick Sort&lt;/li&gt;
&lt;li&gt;Merge Sort&lt;/li&gt;
&lt;li&gt;Counting Sort&lt;/li&gt;
&lt;li&gt;Radix Sort&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Binary Search&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Searching in a sorted array&lt;/li&gt;
&lt;li&gt;Binary search on the answer&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Two Pointers&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Solving problems related to subarrays, pairs, etc.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Prefix Sums&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Fast computation of sums on subarrays.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Stack, Queue, Deque&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Implementation and applications in problems.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Hashing&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Hash tables, polynomial hashes for strings.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  2. &lt;strong&gt;Graphs&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Graph Representation&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Adjacency lists, adjacency matrix.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Graph Traversal&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Depth-First Search (DFS)&lt;/li&gt;
&lt;li&gt;Breadth-First Search (BFS)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Connected Components&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Finding connected components in undirected graphs.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Topological Sorting&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;For Directed Acyclic Graphs (DAG).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Shortest Paths&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Dijkstra's Algorithm&lt;/li&gt;
&lt;li&gt;Bellman-Ford Algorithm&lt;/li&gt;
&lt;li&gt;Floyd-Warshall Algorithm&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Minimum Spanning Tree (MST)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Kruskal's Algorithm&lt;/li&gt;
&lt;li&gt;Prim's Algorithm&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Cycle Detection&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;In directed and undirected graphs.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Bridges and Articulation Points&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Tarjan's Algorithm.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  3. &lt;strong&gt;Dynamic Programming (DP)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Basics of DP&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Knapsack Problem&lt;/li&gt;
&lt;li&gt;Longest Increasing Subsequence (LIS)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;DP on Subarrays&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Problems related to substrings, subarrays.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;DP on Trees&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Problems involving counting paths, subtrees.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;DP with Bitmasks&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Problems involving subset enumeration.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;DP Optimizations&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Divide and Conquer, Convex Hull Trick.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  4. &lt;strong&gt;Trees&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Binary Trees&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Search, insert, delete operations.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Segment Tree&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Range minimum/maximum queries, range sum queries.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Fenwick Tree (Binary Indexed Tree)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Fast updates and prefix queries.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Search Trees (BST, AVL, Splay)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Tree balancing.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Lowest Common Ancestor (LCA)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Binary Lifting Algorithm.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  5. &lt;strong&gt;Strings&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prefix Function and Z-Function&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Substring search.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Knuth-Morris-Pratt Algorithm (KMP)&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Substring search.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Aho-Corasick Algorithm&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Multiple substring search.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Suffix Array&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Construction and applications.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;String Hashing&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Polynomial hashes for substring comparison.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  6. &lt;strong&gt;Mathematics&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Number Theory&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Greatest Common Divisor (GCD), Euclidean Algorithm.&lt;/li&gt;
&lt;li&gt;Sieve of Eratosthenes for prime numbers.&lt;/li&gt;
&lt;li&gt;Integer factorization.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Combinatorics&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Binomial coefficients, combinations.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Fast Exponentiation&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Fast modular exponentiation.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Chinese Remainder Theorem&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Solving systems of congruences.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Linear Algebra&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Matrix multiplication, fast matrix exponentiation.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  7. &lt;strong&gt;Geometry&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Points, Vectors, Lines&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Dot product, cross product.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Segment Intersection&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Algorithm for checking intersection.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Convex Hull&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Andrew's monotone chain algorithm.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Triangulation&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Decomposing polygons into triangles.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  8. &lt;strong&gt;Advanced Topics&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Network Flow&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Ford-Fulkerson Algorithm.&lt;/li&gt;
&lt;li&gt;Edmonds-Karp Algorithm.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Matchings&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Hungarian Algorithm.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Segment Tree with Lazy Propagation&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Lazy updates in segment trees.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Persistent Data Structures&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Persistent Segment Tree.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Square Root Decomposition&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;SQRT decomposition, Mo's Algorithm.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  9. &lt;strong&gt;Useful Skills&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bit Manipulation&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Bitmasks, bitwise operations.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Greedy Algorithms&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Solving problems using greedy strategies.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Divide and Conquer&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Solving problems by breaking them into subproblems.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Two Pointers Technique&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Solving problems involving subarrays, pairs, etc.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  10. &lt;strong&gt;Practice&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Platforms for Practice&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Codeforces (regular contests, problems of varying difficulty).&lt;/li&gt;
&lt;li&gt;AtCoder (Japanese contests, problems on DP and graphs).&lt;/li&gt;
&lt;li&gt;LeetCode (algorithm and data structure problems).&lt;/li&gt;
&lt;li&gt;Timus Online Judge (Russian-language problems).&lt;/li&gt;
&lt;li&gt;CSES Problem Set (great collection for beginners and advanced programmers).&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h3&gt;
  
  
  How to Learn:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with basic algorithms&lt;/strong&gt; (sorting, binary search, prefix sums).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Solve problems on graphs and dynamic programming&lt;/strong&gt; — these are the most common topics in competitions.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Learn advanced data structures&lt;/strong&gt; (segment trees, Fenwick trees, suffix arrays).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regularly participate in contests&lt;/strong&gt; (Codeforces, AtCoder).&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Example Learning Plan:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Week 1-2&lt;/strong&gt;: Basic algorithms (sorting, binary search, two pointers).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 3-4&lt;/strong&gt;: Graphs (DFS, BFS, shortest paths).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 5-6&lt;/strong&gt;: Dynamic programming (knapsack, LIS, problems on subarrays).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 7-8&lt;/strong&gt;: Trees (segment trees, Fenwick trees, LCA).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Week 9-10&lt;/strong&gt;: Strings (KMP, Z-function, hashing).&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;If you'd like, I can explain any specific algorithm or topic in more detail! 😊&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Day 1</title>
      <dc:creator>Ibrahim</dc:creator>
      <pubDate>Fri, 31 Jan 2025 18:46:00 +0000</pubDate>
      <link>https://dev.to/tmshbai/day-1-32bb</link>
      <guid>https://dev.to/tmshbai/day-1-32bb</guid>
      <description>&lt;p&gt;I founded source of test tasks to preparing to olimpiada. Also DeepSeek gave me list of basic algorithms&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>deepseek</category>
      <category>learning</category>
    </item>
    <item>
      <title>Start</title>
      <dc:creator>Ibrahim</dc:creator>
      <pubDate>Wed, 29 Jan 2025 11:00:28 +0000</pubDate>
      <link>https://dev.to/tmshbai/start-169o</link>
      <guid>https://dev.to/tmshbai/start-169o</guid>
      <description>&lt;p&gt;Today I start my way of learn sport coding. I choosed C++, because I can text a simple code in this language.&lt;br&gt;
Sorry for my english, it will get better over time&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
