結果
問題 | No.836 じょうよ |
ユーザー |
![]() |
提出日時 | 2019-06-14 21:49:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,287 bytes |
コンパイル時間 | 1,546 ms |
コンパイル使用メモリ | 168,568 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-14 04:10:02 |
合計ジャッジ時間 | 3,983 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 39 WA * 2 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll = long long;using ull = unsigned long long;const long double PI = acos(-1);constexpr long double EPS = 1e-15;constexpr int inf = 2e9;constexpr ll INF = 2e18;constexpr ll MOD = 1e9+7;constexpr ll MOD1 = 998244353;typedef pair<ll,ll> P;//#define all(v) (v).begin(), (v).end()#define rep(i,a,b) for (int i = (a); i < (b); i++)#define REP(i,n) rep(i,0,n)#define sz(s) (s).size()#define pb push_back#define fi first#define se second//#define mp make_pairvoid solve() {ll l,r,n;cin >> l >> r >> n;ll a[100010] = {};ll left = l % n;ll right = r % n;ll R = r / n;ll L = l / n;ll k = R - L;if (r - l > n) {REP(i,n) {a[i] = k;}for (ll i = 1; i < left; i++) {a[i]--;}for (ll i = 1; i <= right; i++) {a[i]++;}} else {for (ll i = l; i <= r; i++) {a[i % n]++;}}REP(i,n) {cout << a[i] << endl;}}int main(int argc, char *argv[]){/*Regular*/int case_num = 1;if (argc > 1 && stoi(argv[1])) cin >> case_num;REP(case_no, case_num) {cerr << endl << "case " << case_no + 1 << endl;solve();}// /*ICPC*/// while (cin >> t >> d >> l, t) {// solve();// }//solve();return 0;}