Segment Tree problems

Problem Name Online Judge Year Contest Difficulty Level
1 Brackets SPOJ 1
2 The Great Ball SPOJ 1
3 Can you answer these queries I SPOJ 1
4 Can you answer these queries III SPOJ 1
5 Can you answer these queries V SPOJ 1
6 Maximum Sum SPOJ 1
7 Election Posters SPOJ 1
8 The day of the competitors SPOJ 1
9 K-th Number SPOJ 1
10 Yodaness Level SPOJ 1
11 AND Rounds SPOJ 1
12 Multiples of 3 SPOJ 1
13 Light Switching SPOJ 1
14 D-query SPOJ 1
15 Frequent values SPOJ 1
16 Can you answer these queries II SPOJ 1
17 Sum of Squares with Segment Tree SPOJ 1
18 Horrible Queries SPOJ 1
19 K-query SPOJ 1
20 Largest Rectangle in a Histogram SPOJ 1
21 Xenia and Bit Operations Codeforces Codeforces Round #197 (Div. 2) 1
22 Ordering the Soldiers SPOJ 1
23 Frequent values UVA 1
24 Roti Prata SPOJ 1
25 Negative Score SPOJ 1
26 Can you answer these queries IV SPOJ 1
27 Query on a tree again! SPOJ 1
28 Order statistic set SPOJ 1
29 Interval Product Live Archive 2012 Latin America 1
30 Coin Flip CodeChef 1
31 Find String Roots SPOJ 1
32 Count on a tree SPOJ 1
33 Flipping Coins CodeChef 1
34 Inversion Count SPOJ 1
35 Help R2-D2! SPOJ 2
36 Race Against Time SPOJ 2
37 Can you answer these queries VI SPOJ 2
38 Mummy Madness Live Archive 2011 World Finals - Orlando 2
39 Counting Primes SPOJ 2
40 Snow White and the N dwarfs SPOJ 2
41 Greg and Array Codeforces Codeforces Round #179 (Div. 1) & Codeforces Round #179 (Div. 2) 2
42 Ahoy, Pirates! UVA 2
43 Interval Product UVA 2
44 Living with Courage SPOJ 2
45 Frequent values TJU 2
46 Light Switching TJU 2
47 Potentiometers UVA 2
48 WIND VANE SPOJ 2
49 Handball UVA 2
50 Query on a tree IV SPOJ 2
51 Query on a tree V SPOJ 2
52 Brackets II SPOJ 2
53 Can you answer these queries VII SPOJ 2
54 Chef and medium problem 2 CodeChef 2
55 Binary Search Heap Construction SPOJ 3
56 Congruence Equation SPOJ 3
57 Temple Queues SPOJ 3
58 GM plants SPOJ 3
59 Blue Mary Needs Help Again SPOJ 3
60 Sum of Distinct Numbers SPOJ 3
61 GCD 2010 Timus 3
62 Dima and Staircase Codeforces Codeforces Round #167 (Div. 2) & Codeforces Round #167 (Div. 1) 3
63 Salary Management SPOJ 3
64 Sereja and Brackets Codeforces Codeforces Round #223 (Div. 1) & Codeforces Round #223 (Div. 2) 3
65 Query on a tree VI SPOJ 3
66 Interesting Array Codeforces Codeforces Round #275 (Div. 1) & Codeforces Round #275 (Div. 2) 3
67 Maximum number, GCD condition CodeChef 3
68 Xor Queries CodeChef 3
69 K-query II SPOJ 3
70 Little Elephant and Array Codeforces Codeforces Round #136 (Div. 1) & Codeforces Round #136 (Div. 2) 3
71 Multiply Game TJU 3
72 ForbiddenSum CodeChef 3
73 Pashmak and Parmida's problem Codeforces Codeforces Round #261 (Div. 2) 3
74 Modular Equations Codeforces Codeforces Round #282 (Div. 2) 3
75 Destroying Array Codeforces Intel Code Challenge Elimination Round (Div. 1 + Div. 2, combined) 3
76 Stern-Brocot Tree UVA 3
77 Squares Live Archive 2004 North America - Rocky Mountain 3
78 Interval Product URI 3
79 LCM GCD Love SPOJ 4
80 Who is The Boss SPOJ 4
81 01 Sequence SPOJ 4
82 Enjoy Sum with Operations SPOJ 4
83 Impossible Boss SPOJ 4
84 Propagating tree Codeforces Codeforces Round #225 (Div. 1) & Codeforces Round #225 (Div. 2) 4
85 XOR on Segment Codeforces Codeforces Round #149 (Div. 2) 4
86 Lucky Number UVA 4
87 Query on a tree VII SPOJ 4
88 Roots of a Tree CodeChef 4
89 Brute-force Algorithm Live Archive 2009 Asia - Shanghai 4
90 Nested Segments Timus 4
91 SKYLINE UVA 4
92 Circular RMQ Codeforces Codeforces Testing Round #1 4
93 Babaei and Birthday Cake Codeforces Codeforces Round #343 (Div. 2) 4
94 Enemy is weak Codeforces Codeforces Beta Round #57 (Div. 2) 4
95 Ant colony Codeforces Codeforces Round #271 (Div. 2) 4
96 The Closest Pair Codeforces Codeforces Round #185 (Div. 1) & Codeforces Round #185 (Div. 2) 4
97 XOR Minimization CodeChef 4
98 Preparing for Merge Sort Codeforces 2017-2018 ACM-ICPC, NEERC, Southern Subregional Contest, qualification stage (Online Mirror, ACM-ICPC Rules, Teams Preferred) 4
99 Bash and a Tough Math Puzzle Codeforces Codecraft-18 and Codeforces Round #458 (Div. 1 + Div. 2, combined) 4
100 Rip Van Winkle's Code UVA 5
101 Copying Data Codeforces Croc Champ 2013 - Round 1 5
102 ``Dynamic'' Inversion UVA 5
103 Rectangle Query CodeChef 5
104 The Child and Sequence Codeforces Codeforces Round #250 (Div. 1) 5
105 Fun with AGp CodeChef 5
106 A Simple Task Codeforces Codeforces Round #312 (Div. 2) 5
107 Misha and Permutations Summation Codeforces Codeforces Round #285 (Div. 2) & Codeforces Round #285 (Div. 1) 5
108 Pillars Codeforces Codeforces Round #271 (Div. 2) 5
109 Water Tree Codeforces Codeforces Round #200 (Div. 1) 5
110 Tree and Queries Codeforces Codeforces Round #221 (Div. 1) 5
111 Cards Sorting Codeforces Codeforces Round #424 (Div. 1, rated, based on VK Cup Finals) & Codeforces Round #424 (Div. 2, rated, based on VK Cup Finals) 5
112 PolandBall and Polygon Codeforces 8VC Venture Cup 2017 - Elimination Round 5
113 R2D2 and Droid Army Codeforces Codeforces Round #291 (Div. 2) 5
114 Mishka and Interesting sum Codeforces Codeforces Round #365 (Div. 2) 5
115 Factory Repairs Codeforces 8VC Venture Cup 2016 - Final Round 5
116 Danil and a Part-time Job Codeforces Codeforces Round #442 (Div. 2) 5
117 SUM and REPLACE Codeforces Educational Codeforces Round 37 (Rated for Div. 2) 5
118 High and Low SPOJ 6
119 On Changing Tree Codeforces Codeforces Round #232 (Div. 1) & Codeforces Round #232 (Div. 2) 6
120 DZY Loves Colors Codeforces Codeforces Round #254 (Div. 1) & Codeforces Round #254 (Div. 2) 6
121 DZY Loves Fibonacci Numbers Codeforces Codeforces Round #255 (Div. 1) & Codeforces Round #255 (Div. 2) 6
122 Segment Tree SPOJ 6
123 Drazil and Park Codeforces Codeforces Round #292 (Div. 2) & Codeforces Round #292 (Div. 1) 6
124 Infinite Inversions Codeforces Codeforces Round #301 (Div. 2) 6
125 Lucky Queries Codeforces Codeforces Round #104 (Div. 1) 6
126 Kefa and Watch Codeforces Codeforces Round #321 (Div. 2) 6
127 Valera and Queries Codeforces Codeforces Round #216 (Div. 2) 6
128 Yaroslav and Divisors Codeforces Codeforces Round #182 (Div. 1) 6
129 New Year Domino Codeforces Good Bye 2014 6
130 Subsequences Codeforces Testing Round #12 6
131 Turn Off The TV Codeforces Educational Codeforces Round 29 6
132 Save the Python Programmers! Live Archive 2010 North America - Pacific Northwest 6
133 Union on Tree CodeChef 7
134 Sign on Fence Codeforces Codeforces Round #276 (Div. 1) 7
135 Count The Indexes 2 SPOJ 7
136 Domino Principle Codeforces Codeforces Beta Round #52 (Div. 2) 7
137 Little Elephant and Inversions Codeforces Codeforces Round #136 (Div. 1) 7
138 Points Codeforces Codeforces Beta Round #19 7
139 Lucky Array Codeforces Codeforces Beta Round #91 (Div. 1 Only) 7
140 Vika and Segments Codeforces Codeforces Round #337 (Div. 2) 7
141 Little Girl and Problem on Trees Codeforces Codeforces Round #169 (Div. 2) 7
142 Kool Konstructions UVA 7
143 Army Creation Codeforces Educational Codeforces Round 22 7
144 Segments A2 Online Judge 7
145 Allowance URI 7
146 Blogger language UVA 8
147 Misha and Palindrome Degree Codeforces Codeforces Round #285 (Div. 2) & Codeforces Round #285 (Div. 1) 8
148 Optimize! Codeforces Codeforces Round #196 (Div. 1) 8
149 Jeff and Removing Periods Codeforces Codeforces Round #204 (Div. 1) 8
150 REQ Codeforces Codeforces Round #330 (Div. 1) 8
151 TorCoder Codeforces Codeforces Round #145 (Div. 1, ACM-ICPC Rules) 8
152 Linear Kingdom Races Codeforces Codeforces Beta Round #87 (Div. 1 Only) 8
153 Alphabet Permutations Codeforces Codeforces Round #337 (Div. 2) 8
154 Drazil and Morning Exercise Codeforces Codeforces Round #292 (Div. 1) 8
155 Eyes Closed Codeforces Codeforces Round #448 (Div. 2) 8
156 Ada and Species SPOJ 8
157 Function Codeforces Codeforces Round #260 (Div. 1) 9
158 Camping Groups Codeforces Croc Champ 2012 - Round 1 9
159 To the moon TJU 10
160 Tree or not Tree Codeforces Codeforces Beta Round #88 10
161 #dynamic-programming&nbsp;(168)</span> SPOJ 10
162 Nikita Timus 10