我是靠谱客的博主 美满机器猫,这篇文章主要介绍Codeforces 263A Beautiful Matrix,现在分享给大家,希望可以做个参考。

#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
using namespace std;
int main() {
int temp[6][6];
int x = 0;
int y = 0;
for (int i = 1;i <= 5;++i) {
for (int j = 1;j <= 5;++j) {
scanf("%d", &temp[i][j]);
if (temp[i][j] == 1) {
x = i;
y = j;
}
}
}
printf("%dn", abs(x - 3) + abs(y - 3));
//system("pause");
return 0;
}

 

最后

以上就是美满机器猫最近收集整理的关于Codeforces 263A Beautiful Matrix的全部内容,更多相关Codeforces内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(138)

评论列表共有 0 条评论

立即
投稿
返回
顶部