2023年12月10日
摘要:
#include<iostream> using namespace std; int h[1000000]; int z=0;//z表示数列中有几个元素 void up(int x){ while(x>1 && h[x]<h[x/2]){ swap(h[x],h[x/2]); x /= 2; }
阅读全文
posted @ 2023-12-10 20:36
未晞之时
阅读(32)
推荐(0)
2023年5月27日
摘要:
#include<iostream> #include<cstring>#include<stack> using namespace std; int main(){ string input; cin>>input; int a=input.length(); stack <char> stk;
阅读全文
posted @ 2023-05-27 12:05
未晞之时
阅读(13)
推荐(0)
2023年4月1日
摘要:
#include<iostream> using namespace std; const int N=10; int n; int state[N]; bool used[N]; void dfs(int u){ if(u==n+1){ for(int i=1;i<=n;i++){ cout<<s
阅读全文
posted @ 2023-04-01 12:00
未晞之时
阅读(24)
推荐(0)
摘要:
#include<iostream> using namespace std; const int N=500; int n; int m; int state[N]; bool used[N]; void dfs(int u,int c){ //边界条件 if(c==m){//已经选了m个数 fo
阅读全文
posted @ 2023-04-01 11:51
未晞之时
阅读(6)
推荐(0)
2023年3月25日
摘要:
#include<iostream> using namespace std; int main(){ int n,t; cin>>n; int a[6667]; for(int i=1;i<=6666;i++){ a[i]=0; } for(int i=1;i<=n;i++){ cin>>t; a
阅读全文
posted @ 2023-03-25 11:44
未晞之时
阅读(30)
推荐(0)
2023年3月18日
摘要:

Input:任意多组数据(保证最多只有5组) 对于每组数据,有两行数 第一行数n,代表接下来将有n个数 第二行数有n个乱序数 注意:冒泡排序的越界 #include<iostream> using namespace std; int main(){ int n,t; while(cin>>n){
阅读全文
posted @ 2023-03-18 12:02
未晞之时
阅读(19)
推荐(0)