Editorial for Giết Titan
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.```
Với vấn đề của bài này !
Có $N$ Titan và $M$ thằng trinh sát .
Mỗi trinh sát có 4 con dao và mỗi con dao có 8 lưỡi dao => có M * 32 lưỡi dao
Nếu $N \le M * 32$ thì "$YES$" else "$NO$"
Để tránh tràn số thì chuyển thành $N / 32 \le M$
lưu ý : Sử dụng số thực để so sánh
---
# $\color{#009933}{\text{Preference Accepted Code }}$:
```cpp
#include <iostream>
using namespace std;
int t;
int main(){
cin >> t;
while (t--){
long long n , m;
cin >> n >> m;
long long cp = n / 32;
if (m > cp) cout << "YES\n";
if (m < cp) cout << "NO\n";
if (m == cp) cout << ((n % 32 == 0) ? "YES\n" : "NO\n");
}
return 0;
}
Comments