fork download
  1. /*
  2. * @Author: hungeazy
  3. * @Date: 2026-03-04 23:24:15
  4. * @Last Modified by: hungeazy
  5. * @Last Modified time: 2026-03-28 19:26:32
  6. */
  7. #include <bits/stdc++.h>
  8. using namespace std;
  9. int A[10];
  10.  
  11. int main()
  12. {
  13. ios_base::sync_with_stdio(false);
  14. cin.tie(NULL); cout.tie(NULL);
  15. for (int i = 1; i <= 9; i++) cin >> A[i];
  16. for (int a = 0; a <= 1; a++)
  17. for (int b = 0; b <= 1; b++)
  18. for (int c = 0; c <= 1; c++)
  19. for (int d = 0; d <= 1; d++)
  20. for (int e = 0; e <= 1; e++)
  21. for (int f = 0; f <= 1; f++)
  22. for (int g = 0; g <= 1; g++)
  23. for (int h = 0; h <= 1; h++)
  24. for (int i = 0; i <= 1; i++)
  25. {
  26. int sum = 0, cnt = 0;
  27. if (a == 1) sum += A[1], cnt++;
  28. if (b == 1) sum += A[2], cnt++;
  29. if (c == 1) sum += A[3], cnt++;
  30. if (d == 1) sum += A[4], cnt++;
  31. if (e == 1) sum += A[5], cnt++;
  32. if (f == 1) sum += A[6], cnt++;
  33. if (g == 1) sum += A[7], cnt++;
  34. if (h == 1) sum += A[8], cnt++;
  35. if (i == 1) sum += A[9], cnt++;
  36. if (cnt == 7 and sum == 100)
  37. {
  38. if (a == 1) cout << A[1] << endl;
  39. if (b == 1) cout << A[2] << endl;
  40. if (c == 1) cout << A[3] << endl;
  41. if (d == 1) cout << A[4] << endl;
  42. if (e == 1) cout << A[5] << endl;
  43. if (f == 1) cout << A[6] << endl;
  44. if (g == 1) cout << A[7] << endl;
  45. if (h == 1) cout << A[8] << endl;
  46. if (i == 1) cout << A[9] << endl;
  47. return 0;
  48. }
  49. }
  50. return 0;
  51. }
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty