Not Able to see the solution of others

Please help I am not able to see the solution of others in the DSA learning series.

Thanks

1 Like

Its A Learning Series So You Cannot See The Solutions I Think So

@admin

You used to be able to, so I’m not sure why it’s changed.

At least some of the Problems are drawn from Practice Problems where you can see the Editorial and all submissions, so it seems a bit odd.

Some of my friends can see the solutions but i am not able to so

1 Like

not able to see solutions in divide and conquer

1 Like

Ok, I Thought You Are Doing No.0
Edit: Which Part Are You Doing?

At the moment I m trying Divide and conquer

but not able to solve the problems though

Edit: Share The Question Link That You Are Not Able To Solve I Will Try…
Though I Have Seen Your Codechef Profile You Haven’t Did Any Part Of That Challenge, First Try Easier Parts Of That Challenge You Will Be Able To Solve More Complex Problem
:smiley: :100:

I have solved all the above contest series now trying divide and conquer

the problem I am currently stuck is as below

Just look at the Practice version instead: QHOUSE Problem - CodeChef - has Editorial and visible solutions.

1 Like

Yes thanks

1 Like

Try This
My Answer Link: CodeChef: Practical coding for everyone

import java.io.*;
import java.util.*;
 
class BearHouseQueries {
	public static void main(String args[]) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int low = 0;
		int high = 1000;
		int mid = 0;
		String input = "";
		mid = low + (high - low) / 2;
		while(high >= low){
			
			System.out.println("? " + mid + " 0");
			System.out.flush();
			input = br.readLine();
			if(input.equals("YES")){
				low = mid + 1;
				mid = low + (high - low) / 2;
			}
			else{
				high = mid - 1;
				mid = low + (high - low) / 2;
			}
		}
		
		mid = mid - 1;
		int length = mid * 2;
		
		low = mid;
		high = 1000;
		mid = low + (high - low) / 2;
		while(high >= low){
			
			System.out.println("? " + mid + " " + length);
			System.out.flush();
			input = br.readLine();
			if(input.equals("YES")){
				low = mid + 1;
				mid = low + (high - low) / 2;
			}
			else{
				high = mid - 1;
				mid = low + (high - low) / 2;
			}
		}
		
		mid = mid - 1;
		int base = mid * 2;
		
		low = length;
		high = 1000;
		mid = low + (high - low) / 2;
		while(high >= low){
			//mid = low + (high - low) / 2;
			System.out.println("? 0 " +  mid);
			System.out.flush();
			input = br.readLine();
			if(input.equals("YES")){
				low = mid + 1;
				mid = low + (high - low) / 2;
			}
			else{
				high = mid - 1;
				mid = low + (high - low) / 2;
			}
		}
		
		mid = mid - 1;
		int heightoft = mid - length;
		
		int area = (int)((length * length) + (heightoft * base * 0.5));
		System.out.println("! " + area);
		
	}
 
}

Its In Java

Currently trying the code

but I code in c++

well you study in which year??

I AM IN CLASS 9th, You??
In Kendiya Vidyalaya

Oohhkk

I’m in second year in Dharmsinh Desai University

Hi,

We have made the solutions public. There was a configuration issue. It has been fixed.

Thanks.

~Pallavi
Team CodeChef

1 Like