mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
Create 2022.cpp
This commit is contained in:
parent
9792605e6a
commit
1c80e51dbe
50
HDOJ/2022.cpp
Normal file
50
HDOJ/2022.cpp
Normal file
|
@ -0,0 +1,50 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <queue>
|
||||
#include <algorithm>
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
/// This Contest and Compile does not support C++11.
|
||||
//#include <thread>
|
||||
//#include <mutex>
|
||||
//#include <condition_variable>
|
||||
//#include <functional>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
|
||||
int main()
|
||||
{
|
||||
//cout<<"Hello World!"<<endl;
|
||||
int m,n;
|
||||
while(cin>>m)
|
||||
{
|
||||
cin>>n;
|
||||
int maxABS=0;
|
||||
int oVal=0;
|
||||
int maxLine=-1,maxCol=-1;
|
||||
for(int line=0;line<m;line++)
|
||||
{
|
||||
for(int col=0;col<n;col++)
|
||||
{
|
||||
int temp;
|
||||
cin>>temp;
|
||||
if(abs(temp)>maxABS)
|
||||
{
|
||||
maxABS=abs(temp);
|
||||
oVal=temp;
|
||||
maxLine=line+1;
|
||||
maxCol=col+1;
|
||||
}
|
||||
}
|
||||
}
|
||||
cout<<maxLine<<" "<<maxCol<<" "<<oVal<<endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user