QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#511165#5450. 比赛Franuch#0 1ms3612kbC++17832b2024-08-09 17:03:472024-08-09 17:03:48

Judging History

你现在查看的是最新测评结果

  • [2024-08-09 17:03:48]
  • 评测
  • 测评结果:0
  • 用时:1ms
  • 内存:3612kb
  • [2024-08-09 17:03:47]
  • 提交

answer

#include <bits/stdc++.h>

using namespace std;
typedef int ll;

void input(ll &n, ll &m, vector<vector<ll>> &clubs) {
    cin >> n >> m;
    clubs.resize(m);
    for (ll i = 0; i < m; i++) {
        ll s;
        cin >> s;
        clubs[i].resize(s);
        for (ll j = 0; j < s; j++) {
            cin >> clubs[i][j];
            clubs[i][j]--;
        }
    }
}

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    ll T;
    cin >> T;
    while (T--) {
        ll n, m;
        vector<vector<ll>> clubs;
        input(n, m, clubs);

        if (m == 1) {
            if (n == 1)
                cout << "1\n";
            else if (n == 2)
                cout << "1 2\n";
            else
                cout << "-1\n";
        }
    }
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3552kb

input:

248
9 3
3 3 4 5
3 1 2 3
4 6 7 8 9
8 1
4 3 4 5 6
9 2
5 1 2 3 4 5
3 6 7 8
6 1
4 3 4 5 6
7 2
3 3 4 5
3 1 2 3
9 3
4 1 2 3 4
3 4 5 6
3 6 7 8
7 1
4 4 5 6 7
8 2
3 6 7 8
3 2 3 4
8 2
4 1 2 3 4
4 4 5 6 7
3 0
9 3
3 2 3 4
3 7 8 9
3 4 5 6
6 1
5 1 2 3 4 5
9 2
4 1 2 3 4
3 6 7 8
9 3
3 6 7 8
3 3 4 5
3 1 2 3
8 1
8 1 ...

output:

-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1
-1

result:

wrong answer [testcase #1] You didn't find the solution while jury did.

Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Skipped

Dependency #1:

0%

Subtask #4:

score: 0
Wrong Answer

Test #25:

score: 0
Wrong Answer
time: 0ms
memory: 3592kb

input:

5
400 1
266 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...

output:

-1
-1
-1
-1
-1

result:

wrong answer [testcase #1] You didn't find the solution while jury did.

Subtask #5:

score: 0
Wrong Answer

Test #36:

score: 0
Wrong Answer
time: 0ms
memory: 3612kb

input:

5
400 1
266 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 ...

output:

-1
-1
-1
-1
-1

result:

wrong answer [testcase #1] You didn't find the solution while jury did.

Subtask #6:

score: 0
Skipped

Dependency #1:

0%

Subtask #7:

score: 0
Skipped

Dependency #4:

0%

Subtask #8:

score: 0
Skipped

Dependency #5:

0%

Subtask #9:

score: 0
Skipped

Dependency #1:

0%