답안 #530169

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
530169 2022-02-24T18:15:53 Z pedroslrey Teams (CEOI11_tea) C++17
0 / 100
198 ms 30372 KB
#include <bits/stdc++.h>

using namespace std;

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

    int n;
    cin >> n;

    vector<pair<int, int>> xs;
    for (int i = 0; i < n; ++i) {
        int x;
        cin >> x;

        xs.emplace_back(x, i);
    }

    sort(xs.rbegin(), xs.rend());

    vector<vector<int>> ans;
    for (int i = 0; i < n;) {
        ans.emplace_back();
        for (int j = i; j < i + xs[i].first; ++j)
            ans.back().push_back(xs[j].second);
        i += xs[i].first;
    }

    return 92;

    cout << ans.size() << '\n';
    for (auto xs: ans) {
        cout << xs.size() << " ";
        for (int x: xs)
            cout << x+1 << " ";
        cout << '\n';
    }
}
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 204 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 204 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 0 ms 204 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 1 ms 332 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 14 ms 1432 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 15 ms 1416 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 127 ms 9636 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 174 ms 13008 KB Execution failed because the return code was nonzero
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Runtime error 198 ms 30372 KB Execution killed with signal 11
2 Halted 0 ms 0 KB -