194032025-12-08 13:52:06markfsibianFestés (50 pont)cpp17Wrong answer 0/502ms508 KiB
#include <iostream>
#include <vector>
#include <algorithm>
#include <fstream>
#include <cmath>

using namespace std;

ifstream fin("C:\\Users\\Lenovo I5-7gen\\source\\repos\\teszt\\asd.txt");

#define cin fin

int n, m, r[4], a;

vector<vector<int>> v;

vector<vector<int>> c;

int main()
{
    cin >> n >> m;
    for (int i = 1; i <= n; ++i)
        cin >> r[i];

    c.resize(m+1);

    for (int i = 1; i <= m; ++i)
    {
        c[i].resize(n / 2 * (n + 1)+1);
        for (int j = 1; j <= n / 2 * (n + 1); j++)
            cin >> c[i][j];
    }

    v.resize(n+1);
    for (int i = 1; i <= n; ++i)
        v[i].resize(m+1);

    for (int i = 1; i <= n; ++i)
        for (int j = 1; j <= m; ++j)
        {
            vector<int> t;
            for (int k = 1; k <= n; ++k)
                t.push_back(c[j][k]);
            t.push_back(r[i]);
            v[i][j] = *min_element(t.begin(), t.end());
        }

    for (int i = 1; i <= n; ++i)
    {
        for (int j = 1; j <= m; ++j)
            cout << v[i][j] << " ";
        cout << endl;
    }
    cout << endl;

}
SubtaskSumTestVerdictTimeMemory
base0/50
1Wrong answer0/01ms316 KiB
2Wrong answer0/01ms316 KiB
3Wrong answer0/21ms316 KiB
4Wrong answer0/21ms316 KiB
5Wrong answer0/31ms316 KiB
6Wrong answer0/21ms392 KiB
7Wrong answer0/21ms316 KiB
8Wrong answer0/21ms348 KiB
9Wrong answer0/21ms316 KiB
10Wrong answer0/21ms316 KiB
11Wrong answer0/21ms328 KiB
12Wrong answer0/21ms316 KiB
13Wrong answer0/21ms316 KiB
14Wrong answer0/21ms316 KiB
15Wrong answer0/31ms316 KiB
16Wrong answer0/31ms316 KiB
17Wrong answer0/21ms316 KiB
18Wrong answer0/31ms316 KiB
19Wrong answer0/21ms508 KiB
20Wrong answer0/21ms316 KiB
21Wrong answer0/21ms388 KiB
22Wrong answer0/21ms508 KiB
23Wrong answer0/21ms316 KiB
24Wrong answer0/22ms316 KiB
25Wrong answer0/21ms316 KiB