QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#831100#8903. Тайное посланиеas_lyrCompile Error//C++14356b2024-12-25 10:38:432024-12-25 10:38:44

Judging History

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

  • [2024-12-25 10:38:44]
  • 评测
  • [2024-12-25 10:38:43]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
vector <int> Encode(int n,int k,vector <int> T){
	vector <int> R;
	for(int x:T)
		R.push_back((x+k-1)%n+1);
	sort(R.begin(),R.end());
	return R;
}
vector <int> Decode(int n,int k,vector <int> R){
	vector <int> T;
	for(int x:R)
		T.push_back((x+n-k-1)%n+1);
	sort(T.begin(),T.end());
	return T;
}

Details

/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x24): undefined reference to `main'
collect2: error: ld returned 1 exit status