답안 #952349

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
952349 2024-03-23T15:30:59 Z abczz Intercastellar (JOI22_ho_t1) C++14
35 / 100
27 ms 7680 KB
#include <iostream>
#include <vector>
#include <queue>
#include <algorithm>
#include <map>
#define ll long long

using namespace std;

map <ll, ll> mp;
ll n, q, k, f, s, A[100000];
int main() {
  cin >> n;
  for (int i=0; i<n; ++i) {
    cin >> A[i];
    k = 1;
    while (!(A[i] & 1)) {
      A[i] /= 2;
      k *= 2;
    }
    s += k;
    mp[s] = A[i];
  }
  cin >> q;
  while (q--) {
    cin >> k;
    cout << mp.lower_bound(k)->second << '\n';
  }
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 27 ms 7680 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 1 ms 344 KB Output is correct
7 Correct 1 ms 348 KB Output is correct
8 Correct 2 ms 348 KB Output is correct
9 Correct 1 ms 348 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 2 ms 348 KB Output is correct
12 Correct 3 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 2 ms 496 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Incorrect 27 ms 7680 KB Output isn't correct
4 Halted 0 ms 0 KB -