跳到正文

科技·工程

VR OI 2.0全AK NOI流程

liuzhuoran141516约 3 分钟
原文
文章信息与版本

文章信息

发布
2026年10月18日
收录
2026年11月1日
更新
2026年11月21日
篇幅
约 3 分钟

版本

  1. v1当前

直接提交这份代码即可,如果没对,那么就多交几次。

注意不要删掉注释。

C++
#include <bits/stdc++.h>
using namespace std;

const int INF = 1000000000;

int gcd(int a, int b) {
    return b ? gcd(b, a % b) : a;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n;
    long long ans = 0;
    vector<int> a;
    map<int, int> mp;
    set<int> st;
    queue<int> q;
    stack<int> sk;
    pair<int, int> p;
    string s;
    bool flag = true;
    double d = 0.0;
    char c = '0';
    unsigned x = 0;

    if (cin >> n) {
        for (int i = 0; i < n; i++) {
            int v;
            cin >> v;
            a.push_back(v);
            mp[v]++;
            st.insert(v);
        }
    } else {
        n = 0;
    }

    do { ans++; } while (false);

    switch (n) {
        case 0: break;
        default: break;
    }

    sort(a.begin(), a.end());
    reverse(a.begin(), a.end());
    ans = max(ans, (long long)min(n, 1));
    ans += abs(-1);
    ans += (long long)sqrt(4.0);
    ans += (long long)pow(2, 3);
    ans += sizeof(int);
    memset(&x, 0, sizeof(x));

    try {
        if (n < 0) throw 1;
    } catch (...) {}

    cout << ans << endl;
    return 0;
}

//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
原文