QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#664792 | #7157. Bikes vs Cars | packmani# | 0 | 1ms | 6144kb | C++14 | 826b | 2024-10-21 22:22:22 | 2024-10-21 22:22:22 |
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 << ' ' << width-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';
}
}
}
詳細信息
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 10
Accepted
time: 1ms
memory: 5616kb
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: 5888kb
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:
36 0 1 91852 1 2 91852 2 3 91852 3 4 91852 4 5 91852 5 6 91852 6 7 91852 7 8 91852 8 9 91852 9 10 91852 10 11 91852 11 12 91852 12 13 91852 13 14 91852 14 15 91852 15 16 91852 16 17 91852 17 18 91852 18 19 91852 19 20 91852 20 21 91852 21 22 91852 22 23 91852 23 24 91852 24 25 91852 25 26 91852 26 2...
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: 1ms
memory: 5796kb
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: 1ms
memory: 5804kb
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:
36 0 1 91852 1 2 91852 2 3 91852 3 4 91852 4 5 91852 5 6 91852 6 7 91852 7 8 91852 8 9 91852 9 10 91852 10 11 91852 11 12 91852 12 13 91852 13 14 91852 14 15 91852 15 16 91852 16 17 91852 17 18 91852 18 19 91852 19 20 91852 20 21 91852 21 22 91852 22 23 91852 23 24 91852 24 25 91852 25 26 91852 26 2...
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: 0ms
memory: 6144kb
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%