العربية
فتح في Telegram

منشورimport java.io.*;

19 يوليو 2026
D
Deloitte | COGNIZANT | IBM | CAPGEMINI
import java.io.*; import java.util.*; public class TestClass { public static void droneservicesschedule(int[][] arr, int M, int N) { List<List<Integer>> adj = new ArrayList<>(); for (int i = 0; i <= N; i++) { adj.add(new ArrayList<>()); } int[] degree = new int[N + 1]; for (int i = 0; i < M; i++) { int u = arr[i][0]; int v = arr[i][1]; adj.get(u).add(v); adj.get(v).add(u); degree[u]++; degree[v]++; } boolean[] visited = new boolean[N + 1]; List<List<Integer>> components = new ArrayList<>(); for (int i = 1; i <= N; i++) { if (!visited[i]) { List<Integer> comp = new ArrayList<>(); Queue<Integer> queue = new LinkedList<>(); queue.add(i); visited[i] = true; while (!queue.isEmpty()) { int curr = queue.poll(); comp.add(curr); for (int neighbor : adj.get(curr)) { if (!visited[neighbor]) { visited[neighbor] = true; queue.add(neighbor); } } } components.add(comp); } } if (components.size() > 2) { System.out.println("Not a Complete Day"); return; } for (List<Integer> comp : components) { int K = comp.size(); for (int vertex : comp) { if (degree[vertex] != K - 1) { System.out.println("Not a Complete Day"); return; } } } System.out.println("Complete Day"); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); if (!sc.hasNextInt()) return; int T = sc.nextInt(); for (int j = 0; j < T; j++) { int N = sc.nextInt(); int M = sc.nextInt(); int[][] arr = new int[M][2]; for (int i = 0; i < M; ++i) { arr[i][0] = sc.nextInt(); arr[i][1] = sc.nextInt(); } droneservicesschedule(arr, M, N); } } }
939 ·

بجوارها في الخلاصة

DDeloitte | COGNIZANT | IBM | CAPGEMINIصورةDDeloitte | COGNIZANT | IBM | CAPGEMINIimport java.io.*; import java.util.*; public class TestClass { static int[] dr = {-1, 1, 0, 0}; static int[] dc = {0, 0, -1, 1}; static int minNumOfwalls(int[][
هذه الرسالة
DDeloitte | COGNIZANT | IBM | CAPGEMINIHCL ON-CAMPUS EXAM✅ Contact : @MLCODER2DDeloitte | COGNIZANT | IBM | CAPGEMINIAMAZON SDE ROUND-1✅✅ Contact : @MLCODER2
DDeloitte | COGNIZANT | IBM | CAPGEMINIDeloitte | COGNIZANT | IBM | CAPGEMINI@python_java_Coding · قناة · التقنية
7 178مشتركون560متوسط وصول المنشور
خلاصة المجتمع فتح في Telegram

خلاصة عامة مفتوحة من فهرس البحث ChatCrawler — «Google لـ Telegram العام»؛ تُحدَّث كلما زحفنا إلى المجتمع. الأوقات بتوقيت UTC.

محتوى عام فقط، وAPI Telegram الرسمي. عن المشروع · الأسئلة الشائعة · حدود الفهرس · إزالة صفحة · الدليل · بحث · كيف نحسب