ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1688. Team.GOV!

Помогите пж, ошибка в 11 тесте
Posted by AlEkSeY~` 1 Sep 2017 23:03
#include <iostream>
#include <cmath>
#include <iomanip>
#include <vector>
#include<algorithm>
using namespace std;
int main() {
    long long a, c, d, min, max, n, x;

    long double b, e, sum;
    cin >> a >> n;
    sum = 0;
    d = 0;
    vector<long long> z(n);
    for (long long i = 0; i < n ; ++i) {
        cin >> z[i];
    }
    for (long long i = 0; i < n; ++i) {

        b = z[i] / 3;
        sum = sum + b;
        d = d + 1;
        if (a < sum) {
            break;
        }

    }
    if (a > sum) {
        cout << "Team.GOV!" << endl;
    }
    else {
        cout << "Free after " << d << " times." << endl;
    }
    return 0;
}