제출 #1051402

#제출 시각아이디문제언어결과실행 시간메모리
1051402pcc카니발 티켓 (IOI20_tickets)C++17
컴파일 에러
0 ms0 KiB
#include "tickets.h"
#include <vector>
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,popcnt,sse4")
using namespace std;

#define ll long long

const int mxn = 2e5;
bitset<mxn> dp[mxn];

/*
	int n = x.size();
	int m = x[0].size();
	std::vector<std::vector<int>> answer;
	for (int i = 0; i < n; i++) {
		std::vector<int> row(m);
		for (int j = 0; j < m; j++) {
			if (j < k) {
				row[j] = j;
			} else {
				row[j] = -1;
			}
		}
		answer.push_back(row);
	}
	allocate_tickets(answer);
	return 1;
*/

long long find_maximum(int k, std::vector<std::vector<int>> x) {
	for(auto &i:dp)i.set();
	int N = x.size();
	vector<ll> v;
	for(int i = 0;i<N;i++)v.push_back(x[i][0]);
	sort(v.begin(),v.end());
	ll ans = 0;
	for(int i = 0;i+i<N;i++){
		ans += v[i+N/2]-v[i];
	}
	vector<vector<int>> ansv;
	for(int i = 0;i<N;i++)ansv.push_back({0});
	allocate_tickets(ansv);
	return ans;
}

컴파일 시 표준 에러 (stderr) 메시지

/tmp/cc1qBkxU.o: in function `_GLOBAL__sub_I_dp':
tickets.cpp:(.text.startup+0xb): relocation truncated to fit: R_X86_64_PC32 against `.bss'
tickets.cpp:(.text.startup+0x29): relocation truncated to fit: R_X86_64_PC32 against `.bss'
/tmp/cc9ZlYlW.o: in function `allocate_tickets(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)':
grader.cpp:(.text+0x2d4): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text+0x330): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text+0x347): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text+0x35d): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text+0x370): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text+0x427): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text+0x42e): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text+0x4a1): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text+0x4a8): additional relocation overflows omitted from the output
/usr/bin/ld: failed to convert GOTPCREL relocation; relink with --no-relax
collect2: error: ld returned 1 exit status