diff --git a/solution/3100-3199/3158.Find the XOR of Numbers Which Appear Twice/README.md b/solution/3100-3199/3158.Find the XOR of Numbers Which Appear Twice/README.md
new file mode 100644
index 0000000000000..cfc76d33b83bc
--- /dev/null
+++ b/solution/3100-3199/3158.Find the XOR of Numbers Which Appear Twice/README.md
@@ -0,0 +1,107 @@
+---
+comments: true
+difficulty: 简单
+edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3158.Find%20the%20XOR%20of%20Numbers%20Which%20Appear%20Twice/README.md
+---
+
+
+
+# [3158. 求出出现两次数字的 XOR 值](https://leetcode.cn/problems/find-the-xor-of-numbers-which-appear-twice)
+
+[English Version](/solution/3100-3199/3158.Find%20the%20XOR%20of%20Numbers%20Which%20Appear%20Twice/README_EN.md)
+
+## 题目描述
+
+
+
+
给你一个数组 nums
,数组中的数字 要么 出现一次,要么 出现两次。
+
+请你返回数组中所有出现两次数字的按位 XOR
值,如果没有数字出现过两次,返回 0 。
+
+
+
+示例 1:
+
+
+
输入:nums = [1,2,1,3]
+
+
输出:1
+
+
解释:
+
+
nums
中唯一出现过两次的数字是 1 。
+
+
+示例 2:
+
+
+
输入:nums = [1,2,3]
+
+
输出:0
+
+
解释:
+
+
nums
中没有数字出现两次。
+
+
+示例 3:
+
+
+
输入:nums = [1,2,2,1]
+
+
输出:3
+
+
解释:
+
+
数字 1 和 2 出现过两次。1 XOR 2 == 3
。
+
+
+
+
+提示:
+
+
+ 1 <= nums.length <= 50
+ 1 <= nums[i] <= 50
+ nums
中每个数字要么出现过一次,要么出现过两次。
+
+
+
+
+## 解法
+
+
+
+### 方法一
+
+
+
+#### Python3
+
+```python
+
+```
+
+#### Java
+
+```java
+
+```
+
+#### C++
+
+```cpp
+
+```
+
+#### Go
+
+```go
+
+```
+
+
+
+
+
+
diff --git a/solution/3100-3199/3158.Find the XOR of Numbers Which Appear Twice/README_EN.md b/solution/3100-3199/3158.Find the XOR of Numbers Which Appear Twice/README_EN.md
new file mode 100644
index 0000000000000..f4c04ae2250a5
--- /dev/null
+++ b/solution/3100-3199/3158.Find the XOR of Numbers Which Appear Twice/README_EN.md
@@ -0,0 +1,105 @@
+---
+comments: true
+difficulty: Easy
+edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3158.Find%20the%20XOR%20of%20Numbers%20Which%20Appear%20Twice/README_EN.md
+---
+
+
+
+# [3158. Find the XOR of Numbers Which Appear Twice](https://leetcode.com/problems/find-the-xor-of-numbers-which-appear-twice)
+
+[中文文档](/solution/3100-3199/3158.Find%20the%20XOR%20of%20Numbers%20Which%20Appear%20Twice/README.md)
+
+## Description
+
+
+
+You are given an array nums
, where each number in the array appears either once or twice.
+
+Return the bitwise XOR
of all the numbers that appear twice in the array, or 0 if no number appears twice.
+
+
+Example 1:
+
+
+
Input: nums = [1,2,1,3]
+
+
Output: 1
+
+
Explanation:
+
+
The only number that appears twice in nums
is 1.
+
+
+Example 2:
+
+
+
Input: nums = [1,2,3]
+
+
Output: 0
+
+
Explanation:
+
+
No number appears twice in nums
.
+
+
+Example 3:
+
+
+
Input: nums = [1,2,2,1]
+
+
Output: 3
+
+
Explanation:
+
+
Numbers 1 and 2 appeared twice. 1 XOR 2 == 3
.
+
+
+
+Constraints:
+
+
+ 1 <= nums.length <= 50
+ 1 <= nums[i] <= 50
+ - Each number in
nums
appears either once or twice.
+
+
+
+
+## Solutions
+
+
+
+### Solution 1
+
+
+
+#### Python3
+
+```python
+
+```
+
+#### Java
+
+```java
+
+```
+
+#### C++
+
+```cpp
+
+```
+
+#### Go
+
+```go
+
+```
+
+
+
+
+
+
diff --git a/solution/3100-3199/3159.Find Occurrences of an Element in an Array/README.md b/solution/3100-3199/3159.Find Occurrences of an Element in an Array/README.md
new file mode 100644
index 0000000000000..529b8b2df63db
--- /dev/null
+++ b/solution/3100-3199/3159.Find Occurrences of an Element in an Array/README.md
@@ -0,0 +1,104 @@
+---
+comments: true
+difficulty: 中等
+edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3159.Find%20Occurrences%20of%20an%20Element%20in%20an%20Array/README.md
+---
+
+
+
+# [3159. 查询数组中元素的出现位置](https://leetcode.cn/problems/find-occurrences-of-an-element-in-an-array)
+
+[English Version](/solution/3100-3199/3159.Find%20Occurrences%20of%20an%20Element%20in%20an%20Array/README_EN.md)
+
+## 题目描述
+
+
+
+给你一个整数数组 nums
,一个整数数组 queries
和一个整数 x
。
+
+对于每个查询 queries[i]
,你需要找到 nums
中第 queries[i]
个 x
的位置,并返回它的下标。如果数组中 x
的出现次数少于 queries[i]
,该查询的答案为 -1 。
+
+请你返回一个整数数组 answer
,包含所有查询的答案。
+
+
+
+示例 1:
+
+
+
输入:nums = [1,3,1,7], queries = [1,3,2,4], x = 1
+
+
输出:[0,-1,2,-1]
+
+
解释:
+
+
+ - 第 1 个查询,第一个 1 出现在下标 0 处。
+ - 第 2 个查询,
nums
中只有两个 1 ,所以答案为 -1 。
+ - 第 3 个查询,第二个 1 出现在下标 2 处。
+ - 第 4 个查询,
nums
中只有两个 1 ,所以答案为 -1 。
+
+
+
+示例 2:
+
+
+
输入:nums = [1,2,3], queries = [10], x = 5
+
+
输出:[-1]
+
+
解释:
+
+
+ - 第 1 个查询,
nums
中没有 5 ,所以答案为 -1 。
+
+
+
+
+
+提示:
+
+
+ 1 <= nums.length, queries.length <= 105
+ 1 <= queries[i] <= 105
+ 1 <= nums[i], x <= 104
+
+
+
+
+## 解法
+
+
+
+### 方法一
+
+
+
+#### Python3
+
+```python
+
+```
+
+#### Java
+
+```java
+
+```
+
+#### C++
+
+```cpp
+
+```
+
+#### Go
+
+```go
+
+```
+
+
+
+
+
+
diff --git a/solution/3100-3199/3159.Find Occurrences of an Element in an Array/README_EN.md b/solution/3100-3199/3159.Find Occurrences of an Element in an Array/README_EN.md
new file mode 100644
index 0000000000000..180b98cc22cd4
--- /dev/null
+++ b/solution/3100-3199/3159.Find Occurrences of an Element in an Array/README_EN.md
@@ -0,0 +1,102 @@
+---
+comments: true
+difficulty: Medium
+edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3159.Find%20Occurrences%20of%20an%20Element%20in%20an%20Array/README_EN.md
+---
+
+
+
+# [3159. Find Occurrences of an Element in an Array](https://leetcode.com/problems/find-occurrences-of-an-element-in-an-array)
+
+[中文文档](/solution/3100-3199/3159.Find%20Occurrences%20of%20an%20Element%20in%20an%20Array/README.md)
+
+## Description
+
+
+
+You are given an integer array nums
, an integer array queries
, and an integer x
.
+
+For each queries[i]
, you need to find the index of the queries[i]th
occurrence of x
in the nums
array. If there are fewer than queries[i]
occurrences of x
, the answer should be -1 for that query.
+
+Return an integer array answer
containing the answers to all queries.
+
+
+Example 1:
+
+
+
Input: nums = [1,3,1,7], queries = [1,3,2,4], x = 1
+
+
Output: [0,-1,2,-1]
+
+
Explanation:
+
+
+ - For the 1st query, the first occurrence of 1 is at index 0.
+ - For the 2nd query, there are only two occurrences of 1 in
nums
, so the answer is -1.
+ - For the 3rd query, the second occurrence of 1 is at index 2.
+ - For the 4th query, there are only two occurrences of 1 in
nums
, so the answer is -1.
+
+
+
+Example 2:
+
+
+
Input: nums = [1,2,3], queries = [10], x = 5
+
+
Output: [-1]
+
+
Explanation:
+
+
+ - For the 1st query, 5 doesn't exist in
nums
, so the answer is -1.
+
+
+
+
+Constraints:
+
+
+ 1 <= nums.length, queries.length <= 105
+ 1 <= queries[i] <= 105
+ 1 <= nums[i], x <= 104
+
+
+
+
+## Solutions
+
+
+
+### Solution 1
+
+
+
+#### Python3
+
+```python
+
+```
+
+#### Java
+
+```java
+
+```
+
+#### C++
+
+```cpp
+
+```
+
+#### Go
+
+```go
+
+```
+
+
+
+
+
+
diff --git a/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/README.md b/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/README.md
new file mode 100644
index 0000000000000..84a6c54fc515b
--- /dev/null
+++ b/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/README.md
@@ -0,0 +1,116 @@
+---
+comments: true
+difficulty: 中等
+edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3160.Find%20the%20Number%20of%20Distinct%20Colors%20Among%20the%20Balls/README.md
+---
+
+
+
+# [3160. 所有球里面不同颜色的数目](https://leetcode.cn/problems/find-the-number-of-distinct-colors-among-the-balls)
+
+[English Version](/solution/3100-3199/3160.Find%20the%20Number%20of%20Distinct%20Colors%20Among%20the%20Balls/README_EN.md)
+
+## 题目描述
+
+
+
+给你一个整数 limit
和一个大小为 n x 2
的二维数组 queries
。
+
+总共有 limit + 1
个球,每个球的编号为 [0, limit]
中一个 互不相同 的数字。一开始,所有球都没有颜色。queries
中每次操作的格式为 [x, y]
,你需要将球 x
染上颜色 y
。每次操作之后,你需要求出所有球中 不同 颜色的数目。
+
+请你返回一个长度为 n
的数组 result
,其中 result[i]
是第 i
次操作以后不同颜色的数目。
+
+注意 ,没有染色的球不算作一种颜色。
+
+
+
+示例 1:
+
+
+
输入:limit = 4, queries = [[1,4],[2,5],[1,3],[3,4]]
+
+
输出:[1,2,2,3]
+
+
解释:
+
+
+
+
+ - 操作 0 后,球 1 颜色为 4 。
+ - 操作 1 后,球 1 颜色为 4 ,球 2 颜色为 5 。
+ - 操作 2 后,球 1 颜色为 3 ,球 2 颜色为 5 。
+ - 操作 3 后,球 1 颜色为 3 ,球 2 颜色为 5 ,球 3 颜色为 4 。
+
+
+
+示例 2:
+
+
+
输入:limit = 4, queries = [[0,1],[1,2],[2,2],[3,4],[4,5]]
+
+
输出:[1,2,2,3,4]
+
+
解释:
+
+
+
+
+ - 操作 0 后,球 0 颜色为 1 。
+ - 操作 1 后,球 0 颜色为 1 ,球 1 颜色为 2 。
+ - 操作 2 后,球 0 颜色为 1 ,球 1 和 2 颜色为 2 。
+ - 操作 3 后,球 0 颜色为 1 ,球 1 和 2 颜色为 2 ,球 3 颜色为 4 。
+ - 操作 4 后,球 0 颜色为 1 ,球 1 和 2 颜色为 2 ,球 3 颜色为 4 ,球 4 颜色为 5 。
+
+
+
+
+
+提示:
+
+
+ 1 <= limit <= 109
+ 1 <= n == queries.length <= 105
+ queries[i].length == 2
+ 0 <= queries[i][0] <= limit
+ 1 <= queries[i][1] <= 109
+
+
+
+
+## 解法
+
+
+
+### 方法一
+
+
+
+#### Python3
+
+```python
+
+```
+
+#### Java
+
+```java
+
+```
+
+#### C++
+
+```cpp
+
+```
+
+#### Go
+
+```go
+
+```
+
+
+
+
+
+
diff --git a/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/README_EN.md b/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/README_EN.md
new file mode 100644
index 0000000000000..ebc89d2e6aa16
--- /dev/null
+++ b/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/README_EN.md
@@ -0,0 +1,114 @@
+---
+comments: true
+difficulty: Medium
+edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3160.Find%20the%20Number%20of%20Distinct%20Colors%20Among%20the%20Balls/README_EN.md
+---
+
+
+
+# [3160. Find the Number of Distinct Colors Among the Balls](https://leetcode.com/problems/find-the-number-of-distinct-colors-among-the-balls)
+
+[中文文档](/solution/3100-3199/3160.Find%20the%20Number%20of%20Distinct%20Colors%20Among%20the%20Balls/README.md)
+
+## Description
+
+
+
+You are given an integer limit
and a 2D array queries
of size n x 2
.
+
+There are limit + 1
balls with distinct labels in the range [0, limit]
. Initially, all balls are uncolored. For every query in queries
that is of the form [x, y]
, you mark ball x
with the color y
. After each query, you need to find the number of distinct colors among the balls.
+
+Return an array result
of length n
, where result[i]
denotes the number of distinct colors after ith
query.
+
+Note that when answering a query, lack of a color will not be considered as a color.
+
+
+Example 1:
+
+
+
Input: limit = 4, queries = [[1,4],[2,5],[1,3],[3,4]]
+
+
Output: [1,2,2,3]
+
+
Explanation:
+
+
+
+
+ - After query 0, ball 1 has color 4.
+ - After query 1, ball 1 has color 4, and ball 2 has color 5.
+ - After query 2, ball 1 has color 3, and ball 2 has color 5.
+ - After query 3, ball 1 has color 3, ball 2 has color 5, and ball 3 has color 4.
+
+
+
+Example 2:
+
+
+
Input: limit = 4, queries = [[0,1],[1,2],[2,2],[3,4],[4,5]]
+
+
Output: [1,2,2,3,4]
+
+
Explanation:
+
+
+
+
+ - After query 0, ball 0 has color 1.
+ - After query 1, ball 0 has color 1, and ball 1 has color 2.
+ - After query 2, ball 0 has color 1, and balls 1 and 2 have color 2.
+ - After query 3, ball 0 has color 1, balls 1 and 2 have color 2, and ball 3 has color 4.
+ - After query 4, ball 0 has color 1, balls 1 and 2 have color 2, ball 3 has color 4, and ball 4 has color 5.
+
+
+
+
+Constraints:
+
+
+ 1 <= limit <= 109
+ 1 <= n == queries.length <= 105
+ queries[i].length == 2
+ 0 <= queries[i][0] <= limit
+ 1 <= queries[i][1] <= 109
+
+
+
+
+## Solutions
+
+
+
+### Solution 1
+
+
+
+#### Python3
+
+```python
+
+```
+
+#### Java
+
+```java
+
+```
+
+#### C++
+
+```cpp
+
+```
+
+#### Go
+
+```go
+
+```
+
+
+
+
+
+
diff --git a/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/images/ezgifcom-crop.gif b/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/images/ezgifcom-crop.gif
new file mode 100644
index 0000000000000..fac064945df6b
Binary files /dev/null and b/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/images/ezgifcom-crop.gif differ
diff --git a/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/images/ezgifcom-crop2.gif b/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/images/ezgifcom-crop2.gif
new file mode 100644
index 0000000000000..438c475621f02
Binary files /dev/null and b/solution/3100-3199/3160.Find the Number of Distinct Colors Among the Balls/images/ezgifcom-crop2.gif differ
diff --git a/solution/3100-3199/3161.Block Placement Queries/README.md b/solution/3100-3199/3161.Block Placement Queries/README.md
new file mode 100644
index 0000000000000..8f52d0cc87501
--- /dev/null
+++ b/solution/3100-3199/3161.Block Placement Queries/README.md
@@ -0,0 +1,112 @@
+---
+comments: true
+difficulty: 困难
+edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3161.Block%20Placement%20Queries/README.md
+---
+
+
+
+# [3161. 物块放置查询](https://leetcode.cn/problems/block-placement-queries)
+
+[English Version](/solution/3100-3199/3161.Block%20Placement%20Queries/README_EN.md)
+
+## 题目描述
+
+
+
+有一条无限长的数轴,原点在 0 处,沿着 x 轴 正 方向无限延伸。
+
+给你一个二维数组 queries
,它包含两种操作:
+
+
+ - 操作类型 1 :
queries[i] = [1, x]
。在距离原点 x
处建一个障碍物。数据保证当操作执行的时候,位置 x
处 没有 任何障碍物。
+ - 操作类型 2 :
queries[i] = [2, x, sz]
。判断在数轴范围 [0, x]
内是否可以放置一个长度为 sz
的物块,这个物块需要 完全 放置在范围 [0, x]
内。如果物块与任何障碍物有重合,那么这个物块 不能 被放置,但物块可以与障碍物刚好接触。注意,你只是进行查询,并 不是 真的放置这个物块。每个查询都是相互独立的。
+
+
+请你返回一个 boolean 数组results
,如果第 i
个操作类型 2 的操作你可以放置物块,那么 results[i]
为 true
,否则为 false
。
+
+
+
+示例 1:
+
+
+
输入:queries = [[1,2],[2,3,3],[2,3,1],[2,2,2]]
+
+
输出:[false,true,true]
+
+
解释:
+
+
+
+
查询 0 ,在 x = 2
处放置一个障碍物。在 x = 3
之前任何大小不超过 2 的物块都可以被放置。
+
+
+示例 2:
+
+
+
输入:queries = [[1,7],[2,7,6],[1,2],[2,7,5],[2,7,6]]
+
+
输出:[true,true,false]
+
+
解释:
+
+
+
+
+ - 查询 0 在
x = 7
处放置一个障碍物。在 x = 7
之前任何大小不超过 7 的物块都可以被放置。
+ - 查询 2 在
x = 2
处放置一个障碍物。现在,在 x = 7
之前任何大小不超过 5 的物块可以被放置,x = 2
之前任何大小不超过 2 的物块可以被放置。
+
+
+
+
+
+提示:
+
+
+ 1 <= queries.length <= 15 * 104
+ 2 <= queries[i].length <= 3
+ 1 <= queries[i][0] <= 2
+ 1 <= x, sz <= min(5 * 104, 3 * queries.length)
+ - 输入保证操作 1 中,
x
处不会有障碍物。
+ - 输入保证至少有一个操作类型 2 。
+
+
+
+
+## 解法
+
+
+
+### 方法一
+
+
+
+#### Python3
+
+```python
+
+```
+
+#### Java
+
+```java
+
+```
+
+#### C++
+
+```cpp
+
+```
+
+#### Go
+
+```go
+
+```
+
+
+
+
+
+
diff --git a/solution/3100-3199/3161.Block Placement Queries/README_EN.md b/solution/3100-3199/3161.Block Placement Queries/README_EN.md
new file mode 100644
index 0000000000000..5bc35790ffc0c
--- /dev/null
+++ b/solution/3100-3199/3161.Block Placement Queries/README_EN.md
@@ -0,0 +1,110 @@
+---
+comments: true
+difficulty: Hard
+edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3161.Block%20Placement%20Queries/README_EN.md
+---
+
+
+
+# [3161. Block Placement Queries](https://leetcode.com/problems/block-placement-queries)
+
+[中文文档](/solution/3100-3199/3161.Block%20Placement%20Queries/README.md)
+
+## Description
+
+
+
+There exists an infinite number line, with its origin at 0 and extending towards the positive x-axis.
+
+You are given a 2D array queries
, which contains two types of queries:
+
+
+ - For a query of type 1,
queries[i] = [1, x]
. Build an obstacle at distance x
from the origin. It is guaranteed that there is no obstacle at distance x
when the query is asked.
+ - For a query of type 2,
queries[i] = [2, x, sz]
. Check if it is possible to place a block of size sz
anywhere in the range [0, x]
on the line, such that the block entirely lies in the range [0, x]
. A block cannot be placed if it intersects with any obstacle, but it may touch it. Note that you do not actually place the block. Queries are separate.
+
+
+Return a boolean array results
, where results[i]
is true
if you can place the block specified in the ith
query of type 2, and false
otherwise.
+
+
+Example 1:
+
+
+
Input: queries = [[1,2],[2,3,3],[2,3,1],[2,2,2]]
+
+
Output: [false,true,true]
+
+
Explanation:
+
+
+
+
For query 0, place an obstacle at x = 2
. A block of size at most 2 can be placed before x = 3
.
+
+
+Example 2:
+
+
+
Input: queries = [[1,7],[2,7,6],[1,2],[2,7,5],[2,7,6]]
+
+
Output: [true,true,false]
+
+
Explanation:
+
+
+
+
+ - Place an obstacle at
x = 7
for query 0. A block of size at most 7 can be placed before x = 7
.
+ - Place an obstacle at
x = 2
for query 2. Now, a block of size at most 5 can be placed before x = 7
, and a block of size at most 2 before x = 2
.
+
+
+
+
+Constraints:
+
+
+ 1 <= queries.length <= 15 * 104
+ 2 <= queries[i].length <= 3
+ 1 <= queries[i][0] <= 2
+ 1 <= x, sz <= min(5 * 104, 3 * queries.length)
+ - The input is generated such that for queries of type 1, no obstacle exists at distance
x
when the query is asked.
+ - The input is generated such that there is at least one query of type 2.
+
+
+
+
+## Solutions
+
+
+
+### Solution 1
+
+
+
+#### Python3
+
+```python
+
+```
+
+#### Java
+
+```java
+
+```
+
+#### C++
+
+```cpp
+
+```
+
+#### Go
+
+```go
+
+```
+
+
+
+
+
+
diff --git a/solution/3100-3199/3161.Block Placement Queries/images/example0block.png b/solution/3100-3199/3161.Block Placement Queries/images/example0block.png
new file mode 100644
index 0000000000000..9a9c930243457
Binary files /dev/null and b/solution/3100-3199/3161.Block Placement Queries/images/example0block.png differ
diff --git a/solution/3100-3199/3161.Block Placement Queries/images/example1block.png b/solution/3100-3199/3161.Block Placement Queries/images/example1block.png
new file mode 100644
index 0000000000000..da243362ecf4c
Binary files /dev/null and b/solution/3100-3199/3161.Block Placement Queries/images/example1block.png differ
diff --git a/solution/CONTEST_README.md b/solution/CONTEST_README.md
index 652387e898722..995b08da6256a 100644
--- a/solution/CONTEST_README.md
+++ b/solution/CONTEST_README.md
@@ -28,6 +28,10 @@ comments: true
#### 第 131 场双周赛(2024-05-25 22:30, 90 分钟) 参赛人数 2467
+- [3158. 求出出现两次数字的 XOR 值](/solution/3100-3199/3158.Find%20the%20XOR%20of%20Numbers%20Which%20Appear%20Twice/README.md)
+- [3159. 查询数组中元素的出现位置](/solution/3100-3199/3159.Find%20Occurrences%20of%20an%20Element%20in%20an%20Array/README.md)
+- [3160. 所有球里面不同颜色的数目](/solution/3100-3199/3160.Find%20the%20Number%20of%20Distinct%20Colors%20Among%20the%20Balls/README.md)
+- [3161. 物块放置查询](/solution/3100-3199/3161.Block%20Placement%20Queries/README.md)
#### 第 398 场周赛(2024-05-19 10:30, 90 分钟) 参赛人数 3606
diff --git a/solution/CONTEST_README_EN.md b/solution/CONTEST_README_EN.md
index 914890d4f08e1..48d8c36c71e7b 100644
--- a/solution/CONTEST_README_EN.md
+++ b/solution/CONTEST_README_EN.md
@@ -31,6 +31,10 @@ If you want to estimate your score changes after the contest ends, you can visit
#### Biweekly Contest 131
+- [3158. Find the XOR of Numbers Which Appear Twice](/solution/3100-3199/3158.Find%20the%20XOR%20of%20Numbers%20Which%20Appear%20Twice/README_EN.md)
+- [3159. Find Occurrences of an Element in an Array](/solution/3100-3199/3159.Find%20Occurrences%20of%20an%20Element%20in%20an%20Array/README_EN.md)
+- [3160. Find the Number of Distinct Colors Among the Balls](/solution/3100-3199/3160.Find%20the%20Number%20of%20Distinct%20Colors%20Among%20the%20Balls/README_EN.md)
+- [3161. Block Placement Queries](/solution/3100-3199/3161.Block%20Placement%20Queries/README_EN.md)
#### Weekly Contest 398
diff --git a/solution/README.md b/solution/README.md
index b2da134b77441..d3514718fce88 100644
--- a/solution/README.md
+++ b/solution/README.md
@@ -3168,6 +3168,10 @@
| 3155 | [可升级服务器的最大数量](/solution/3100-3199/3155.Maximum%20Number%20of%20Upgradable%20Servers/README.md) | `数组`,`数学`,`二分查找` | 中等 | 🔒 |
| 3156 | [员工任务持续时间和并发任务](/solution/3100-3199/3156.Employee%20Task%20Duration%20and%20Concurrent%20Tasks/README.md) | `数据库` | 困难 | 🔒 |
| 3157 | [找到具有最小和的树的层数](/solution/3100-3199/3157.Find%20the%20Level%20of%20Tree%20with%20Minimum%20Sum/README.md) | | 中等 | 🔒 |
+| 3158 | [求出出现两次数字的 XOR 值](/solution/3100-3199/3158.Find%20the%20XOR%20of%20Numbers%20Which%20Appear%20Twice/README.md) | | 简单 | 第 131 场双周赛 |
+| 3159 | [查询数组中元素的出现位置](/solution/3100-3199/3159.Find%20Occurrences%20of%20an%20Element%20in%20an%20Array/README.md) | | 中等 | 第 131 场双周赛 |
+| 3160 | [所有球里面不同颜色的数目](/solution/3100-3199/3160.Find%20the%20Number%20of%20Distinct%20Colors%20Among%20the%20Balls/README.md) | | 中等 | 第 131 场双周赛 |
+| 3161 | [物块放置查询](/solution/3100-3199/3161.Block%20Placement%20Queries/README.md) | | 困难 | 第 131 场双周赛 |
## 版权
diff --git a/solution/README_EN.md b/solution/README_EN.md
index 33367bab45005..bf67cdf7e6b90 100644
--- a/solution/README_EN.md
+++ b/solution/README_EN.md
@@ -3166,6 +3166,10 @@ Press Control + F(or Command + F on
| 3155 | [Maximum Number of Upgradable Servers](/solution/3100-3199/3155.Maximum%20Number%20of%20Upgradable%20Servers/README_EN.md) | `Array`,`Math`,`Binary Search` | Medium | 🔒 |
| 3156 | [Employee Task Duration and Concurrent Tasks](/solution/3100-3199/3156.Employee%20Task%20Duration%20and%20Concurrent%20Tasks/README_EN.md) | `Database` | Hard | 🔒 |
| 3157 | [Find the Level of Tree with Minimum Sum](/solution/3100-3199/3157.Find%20the%20Level%20of%20Tree%20with%20Minimum%20Sum/README_EN.md) | | Medium | 🔒 |
+| 3158 | [Find the XOR of Numbers Which Appear Twice](/solution/3100-3199/3158.Find%20the%20XOR%20of%20Numbers%20Which%20Appear%20Twice/README_EN.md) | | Easy | Biweekly Contest 131 |
+| 3159 | [Find Occurrences of an Element in an Array](/solution/3100-3199/3159.Find%20Occurrences%20of%20an%20Element%20in%20an%20Array/README_EN.md) | | Medium | Biweekly Contest 131 |
+| 3160 | [Find the Number of Distinct Colors Among the Balls](/solution/3100-3199/3160.Find%20the%20Number%20of%20Distinct%20Colors%20Among%20the%20Balls/README_EN.md) | | Medium | Biweekly Contest 131 |
+| 3161 | [Block Placement Queries](/solution/3100-3199/3161.Block%20Placement%20Queries/README_EN.md) | | Hard | Biweekly Contest 131 |
## Copyright