QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#664807 | #7157. Bikes vs Cars | packmani# | 0 | 2ms | 6356kb | C++14 | 732b | 2024-10-21 22:27:37 | 2024-10-21 22:27:39 |
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(width<c[0][1] or width<b[0][1])
{
cout << "NO";
return 0;
}
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';
}
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 0
Wrong Answer
Test #1:
score: 10
Accepted
time: 1ms
memory: 5760kb
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: 5912kb
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: 1ms
memory: 5824kb
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: 5860kb
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: 6356kb
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%