Language: C++

int main() {
	ll N, A, B, Diff, h[100002];
	scanf("%lld %lld %lld", &N, &A, &B);
	Diff = A - B;
	for (int i = 0; i < N; i++)
		scanf("%lld", h + i);

	std::sort(h, h + N);
	h[N]     = 0x7fffffffffffffffll;
	ll up = 1000000000, down = 0, center = (up + down) / 2;
	while (1 < (up - down)) {
		ll adown;
		for (adown = 0; h[adown] < (B * center); adown++);

		ll sum = 0;
		for (int i = adown; i < N; i++)
			sum += ((h[i] - B * center) + Diff - 1) / Diff;

		if (sum <= center)
			up = center;
		else
			down = center;
		center = (up + down) / 2;
	}

	printf("%d\n", up);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:9: error: 'll' was not declared in this scope
    2 |         ll N, A, B, Diff, h[100002];
      |         ^~
a.cc:3:34: error: 'N' was not declared in this scope
    3 |         scanf("%lld %lld %lld", &N, &A, &B);
      |                                  ^
a.cc:3:38: error: 'A' was not declared in this scope
    3 |         scanf("%lld %lld %lld", &N, &A, &B);
      |                                      ^
a.cc:3:42: error: 'B' was not declared in this scope
    3 |         scanf("%lld %lld %lld", &N, &A, &B);
      |                                          ^
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%lld %lld %lld", &N, &A, &B);
      |         ^~~~~
a.cc:4:9: error: 'Diff' was not declared in this scope
    4 |         Diff = A - B;
      |         ^~~~
a.cc:6:31: error: 'h' was not declared in this scope
    6 |                 scanf("%lld", h + i);
      |                               ^
a.cc:8:14: error: 'sort' is not a member of 'std'
    8 |         std::sort(h, h + N);
      |              ^~~~
a.cc:8:19: error: 'h' was not declared in this scope
    8 |         std::sort(h, h + N);
      |                   ^
a.cc:10:11: error: expected ';' before 'up'
   10 |         ll up = 1000000000, down = 0, center = (up + down) / 2;
      |           ^~~
      |           ;
a.cc:11:21: error: 'up' was not declared in this scope
   11 |         while (1 < (up - down)) {
      |                     ^~
a.cc:11:26: error: 'down' was not declared in this scope
   11 |         while (1 < (up - down)) {
      |                          ^~~~
a.cc:12:19: error: expected ';' before 'adown'
   12 |                 ll adown;
      |                   ^~~~~~
      |                   ;
a.cc:13:22: error: 'adown' was not declared in this scope
   13 |                 for (adown = 0; h[adown] < (B * center); adown++);
      |                      ^~~~~
a.cc:13:49: error: 'center' was not declared in this scope
   13 |                 for (adown = 0; h[adown] < (B * center); adown++);
      |                                                 ^~~~~~
a.cc:15:19: error: expected ';' before 'sum'
   15 |                 ll sum = 0;
      |                   ^~~~
      |                   ;
a.cc:16:30: error: 'adown' was not declared in this scope
   16 |                 for (int i = adown; i < N; i++)
      |                              ^~~~~
a.cc:17:25: error: 'sum' was not declared in this scope
   17 |                         sum += ((h[i] - B * center) + Diff - 1) / Diff;
      |                         ^~~
a.cc:17:45: error: 'center' was not declared in this scope
   17 |                         sum += ((h[i] - B * center) + Diff - 1) / Diff;
      |                                             ^~~~~~
a.cc:19:21: error: 'sum' was not declared in this scope
   19 |                 if (sum <= center)
      |                     ^~~
a.cc:19:28: error: 'center' was not declared in this scope
   19 |                 if (sum <= center)
      |                            ^~~~~~
a.cc:23:17: error: 'center' was not declared in this scope
   23 |                 center = (up + down) / 2;
      |                 ^~~~~~
a.cc:26:24: error: 'up' was not declared in this scope
   26 |         printf("%d\n", up);
      |                        ^~
a.cc:26:9: error: 'printf' was not declared in this scope
   26 |         printf("%d\n", up);
      |         ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {