QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#162442 | #5252. Deforestation | yinshaziyue | Compile Error | / | / | C++17 | 512b | 2023-09-03 12:30:52 | 2023-09-03 12:30:52 |
Judging History
answer
#include<algorithm>
#include<string>
#include<stdio.h>
#include<map>
#include<iostream>
#include<vector>
#include<iomanip>
#include<random>
#include<cmath>
#include<set>
using namespace std;
int m,cnt; vector<int>kk(10000000),long long all;
void input(int a,int b) {
kk[++cnt] = a;
all += a;
for (int i = 1; i <= b; i++) {
int a1, b1;
cin >> a1 >> b1;
input(a1, b1);
}
}
int main() {
cin >> m;
int a, b;
cin >> a >> b;
input(a, b);
long long ans = all / m;
return 0;
}
详细
answer.code:12:36: error: expected unqualified-id before ‘long’ 12 | int m,cnt; vector<int>kk(10000000),long long all; | ^~~~ answer.code: In function ‘void input(int, int)’: answer.code:15:9: error: ‘all’ was not declared in this scope 15 | all += a; | ^~~ answer.code: In function ‘int main()’: answer.code:27:25: error: ‘all’ was not declared in this scope 27 | long long ans = all / m; | ^~~