#include<bits/stdc++.h>
using namespace std;
int main()
{
	//long long m,n,cnt=0;
	//cin >> m >> n;	
	//读入 m, n
	//定义 vector<vector<int>> v
	//for i = 0 to n-1:
    //	定义 vector<int> row
    //	for j = 0 to m-1:
   	//     	读入 x
    //	    row.push_back(x)
   	//	v.push_back(row)        
	
	vector<vector<long long>> v;
	for( int i =0; i < 5; i++)
	{
		vector<long long> row;
		for( int j =0; j < 5; j++)
		{
			long long x;
			cin >> x;
			row.push_back(x);
		}
		v.push_back(row);
	}
	

	
	//int len=1;
	
	
	
	bool all = false;
	for( int i =0; i < 5; i++)
	{
		for( int j =0; j < 5; j++)
		{
			bool li_max = true;
			bool le_min = true;
			for(int t =0; t < 5; t++)
			{
				if (v[i][j] < v[i][t]) li_max=false; 
			}
			
			for(int c =0; c < 5; c++)
			{
				if (v[i][j] > v[c][j]) le_min=false; 
			}
			if (li_max==true && le_min==true) 
			{
				cout << i+1 << " " << j+1 << " " << v[i][j] << endl;
				all = true;
			}
			
			
		}
	}
	
	if ( all == false) cout << "not found" << endl;
	
	
	
	return 0;
 } 

0 comments

No comments so far...

Information

ID
602
Time
1000ms
Memory
256MiB
Difficulty
3
Tags
(None)
# Submissions
153
Accepted
78
Uploaded By