結果
| 問題 | No.836 じょうよ |
| コンテスト | |
| ユーザー |
yuliicppy
|
| 提出日時 | 2019-06-14 21:41:05 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 125 ms / 1,000 ms |
| コード長 | 1,702 bytes |
| コンパイル時間 | 684 ms |
| コンパイル使用メモリ | 84,840 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-09 00:41:15 |
| 合計ジャッジ時間 | 3,179 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 41 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <stack>
#include <queue>
#include <cmath>
#include <tuple>
#include <cstdio>
#include <bitset>
#include <sstream>
#include <iterator>
#include <numeric>
#include <map>
#include <cstring>
#include <set>
#include <functional>
#include <iomanip>
using namespace std;
#define DEBUG_ //!!提出時にコメントアウト!!
#ifdef DEBUG_
#define dump(x) cerr << #x << " = " << (x) << endl;
#else
#define dump(x) ;
#endif
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
#define SZ(x) ((int)(x).size())
#define pb push_back
#define eb emplace_back
//#define int long long
typedef long long LL;
typedef vector<int> VI;
typedef vector<LL> VL;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
template <typename T>
std::string printVector(const std::vector<T> &data)
{
std::stringstream ss;
std::ostream_iterator<T> out_it(ss, ", ");
ss << "[";
std::copy(data.begin(), data.end() - 1, out_it);
ss << data.back() << "]";
return ss.str();
}
const int MOD = 1e9+7;
const LL LINF = 1001002003004005006ll;
const int INF = 1001001001;
signed main(int argc, char const *argv[])
{
cin.tie(0);
ios::sync_with_stdio(false);
LL l,r,n; cin >> l >> r >> n;
REP(i,n){
LL a,b;
if(i == 0){
a = (r-i) / n;
b = (l-1-i) / n;
}
else{
if(r - i < 0) a = 0;
else a = (r-i) / n + 1;
if(l-1-i < 0) b= 0;
else b = (l-1-i) / n + 1;
}
//dump(a)
//dump(b)
cout << a-b << endl;
}
}
yuliicppy