結果
| 問題 | No.836 じょうよ |
| コンテスト | |
| ユーザー |
onakaT_Titai
|
| 提出日時 | 2019-06-14 21:47:01 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 127 ms / 1,000 ms |
| コード長 | 1,417 bytes |
| コンパイル時間 | 1,061 ms |
| コンパイル使用メモリ | 102,696 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-14 04:00:17 |
| 合計ジャッジ時間 | 3,644 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 |
ソースコード
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cstring>
#include <vector>
#include <set>
#include <map>
#include <unordered_map>
#include <queue>
#include <deque>
#include <stack>
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdlib>
#include <ctime>
#include <numeric>
#include <functional>
#include <cctype>
#include <list>
#include <limits>
#include <cassert>
//#include <boost/multiprecision/cpp_int.hpp>
const double EPS = (1e-10);
using namespace std;
using Int = long long;
//using namespace boost::multiprecision;
const Int MOD = 1000000007;
long long mod_pow(long long x, long long n) {
long long res = 1;
for(int i = 0;i < 60; i++){
if(n >> i & 1) res = res * x % MOD;
x = x * x % MOD;
}
return res;
}
template<typename T>
T gcd(T a, T b) {
return b != 0 ? gcd(b, a % b) : a;
}
template<typename T>
T lcm(T a, T b) {
return a * b / gcd(a, b);
}
void fast_input() {
cin.tie(0);
ios::sync_with_stdio(false);
}
int main(void) {
fast_input();
long long L, R, N; cin >> L >> R >> N;
vector<long long> ans(N);
for (int i = 0; i < N; i++) {
long long a = (L- 1 - i + N - 1 + 1) / N;
a = max(0LL, a);
long long b = (R - i + N - 1 + 1) / N;
b = max(0LL, b);
ans[i] = b - a;
}
for (auto i : ans) {
cout << i << endl;
}
}
onakaT_Titai