Submission #1361571

#TimeUsernameProblemLanguageResultExecution timeMemory
1361571avahwData Transfer (IOI19_transfer)C++20
5 / 100
550 ms3256 KiB
#include "transfer.h"
#include <bits/stdc++.h>
using namespace std;

std::vector<int> get_attachment(std::vector<int> source) {
	vector<int> ans;
	for(int i = 0; i < 2; i++){
		for(int j = 0; j < source.size(); j++){
			ans.push_back(source[j]);
		}
	}
	return ans;
}

std::vector<int> retrieve(std::vector<int> data) {
	int n = data.size() / 3;
	vector<int> ans;
	for(int i = 0; i < n; i++){
		vector<int> bits = {data[i], data[i + n], data[i + n + n]};
		sort(bits.begin(), bits.end());
		ans.push_back(bits[1]);
	}
	return ans;
}

Compilation message (stderr)

grader.cpp: In instantiation of 'void shuffle(std::vector<T>&) [with T = Scenario]':
grader.cpp:200:10:   required from here
grader.cpp:28:23: warning: 'void std::random_shuffle(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<Scenario*, vector<Scenario> >]' is deprecated: use 'std::shuffle' instead [-Wdeprecated-declarations]
   28 |         random_shuffle(v.begin(), v.end());
      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61,
                 from grader.cpp:8:
/usr/include/c++/13/bits/stl_algo.h:4581:5: note: declared here
 4581 |     random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
      |     ^~~~~~~~~~~~~~
#Result Execution timeMemoryGrader output
Fetching results...
#Result Execution timeMemoryGrader output
Fetching results...