A
link
算出两个队分别得了几分,让木青队的总得分比高桥队多\(1\)即可。
点击查看代码
#include<bits/stdc++.h>
using namespace std;
int gq,mq;
signed main(){
int x;
for(int i = 1;i <= 9;++ i){
cin >> x;gq += x;
}
for(int i = 1;i <= 8;++ i){
cin >> x;mq += x;
}
cout << gq-mq+1;
return 0;
}
B
link
暴力
点击查看代码
#include<bits/stdc++.h>
using namespace std;
int n;
char a[105][105];
int x,y;
signed main(){
cin >> n;
for(int i = 1;i <= n;++ i){
for(int j = 1;j <= n;++ j){
cin >> a[i][j];
}
}
for(int i = 1;i <= n;++ i){
for(int j = 1;j <= n;++ j){
char b;
cin >> b;
if(b != a[i][j]) x = i,y = j;
}
}
cout << x << " " << y;
return 0;
}