結果
問題 | No.836 じょうよ |
ユーザー |
![]() |
提出日時 | 2019-06-14 22:03:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 125 ms / 1,000 ms |
コード長 | 1,157 bytes |
コンパイル時間 | 1,616 ms |
コンパイル使用メモリ | 168,348 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-14 05:54:25 |
合計ジャッジ時間 | 4,115 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 41 |
ソースコード
#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_pair void solve() { ll l,r,n; cin >> l >> r >> n; ll a[100010] = {}; ll k = r / n; REP(i,n) { a[i] += k; } for (ll i = 1; i <= r%n; i++) { a[i]++; } l--; k = l / n; REP(i,n) { a[i] -= k; } for (ll i = 1; i <= l%n; i++) { a[i]--; } 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; }