Codeforces Round #655 (Div. 2) A. Omkar and Completion (构造)
-
题意:构造一个长度为\(n\)的序列,要求所有元素总和不大于\(1000\),并且任意两项的和不等于另外一项.
-
题解:全构造\(1\)就好了.
-
代码:
int t; int n; int main() { ios::sync_with_stdio(false);cin.tie(0); cin>>t; while(t--){ cin>>n; for(int i=1;i<=n;++i){ cout<<1<<" "; } cout<<endl; } return 0; }
𝓐𝓬𝓱𝓲𝓮𝓿𝓮𝓶𝓮𝓷𝓽 𝓹𝓻𝓸𝓿𝓲𝓭𝓮𝓼 𝓽𝓱𝓮 𝓸𝓷𝓵𝔂 𝓻𝓮𝓪𝓵
𝓹𝓵𝓮𝓪𝓼𝓾𝓻𝓮 𝓲𝓷 𝓵𝓲𝓯𝓮