提交时间:2025-03-23 19:51:28

运行 ID: 8079

#include<bits/stdc++.h> using namespace std; struct temps{ int x; }t; int main() { int a,b; cin>>a>>b; int n[a][b]; for(int i;i<a;i++) { for(int j;j<b;j++) { cin>>n[i][j]; } } for(int i;i<a;i++) { for(int j;j<b;j++) { t.x = 0; if(n[i][j]!=0&&n[i][j]!=1) { t.x = 1; } } } if(t.x == 1) { cout<<"No"; } else { cout<<"Yes"; } }