T1挂 警示后人
  • 板块灌水区
  • 楼主ande
  • 当前回复9
  • 已保存回复9
  • 发布时间2023/3/4 19:02
  • 上次更新2023/10/23 23:05:28
查看原帖
T1挂 警示后人
573589
ande楼主2023/3/4 19:02

考场代码:

for(int i = 1;i<=n;i++){
        for(int j = 1;j<=n;j++){
            if(xx[i] == yy[j]){
                printf("%lld ",xx[i]);
            }
            else{
                (tx[i] >ty[j])?printf("%lld ",xx[i]):printf("%lld ",yy[j]);
            }
        }
        puts("");
    }

满分代码:

for(int i = 1;i<=n;i++){
        for(int j = 1;j<=m;j++){
            if(xx[i] == yy[j]){
                printf("%lld ",xx[i]);
            }
            else{
                (tx[i] >ty[j])?printf("%lld ",xx[i]):printf("%lld ",yy[j]);
            }
        }
        puts("");
    }

2023/3/4 19:02
加载中...