From 6b548332bfc6469756526002971c422f43f86d0a Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Mon, 24 Jul 2023 13:11:33 +0300 Subject: Removed some empty *.cpp files and Solved some new problems --- codeforces/BearAndBigBrother/main | Bin 0 -> 17832 bytes codeforces/BearAndBigBrother/main.cpp | 136 ++++++++++++++++++++++++++ codeforces/BearAndBigBrother/main_input0.txt | 1 + codeforces/BearAndBigBrother/main_input1.txt | 1 + codeforces/BearAndBigBrother/main_input2.txt | 1 + codeforces/BearAndBigBrother/main_output0.txt | 1 + codeforces/BearAndBigBrother/main_output1.txt | 1 + codeforces/BearAndBigBrother/main_output2.txt | 1 + 8 files changed, 142 insertions(+) create mode 100755 codeforces/BearAndBigBrother/main create mode 100755 codeforces/BearAndBigBrother/main.cpp create mode 100644 codeforces/BearAndBigBrother/main_input0.txt create mode 100644 codeforces/BearAndBigBrother/main_input1.txt create mode 100644 codeforces/BearAndBigBrother/main_input2.txt create mode 100644 codeforces/BearAndBigBrother/main_output0.txt create mode 100644 codeforces/BearAndBigBrother/main_output1.txt create mode 100644 codeforces/BearAndBigBrother/main_output2.txt (limited to 'codeforces/BearAndBigBrother') diff --git a/codeforces/BearAndBigBrother/main b/codeforces/BearAndBigBrother/main new file mode 100755 index 0000000..0098166 Binary files /dev/null and b/codeforces/BearAndBigBrother/main differ diff --git a/codeforces/BearAndBigBrother/main.cpp b/codeforces/BearAndBigBrother/main.cpp new file mode 100755 index 0000000..d4e9c1f --- /dev/null +++ b/codeforces/BearAndBigBrother/main.cpp @@ -0,0 +1,136 @@ +#include +using namespace std; + +using ll = long long; +using pii = pair; +using vpi = vector; +using vi = vector; +using vll = vector; +using mpii = map; +using mpll = map; +using db = long double; + +#define pb push_back +#define all(x) (x).begin(), (x).end() +#define rall(x) (x).rbegin(), (x).rend() +#define lb lower_bound +#define ub upper_bound +#define make_unique(x) sort(all((x))); (x).resize(unique(all((x))) - (x).begin()) +#define ceil(a, b) ((a) + (b) - 1) / (b)) + +const int MOD = (int)1e9 + 7; +const db PI = acos((db)-1); +const int dx[4]{1, 0, -1, 0}; +const int dy[4]{0, 1, 0, -1}; + +template ostream& operator<<(ostream& os, const pair& p); +template ostream& operator<<(ostream& os, const vector& vec); +template ostream& operator<<(ostream& os, const map& m); +template ostream& operator<<(ostream& os, const unordered_map& m); +template ostream& operator<<(ostream& os, const set& s); +template ostream& operator<<(ostream& os, const unordered_set& s); + +template +ostream& operator<<(ostream& os, const pair& p) { + os << "(" << p.first << ", " << p.second << ")"; + return os; +} + +template +ostream& operator<<(ostream& os, const vector& vec) { + os << "{"; + for (size_t i = 0; i < vec.size(); ++i) { + if (i > 0) os << ", "; + os << vec[i]; + } + os << "}"; + return os; +} + + +template +ostream& operator<<(ostream& os, const map& m) { + os << "{"; + for (const auto& p : m) { + os << p.first << ": " << p.second << ", "; + } + os << "}"; + return os; +} + +template +ostream& operator<<(ostream& os, const unordered_map& m) { + os << "{"; + for (const auto& p : m) { + os << p.first << ": " << p.second << ", "; + } + os << "}"; + return os; +} + +template +ostream& operator<<(ostream& os, const set& s) { + int i = 0; + os << "{"; + for (const auto& e : s) { + if (i > 0) os << ", "; + os << e; + i++; + } + os << "}"; + return os; +} + +template +ostream& operator<<(ostream& os, const unordered_set& s) { + int i = 0; + os << "{"; + for (const auto& e : s) { + if (i > 0) os << ", "; + os << e; + i++; + } + os << "}"; + return os; +} + +void print() { + cerr << "\n"; +} + +template +void print(T val, TS... vals) { + cerr << val << " "; + print(vals...); +} + + + +/* stuff you should look for: + --------------------------- + * special cases (n=1?) + * int overflow, array bounds + * do smth instead of nothing and stay organized + * WRITE STUFF DOWN + * DON'T GET STUCK ON ONE APPROACH + */ + +void solve() { + int a, b; + cin >> a >> b; + int ans = 0; + while (a <= b) { + a *= 3; + b *= 2; + ans++; + } + cout << ans << '\n'; +} + +int main () { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + solve(); +} + + diff --git a/codeforces/BearAndBigBrother/main_input0.txt b/codeforces/BearAndBigBrother/main_input0.txt new file mode 100644 index 0000000..9ac1165 --- /dev/null +++ b/codeforces/BearAndBigBrother/main_input0.txt @@ -0,0 +1 @@ +4 7 diff --git a/codeforces/BearAndBigBrother/main_input1.txt b/codeforces/BearAndBigBrother/main_input1.txt new file mode 100644 index 0000000..aaf5572 --- /dev/null +++ b/codeforces/BearAndBigBrother/main_input1.txt @@ -0,0 +1 @@ +4 9 diff --git a/codeforces/BearAndBigBrother/main_input2.txt b/codeforces/BearAndBigBrother/main_input2.txt new file mode 100644 index 0000000..2fb73a0 --- /dev/null +++ b/codeforces/BearAndBigBrother/main_input2.txt @@ -0,0 +1 @@ +1 1 diff --git a/codeforces/BearAndBigBrother/main_output0.txt b/codeforces/BearAndBigBrother/main_output0.txt new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/codeforces/BearAndBigBrother/main_output0.txt @@ -0,0 +1 @@ +2 diff --git a/codeforces/BearAndBigBrother/main_output1.txt b/codeforces/BearAndBigBrother/main_output1.txt new file mode 100644 index 0000000..00750ed --- /dev/null +++ b/codeforces/BearAndBigBrother/main_output1.txt @@ -0,0 +1 @@ +3 diff --git a/codeforces/BearAndBigBrother/main_output2.txt b/codeforces/BearAndBigBrother/main_output2.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/codeforces/BearAndBigBrother/main_output2.txt @@ -0,0 +1 @@ +1 -- cgit v1.2.3