답안 #776684

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
776684 2023-07-08T07:05:43 Z vjudge1 Sajam (COCI18_sajam) C++17
15 / 90
416 ms 4236 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;
				if(arr[i][j]){
					for(int k=0;k<n;k++)arr[k][j]^=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;


}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 2 ms 980 KB Output is correct
3 Correct 2 ms 1364 KB Output is correct
4 Correct 6 ms 3544 KB Output is correct
5 Correct 3 ms 1364 KB Output is correct
6 Correct 1 ms 724 KB Output is correct
7 Correct 65 ms 1236 KB Output is correct
8 Correct 376 ms 3840 KB Output is correct
9 Correct 5 ms 468 KB Output is correct
10 Correct 388 ms 3764 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Incorrect 1 ms 212 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 108 ms 2524 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 185 ms 3284 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 121 ms 1964 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 416 ms 4236 KB Output isn't correct
2 Halted 0 ms 0 KB -