[codeforces 1305A] Kuroni and the Gifts 故弄玄虚

Ozon Tech Challenge 2020 (Div.1 + Div.2, Rated, T-shirts + prizes!)   比赛人数7420

[codeforces 1305A] Kuroni and the Gifts   故弄玄虚

总目录详见https://blog.csdn.net/mrcrack/article/details/103564004

在线测评地址https://codeforces.ml/contest/1305/problem/A

Problem Lang Verdict Time Memory
A - Kuroni and the Gifts GNU C++11 Accepted 31 ms 0 KB

题目给的处理手法,无用,本质还是要抓住和不同

a1

b1

肯定能推导出下面的和

a1+b1

AC代码如下

#include 
#include 
#define maxn 105
using namespace std;
int a[maxn],b[maxn];
int main(){
	int t,n,i;
	scanf("%d",&t);
	while(t--){
		scanf("%d",&n);
		for(i=1;i<=n;i++)scanf("%d",&a[i]);
		for(i=1;i<=n;i++)scanf("%d",&b[i]);
		sort(a+1,a+1+n);
		sort(b+1,b+1+n);
		for(i=1;i

 

你可能感兴趣的:(codeforces)