Submission #755526

# Submission time Handle Problem Language Result Execution time Memory
755526 2023-06-10T08:22:27 Z jmyszka2007 Remittance (JOI19_remittance) C++17
0 / 100
1 ms 212 KB
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	ll n;
	cin >> n;
	ll ans = 0;
	for(int i = 1; i <= n; i++) {
		ll a, b;
		cin >> a >> b;
		ans += (b - a) * (1ll << (i - 1));
	}
	if(ans % ((1ll << n) - 1)) {
		cout << "NO\n";
	}
	else {
		cout << "YES\n";
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -