QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#666859#7158. Carnival GeneralKhiem#11 21ms6656kbC++14510b2024-10-22 20:14:012024-10-22 20:14:19

Judging History

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

  • [2024-10-22 20:14:19]
  • 评测
  • 测评结果:11
  • 用时:21ms
  • 内存:6656kb
  • [2024-10-22 20:14:01]
  • 提交

answer

#include <bits/stdc++.h>
#define z exit(0)
using namespace std;
const int N = 1005;
vector<int> g[N];
int a[N], dp[256][8], V[N];
pair<int,int> up[256][8];
signed main(){
    int n; scanf("%d", &n);
    for(int i = 1; i<n; ++i){
        for(int j = 0; j<i; ++j) scanf("%d", a+j);
        int sz = i/2 + (i&1);
        for(int j = 0; j<sz; ++j){
            int u = i, v = a[j];
            g[u].push_back(v); g[v].push_back(u);
        }
    }
    for(int i = 0; i<n; ++i) printf("%d ", i);
}

詳細信息

Subtask #1:

score: 11
Accepted

Test #1:

score: 11
Accepted
time: 0ms
memory: 3876kb

input:

2
0

output:

0 1 

result:

ok correct

Test #2:

score: 11
Accepted
time: 1ms
memory: 3972kb

input:

99
0
1 0
2 1 0
3 2 1 0
4 3 2 1 0
5 4 3 2 1 0
6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
10 9 8 7 6 5 4 3 2 1 0
11 10 9 8 7 6 5 4 3 2 1 0
12 11 10 9 8 7 6 5 4 3 2 1 0
13 12 11 10 9 8 7 6 5 4 3 2 1 0
14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
16 1...

output:

0 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 

result:

ok correct

Test #3:

score: 11
Accepted
time: 21ms
memory: 6656kb

input:

1000
0
1 0
2 1 0
3 2 1 0
4 3 2 1 0
5 4 3 2 1 0
6 5 4 3 2 1 0
7 6 5 4 3 2 1 0
8 7 6 5 4 3 2 1 0
9 8 7 6 5 4 3 2 1 0
10 9 8 7 6 5 4 3 2 1 0
11 10 9 8 7 6 5 4 3 2 1 0
12 11 10 9 8 7 6 5 4 3 2 1 0
13 12 11 10 9 8 7 6 5 4 3 2 1 0
14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
16...

output:

0 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 100 101 10...

result:

ok correct

Test #4:

score: 11
Accepted
time: 0ms
memory: 3900kb

input:

8
0
1 0
2 1 0
3 2 1 0
4 3 2 1 0
5 4 3 2 1 0
6 5 4 3 2 1 0

output:

0 1 2 3 4 5 6 7 

result:

ok correct

Test #5:

score: 11
Accepted
time: 0ms
memory: 3932kb

input:

6
0
1 0
2 1 0
3 2 1 0
4 3 2 1 0

output:

0 1 2 3 4 5 

result:

ok correct

Subtask #2:

score: 0
Wrong Answer

Test #6:

score: 23
Accepted
time: 0ms
memory: 3992kb

input:

2
0

output:

0 1 

result:

ok correct

Test #7:

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

input:

99
0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5
0 1 2 3 4 5 6
0 1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 8
0 1 2 3 4 5 6 7 8 9
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10 11
0 1 2 3 4 5 6 7 8 9 10 11 12
0 1 2 3 4 5 6 7 8 9 10 11 12 13
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 1 ...

output:

0 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 

result:

wrong answer Enemies 2 and 3 are next to each other

Subtask #3:

score: 0
Wrong Answer

Test #12:

score: 29
Accepted
time: 1ms
memory: 3920kb

input:

2
0

output:

0 1 

result:

ok correct

Test #13:

score: 29
Accepted
time: 0ms
memory: 3872kb

input:

8
0
1 0
2 1 0
3 2 1 0
4 3 2 1 0
5 4 3 2 1 0
6 5 4 3 2 1 0

output:

0 1 2 3 4 5 6 7 

result:

ok correct

Test #14:

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

input:

8
0
0 1
0 1 2
0 1 2 3
0 1 2 3 4
0 1 2 3 4 5
0 1 2 3 4 5 6

output:

0 1 2 3 4 5 6 7 

result:

wrong answer Enemies 2 and 3 are next to each other

Subtask #4:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%