跳到正文

dH_Hb

972511

It always seems impossible until it's done

这是 2026年11月4日 存档的第 3 版,不是当前版本。查看当前版本

资料、奖项与版本

资料

编号
972511
抓取

版本

  1. v5当前
  2. v4
  3. v3
  4. v2
更早的 1 个版本
  1. v1

贴点快捷按钮

新建文章 || 灌水区 || florr.io || OI-Wiki || 题解站 || 原题机 || JS学习 || 教练模拟器 || 超算OJ

AtCoder || CF || vjudge


阅读从这里开始

什么!你看到了我的个人介绍,不简单啊!

所以我在这里宣团:OI 出题组

看这团队名称多好啊,不考虑加入吗?

Ljh421的大事记

C++
//-Wl,--stack=1000000000 -std=c++14 -O2
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main(){

	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	
	

	return 0;
}

内存计算方式:

C++
#include<bits/stdc++.h>
using namespace std;
int main(){

	int n;
	cin>>n; //a[n] 的 int 数组 
	bool ans=false;
	if(n*4/1028/1028<=内存){ //MB
		ans=true;
	}
	cout<<ans;

	return 0;
}

名言:

一旦尝试过飞行的滋味,便会永远仰望天空。因为你曾去过那里,并且渴望回到那里。


被做局了:

florr.io:florr.io:

[2024.9.27——2025.9.1][2024.9.27——2025.9.1]

缓存区

http://183.6.8.202:8888/d/contest/contest

1132624208

cf1815b

C++
#include<bits/stdc++.h>
using namespace std;
const int N=1e3+10;
int T,n,get;
int mx,mn,ans[N];
int a[N];
int mxi,mni;
struct node{
	int a,id;
}b[N];
void clear(){
	get=mx=mn=0;
	mxi=mni=0;
	for(int i=1;i<=n;i++){
		a[i]=b[i].a=b[i].id=ans[i]=0;
	}
}
bool cmp(node x,node y){
	return x.a<y.a;
}
int main(){
	
	ios::sync_with_stdio(0);
	cin.tie(0);cout.tie(0);
	
	cin>>T;
	while(T--){
		cin>>n;
		clear();
		cout<<"+ "<<n+1<<"\n";
		cout.flush();
		cin>>get;
		cout<<"+ "<<n+2<<"\n";
		cout.flush();
		cin>>get;
		for(int i=2;i<=n;i++){
			cout<<"? 1 "<<i<<"\n";
			cout.flush();
			cin>>a[i];
			if(a[i]>mx){
				mx=a[i];mxi=i;
			}
		}
		b[mxi].id=mxi;
		for(int i=1;i<=n;i++){
			if(i==mxi) continue;
			cout<<"? "<<mxi<<" "<<i<<"\n";
			cout.flush();
			cin>>b[i].a;
			b[i].id=i;
		}
		sort(b+1,b+n+1,cmp);
		cout<<"! ";
		int now=n;
		ans[mxi]=1;
		for(int i=2;i<=n;i++){
			ans[b[i].id]=now;
			if(i%2){
				now=(i+1)/2;
			}else{
				now=n-(i-1)/2;
			}
		}
		for(int i=1;i<=n;i++){
			cout<<ans[i]<<" ";
		}
		
		cout.flush();
		cin>>get;
	}
	
	return 0;
}