답안 #374691

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
374691 2021-03-07T20:56:03 Z gustason Fire drill (LMIO18_sauga) C++14
31.055 / 100
41 ms 4972 KB
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    srand(time(0));
    int t, n, s;
    cin >> t >> n >> s;

    vector<int> cant[n+1];
    for(int i = 0; i < n; i++) {
        int m;
        cin >> m;
        for(int j = 0; j < m; j++) {
            int x;
            cin >> x;
            cant[i].push_back(x);
        }
    }

    vector<bool> done(n+1, false);
    vector<int> ans;

    for(int i = 0; i < n; i++) {
        while(1) {
            int x = rand() % n;
            if (!done[x]) {
                ans.push_back(x+1);
                done[x] = true;
                break;
            }
        }
    }

    for(int i : ans) {
        cout << i << "\n";
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Partially correct 39 ms 4972 KB Output is partially correct
2 Partially correct 1 ms 364 KB Output is partially correct
3 Partially correct 1 ms 364 KB Output is partially correct
4 Partially correct 1 ms 492 KB Output is partially correct
5 Partially correct 1 ms 364 KB Output is partially correct
6 Partially correct 1 ms 492 KB Output is partially correct
7 Partially correct 7 ms 1132 KB Output is partially correct
8 Partially correct 41 ms 4716 KB Output is partially correct
9 Partially correct 5 ms 876 KB Output is partially correct
10 Partially correct 1 ms 384 KB Output is partially correct