Task 1 - Maeglad/TEA-class GitHub Wiki

We have n cups numbered form 1 to n. We have two types of queries add one pebble to cups in interval a to b (inclusive) or get number of pebbles in cup c.

Input:
In first line are two numbers n and q - number of cups and number of queries.
Q lines follow each containing query either:
1 x - how many pebbles are in cup x?
2 x y - add one pebble to each cup in interval x y (inclusive)

Output:
For each query 1 x print one number - number of pebbles in cup x.

sample in/out:

5 7
2 3 5
1 2
2 1 4
2 4 4
1 4
1 2
2 1 1

0
3
1

⚠️ **GitHub.com Fallback** ⚠️