Java Hyd Team
746 subscribers
986 photos
39 videos
670 files
690 links
https://teamhydteam.my.canva.site/

Can visit us on our website 😊
Still working on it 😊
Download Telegram
please mail on above mentioned email id all your resumes
In call with some more organization let me confirm then will do share details if it's a mass Hiring
If you aren't able to mail from Outlook kindly use Gmail it will be done if still not do please share your resumes @stockkida for further process
Can drop your resumes here
Forwarded from Aman Raj
Alice is still not satisfied with Bob's math skills so she gave him a new challenge.

Given a positive integer NN, find any 33 distinct positive integers A, B, CA,B,C such that:

The product of any two of these 33 integers is a divisor of NN.
The product of all three integers is a multiple of NN.
If multiple solutions exist, you may print any of them.
Print -1−1 if no solution exists.

Input Format
The first line of input will contain a single integer TT, denoting the number of test cases.
The first and only line of each test case contains a single integer, NN.
Output Format
For each test case, output on a new line three space-separated integers satisfying the given condition.
Print -1−1 if the answer does not exist.

Constraints
1 \leq T \leq 1001≤T≤100
1 \leq N \leq 10^91≤N≤10
9
Forwarded from Aman Raj
Rushitote went to a programming contest to distribute apples and oranges to the contestants.
He has NN apples and MM oranges, which need to be divided equally amongst the contestants. Find the maximum possible number of contestants such that:

Every contestant gets an equal number of apples; and
Every contestant gets an equal number of oranges.
Note that every fruit with Rushitote must be distributed, there cannot be any left over.

For example, 22 apples and 44 oranges can be distributed equally to two contestants, where each one receives 11 apple and 22 oranges.
However, 22 apples and 55 oranges can only be distributed equally to one contestant.

Input Format
The first line of input will contain a single integer TT, denoting the number of test cases.
The first and only line of each test case contains two space-separated integers NN and MM — the number of apples and oranges, respectively.
Output Format
For each test case, output on a new line the answer: the maximum number of contestants such that everyone receives an equal number of apples and an equal number of oranges.

Constraints
1 \leq T \leq 10001≤T≤1000
1 \leq N , M \leq 10^91≤N,M≤10
9
Forwarded from Aman Raj
Alice gave Bob 33 integers N, K,N,K, and SS. Help Bob find an SS-good sequence.

A sequence BB of length NN is called SS-good if the following conditions are met:

B_i \in \{-1, 0, 1\}B
i
​
∈{−1,0,1} for each 1 \leq i \leq N1≤i≤N
\sum_{i=1}^N B_i\cdot K^{i-1} = S∑
i=1
N
​
B
i
​
â‹…K
i−1
=S
If there are multiple SS-good sequences, print any of them.
If no SS-good sequence exists, print -2−2.

Input Format
The first line of input will contain a single integer TT, denoting the number of test cases.
Each test case consists of a single line of input containing three space-separated integers — N, K,N,K, and SS.
Output Format
For each test case:

If no SS-good sequence exists, print -2−2.
Otherwise, output NN space-separated integers denoting the SS-good sequence.
If multiple SS-good sequences exist, you may print any of them.

Constraints
1 \leq T \leq 10^41≤T≤10
4

1 \leq N \leq 1001≤N≤100
2 \leq K \leq 1002≤K≤100
1 \leq S \leq 10^{18}1≤S≤10
18
Forwarded from Aman Raj
Test case 11: We have B = [1,1,1,1]B=[1,1,1,1] and S = 15S=15
\sum_{i=1}^N B_i\cdot K^{i-1} = 1\cdot 1 + 2\cdot 1 + 4\cdot 1 + 8\cdot 1 = 15∑
i=1
N
​
B
i
​
â‹…K
i−1
=1â‹…1+2â‹…1+4â‹…1+8â‹…1=15, hence BB is an SS-good sequence.

Test case 22: We have B = [0, 0, 1]B=[0,0,1] and S = 36S=36. 6^2 = 366
2
=36 so clearly BB is SS-good.

