提交时间:2022-08-18 11:16:21
运行 ID: 55475
#include<bits/stdc++.h> using namespace std; int n,m,L,s,t; int a[10005],b[10005],k[10005]; inline long long read(){ register long long x=0,f=0; register char t=getchar(); while(t<'0'||t>'9')f^=(t=='-'),t=getchar(); while(t>='0'&&t<='9')x=(x<<3)+(x<<1)+(t^48),t=getchar(); return f?-x:x; } int main(){ n=read(),m=read(),L=read(),s=read(),t=read(); for(int i=1;i<=m;i++) a[i]=read(),b[i]=read(),k[i]=read(); printf("Yes\n"); for(int i=1;i<=m;i++){ if(k[i]==0) k[i]=8; printf("%d %d %d\n",a[i],b[i],k[i]); } return 0; }