QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#162443#5252. DeforestationyinshaziyueCompile Error//C++17513b2023-09-03 12:31:352023-09-03 12:31:36

Judging History

你现在查看的是最新测评结果

  • [2023-09-03 12:31:36]
  • 评测
  • [2023-09-03 12:31:35]
  • 提交

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: In function ‘int main()’:
answer.code:28:18: error: expected ‘}’ at end of input
   28 |         return 0;
      |                  ^
answer.code:22:12: note: to match this ‘{’
   22 | int main() {
      |            ^