| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1352994 | hsuan._.0528 | Bikes vs Cars (EGOI23_bikesvscars) | C++20 | 17 ms | 7616 KiB |
// pD
#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define pii pair<LL, LL>
#define S second
#define F first
const int maxn = 1000+10;
int n, w;
int b[maxn][maxn];
int c[maxn][maxn];
vector< tuple<int, int, int> > cc, bb;
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cin>>n>>w;
for(int i=1; i<n; i++)
for(int j=0; j<i; j++){
cin>>c[i][j];
cc.push_back( make_tuple(c[i][j], i, j) );
}
for(int i=1; i<n; i++)
for(int j=0; j<i; j++){
cin>>b[i][j];
bb.push_back( make_tuple(b[i][j], i, j) );
}
sort(cc.begin(), cc.end());
sort(bb.begin(), bb.end());
if(w-c[1][0] > b[1][0]) cout<<"NO";
else{
cout<<2*(n-1)<<"\n";
for(int i=1; i<n; i++){
cout<<i-1<<" "<<i<<" "<<w-c[1][0]<<"\n";
cout<<i-1<<" "<<i<<" "<<b[1][0]<<"\n";
}
}
return 0;
}| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
