結果
問題 | No.836 じょうよ |
ユーザー |
|
提出日時 | 2019-06-14 23:03:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 491 bytes |
コンパイル時間 | 600 ms |
コンパイル使用メモリ | 71,588 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-14 12:57:19 |
合計ジャッジ時間 | 3,281 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 WA * 12 |
ソースコード
#include <iostream> #include <vector> using namespace std; typedef long long LL; int main(int argc, char* argv[]) { LL l,r; int n; cin>>l>>r>>n; LL num0=(r-l+1)/n; LL numS=l/n*n; if (numS<l){ numS+=n; } LL NumE=(r/n)*n; vector<LL> numV; numV.push_back(num0); for (int i=1;i<n;i++){ numV.push_back(num0-1); } for (LL i=l;i<numS;i++){ numV[i%n]++; } for (LL i=NumE+1;i<=r;i++){ numV[i%n]++; } for (int i=0;i<numV.size();i++){ cout<<numV[i]<<endl; } return 0; }