---
# System prepended metadata

title: BiWeekly Contest 111
tags: [BiWeekly Contest]

---

###### tags: `BiWeekly Contest`
# BiWeekly Contest 111

## [2824. Count Pairs Whose Sum is Less than Target](https://leetcode.com/problems/count-pairs-whose-sum-is-less-than-target) (<font color=#00B8A3>Easy</font>)

限制 :

<ul>
<li><code>1 <= nums.length == n <= 50</code></li>
<li><code>-50 <= nums[i], target <= 50</code></li>
</ul>
### Solution

#### 時間複雜度: $O(n^2)$

#### 空間複雜度: $O(1)$

程式碼:

```c++=
class Solution {
public:
    int countPairs(vector<int>& nums, int target) {
        
        int count = 0;
        for(int i=0;i<nums.size();i++)
        {
            for(int j= i+1 ; j<nums.size() && j!=i ; j++)
            {
                if((nums[i]+nums[j])< target)
                    count++;
            }
        }
        return count;
    }
};
```

## [2825. Make String a Subsequence Using Cyclic Increments](https://leetcode.com/problems/make-string-a-subsequence-using-cyclic-increments) (<font color=#FFC011>Medium</font>)

限制 :

<ul>
<li><code>10<sup>4</sup></code></li>
</ul>
### Solution

#### 時間複雜度: $O()$

#### 空間複雜度: $O()$

程式碼:

```c++=
```

## [2826. Sorting Three Groups](https://leetcode.com/problems/sorting-three-groups)(<font color=#FFC011>Medium</font>)

限制 :

<ul>
<li><code>10<sup>4</sup></code></li>
</ul>
### Solution

#### 時間複雜度: $O()$

#### 空間複雜度: $O()$

程式碼:

```c++=
```

## [2827. Number of Beautiful Integers in the Range](https://leetcode.com/problems/number-of-beautiful-integers-in-the-range)(<font color=#FF375F>Hard</font>)

限制 :

<ul>
<li><code>10<sup>4</sup></code></li>
</ul>
### Solution

#### 時間複雜度: $O()$

#### 空間複雜度: $O()$

程式碼:

```c++=
```
