杭电OJ2022

#include<stdio.h>
int change(int num)
{
	if (num < 0)
	{
		num =~(num - 1);

	}
	return num;
}
int main()
{
	int m, n;
	int arr[100][100];
	while (scanf("%d%d", &m, &n) != EOF)
	{
		int x = 0,y = 0;
		for (int i = 0; i < m; i++)
		{
			for (int j = 0; j < n; j++)
			{
				scanf("%d", &arr[i][j]);
				
			}
		}
		int max = arr[0][0];
		for (int i = 0; i < m; i++)
		{
			for (int j = 0; j < n; j++)
			{
				if (change(max) < change(arr[i][j]))
				{
					x = i;
					y = j;
					max = arr[i][j];
				}
			}
		}
		printf("%d %d %d\n", x+1, y+1, max);
		
	}

}

上一篇:mysql对表的操作DML


下一篇:java 值传递和引用传递