結果
問題 | No.2789 hako111223’s Master Thesis |
ユーザー |
|
提出日時 | 2024-06-21 21:21:25 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 995 bytes |
コンパイル時間 | 1,698 ms |
コンパイル使用メモリ | 165,740 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-21 21:21:29 |
合計ジャッジ時間 | 2,420 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;typedef long double ld;#define rep(i, n) for(ll i = 0; i < (n); i++)#define reps(i, l, r) for(ll i = (l); i < (r); i++)#define all(a) (a).begin(), (a).end()#define endl "\n";const ll INF = 2e18;const ll mod1 = 1000000007;const ll mod2 = 998244353;ll dx[4] = {-1, 1, 0, 0};ll dy[4] = {0, 0, -1, 1};void chmin(ll& a, ll b){ if(a > b) a = b; }void chmax(ll& a, ll b){ if(a < b) a = b; }ll gcd(ll a, ll b) {return (b == 0 ? a : gcd(b, a % b));}ll lcm(ll a, ll b) {return a / gcd(a, b) * b;}void solve() {//ofstream cout("text.txt");ll A, B, C, D; cin >> A >> B >> C >> D;ll a = A + C; a -= 31;if (a <= B) {cout << 1 << endl;}else {a = A + D; a -= 31;if (a <= B) {cout << 2 << endl;}else cout << 3 << endl;}}signed main() {cin.tie(nullptr);ios_base::sync_with_stdio(false);ll T = 1; //cin >> T;while(T--) solve();}