Test case 33: No SS-good sequence of length 55 exists.
Forwarded from Aman Raj
Bob received an assignment from his school: he has two numbers AA and BB, and he has to find the sum of these two numbers.
Alice, being a good friend of Bob, told him that the answer to this question is CC.
Bob doesn't completely trust Alice and asked you to tell him if the answer given by Alice is correct or not.
If the answer is correct print "YES", otherwise print "NO" (without quotes).

Input Format
The first line of input will contain a single integer TT, denoting the number of test cases.
The first and only line of each test case consists of three space-separated integers A, B,A,B, and CC.
Output Format
For each test case, output on a new line the answer: YES if Alice gave the right answer, and NO otherwise.

Each character of the output may be printed in either uppercase or lowercase, i.e, the outputs Yes, YES, yEs and yes will be treated as equivalent.

Constraints
1 \leq T \leq 1001≤T≤100
0 \leq A , B , C \leq 1000≤A,B,C≤100
Forwarded from Aman Raj
Alice thinks Bob has very weak math skills.
Alice gave Bob three numbers A, B,A,B, and CC and challenged him to find any positive integer KK strictly less than 100100 such that none of the three numbers are divisible by KK.

Help Bob find one such integer KK.

Under the given constraints, a valid KK will always exist.

Input Format
The first line of input will contain a single integer TT, denoting the number of test cases.
The first and only line of each test case contains three space-separated integers A, B,A,B, and CC.
Output Format
For each test case, output on a new line any positive integer KK less than 100100 that does not divide any of A, B,A,B, or CC.

Constraints
1 \leq T \leq 10001≤T≤1000
2 \leq A , B , C \leq 1002≤A,B,C≤100
Forwarded from Aman Raj
Suppose you have a binary array BB of length NN.
A sequence x_1, x_2, \ldots, x_kx
1
​
,x
2
​
,…,x
k
​
is called good with respect to BB if it satisfies the following conditions:

1 \leq x_1 \lt x_2 \lt \ldots \lt x_k \leq N+11≤x
1
​
<x
2
​
<…<x
k
​
≤N+1
For every pair (i, j)(i,j) such that 1 \leq i \lt j \leq k1≤i<j≤k, the subarray B[x_i: x_j-1]B[x
i
​
:x
j
​
−1] contains (j-i)(j−i) more ones than zeros.
That is, if B[x_i : x_j-1]B[x
i
​
:x
j
​
−1] contains c_1c
1
​
ones and c_0c
0
​
zeros, then c_1 - c_0 = j-ic
1
​
−c
0
​
=j−i must hold.
Here, B[L: R]B[L:R] denotes the subarray consisting of elements [B_L, B_{L+1}, B_{L+2}, \ldots, B_R][B
L
​
,B
L+1
​
,B
L+2
​
,…,B
R
​
].
Note that in particular, a sequence of size 11 is always good.

For example, suppose B = [0,1,1,0,1,1]B=[0,1,1,0,1,1]. Then,

The sequence [1,4,7][1,4,7] is a good sequence. The subarrays that need to be checked are B[1:3], B[1:6]B[1:3],B[1:6] and B[4:6]B[4:6], which all satisfy the condition.
The sequence [1, 5][1,5] is not good, because B[1:4] = [0, 1, 1, 0]B[1:4]=[0,1,1,0] contains an equal number of zeros and ones (when it should contain one extra 11).
Alice gave Bob a binary array AA of size NN and asked him to find the longest sequence that is good with respect to AA. Help Bob find one such sequence.
If multiple possible longest sequences exist, you may print any of them.

Input Format
The first line of input will contain a single integer TT, denoting the number of test cases.
Each test case consists of two lines of input.
The first line of each test case contains a single integer NN — the size of the binary array.
The second line contains NN space-separated numbers — A_1 , A_2 , \ldots , A_NA
1
​
,A
2
​
,…,A
N
​
.
Output Format
Each test case requires two lines of output:

First, print on a new line a single integer KK — the maximum length of a sequence that is good with respect to AA
On the next line, print KK space-separated integers in increasing order, denoting the indices of one such sequence.
If there are multiple possible good sequences with maximum size, output any of them.

Constraints
1 \leq T \leq 10^51≤T≤10
5

1 \leq N \leq 10^51≤N≤10
5

0 \leq A_i \leq 10≤A
i
​
≤1
The sum of NN over all test cases won't exceed 10^610
6
.
Forwarded from Aman Raj
Reyaan has given you the following problem to solve:

