| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 90098 | sh25_zhangjiajia | 宝藏图 | C++ | 通过 | 0 MS | 252 KB | 356 | 2026-06-05 15:11:17 |
#include <bits/stdc++.h> using namespace std; int main(){ int m,n,bz=0,xj=0; cin>>m>>n; int map[m][n]; for(int i=0;i<m;i++){ for(int j=0;j<n;j++){ cin>>map[i][j]; if(map[i][j]==1){ bz++; }else if(map[i][j]==-1){ xj++; } } }double bzl=bz*1.0/(m*n); double xjl=xj*1.0/(m*n); cout<<bzl<<" "<<xjl; return 0; }