test

 avatar
unknown
plain_text
2 years ago
559 B
3
Indexable
#include <bits/stdc++.h>
using namespace std;

int n, kq = 0;

int main() {
    ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
    freopen("MULMAX.INP", "r", stdin);
    freopen("MULMAX.OUT", "w", stdout);
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    int luu;
    for (int i = 0; i < n; ++i) {
        for (int j = i + 1; j < n; j++) {
            luu = a[i] * a[j];
        }
        if (luu > kq) {
            kq = luu;
        }
    }
    cout << kq;
    return 0;
}
Editor is loading...