纯模拟
#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ //freopen("in", "r", stdin); int m, n; while (scanf("%d%d", &m, &n) != EOF) { vector< vector<ll> > a; a.resize(m); pair<ll, ll> ans(0, 0); for (int i = 0; i < m; i++) { a[i].resize(n); for (int j = 0; j < n; j++) { scanf("%lld", &a[i][j]); if (abs(a[i][j]) > abs(a[ans.first][ans.second])) ans = make_pair(i, j); } } PRintf("%lld %lld %lld/n", ans.first + 1, ans.second + 1, a[ans.first][ans.second]); }}新闻热点
疑难解答