谁知道那样的网址5671芯片的功能?

ACM_YY(11)
Time Limit:
MS (Java/Others)
Memory Limit: 072 K (Java/Others)
Total Submission(s): 1031
Accepted Submission(s): 430
Problem Description
There is a matrix M that has n rows and m columns (1≤n≤1000,1≤m≤1000).Then we perform q(1≤q≤100,000) operations:
1 x y: Swap row x and row y (1≤x,y≤n);
2 x y: Swap column x and column y (1≤x,y≤m);
3 x y: Add y to all elements in row x (1≤x≤n,1≤y≤10,000);
4 x y: Add y to all elements in column x (1≤x≤m,1≤y≤10,000);
There are multiple test cases. The first line of input contains an integer T(1≤T≤20) indicating the number of test cases. For each test case:
The first line contains three integers n, m and q.
The following n lines describe the matrix M.(1≤Mi,j≤10,000) for all (1≤i≤n,1≤j≤m).
The following q lines contains three integers a(1≤a≤4), x and y.
For each test case, output the matrix M after all q operations.
Sample Input
Sample Output
12 13 14 15
这道题直接写GG,要记录一下才行。
const int maxn=1005;
int x[maxn];
int y[maxn];
int a[maxn][maxn];
int addx[maxn];
int addy[maxn];
void swap(int &aa,int &bb){
if((aa^bb)){
aa^=bb^=aa^=
int main(){
int n,m,k;
scanf("%d",&T);
while(T--){
scanf("%d%d%d",&n,&m,&k);
for(int i=1;i&=n;++i){
for(int j=1;j&=m;++j){
scanf("%d",&a[i][j]);
addy[j]=0;
addx[i]=0;
while(k--){
int o,p,q;
scanf("%d%d%d",&o,&p,&q);
swap(x[p],x[q]);
}else if(o==2){
swap(y[p],y[q]);
}else if(o==3){
addx[x[p]]+=q;
addy[y[p]]+=q;
for(int i=1;i&=n;++i){
for(int j=1;j&=m;++j){
printf("%d%c",a[x[i]][y[j]]+addx[x[i]]+addy[y[j]],j==m?'\n':' ');
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:17107次
积分:2809
积分:2809
排名:第9022名
原创:255篇
评论:12条
文章:17篇
阅读:3104
阅读:1585
(1)(75)(53)(23)(36)(3)(29)(25)(1)(4)(3)(6)(2)(1)热门搜索:
手机浏览微商铺
(window.slotbydup = window.slotbydup || []).push({
id: '1129989',
container: s,
size: '440,60',
display: 'inlay-fix'
猜你感兴趣
该公司其他产品推荐
(window.slotbydup = window.slotbydup || []).push({
id: '1040504',
container: s,
size: '970,60',
display: 'inlay-fix'
(window.slotbydup = window.slotbydup || []).push({
id: '1133465',
container: s,
size: '960,90',
display: 'inlay-fix'
(window.slotbydup = window.slotbydup || []).push({
id: '1129990',
container: s,
size: '760,22',
display: 'inlay-fix'
免责声明:以上所展示的THS5671AIDWRG4 TI原装由深圳鼎诚讯电子科技有限公司自行提供的,THS5671AIDWRG4 TI原装内容的真实性、准确性和合法性由发布企业深圳鼎诚讯电子科技有限公司负责,中国制造交易网不承担任何责任。中国制造交易网不涉及用户间因非本网站担保交易方式的交易而产生的法律关系及法律纠纷,纠纷由您自行协商解决。
友情提醒:本网站仅作为用户寻找交易对象,就产品和服务的交易进行协商,以及获取各类与贸易相关的服务信息的平台。为保障您的利益,避免产生购买风险,建议您在购买相关产品前务必确认供应商的资质及产品质量,优先选择交易通产品。过低的价格、夸张的描述以及私人银行账户等都有可能是虚假信息,请采购商谨慎对待,谨防欺诈。
中国制造交易网授权者版权所有 | 广告经营许可证 | 豫ICP备号
增值电信业务经营许可证 豫B

我要回帖

更多关于 西单女孩 有谁知道 的文章

 

随机推荐