跳到正文

jzcaf

446715

在洛谷打开
资料、奖项与版本

资料

编号
446715
抓取

PE,WA,CE,RE,TLE,MLE,OLE,UKE你们不要过来啊

神贴&论怎么找到所有管理员

%%%神仙

一些题

题解要求

2021.9.21再次绿名(第一次忘了是啥时候了)

奇葩经历

HHHXSWL

C++
#include<cstdio>
#include<iostream>
#include<cmath>
#include<algorithm>
#include<cstring>

using namespace std;

struct O{
	int id;
	int num;
};
const int N=1e5+5;
char c[N];
int n,t,ans[N];
void swap(O s,O b){
	
}

int main(){
	cin>>t;
	while(t--){
		cin>>n;
		cin>>c;
		for(int i=1;i<=n;i++){
			ans[i]=i;
		}
		for(int i=1;i<=n;i++){
			for(int j=1;j<n;j++){
				if(c[j-1]=='<'&&ans[j]>ans[j+1])
				swap(ans[j],ans[j+1]);
				if(c[j-1]=='>'&&ans[j]<ans[j+1])
				swap(ans[j],ans[j+1]);
			}
		}
		for(int i=1;i<=n;i++){
			if(i==n)cout<<ans[i];
			else cout<<ans[i]<<" ";
		}
	}
	return 0;
}
C++
#include<iostream>
#include<cstdio>
#include<ctime>
#include<cstdlib>

using namespace std;

const int N=1e4;

int main(){
	freopen("out.in","w",stdout);
	srand(time(NULL));
	cout<<1<<endl;
	cout<<N<<endl;
	for(int i=1;i<=N;i++){
		if(rand()%2)cout<<">";
		else cout<<"<";
	}
	return 0;
}

准备学习王小云md5啦(doge)

还没有收录这位用户的文章。