11 条题解
-
2
兄弟们,dbzs (rrr) LV 10 @ 3 个月前 的代码是AC的!!!AC的!!!请看:
代码如下:
#include <bits/stdc++.h> using namespace std; int main() { cout << 9 << endl << 2 <<endl << 1; }
请注意bì xū抄袭题解,写题解xū yào只放代码,bù néng加上你的思路或代码注释。 抄袭题解一经发现直接chéng jì mǎn fēn!!!
-
0
#include <bits/stdc++.h> using namespace std; int main() { int a[3][4], r, c; for (int i = 0; i < 3; i += 1) for (int j = 0; j < 4; j += 1) cin >> a[i][j]; int max = a[0][0]; for (int i = 0; i < 3; i += 1) for (int j = 0; j < 4; j += 1) if (a[i][j] > max) { max = a[i][j]; r = i; c = j; } cout << max << endl << r + 1 << endl << c + 1 << endl; return 0; }
-
-1
#include <bits/stdc++.h> using namespace std; int a[3][4],maxx=-1; int main() { for(int i=1;i<=3;i++) { for(int j=1;j<=4;j++) { cin>>a[i][j]; maxx=max(a[i][j],maxx); } } for(int i=1;i<=3;i++) { for(int j=1;j<=4;j++) { if(a[i][j]==maxx) { cout<<maxx<<endl<<i<<endl<<j; } } } return 0; }
-
-2
#include < iοstream> using namespace std; int main() { int a[3][4], r, c; for (int i = 0; i < 3; i += 1) for (int j = 0; j < 4; j += 1) cin >> a[i][j]; int max = a[0][0]; for (int i = 0; i < 3; i += 1) for (int j = 0; j < 4; j += 1) if (a[i][j] > max) { max = a[i][j]; r = i; c = j; } cout << max << endl << r + 1 << endl << c + 1 << endl; return 0; }
已
AC,请放心食用~~ -
-2
#include <bits/stdc++.h> using namespace std; const int N=5; int a[N][N], r, c; int main() { for (int i = 1; i <= 3; ++i) { for (int j = 1; j <= 4;++j) { cin >> a[i][j]; } } int max = INT_MIN; for (int i = 1; i <= 3; ++i) for (int j = 1; j <= 4; ++j) if (a[i][j] > max) { max = a[i][j]; r = i; c = j; } cout << max << endl << r << endl << c << endl; return 0; }
-
-2
#include using namespace std; int main() { int a[3][4], r, c; for (int i = 0; i < 3; i += 1) for (int j = 0; j < 4; j += 1) cin >> a[i][j]; int max = a[0][0]; for (int i = 0; i < 3; i += 1) for (int j = 0; j < 4; j += 1) if (a[i][j] > max) { max = a[i][j]; r = i; c = j; } cout << max << endl << r + 1 << endl << c + 1 << endl; return 0; } //已AC,请放心食用~~
-
-2
#include <iostream>//hetao3097453 using namespace std; int a[3][4]; int main() { int maxx = -1; for(int i = 1;i <= 3;i++) { for(int j = 1;j <= 4;j++) { cin >> a[i][j]; } } for(int i = 1;i <= 3;i++) { for(int j = 1;j <= 4;j++) { maxx = max(maxx,a[i][j]); } } cout << maxx << endl; for(int i = 1;i <= 3;i++) { for(int j = 1;j <= 4;j++) { if(a[i][j] == maxx) { cout << i << endl << j << endl; } } } return 0; }
- 1
信息
- ID
- 1023
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 3
- 标签
- 递交数
- 830
- 已通过
- 424
- 上传者