結果
問題 | No.1465 Archaea |
ユーザー |
![]() |
提出日時 | 2021-04-02 22:37:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 501 bytes |
コンパイル時間 | 2,088 ms |
コンパイル使用メモリ | 192,336 KB |
最終ジャッジ日時 | 2025-01-20 09:44:20 |
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 8 WA * 12 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, srt, end) for (long long i = (srt); i < (long long)(end); i++) void solve() { ll n, k; cin >> n >> k; ll L = 1, R = 1; rep(i, 0, k) { ll nL = min(L+3, L*2); ll nR = max(R+3, R*2); L = nL; R = nR; } if(L <= n && n <= R) cout << "YES\n"; else cout << "NO\n"; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); solve(); return 0; }