You are given an integer KK in base BB, represented by an array AA of length NN such that

0 \leq A_i \lt B0≤A
i
​
<B for every 1 \leq i \leq N1≤i≤N
\sum_{i=1}^N A_i \cdot B^{N-i} = K∑
i=1
N
​
A
i
​
â‹…B
N−i
=K
Note that N \leq BN≤B in this problem.

Find the smallest non-negative integer XX such that X+KX+K contains every digit from 00 to B-1B−1 in its base-BB representation.

XX can be very large, so print the answer modulo 10^9 + 710
9
+7.

Note: Leading zeros are not counted as part of the number, so for example 12 = 01212=012 has only two distinct digits: 11 and 22. However, 102102 does have three distinct digits.

Input Format
The first line of input will contain a single integer TT, denoting the number of test cases.
Each test case consists of two lines of input.
The first line of each test case contains two space-separated integers NN and BB — the size of the array AA and the base.
The second line of each test case contains NN space-separated integers A_1, A_2, \ldots, A_NA
1
​
,A
2
​
,…,A
N
​
.
Output Format
For each test case, output on a new line the value of XX, modulo 10^9 + 710
9
+7.

Constraints
1 \leq T \leq 10^41≤T≤10
4

1 \leq N \leq 10^61≤N≤10
6

2 \leq B \leq 10^62≤B≤10
6

N \leq BN≤B
0 \leq A_i \lt B0≤A
i
​
<B
A_1 \gt 0A
1
​
>0, i.e, the given number doesn't contain leading zeros.
The sum of BB across all test cases won't exceed 10^610
6
.
Forwarded from Aman Raj
There is a tree with NN vertices, rooted at vertex 11. Vertex ii has the value A_iA
i
​
written on it.

Alice walks along this tree, starting at the root.
When she is at vertex uu:

If uu has no children, she stops.
Otherwise, suppose uu has cc children. She picks one of them at random (each one has a \frac{1}{c}
c
1
​
probability of being picked), and then moves to it.
Alice also has a score, defined as follows:

Let the vertices she visited be u_1, u_2, \ldots, u_ku
1
​
,u
2
​
,…,u
k
​

Then, she will forget exactly one of these kk vertices; and her score will be the bitwise xor of the remaining ones.
That is, if she chooses to forget vertex u_iu
i
​
, then her score is A_{u_1} \oplus A_{u_2} \oplus \ldots \oplus A_{u_{i-1}} \oplus A_{u_{i+1}} \oplus \ldots \oplus A_{u_{k}}A
u
1
​

​
⊕A
u
2
​

​
⊕…⊕A
u
i−1
​

​
⊕A
u
i+1
​

​
⊕…⊕A
u
k
​

​
. Here, \oplus⊕ denotes the bitwise xor operation.
Alice wants to maximize her score, and will always choose to forget a vertex optimally to achieve this.

What is Alice's expected final score?

Find the expected value modulo 10^9 + 710
9
+7.
That is, the expected value can be written as \frac{P}{Q}
Q
P
​
for two integers P, QP,Q such that \gcd(Q, 10^9 + 7) = 1gcd(Q,10
9
+7)=1; print the value of P\cdot Q^{-1} \pmod{10^9 + 7}Pâ‹…Q
−1
(mod10
9
+7).

Input Format
The first line of input will contain a single integer TT, denoting the number of test cases.
Each test case consists of multiple lines of input.
The first line of each test case contains a single integer NN — the number of vertices of the tree.
The second line of each test case contains NN space-separated integers A_1, A_2, \ldots, A_NA
1
​
,A
2
​
,…,A
N
​
.
The next N-1N−1 lines describe the edges. The i^{th}i
th
of these lines contains two space-separated integers u_iu
i
​
and v_iv
i
​
, denoting an edge between u_iu
i
​
and v_iv
i
​
.
Output Format
For each test case, output on a new line Alice's expected final score.

Constraints
1 \leq T \leq 10^41≤T≤10
4

1 \leq N \leq 5\cdot 10^51≤N≤5⋅10
5

1 \leq A_i \leq 10^91≤A
i
​
≤10
9

The sum of NN over all test cases won't exceed 5\cdot 10^55â‹…10
5