fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. const int MAX_SIZE = 100000;
  5.  
  6. int main() {
  7. int n, v[MAX_SIZE + 1], lost = 0;
  8. cin >> n;
  9. for (int i = 1; i <= n; ++i) {
  10. cin >> v[i];
  11. lost += v[i];
  12. }
  13. for (int j = 1; j <= n - 1; ++j) {
  14. cin >> v[j];
  15. lost -= v[j];
  16. }
  17. cout << lost;
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5284KB
stdin
10
32 34 89 -67 45 21 34 5 9 7
34 32 45 89 34 21 5 7 9
stdout
-67