YUVASENA

@klu_y22_batch


All kluh and klu guntur all members are welcome to channel guy's ❤️ support cheyande guy's
https://t.me/KLU_Y22_BATCH channel's don't portray in the wrong way Dude 😎.
hope you all.........Road to 4k family guy's ❤️

YUVASENA

23 Oct, 16:00


5th code

YUVASENA

23 Oct, 16:00


def count_normal_subarrays(A, N):
total_normal_subarrays = 0
length = 1

for i in range(1, N):
if A[i] == A[i - 1]:
length += 1
else:
total_normal_subarrays += length * (length + 1) // 2
length = 1

total_normal_subarrays += length * (length + 1) // 2 # Add for the last segment

return total_normal_subarrays

def main():
T = int(input()) # Read the number of test cases
results = []

for _ in range(T):
N = int(input()) # Read the length of the array
A = list(map(int, input().split())) # Read the array elements

result = count_normal_subarrays(A, N)
results.append(result)

print("\n".join(map(str, results)))

if name == "main": # Corrected from name to name and from "main" to "main"
main()

YUVASENA

23 Oct, 15:35


#include <stdio.h>
#include <string.h>
int countOnes(char s[], int n) {
int count = 0;
for (int i = 0; i < n; i++) {
if (s[i] == '1') {
count++;
}
}
return count;
}

int main() {
int t;
scanf("%d", &t);

while (t--) {
int n;
scanf("%d", &n);

char s[n+1];
scanf("%s", s);

int o = countOnes(s, n);
int z = n - o;

if (o == 0) {
printf("%d\n", n);
} else {
if (o % 2 == 0) {
printf("0\n");
} else {
printf("1\n");
}
}
}
return 0;
}

4th code c++

YUVASENA

23 Oct, 15:33


https://t.me/KLU_Y22_BATCH

share to ur frds guys

YUVASENA

23 Oct, 15:28


https://www.codechef.com/START157

code chef web link

YUVASENA

23 Oct, 15:08


#include <iostream>
#include <vector>
#include <numeric>

using namespace std;

int minimize_sum(int N, vector<int>& A) {

int A_last = A[N];

while (true) {

bool swapped = false;

for (int i = 0; i < N; i++) {
if (A[i] <= 2 * A_last) {

if (A_last < A[i]) {

swap(A[i], A[N]);
A_last = A[N];
swapped = true;
}
}
}
if (!swapped) {
break;
}
}

int sum = accumulate(A.begin(), A.begin() + N, 0);
return sum;
}
int main() {
int T;
cin >> T;
vector<int> results;

for (int t = 0; t < T; ++t) {
int N;
cin >> N;
vector<int> A(N + 1);

for (int i = 0; i <= N; ++i) {
cin >> A[i];
}
int min_sum = minimize_sum(N, A);
results.push_back(min_sum);
}
for (int result : results) {
cout << result << endl;
}

return 0;
}

3rd c++
Not-too-far Replacement

YUVASENA

23 Oct, 15:06


import java.util.*;
import java.lang.*;
import java.io.*;

import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int T = scanner.nextInt();

while (T-- > 0) {
int N = scanner.nextInt();
int M = scanner.nextInt();

String SA = scanner.next();
String SB = scanner.next();

boolean[] charsInSA = new boolean[26];
boolean[] charsInSB = new boolean[26];

for (int i = 0; i < N; i++) {
charsInSA[SA.charAt(i) - 'a'] = true;
}

for (int i = 0; i < M; i++) {
charsInSB[SB.charAt(i) - 'a'] = true;
}

boolean found = false;
for (int i = 0; i < 26; i++) {
if (!charsInSA[i] && !charsInSB[i]) {
found = true;
break;
}
}

if (found) {
System.out.println("YES");
} else {
System.out.println("NO");
}
}

scanner.close();
}
}

2nd code JAVA CODE
Non-matching Name

YUVASENA

23 Oct, 14:49


#include <stdio.h>

int main() {
int X, Y;

scanf("%d %d", &X, &Y);

if (Y <= 2 * X) {
printf("METAL\n");
} else {
printf("PLASTIC\n");
}

return 0;
}


1st glass prices

YUVASENA

23 Oct, 13:45


free fire guild lo join avutara
3021476247 send the req to join in our guild

YUVASENA

23 Oct, 13:32


https://www.hackerrank.com/event/ignite-your-coding-career-with-dtcc

YUVASENA

21 Oct, 18:53


Advance happy birthday to you darling 💗

YUVASENA

21 Oct, 12:39


Placement Eligibility Test Schedule

Placement Eligibility Test is rescheduled as per the following

Cluster -1 : 5th November 2024
Cluster -2 : 7th November 2024
Cluster -3 : 9th November 2024

All the CRT students are informed to take a note of the change in the schedule

YUVASENA

21 Oct, 07:56


Emergency Blood Requirement
Patient Name: Sk. Gousya Blood Group: B+ (Platelets)
No. of Units: 3 Location: AIIMS, Mangalagiri
Contact: Sk. Shafi, Mobile No: 9959936064

YUVASENA

21 Oct, 05:00


3rd year CRT EXAMS

YUVASENA

20 Oct, 23:22


C language