QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#522551#4561. Catfish Farmtunjeek#Compile Error//C++20435b2024-08-17 01:25:592024-08-17 01:25:59

Judging History

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

  • [2024-08-17 01:25:59]
  • 评测
  • [2024-08-17 01:25:59]
  • 提交

answer

#include "fish.h"
#include <cstdio>
#include <vector> 
#include <algorithm>
#include <cstring>

#define X first
#define Y second
#define PB push_back
#define debug(...) //fprintf(stderr, __VA_ARGS__)

using namespace std; 

typedef long long ll;

ll a[2];

ll max_weights(int n, int m, vector<int> X, vector<int> Y, vector<ll> W) {
	for(int i = 0; i < m; ++i) { 
		a[X[i]] += W[i];
	}
	return max(a[0], a[1]);
}

Details

/usr/bin/ld: /tmp/ccpaa2NT.o: in function `main':
implementer.cpp:(.text.startup+0x275): undefined reference to `max_weights(int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status