Submission #1350306

#TimeUsernameProblemLanguageResultExecution timeMemory
1350306kokoxuyaArt Collections (BOI22_art)C++20
100 / 100
518 ms500 KiB
#include "art.h"
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define mp make_pair
#define lsb(x) (x&(-x))
#define pii pair<int,int>
#define ss second
#define ff first
#define piii pair<int,pii>
#define debu(x) (cerr << #x  << " = "<< x << "\n")
#define debu2(x,y) (cerr << #x  << " = "<< x << " " << #y << " = " << y << "\n")
#define debu3(x,y,z) (cerr << #x  << " = "<< x << " " << #y << " = " << y << " " << #z << " = " << z<< "\n")
#define bitout(x,y) {\
	cerr << #x << " : ";\
	for (int justforbits = y; justforbits >=0; justforbits--)cout << (((1 << justforbits) & x)>=1);\
	cout << "\n";\
}
#define rangeout(j,rangestart,rangeend) {\
	cerr << "outputting " << #j<< ":\n";\
	for (int forrang = rangestart; forrang <= rangeend; forrang++)cerr << j[forrang] << " ";\
	cerr<<"\n";\
}
#define c1 {cerr << "Checkpoint 1! \n\n";cerr.flush();}
#define c2 {cerr << "Checkpoint 2! \n\n";cerr.flush();}
#define c3 {cerr << "Checkpoint 3! \n\n";cerr.flush();}
#define c4 {cerr << "Checkpoint 4! \n\n";cerr.flush();}

void solve(int N) 
{
	int n=N;
    vector<int>retno;retno.pb(0);
    
    for(int a=0;a<n;a++)
    {
		vector<int>order;
		for(int b=0;b<n;b++)
		{
			order.pb(((a+b)%n)+1);
		}
		int t1=publish(order);
		retno.pb(t1);
	}
	retno.pb(retno[1]);
	
	vector<int>ans(n);
	for(int a=1;a<=n;a++)
	{
		int t1=retno[a],t2=retno[a+1];
		int infront=(n-1)+(t1-t2);infront/=2;
		ans[infront]=a;
	}
	answer(ans);
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...