답안 #711238

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
711238 2023-03-16T10:53:26 Z dozer Trobojnica (COCI19_trobojnica) C++14
0 / 110
1 ms 340 KB
#include <bits/stdc++.h>
using namespace std;
#define sp " "
#define endl "\n";
#define fastio() cin.tie(0), ios_base::sync_with_stdio(0)
#define pb push_back
#define pii pair<int, int>
#define st first
#define nd second
#define N 200005

const int modulo = 1e9 + 7;

int arr[N];

/*
void f(int ind, vector<array<int, 3>> v)
{
	if (ind == 15) return;
	set<array<int, 3>> s;
	for (auto i : v)
	{
		cout<<"(";
		for (int j = 0; j < 3; j++)
		{
			cout<<i[j]<<sp;
			array<int, 3> tmp = i;
			for (int k = 0; k < 3; k++) tmp[k]++;
			tmp[j] -= 2;
			if (tmp[j] < 0) continue;
			sort(tmp.begin(), tmp.end());
			s.insert(tmp);
		}
		cout<<") ";
	}
	cout<<endl;
	vector<array<int, 3>> vec(s.begin(),s.end());
	f(ind + 1, vec);
}*/


int32_t main()
{
	fastio();

	int n;
	cin>>n;
	vector<int> cnt(5, 0);
	for (int i = 1; i <= n; i++)
	{
		char tmp;
		cin>>tmp;
		arr[i] = tmp - '0';
		cnt[arr[i]]++;
	}

	int odd = 0;
	for (int i = 1; i <= 3; i++) odd += cnt[i] % 2;
	if (odd == 3 || odd == 0) cout<<"DA\n";
	else cout<<"NE\n";

	cerr << "time taken : " << (float)clock() / CLOCKS_PER_SEC << " seconds\n";
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 340 KB Unexpected end of file - int32 expected
2 Halted 0 ms 0 KB -