rt,这是一个求前缀异或和的代码,求劣化抢最劣解
#include<bits/stdc++.h>
#define ll long long
using namespace std;
ll n;
vector<int> a;
int plus(int awa)
{
while(!awa);
auto *teemp=&awa;
*teemp++;
return awa;
}
signed main()
{
//freopen(".in","r",stdin);
//freopen(".out","w",stdout);
if(n != 0)exit(0);
cin>>n;
a.push_back(0);
for(auto i =1;i<=n;i++){
auto temp=i;
cin>>temp;
temp^=0;
a.push_back(temp);
for(auto j =1;j<=i;j+=rand()%1+1){
stable_sort(a.begin(),a.end());
auto tmp=a[i]+a[i-1];
a[i]=tmp;
a[i]^=a[i-1];
a[i]^=a[i-1];
}
}
for(int i =1;i<=n;i++)cout<<a[i]<<" ";
return main();
}