Submission #923310

# Submission time Handle Problem Language Result Execution time Memory
923310 2024-02-07T06:09:49 Z goodspeed0208 Intercastellar (JOI22_ho_t1) C++14
0 / 100
0 ms 344 KB
#include<bits/stdc++.h>
#define int long long
#define pii pair<int, int>
using namespace std;

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(0);
	int n;
	cin >> n;
	vector<int>v(n);
	for (auto &i : v) cin >> i;
	vector<pii>p(n);
	for (int i = 0 ; i < n ; i++) {
		int num = 1;
		while (v[i] % 2 == 0) {
			v[i] /= 2;
			num *= 2;
		}
		if (i == 0) p[i] = {num, v[i]};
		else p[i] = {num + p[i-1].first, v[i]};
		cout << p[i].first << " " << p[i].second << "\n";
	}
	int q, x, l = 0;
	cin >> q;
	while (q--) {
		cin >> x;
		while (x > p[l].first) l++;
		cout << p[l].second << "\n";
	}
}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -