codeforces 712 Memory and De-Evolution
生活随笔
收集整理的這篇文章主要介紹了
codeforces 712 Memory and De-Evolution
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
2019-05-19
13:25:37
加油,加油,堅持,堅持!!!
一定要逆推,才可以是最少的次數
更好的方法:
https://www.cnblogs.com/ECJTUACM-873284962/p/6379014.html
#include <bits/stdc++.h> using namespace std; typedef long long ll;int main() {ll x, y;scanf("%lld %lld", &x, &y);ll maxx = y;ll midd = y;ll minn = y;ll p = 0;ll q = 0;ll count = 0;while(1){p = maxx;q = midd;maxx = midd + maxx - 1;midd = p;minn = q;count++;if (maxx >= x){cout << count + 2 << endl;return 0;}} return 0; }?
轉載于:https://www.cnblogs.com/Artimis-fightting/p/10889047.html
總結
以上是生活随笔為你收集整理的codeforces 712 Memory and De-Evolution的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 字典树andXOR*
- 下一篇: 小花梨的数组