Untitled

mail@pastecode.io avatar
unknown
plain_text
2 months ago
2.4 kB
1
Indexable
Never
#include <iostream>
#include <string.h>
#include <cstdlib>
using namespace std;
/*
void str(string& a) {
    if (a.size()) {
        if ((a[0] >= 97) && (a[0] <= 122)) {
            a[0] -= 32;
        }
    }

}
*/
/*
string a_bc(string& a, string& b, string& c, string &d) {
    str(a);
    str(b);
    str(c);
    d += a;
    d += ' ';
    d += b[0];
    d += ". ";
    d += c[0];
    d += '.';
    return d;
}
*/
/*
int cadastr(int& a, int& n, int &m, int &s, int &b) {
    int res = (a * n * m) + (s * b);
    return res;
}
*/
/*
void foo(int mas[], const int size, int& n, int &a, int &b) {
    srand(time(NULL));
    int i = 0;
    while (i < n) {
        mas[i] = rand() % (b - a + 1) + a;
        i++;
    }
}
*/
bool Great_wall(int mas[], const int size, int (* mas_2[10]), const int size_2, const int size_3, int& n, int& m, int& k) {
    int i = 0;
    int u;
    int o = 0;
    while (i < m){
        u = 0;
        while (u < k) {
            o = 0;
            while (o < n) {
                if (mas_2[i][u] == o) {
                    mas[o] -= 1;
                }
                o++;
            }
            u++;
        }
        i++;
    }
    o = 0;
    while (o < n) {
        if (mas[o] <= 0) {
            cout << "aaaaaaaaaaaaaaaaaaaaa";
        }
        o++;
    }
    return 0;
}
int main() {
    /*
    string a;
    cin >> a;
    str(a);
    */
    /*
    string a, b, c, d;
    cin >> a >> b >> c;
    d = "";
    cout << a_bc(a, b, c, d);
    */
    /*
    int a, n, m, s, b;
    cin >> a >> n >> m >> s >> b;
    cout << cadastr(a, n, m, s, b);
    */
    /*
    int mas[100];
    int n;
    int a, b;
    cin >> n;
    cin >> a >> b;
    const int size = 100;
    int i = 0;
    foo(mas, size, n, a, b);
    while (i < n) {
        cout << mas[i] << endl;
        i++;
    }
    */
    int mas[100];
    int n;
    cin >> n;
    int i = 0;
    while (i < n) {
        cin >> mas[i];
        i++;
    }
    int mas_2[10][100];
    i = 0;
    int u = 0;
    int m, k;
    cin >> m;
    while (i < m)
    {
        cin >> k;
        u = 0;
        while (u < k) {
            cin >> mas_2[i][u];
            u++;
        }
        i++;
    }
    const int size = 100;
    const int size_2 = 10;
    const int size_3 = 100;
    Great_wall(mas, size, mas_2, size_2, size_3, n, m, k);
}
Leave a Comment