| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 32352 | Jerry | 计算矩阵边缘元素之和 | C++ | Accepted | 0 MS | 256 KB | 262 | 2023-11-30 21:11:56 |
#include<iostream> using namespace std; int main(){ int n,m,a[300][300],cnt=0; cin>>n>>m; for (int i=0;i<n;i++){ for (int j=0;j<m;j++){ cin>>a[i][j]; if(i==0||j==0||j==m-1||i==n-1){ cnt+=a[i][j]; } } } cout<<cnt; return 0; }