Submission #3010237


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
using ll = long long;

int main()
{
	ll K, A, B;
	cin >> K >> A >> B;
	if (A <= B && A < K) {
		cout << -1 << endl;
	}
	else if (A <= B) {
		cout << 1 << endl;
	}
	else {
		cout << min((K + A - B - 1) / (A - B) * 2, (K - A + A - B - 1) / (A - B) * 2 + 1) << endl;
	}
	return 0;
}

Submission Info

Submission Time
Task A - Kaiden
User fxt
Language C++ (GCC 5.4.1)
Score 0
Code Size 326 Byte
Status CE

Compile Error

./Main.cpp:3:7: error: expected nested-name-specifier before ‘ll’
 using ll = long long;
       ^
./Main.cpp: In function ‘int main()’:
./Main.cpp:7:2: error: ‘ll’ was not declared in this scope
  ll K, A, B;
  ^
./Main.cpp:8:9: error: ‘K’ was not declared in this scope
  cin >> K >> A >> B;
         ^
./Main.cpp:8:14: error: ‘A’ was not declared in this scope
  cin >> K >> A >> B;
              ^
./Main.cpp:8:19: error: ‘B’ was not declared in this scope
  cin >> K >> A >> B;
                   ^