acgo题库
  • 首页
  • 题库
  • 题单
  • 竞赛
  • 讨论
  • 排行
  • 团队
  • 备赛专区

    竞赛

    • CSP-J/S
    • 蓝桥杯

    考级

    • GESP
    • CPA
    • 电子学会考级
登录
注册
题目详情题解(0)讨论(0)提交记录(0)
  • 题解

    userId_undefined

    法兰西玫瑰

    倔强青铜
    34阅读
    0回复
    0点赞
  • 题解!暴力枚举

    啥也别说了,多定义几个变量就好了,上代码

    userId_undefined

    赵奕航

    倔强青铜
    5阅读
    0回复
    0点赞
  • 题解

    #include <bits/stdc++.h> using namespace std; int a[105][105]; int main(){ int n,m; for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ cin>>a[i][j]; } } cin>>n>>m; for(int j=0;j<5;j++){ swap(a[n-1][j],a[m-1][j]); } for(int i=0;i<5;i++){ for(int j=0;j<5;j++){ cout<<a[i][j]<<" "; } cout<<endl; } return 0; }

    userId_undefined

    张高纶

    倔强青铜
    5阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    Alex

    荣耀黄金
    4阅读
    0回复
    0点赞
  • ac一次过

    userId_undefined

    胡天维

    倔强青铜
    2阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    majmDZB

    倔强青铜
    2阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    LS_YZY

    倔强青铜
    1阅读
    0回复
    0点赞
  • tj

    直接用swap就行了

    userId_undefined

    暴力出奇迹,结果TLE

    荣耀黄金
    1阅读
    0回复
    0点赞
  • 题解

    #include<bits/stdc++.h> using namespace std; int n[114][514]; int main(){ int a,b; for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ cin>>n[i][j]; } } cin>>a>>b; for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ swap(n[a][j],n[b][j]); } } for(int i=1;i<=5;i++){ for(int j=1;j<=5;j++){ cout<<n[i][j]<<" "; } cout<<endl; } return 0; }

    userId_undefined

    准

    倔强青铜
    1阅读
    0回复
    0点赞
  • 题解

    userId_undefined

    zsy

    秩序白银
    0阅读
    0回复
    0点赞
首页