QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#664522#7157. Bikes vs CarsKhiem#0 2ms4472kbC++14615b2024-10-21 20:58:512024-10-21 20:58:51

Judging History

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

  • [2024-10-21 20:58:51]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:4472kb
  • [2024-10-21 20:58:51]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
const int N = 505;
int C[N][N], B[N][N];
signed main(){
    int n, W; scanf("%d %d", &n, &W);
    for(int i = 1; i<n; ++i){
        for(int j = 0; j<i; ++j){
            scanf("%d", &C[j][i]);
        }
    }
    for(int i = 1; i<n; ++i){
        for(int j = 0; j<i; ++j){
            scanf("%d", &B[j][i]);
        }
    }
    if(W < B[0][1] || W < C[0][1]){ puts("NO"); return 0;}
    printf("%d\n", 2*(n-1));
    for(int i = 1; i<n; ++i){
        printf("%d %d %d\n", i-1, i, B[0][1]);
        printf("%d %d %d\n", i-1, i, W - C[0][1]);
    }
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 10
Accepted
time: 0ms
memory: 3892kb

input:

14 1000000
494185
494185 494185
494185 494185 494185
494185 494185 494185 494185
494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 49...

output:

26
0 1 536641
0 1 505815
1 2 536641
1 2 505815
2 3 536641
2 3 505815
3 4 536641
3 4 505815
4 5 536641
4 5 505815
5 6 536641
5 6 505815
6 7 536641
6 7 505815
7 8 536641
7 8 505815
8 9 536641
8 9 505815
9 10 536641
9 10 505815
10 11 536641
10 11 505815
11 12 536641
11 12 505815
12 13 536641
12 13 505815

result:

ok 

Test #2:

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

input:

37 1000000
891050
891050 891050
891050 891050 891050
891050 891050 891050 891050
891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 89...

output:

72
0 1 91852
0 1 108950
1 2 91852
1 2 108950
2 3 91852
2 3 108950
3 4 91852
3 4 108950
4 5 91852
4 5 108950
5 6 91852
5 6 108950
6 7 91852
6 7 108950
7 8 91852
7 8 108950
8 9 91852
8 9 108950
9 10 91852
9 10 108950
10 11 91852
10 11 108950
11 12 91852
11 12 108950
12 13 91852
12 13 108950
13 14 9185...

result:

wrong answer Min Max 1 - 0 not equal aij, is 91852, should be 108950

Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Wrong Answer

Test #16:

score: 17
Accepted
time: 0ms
memory: 3960kb

input:

14 1000000
494185
494185 494185
494185 494185 494185
494185 494185 494185 494185
494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 494185 494185 494185
494185 494185 494185 494185 494185 49...

output:

26
0 1 536641
0 1 505815
1 2 536641
1 2 505815
2 3 536641
2 3 505815
3 4 536641
3 4 505815
4 5 536641
4 5 505815
5 6 536641
5 6 505815
6 7 536641
6 7 505815
7 8 536641
7 8 505815
8 9 536641
8 9 505815
9 10 536641
9 10 505815
10 11 536641
10 11 505815
11 12 536641
11 12 505815
12 13 536641
12 13 505815

result:

ok 

Test #17:

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

input:

37 1000000
891050
891050 891050
891050 891050 891050
891050 891050 891050 891050
891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 891050 891050 891050
891050 891050 891050 891050 891050 89...

output:

72
0 1 91852
0 1 108950
1 2 91852
1 2 108950
2 3 91852
2 3 108950
3 4 91852
3 4 108950
4 5 91852
4 5 108950
5 6 91852
5 6 108950
6 7 91852
6 7 108950
7 8 91852
7 8 108950
8 9 91852
8 9 108950
9 10 91852
9 10 108950
10 11 91852
10 11 108950
11 12 91852
11 12 108950
12 13 91852
12 13 108950
13 14 9185...

result:

wrong answer Min Max 1 - 0 not equal aij, is 91852, should be 108950

Subtask #4:

score: 0
Wrong Answer

Test #39:

score: 0
Wrong Answer
time: 2ms
memory: 4472kb

input:

163 1
0
0 0
0 1 0
1 0 0 0
0 0 0 0 0
1 0 0 0 1 0
0 0 0 0 0 0 0
0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 1
0 0 0 0 0 1 0 0 0 0 0
0 0 0 0 0 1 0 0 0 0 0 1
0 1 0 1 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 1 1 0 0 0
0 0 0 0 0 1 0 0 0 0 0 1 1 0 0
0 1 0 1 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 0 0 0 0 1 1 0 0 ...

output:

324
0 1 0
0 1 1
1 2 0
1 2 1
2 3 0
2 3 1
3 4 0
3 4 1
4 5 0
4 5 1
5 6 0
5 6 1
6 7 0
6 7 1
7 8 0
7 8 1
8 9 0
8 9 1
9 10 0
9 10 1
10 11 0
10 11 1
11 12 0
11 12 1
12 13 0
12 13 1
13 14 0
13 14 1
14 15 0
14 15 1
15 16 0
15 16 1
16 17 0
16 17 1
17 18 0
17 18 1
18 19 0
18 19 1
19 20 0
19 20 1
20 21 0
20 21 ...

result:

wrong answer Min Max 1 - 0 not equal aij, is 0, should be 1

Subtask #5:

score: 0
Skipped

Dependency #2:

0%

Subtask #6:

score: 0
Skipped

Dependency #1:

0%