Sort by

recency

|

381 Discussions

|

  • + 0 comments

    I think the expected output for test case 5 is wrong

  • + 2 comments

    JUST COPY PASTE THIS FOR PASSING TEST CASE 5......IT WORKED

    // Use a HashSet to store unique pairs Set uniquePairs = new HashSet<>();

    for (int i = 0; i < t; i++) {
        String[] pair = {pair_left[i], pair_right[i]};
        Arrays.sort(pair); // Sort the pair to ensure consistent ordering
        String sortedPair = pair[0] + "," + pair[1];
        uniquePairs.add(sortedPair);
        System.out.println(uniquePairs.size());
    }
    
  • + 0 comments

    some Injector ML tools offer performance optimization features, such as FPS boosting and lag reduction, which can be particularly helpful for those with lower-end devices. These enhancements allow players to experience smoother gameplay, faster response times Injector 2025, and fewer crashes, which is especially beneficial during intense matches or ranked games. Ultimately, for casual players and enthusiasts alike, Injector ML tools can be a fun and convenient way to enhance Mobile Legends, making the game more enjoyable and accessible.

  • + 0 comments

    //Write your code here Set> pair = new HashSet<>(); for(int p1 =0;p1 pair1 = new HashSet(); pair1.add(pair_left[p1]); pair1.add(pair_right[p1]); pair.add(pair1); System.out.println(pair.size()); }

  • + 0 comments
    import java.util.*;
    import java.util.stream.IntStream;
    
    public class Solution {
    
        public static void main(String[] args) {
    		/*
    		 * Enter your code here. Read input from STDIN. Print output to STDOUT. Your
    		 * class should be named Solution.
    		 */
    		Scanner sc = new Scanner(System.in);
    		int size = sc.nextInt();
    		sc.nextLine();
    		Set<String> set = new HashSet<>();
    		
    		IntStream.range(0, size).forEach(item -> {
    			String line = sc.nextLine();
    			String[] deLine = line.split(" ");
    			String de = deLine[1] + " " + deLine[0];
    			if (!set.contains(de)) {
    				set.add(line);
    			}
    			System.out.println(set.size());
    		});
            sc.close();
    	}
    }