Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <conio.h>
- #include <math.h>
- #include <string>
- #include <algorithm>
- #include <set>
- using namespace ::std;
- int main()
- {
- unsigned long long N, d = 0, j = 1, max = -1;
- unsigned long long arr[65536];
- set <unsigned long long> number1;
- double n, prom1 = 1, prom2;
- cin >> N;
- for (unsigned long long i = 1; i <= N; i++)
- {
- cin >> arr[i];
- if (arr[i]> max)
- max = arr[i];
- }
- for (unsigned long long i = 1; i <= N; i++)
- {
- if (arr[i] != 1)
- if ((1 / 4) - 2 + 2 * arr[i] >= 0)
- {
- prom1 = sqrt((1.0 / 4.0) - 2.0 + 2.0 * arr[i]) - (1.0 / 2.0);
- if (prom1 > 0 && prom1 - (int)prom1 == 0)
- cout << "1 ";
- else
- cout << "0 ";
- }
- else
- cout << "0 ";
- else
- cout << "1 ";
- }
- _getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment