Submission #776674

# Submission time Handle Problem Language Result Execution time Memory
776674 2023-07-08T06:54:41 Z vjudge1 Sajam (COCI18_sajam) C++17
0 / 90
8 ms 4180 KB
#include<bits/stdc++.h>
using namespace std;
#define lalala ios_base::sync_with_stdio(false);cin.tie(NULL);
#define endl "\n"
#define ll long long
#define pb push_back
int main(){
	lalala;
	int n,k;cin>>n>>k;
	int arr[n][n];
	for(int i=0;i<n;i++){
		string str;cin>>str;
		for(int j=0;j<n;j++){
			if(str[j]=='x')arr[i][j]=0;
			else arr[i][j]=1;
		}
	}
	for(int i=0;i<n;i++){
		int evet=0;
		for(int j=0;j<n;j++){
			if(arr[i][j]){evet=1;break;}
		}
		if(evet){
			for(int j=0;j<n;j++){
				arr[i][j]^=1;
			}
		
		}
	}
	for(int i=0;i<n;i++){
		int evet=0;
		for(int j=0;j<n;j++){
			if(arr[j][i]){evet=1;break;}
		}
		if(evet){
			for(int j=0;j<n;j++){
				arr[j][i]^=1;
			}
		
		}
	}
	int yes=1;
	for(int i=0;i<n;i++){
		if(yes==0)break;
		for(int j=0;j<n;j++){
			if(arr[i][j]){
				yes=0;
				break;
			}
		}
	}
	if(yes)cout<<"DA"<<endl;
	else cout<<"NE"<<endl;


}
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 212 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 2504 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 4 ms 3284 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 1876 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 8 ms 4180 KB Output isn't correct
2 Halted 0 ms 0 KB -