1. Abridged Problem Statement
Given N candidates and their vote counts A1…AN, compute integer percentages P1…PN such that:
- ∑Pi = 100
- Each Pi equals the exact percentage (Ai·100/∑Ai) rounded either down or up.
If no solution exists, output "No solution"; otherwise output any valid sequence P.

2. Detailed Editorial

Problem restatement and constraints
- N up to 10⁴, Ai up to 10⁴, sum S = ∑Ai.
- We want integer Pi with Pi ∈ {⌊ri⌋,⌈ri⌉} where ri = Ai·100/S, and ∑Pi=100.

Key observations
1. Compute floor values fi = ⌊Ai·100/S⌋. Let F = ∑fi. Then F ≤ ∑ri = 100, so F ≤ 100.
2. Let Ki be the fractional-part indicator: Ki=1 if Ai·100 % S ≠ 0, else 0. The count of non-integers is K = ∑Ki.
3. If we take all ceilings ci=fi+Ki, then ∑ci = F+K. But ∑ri = F + ∑(ri−fi). Since ∑ri=100 and each (ri−fi)∈(0,1) for a non-integer term, we get K ≥ 100−F. Hence F ≤ 100 ≤ F+K.

Construction of solution
- Start with Pi = fi. The deficit to distribute is sum_p = 100 − F.
- We have exactly K candidates whose ri is non-integer, and K ≥ sum_p.
- Walk the list; for each candidate whose share is not already an integer, increase Pi by 1, until sum_p is exhausted. This yields ∑Pi = 100 and each Pi is either fi or fi+1, satisfying the rounding rule.

The test data guarantees a valid configuration exists, so the construction always succeeds. (Detecting a non-integer share is done via the exact comparison p[i]·S ≠ a[i]·100, which avoids recomputing the modulo.)

Time complexity O(N).

3. C++ Solution

```cpp
#include <bits/stdc++.h>

using namespace std;

template<typename T1, typename T2>
ostream& operator<<(ostream& out, const pair<T1, T2>& x) {
    return out << x.first << ' ' << x.second;
}

template<typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& x) {
    return in >> x.first >> x.second;
}

template<typename T>
istream& operator>>(istream& in, vector<T>& a) {
    for(auto& x: a) {
        in >> x;
    }
    return in;
};

template<typename T>
ostream& operator<<(ostream& out, const vector<T>& a) {
    for(auto x: a) {
        out << x << ' ';
    }
    return out;
};

int n;
vector<int> a;

void read() {
    cin >> n;
    a.resize(n);
    cin >> a;
}

void solve() {
    // Each candidate's real share is a[i]*100/sum percent. We first floor
    // every share, which leaves a remainder sum_p = 100 - sum of floors to
    // distribute (it never exceeds the number of candidates with a fractional
    // part). We then walk the list and round up exactly the candidates whose
    // share was not already an integer, one each, until sum_p is exhausted.
    // Every printed part stays within one of its real value and the total is
    // exactly 100.

    int sum = 0;
    for(int x: a) {
        sum += x;
    }

    vector<int> p(n);
    int sum_p = 100;
    for(int i = 0; i < n; i++) {
        p[i] = (a[i] * 100) / sum;
        sum_p -= p[i];
    }

    for(int i = 0; i < n; i++) {
        if(p[i] * 1ll * sum != a[i] * 100ll && sum_p) {
            p[i]++;
            sum_p--;
        }
    }

    cout << p << endl;
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);

    int T = 1;
    // cin >> T;
    for(int test = 1; test <= T; test++) {
        read();
        // cout << "Case #" << test << ": ";
        solve();
    }

    return 0;
}
```

4. Python Solution

```python
import sys

def main():
    data = sys.stdin.read().split()
    if not data:
        return
    it = iter(data)
    n = int(next(it))
    a = [int(next(it)) for _ in range(n)]
    total = sum(a)
    # If no votes, we cannot form percentages
    if total == 0:
        print("No solution")
        return

    # Compute floor percentages and track how many points remain
    p = []
    current_sum = 0
    for votes in a:
        # floor of votes*100/total
        val = (votes * 100) // total
        p.append(val)
        current_sum += val

    # How many % points we still need to distribute
    need = 100 - current_sum

    # Collect indices with non-integer true percentage
    frac_indices = []
    for i, votes in enumerate(a):
        if (votes * 100) % total != 0:
            frac_indices.append(i)

    # If not enough non-integer entries to round up, no solution
    if need > len(frac_indices):
        print("No solution")
        return

    # Round up the first 'need' candidates with fractional percentage
    for i in range(need):
        idx = frac_indices[i]
        p[idx] += 1

    # Output result
    print(*p)

if __name__ == "__main__":
    main()
```

5. Compressed Editorial
- Compute fi = ⌊Ai·100/∑Ai⌋ for all i; let F = ∑fi.
- The deficit D = 100−F equals ∑(Ai·100/∑Ai − fi), and there are at least D non-integer parts.
- Increase fi by 1 for any D candidates whose true percentage is non-integer. This yields a valid solution in O(N).
