|  | 
|  | 
| вернуться в форум | HELP!!! This is my code and I got wa. But I don't understand, where's the mistake?Thank you very much!!
 
 #include <cstdio>
 #include <cstring>
 #include <iostream>
 #include <cmath>
 
 using namespace std;
 
 int main()
 {
 long long d, e, f, dp, ep, h;
 while (cin >> d >> e >> f >> dp >> ep >> h) {
 long long adepth = 0;
 while (dp != ep ) {
 dp = dp / 2;
 ep = ep / 2;
 adepth++;
 }
 if (adepth > max(d, e)) {
 if (adepth + adepth - d - e > h) cout << "NO" << endl;
 else cout << "YES" << endl;
 } else {
 if (abs((double)d - e) > h) cout << "NO" << endl;
 else cout << "YES" << endl;
 }
 }
 }
 | 
 | 
|