fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int MAX_SIZE = 10;
  5.  
  6. int main() {
  7. int n, fLine[MAX_SIZE + 1], sLine[MAX_SIZE + 1];
  8. cin >> n;
  9. for (int i = 1; i <= n; ++i) {
  10. cin >> fLine[i];
  11. }
  12. int goodLine = 0;
  13. for (int i = 1; i <= n; ++i) {
  14. cin >> sLine[i];
  15. if (fLine[i] != sLine[i]) {
  16. ++goodLine;
  17. }
  18. }
  19. if (goodLine == n) {
  20. cout << "DA";
  21. } else {
  22. cout << "NU";
  23. }
  24. return 0;
  25. }
Success #stdin #stdout 0s 5280KB
stdin
10
0 1 7 3 1 9 11 57 123 21
7 3 8 1 9 7 11 11 31 20
stdout
NU