結果
| 問題 |
No.804 野菜が苦手
|
| コンテスト | |
| ユーザー |
baku1101
|
| 提出日時 | 2019-03-22 21:28:28 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,573 bytes |
| コンパイル時間 | 1,608 ms |
| コンパイル使用メモリ | 168,160 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-19 02:48:27 |
| 合計ジャッジ時間 | 2,275 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 14 WA * 4 |
ソースコード
//include
//------------------------------------------
#include <bits/stdc++.h>
using namespace std;
//typedef
//------------------------------------------
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef vector<string> VS;
typedef pair<LL, LL> PLL;
//container util
//------------------------------------------
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI = acos(-1.0);
const int MOD = 1000000007;
//MOD
//--------------------------------------------
#define MUL(a,b) (((a) % MOD) * ((b) % MOD)) % MOD
// grid
//--------------------------------------------
VL dx = {0, 1, 0, -1};
VL dy = {1, 0, -1, 0};
VL dx2 = {-1, 0, 1, -1, 1, -1, 0, 1};
VL dy2 = {-1, -1, -1, 0, 0, 1, 1, 1};
//debug
//--------------------------------------------
#define dump(x) cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;
//main code
int main(int argc, char const* argv[])
{
int a,b,c,d;
cin >> a >> b >> c >> d;
if (c > b) {
cout << 0 << endl;
return 0;
}
for (int i = 1; i <= 100; i++) {
if ((i+1) * c > b or (i+1) * c + i+1 > d) {
cout << i << endl;
return 0;
}
}
return 0;
}
baku1101