Acwing789. 数的范围 题目描述代码展示 题目描述 代码展示
#include <iostream>
using namespace std;
const int maxn 100005;
int n, q, x, a[maxn];
int main() {scanf("%d%d", &n, &q);for (int i 0; i < n; i) scanf("%d", &a…
⭐️ 题目描述 🌟 leetcode链接:https://leetcode.cn/problems/sum-of-root-to-leaf-binary-numbers/description/
代码:
class Solution {
public:int sum (TreeNode* root , int num 0) {if (root nullptr) {return 0;}int cur num r…