結果

問題 No.836 じょうよ
ユーザー pionepione
提出日時 2019-06-14 21:49:04
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 114 ms / 1,000 ms
コード長 1,220 bytes
コンパイル時間 1,151 ms
コンパイル使用メモリ 146,256 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-08 23:15:54
合計ジャッジ時間 3,887 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 AC 2 ms
4,380 KB
testcase_06 AC 2 ms
4,384 KB
testcase_07 AC 1 ms
4,380 KB
testcase_08 AC 1 ms
4,376 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 10 ms
4,380 KB
testcase_12 AC 14 ms
4,380 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 90 ms
4,384 KB
testcase_17 AC 81 ms
4,380 KB
testcase_18 AC 9 ms
4,380 KB
testcase_19 AC 18 ms
4,380 KB
testcase_20 AC 51 ms
4,376 KB
testcase_21 AC 5 ms
4,380 KB
testcase_22 AC 41 ms
4,380 KB
testcase_23 AC 89 ms
4,376 KB
testcase_24 AC 8 ms
4,380 KB
testcase_25 AC 32 ms
4,380 KB
testcase_26 AC 3 ms
4,380 KB
testcase_27 AC 4 ms
4,380 KB
testcase_28 AC 9 ms
4,376 KB
testcase_29 AC 5 ms
4,380 KB
testcase_30 AC 4 ms
4,376 KB
testcase_31 AC 12 ms
4,380 KB
testcase_32 AC 10 ms
4,376 KB
testcase_33 AC 4 ms
4,380 KB
testcase_34 AC 10 ms
4,376 KB
testcase_35 AC 10 ms
4,380 KB
testcase_36 AC 53 ms
4,384 KB
testcase_37 AC 50 ms
4,380 KB
testcase_38 AC 72 ms
4,376 KB
testcase_39 AC 63 ms
4,384 KB
testcase_40 AC 114 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

#define REP(i, n) for (int i = (int)(0); i < (int)(n); ++i)
#define REPS(i, n) for (int i = (int)(1); i <= (int)(n); ++i)
#define RREP(i, n) for (int i = ((int)(n)-1); i >= 0; i--)
#define RREPS(i, n) for (int i = ((int)(n)); i > 0; i--)
#define IREP(i, m, n) for (int i = (int)(m); i < (int)(n); ++i)
#define IREPS(i, m, n) for (int i = (int)(m); i <= (int)(n); ++i)
#define FOR(e, c) for (auto &e : c)
#define SORT(v, n) sort(v, v + n);
#define VSORT(v) sort(v.begin(), v.end());
#define RVISORT(v) sort(v.begin(), v.end(), greater<int>());
#define ALL(v) v.begin(), v.end()

using VI = vector<int>;
using VVI = vector<VI>;
using PII = pair<int, int>;
using ll = long long;

typedef long long ll;

template<class T, class C> void chmax(T& a, C b){ a>b?:a=b; }
template<class T, class C> void chmin(T& a, C b){ a<b?:a=b; }

const ll mod=1e9+7;

int main()
{
    cin.tie( 0 );
    ios::sync_with_stdio( false );
	
	ll l,r;int n;cin>>l>>r>>n;
	ll quotient=(r-l+1)/n;
	ll remainder=(r-l+1)%n;
	vector<long long> v(n,0);
	REP(i,n){
		v[(l+i)%n]++;
	}
	REP(i,n){
		v[i]*=quotient;
	}
	REP(i,remainder){
		v[(r-i)%n]++;
	}

	REP(i,n){
		cout << v[i] << endl;
	}

    return 0;
}
0