Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- using namespace std;
- ifstream fin("bac.in");
- int fr[1001];
- int main() {
- int x, odd = 0;
- while (fin >> x) {
- fr[x]++;
- }
- for (int i = 1; i <= 1000; i++) {
- if (fr[i] % 2) {
- odd++;
- }
- if (odd == 2) {
- puts("NU");
- break;
- }
- }
- if (odd != 2) {
- puts("DA");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment