https://www.acmicpc.net/problem/3753 코드#include using namespace std;#define FASTIO ios::sync_with_stdio(false);cin.tie(NULL);typedef long long ll;ll ternary_search(ll n, ll c) { if (n == 0) return 0; ll l = 0, r = c / n; while (r - l > 3) { ll m1 = l + (r - l) / 3; ll m2 = r - (r - l) / 3; ll p1 = m1 * (c - m1 * n); ll p2 = m2 * (c - m2 * n); if (p1 > p2) r = m2; else l = m1; } ll ans = l;..