HDU2022海选女主角

本文章仅用于笔记。部分知识点来源于网络,授权请联系作者([email protected])。



题目






解题


扫描二维码关注公众号,回复: 4327264 查看本文章

import java.util.Scanner;

public class Main
{

	public static void main(String[] args)
	{
		Scanner s=new Scanner(System.in);
		while(s.hasNextInt())
		{
			int m=s.nextInt(),n=s.nextInt(),a=0,max=0;
			for(int i=1;i<=m*n;i++)
			{
				int shu=s.nextInt();
				if(Math.abs(shu)>Math.abs(max))
					{
					max=shu;a=i;
					}
			}
			if(a%n==0)
			{
				System.out.println(a/n+" "+n+" "+max);
			}
			else
			{
				System.out.println((a/n+1)+" "+a%n+" "+max);
			}
		}

	}

}


求来波关注! 谢谢啦0.0!

小小小作者 
@Fanny0602

猜你喜欢

转载自blog.csdn.net/qq_40833874/article/details/78715259