QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#666867#7158. Carnival GeneralKhiem#11 21ms6580kbC++14511b2024-10-22 20:15:212024-10-22 20:15:26

Judging History

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

  • [2024-10-22 20:15:26]
  • 评测
  • 测评结果:11
  • 用时:21ms
  • 内存:6580kb
  • [2024-10-22 20:15:21]
  • 提交

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 = n-1; ~i; --i) printf("%d ", i);
}

詳細信息

Subtask #1:

score: 11
Accepted

Test #1:

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

input:

2
0

output:

1 0 

result:

ok correct

Test #2:

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

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:

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

result:

ok correct

Test #3:

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

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:

999 998 997 996 995 994 993 992 991 990 989 988 987 986 985 984 983 982 981 980 979 978 977 976 975 974 973 972 971 970 969 968 967 966 965 964 963 962 961 960 959 958 957 956 955 954 953 952 951 950 949 948 947 946 945 944 943 942 941 940 939 938 937 936 935 934 933 932 931 930 929 928 927 926 925 ...

result:

ok correct

Test #4:

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

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:

7 6 5 4 3 2 1 0 

result:

ok correct

Test #5:

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

input:

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

output:

5 4 3 2 1 0 

result:

ok correct

Subtask #2:

score: 0
Wrong Answer

Test #6:

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

input:

2
0

output:

1 0 

result:

ok correct

Test #7:

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

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:

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

result:

wrong answer Enemies 99 and 98 are next to each other

Subtask #3:

score: 0
Wrong Answer

Test #12:

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

input:

2
0

output:

1 0 

result:

ok correct

Test #13:

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

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:

7 6 5 4 3 2 1 0 

result:

ok correct

Test #14:

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

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:

7 6 5 4 3 2 1 0 

result:

wrong answer Enemies 8 and 7 are next to each other

Subtask #4:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

0%