mirror of
https://github.com/wczffl-503/OI-Codes.git
synced 2025-07-08 02:13:51 +08:00
Archive Contest: TOTAL 5 Code
This commit is contained in:
28
Luogu/B4144_[语言月赛 202502] 随机数.cpp
Normal file
28
Luogu/B4144_[语言月赛 202502] 随机数.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include <bits/stdc++.h>
|
||||
#define lo long long
|
||||
#define INF INT_MAX
|
||||
#define LLM LONG_LONG_MAX
|
||||
|
||||
using namespace std;
|
||||
const lo N = 1e7 + 10;
|
||||
/*
|
||||
toothless. #17
|
||||
@fredcss_dev
|
||||
*/
|
||||
|
||||
signed main() {
|
||||
lo n, L, R;
|
||||
cin >> n >> L >> R;
|
||||
lo S = L;
|
||||
lo k = S / n;
|
||||
lo r = S % n;
|
||||
vector<lo> ans(n, k);
|
||||
for (lo i = 0; i < r; ++i) {
|
||||
ans[i] += 1;
|
||||
}
|
||||
for (lo i = 0; i < n; ++i) {
|
||||
cout << ans[i] << " ";
|
||||
}
|
||||
cout << endl;
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user