20-22 AC 23 WA

This commit is contained in:
xice09
2018-08-01 12:25:28 +08:00
parent cc6cf4cdea
commit 813bd54652
4 changed files with 92 additions and 0 deletions

16
2022.cpp Normal file
View 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;
}