QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#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;
}
Details
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; | ^~~