Sponsors

Tag: problem: (A) Okabe and Future Gadget Laboratory Solve In C/C++

Codeforces Round #420 (Div....

#include <bits/stdc++.h> using namespace std; int main() { int n,a,i,j,k,l,f; cin>>n; for(i=0;i<n;i++) for(j=0;j<n;j++) cin>>a; for(i=0;i<n;i++) for(j=0;j<n;j++) { f=0; for(k=0;k<n;k++) for(l=0;l<n;l++) if(a==a+a||a==1) f=1; if(!f) { cout<<"Non"; return 0; } } cout<<"Yesn"; return 0; }

Advertisement

spot_img