1. Concise 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] contributes exactly K terms, we get K ≥ 100−F. Hence F ≤ 100 ≤ F+K.  

Construction of solution  
- Start with Pi = fi. The current sum is F.  
- We need to distribute D = 100−F increments, and we have exactly K candidates whose ri is non-integer, and K ≥ D.  
- For the first D candidates with Ki=1, increase Pi by 1. This yields ∑Pi = F + D = 100 and each Pi is either fi or fi+1, satisfying the rounding rule.

Edge cases  
- If S=0 (all Ai=0), no meaningful percentages exist, so output “No solution.”  
- Otherwise, the above procedure always finds a valid solution.

Time complexity O(N).  

3. C++ solution with detailed comments  

```cpp
#include <bits/stdc++.h>
using namespace std;

// Overload printing and reading for convenience
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;

// Read input: N and array a
void read() {
    cin >> n;
    a.resize(n);
    cin >> a;
}

void solve() {
    // Compute total votes
    long long sum = 0;
    for (int x : a) sum += x;
    if (sum == 0) {
        // No votes cast -> no solution
        cout << "No solution\n";
        return;
    }

    // Compute floor percentages fi and track how much of 100 remains
    vector<int> p(n);
    int remaining = 100;
    for (int i = 0; i < n; i++) {
        // floor of (a[i]*100)/sum
        p[i] = int((long long)a[i] * 100 / sum);
        remaining -= p[i];
    }

    // Distribute the remaining increments to those with non-zero fractional parts
    // Ai*100 % sum != 0 means ri was non-integer and eligible for rounding up
    for (int i = 0; i < n && remaining > 0; i++) {
        long long prod = (long long)a[i] * 100;
        // If there was a fractional part, we can round this one up
        if (prod % sum != 0) {
            p[i]++;
            remaining--;
        }
    }

    // After distribution, remaining should be zero by the proof
    if (remaining != 0) {
        cout << "No solution\n";
    } else {
        cout << p << "\n";
    }
}

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

    read();
    solve();
    return 0;
}
```

4. Python solution with detailed comments  

```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).