Codeforces 862div2 F
// compile: g++ -o data data.cpp -std=gnu++20 -DLOCAL
// run: ./data < data.in
#include <bits/stdc++.h>
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#ifdef LOCAL
#endif
#define sz(v) ((int)(v).size())
#define PV(v) for (int i=0;i<v.size();++i)cout<<v[i]<<" ";cout<<endl;
#define INTINF 9223372036854775807
#define int long long
#define MAXN 1010

using namespace std;

int32_t main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int n; cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; ++i) cin >> a[i];
    PV(a);
    for (; n >= 2; --n) {
        vector<int> b; b.clear();
        for (int i = 0; i < n; ++i) {
            for (int j = i+1; j < n; ++j) {
                b.push_back(a[i] + a[j]);
            }
        }
        sort(b.begin(), b.end());
        b.resize(n-1);
        a = b;
        PV(a);
    }

    return 0;
}

Comments

  1. 4 weeks ago
    2025-12-06 2:46:43

    Heard some buzz about 11ttcom. Gave it a look and… yeah, it’s interesting. If you’re into this kinda thing, might be your cup of tea. My opinion? Judge for yourself: 11ttcom

  2. 2 weeks ago
    2025-12-19 14:01:07

    Bet188link, đường dẫn mới của 188bet hả? Mấy cái link này hay bị chặn lắm, phải có cái dự phòng thế này mới yên tâm được. Thanks for sharing bet188link.

  3. 7 days ago
    2025-12-29 6:29:19

    Yo, anyone tried 7ffbet? The site design is slick, I’ll give them that. I’m still testing the waters but so far seems legit and the bonuses seem alright. What’s your experience?

Send Comment Edit Comment


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Previous
Next