Submission #57130633


Source Code Expand

Copy
#include<bits/stdc++.h>
#define rep(i,l,r) for(int i(l),i##End(r); i<=i##End; ++i)
#define rep_(i,l,r) for(int i(l),i##End(r); i<i##End; ++i)
#define per(i,l,r) for(int i(r),i##End(l); i>=i##End; --i)
#define per_(i,l,r) for(int i(r),i##End(l); i>i##End; --i)
#define kid(i,x,G) for(int i=G.ls[x];i;i=G.nx[i])
#define endl '\n'
using namespace std;
using ll=long long;
using ull=long long unsigned;
using uint=unsigned int;
using db=double;
using ldb=long double;
using i128=__int128;
using ui128=unsigned __int128;
using bo=bool;
template<typename T> constexpr T inf = 0;
template<> constexpr int inf<int> = 1e9;
template<> constexpr ll inf<ll> = 1e18;
template<> constexpr db inf<db> = 1e18;
template<> constexpr ldb inf<ldb> = 1e18;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#include<bits/stdc++.h>
#define rep(i,l,r) for(int i(l),i##End(r); i<=i##End; ++i)
#define rep_(i,l,r) for(int i(l),i##End(r); i<i##End; ++i)
#define per(i,l,r) for(int i(r),i##End(l); i>=i##End; --i)
#define per_(i,l,r) for(int i(r),i##End(l); i>i##End; --i)
#define kid(i,x,G) for(int i=G.ls[x];i;i=G.nx[i])
#define endl '\n'
using namespace std;
using ll=long long;
using ull=long long unsigned;
using uint=unsigned int;
using db=double;
using ldb=long double;
using i128=__int128;
using ui128=unsigned __int128;
using bo=bool;
template<typename T> constexpr T inf = 0;
template<> constexpr int inf<int> = 1e9;
template<> constexpr ll inf<ll> = 1e18;
template<> constexpr db inf<db> = 1e18;
template<> constexpr ldb inf<ldb> = 1e18;
constexpr db eps=1e-12;
#define vec vector
template<typename T> using heap=priority_queue<T,vec<T>,greater<T>>;
template<typename T> using big_heap=priority_queue<T>;
#define clock() chrono::steady_clock::now()
const auto start_time=clock();
template<typename T=db> T runtime() {return chrono::duration<T>(clock()-start_time).count();}
mt19937 rnd(random_device{}());
void Yes(bo f=true) {cout<<(f?"Yes":"No")<<endl;}
void No(bo f=true) {Yes(!f);}
void yes(bo f=true) {cout<<(f?"yes":"no")<<endl;}
void no(bo f=true) {yes(!f);}
void YES(bo f=true) {cout<<(f?"YES":"NO")<<endl;}
void NO(bo f=true) {YES(!f);}
ll qpow(ll a,ll n,ll p)
{
	ll x=1;
	for(;n;n>>=1,a=(i128)a*a%p)
		if(n&1) x=(i128)x*a%p;
	return x;
}
constexpr int
	N=505,
	M=N*N,
	K=0,
	Q=0,
	S=0,
	P=998244353 //1e9+7
;
struct Graph
{
	int e[M],ls[N],nx[M],em;
	void lian(int x,int y) {e[++em]=y,nx[em]=ls[x],ls[x]=em;}
};
struct v_Graph
{
	int e[M][2],ls[N],nx[M],em;
	void lian(int x,int y,int z) {e[++em][0]=y,e[em][1]=z,nx[em]=ls[x],ls[x]=em;}
};
// #define MULTITEST
// #define FILE_IO_NAME ""

int n,m;
void _main()
{
	cin>>n>>m;
	if(n&1) rep(i,1,m) cout<<n/2+1<<" ";
	if(n==1) return;
	cout<<n/2<<" ";
	per(i,1,n)
	{
		if((n&1)&&i==n/2+1) continue;
		int o=(i==n/2);
		rep(j,1,m-o) cout<<i<<" ";
	}
}

int main() {
#if defined(FILE_IO_NAME) && !defined(ONLINE_JUDGE)
	freopen(FILE_IO_NAME".in","r",stdin);
	freopen(FILE_IO_NAME".out","w",stdout);
#endif
	ios::sync_with_stdio(false);cin.tie(nullptr);cout.tie(nullptr);
	cout<<fixed<<setprecision(15);
	int T=1;
#if defined(MULTITEST)
	cin>>T;
#endif
	while(T--) _main();
	return 0;
}

Submission Info

Submission Time
Task A - Median of Good Sequences
User Aje453_Revival
Language C++ 20 (gcc 12.2)
Score 400
Code Size 2428 Byte
Status AC
Exec Time 11 ms
Memory 3608 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 4
AC × 35
Set Name Test Cases
Sample 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt, 00-sample-004.txt
All 00-sample-001.txt, 00-sample-002.txt, 00-sample-003.txt, 00-sample-004.txt, 01-001.txt, 01-002.txt, 01-003.txt, 01-004.txt, 01-005.txt, 01-006.txt, 01-007.txt, 01-008.txt, 01-009.txt, 01-010.txt, 01-011.txt, 01-012.txt, 01-013.txt, 01-014.txt, 01-015.txt, 01-016.txt, 01-017.txt, 01-018.txt, 01-019.txt, 01-020.txt, 01-021.txt, 01-022.txt, 01-023.txt, 01-024.txt, 01-025.txt, 01-026.txt, 01-027.txt, 01-028.txt, 01-029.txt, 01-030.txt, 01-031.txt
Case Name Status Exec Time Memory
00-sample-001.txt AC 1 ms 3444 KB
00-sample-002.txt AC 1 ms 3484 KB
00-sample-003.txt AC 1 ms 3476 KB
00-sample-004.txt AC 1 ms 3488 KB
01-001.txt AC 1 ms 3524 KB
01-002.txt AC 3 ms 3388 KB
01-003.txt AC 8 ms 3532 KB
01-004.txt AC 1 ms 3484 KB
01-005.txt AC 1 ms 3488 KB
01-006.txt AC 3 ms 3476 KB
01-007.txt AC 2 ms 3488 KB
01-008.txt AC 2 ms 3488 KB
01-009.txt AC 5 ms 3484 KB
01-010.txt AC 3 ms 3532 KB
01-011.txt AC 3 ms 3480 KB
01-012.txt AC 1 ms 3608 KB
01-013.txt AC 1 ms 3480 KB
01-014.txt AC 1 ms 3484 KB
01-015.txt AC 1 ms 3480 KB
01-016.txt AC 1 ms 3548 KB
01-017.txt AC 1 ms 3444 KB
01-018.txt AC 1 ms 3552 KB
01-019.txt AC 1 ms 3464 KB
01-020.txt AC 3 ms 3484 KB
01-021.txt AC 3 ms 3488 KB
01-022.txt AC 3 ms 3480 KB
01-023.txt AC 3 ms 3476 KB
01-024.txt AC 7 ms 3464 KB
01-025.txt AC 6 ms 3444 KB
01-026.txt AC 6 ms 3460 KB
01-027.txt AC 6 ms 3456 KB
01-028.txt AC 11 ms 3464 KB
01-029.txt AC 11 ms 3484 KB
01-030.txt AC 11 ms 3548 KB
01-031.txt AC 11 ms 3332 KB


2025-03-05 (Wed)
18:13:42 +00:00