結果
| 問題 |
No.836 じょうよ
|
| コンテスト | |
| ユーザー |
ndifix
|
| 提出日時 | 2019-06-14 21:32:51 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 124 ms / 1,000 ms |
| コード長 | 1,306 bytes |
| コンパイル時間 | 829 ms |
| コンパイル使用メモリ | 86,132 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-09 00:28:11 |
| 合計ジャッジ時間 | 3,261 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <set>
#include <map>
#include <algorithm>
#include <iomanip>
const int mod=1e9+7;
using LL=long long;
using std::cout;using std::endl;using std::cin;
using std::vector;using std::string;using std::set;using std::multiset;
using std::pair;using std::map;
using std::min;using std::max;
using std::make_pair;
std::ostream& operator<<(std::ostream& os,std::map<int,int>& obj){for(std::map<int,int>::iterator itr=obj.begin();itr!=obj.end();itr++){os<<itr->first<<"^"<<itr->second<<" ";}return os;}
std::ostream& operator<<(std::ostream& os,std::vector<std::map<int,int>>& obj){for(auto itr=obj.begin();itr!=obj.end();itr++){os<<*itr<<std::endl;}return os;}
std::ostream& operator<<(std::ostream& os,std::vector<int>& obj){for(auto itr=obj.begin();itr!=obj.end();itr++){os<<*itr<<endl;}return os;}
namespace ndifix{
template<class T>void sort(T &v){std::sort(v.begin(),v.end());}
}
int main(){std::cout << std::setprecision(10);
LL l,r;
int n;cin>>l>>r>>n;
vector<LL> ans(n);
while((l%n)!=0 && l!=r){
ans[l%n]++;l++;
}
while((r%n)!=n-1 && l!=r){
ans[r%n]++;r--;
}
if(l==r){
ans[l%n]++;
for(int i=0;i<n;i++)cout<<ans[i]<<endl;
return 0;
}
for(int i=0;i<n;i++)cout<<ans[i]+(r-l+1)/n<<endl;
return 0;
}
ndifix