結果

問題 No.836 じょうよ
ユーザー tooftoof
提出日時 2019-06-14 21:33:35
言語 C++11
(gcc 11.4.0)
結果
TLE  
実行時間 -
コード長 765 bytes
コンパイル時間 1,609 ms
コンパイル使用メモリ 145,824 KB
実行使用メモリ 8,760 KB
最終ジャッジ日時 2023-08-08 17:27:42
合計ジャッジ時間 5,186 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
8,760 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,376 KB
testcase_09 AC 2 ms
4,380 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 10 ms
4,384 KB
testcase_12 AC 14 ms
4,376 KB
testcase_13 AC 9 ms
4,380 KB
testcase_14 AC 3 ms
4,376 KB
testcase_15 AC 12 ms
4,380 KB
testcase_16 AC 91 ms
4,380 KB
testcase_17 AC 84 ms
4,376 KB
testcase_18 AC 8 ms
4,376 KB
testcase_19 AC 17 ms
4,376 KB
testcase_20 AC 49 ms
4,376 KB
testcase_21 TLE -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vl = vector<ll>;
#define rep(i, n) for(ll i = 0;i < n;i++)
#define all(i) i.begin(), i.end()
template<class T, class U> bool cmax(T& a, U b) { if (a<b) {a = b; return true;} else return false; }
template<class T, class U> bool cmin(T& a, U b) { if (a>b) {a = b; return true;} else return false; }

int main() {
  cin.tie(0); ios::sync_with_stdio(false);

  ll l, r, n;
  cin >> l >> r >> n;
  vector<ll> ans(n);
  int cnt = 0;
  for(ll i = l; i%n != 0; i++) {
    ans[i%n]++;
    cnt++;
  }
  for(ll i = r; i%n != n-1; i--) {
    ans[i%n]++;
    cnt++;
  }
  ll base = (r-l+1-cnt)/n;
  rep(i, n) {
    cout << ans[i] + base << endl;
  }
}
0