题解 2877: 同行列对角线的格子

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

同行列对角线的格子

摘要:解题思路:从左上到右下(先找到最左下的元素,利用while循环,以此往下输出),左下到右上同理。。。利用tx、ty、rx、ry保存x、y的值,从而找到左下或右上的第一个元素。注意事项:参考代码:#in……

同行列对角线的格子

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ //同行列对角线的格子  int n; scanf("%d", &n);//n*n形式的矩阵(从1开始)  i……

2877: 同行列对角线的格子

摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n; scanf("%d", &n);//n*n int i, j; scanf("%d %d", ……

同行列对角线的格子

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    int n,m,g;    scanf("%d %d %d",&n,&m,&g); for(int i=0……