QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#664788#7157. Bikes vs Carspackmani#0 2ms6376kbC++14820b2024-10-21 22:21:252024-10-21 22:21:25

Judging History

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

  • [2024-10-21 22:21:25]
  • 评测
  • 测评结果:0
  • 用时:2ms
  • 内存:6376kb
  • [2024-10-21 22:21:25]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
#define int long long int
const int SZ = 505;
int n,width;
int c[SZ][SZ];
int b[SZ][SZ];
int32_t main()
{
	ios_base::sync_with_stdio(false); cin.tie(0);
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	cin >> n >> width;
	for(int i=1;i<=n-1;i++)
	{
		for(int j=0;j<i;j++)
		{
			cin >> c[j][i];
		}
	}
	for(int i=1;i<=n-1;i++)
	{
		for(int j=0;j<i;j++)
		{
			cin >> b[j][i];
		}
	}
	if(b[0][1]+c[0][1]>width)
	{
		cout << 2*(n-1) << '\n';
		for(int i=0;i<n-1;i++)
		{
			cout << i << ' ' << i+1 << ' ' << b[0][1] << '\n';
			cout << i << ' ' << i+1 << ' ' << c[0][1] << '\n';
		}
	}
	else
	{
		cout << n-1 << '\n';
		for(int i=0;i<n-1;i++)
		{
			cout << i << ' ' << i+1 << ' ' << b[0][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: 5784kb

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 494185
1 2 536641
1 2 494185
2 3 536641
2 3 494185
3 4 536641
3 4 494185
4 5 536641
4 5 494185
5 6 536641
5 6 494185
6 7 536641
6 7 494185
7 8 536641
7 8 494185
8 9 536641
8 9 494185
9 10 536641
9 10 494185
10 11 536641
10 11 494185
11 12 536641
11 12 494185
12 13 536641
12 13 494185

result:

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

Subtask #2:

score: 0
Skipped

Dependency #1:

0%

Subtask #3:

score: 0
Wrong Answer

Test #16:

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

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 494185
1 2 536641
1 2 494185
2 3 536641
2 3 494185
3 4 536641
3 4 494185
4 5 536641
4 5 494185
5 6 536641
5 6 494185
6 7 536641
6 7 494185
7 8 536641
7 8 494185
8 9 536641
8 9 494185
9 10 536641
9 10 494185
10 11 536641
10 11 494185
11 12 536641
11 12 494185
12 13 536641
12 13 494185

result:

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

Subtask #4:

score: 0
Wrong Answer

Test #39:

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

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:

162
0 1 0
1 2 0
2 3 0
3 4 0
4 5 0
5 6 0
6 7 0
7 8 0
8 9 0
9 10 0
10 11 0
11 12 0
12 13 0
13 14 0
14 15 0
15 16 0
16 17 0
17 18 0
18 19 0
19 20 0
20 21 0
21 22 0
22 23 0
23 24 0
24 25 0
25 26 0
26 27 0
27 28 0
28 29 0
29 30 0
30 31 0
31 32 0
32 33 0
33 34 0
34 35 0
35 36 0
36 37 0
37 38 0
38 39 0
39 ...

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%