結果

問題 No.836 じょうよ
ユーザー mmn15277198mmn15277198
提出日時 2020-07-06 23:22:50
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 646 bytes
コンパイル時間 1,057 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 4,624 KB
最終ジャッジ日時 2023-10-25 00:50:20
合計ジャッジ時間 3,741 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
4,368 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,348 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 11 ms
4,348 KB
testcase_12 AC 16 ms
4,348 KB
testcase_13 AC 10 ms
4,348 KB
testcase_14 AC 3 ms
4,348 KB
testcase_15 AC 13 ms
4,348 KB
testcase_16 AC 101 ms
4,624 KB
testcase_17 AC 91 ms
4,368 KB
testcase_18 AC 9 ms
4,348 KB
testcase_19 AC 20 ms
4,348 KB
testcase_20 AC 58 ms
4,348 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <vector>
#include <iostream>
#include <algorithm>
#include <functional>
#include <string>
#include <math.h>
#include <map>
using namespace std;

int main(){
	long long l,r,n;
	cin >> l >> r >> n;
	vector<long long> mo;
	for(long long i=l;i<=r;i++){
		if(i==l){
			mo.push_back(i%n);
			continue;
		}else{
			if(mo[0]==i%n){
				break;
			}else{
				mo.push_back(i%n);
			}
		}
	}

	vector<long long> cnt(mo.size(),(r-l+1)/mo.size());
	
	long long add=(r-l+1)%mo.size();
	
	for(long long i=0;i<add;i++){
		cnt[mo[i]]++;
	}
	
	sort(mo.begin(),mo.end());
	
	for(long long i=0;i<mo.size();i++){
		cout << cnt[mo[i]] << endl;
	}

	return 0;
}
0