20-22 AC 23 WA
This commit is contained in:
16
2022.cpp
Normal file
16
2022.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <iostream>
|
||||
#define abs(x) ((x)>0?(x):-x)
|
||||
using namespace std;
|
||||
int main(){
|
||||
int m,n;
|
||||
while (cin >> m >> n){
|
||||
int max=0,maxi=0,tmp;
|
||||
for(int i = 0;i<m*n;i++){
|
||||
cin >> tmp;
|
||||
if(abs(tmp)>abs(max))
|
||||
maxi = i,max = tmp;
|
||||
}
|
||||
cout << maxi/n+1 << ' ' << maxi%n +1 << ' '<< max << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user