As I have karma = 1, I cannot comment on the problems of June challenge (I can, but it says āyou comment screened out till adminās approvalā, and I got no answers yet), neither I can create new threads in discussions
So, probably, someone will see my comment here and will comment on my behalf that I have strong suspicions that the problem CHPLGNS of Juneās Challenge has incorrect test data set #9. If you solve the problem honestly testing for each pair of the polygons, which one is contained inside another one, it will detect that in the data set #9 there is a pair of polygons not lying one inside another (my implementation of this approach correctly passes all other test cases, showing, by the way, that in the test cases #### 4, 10 some of the polygons touch each other, though taskās authors replied many times in the comments that it never happens). So, there is another, simpler approach to solve the problem, valid if it is guaranteed, as in the task condition, that for each pair of the polygons one of them contains another. And this approach passes the set #9, though, in no way it really checks that the test-set satisfies task conditions.
s there something in specific that needs to be done to get my queries answered? I have posted queries adhering to the above mentioned guidelines and still never get a response, can you explain a reason why this could be the case. Thanks in advanceā¦!
Is it okay to comment something funny ? Like I was reading this problem on bread and I commented saying āI feel like eating Garlic Bread after Reading this problem statement Hehehehā and I guess the admin dint approve it. Why ? Is it so bad to post some humor ?
//Chef and way in JAVA
import java.util.*;
class Chefstreet1
{
static Scanner sc=new Scanner(System.in);
public static void main(String[] args)
{
int n=sc.nextInt();;
int k=sc.nextInt();
int mat[]=new int[n];
int a=1;
for (int i=0;i<n ;i++ )
{
mat[i]=a;
a++;
}
for (int i=0;i<n ;i++ )
{
System.out.print(mat[i]);
}
System.out.println();
int g=0;
for (int i=0;i<n-1 ;i++ )
{
for (int j=0;j<n-1 ;j++ )
{
if (mat[j]>mat[j+1])
{
g=mat[j];
mat[j]=mat[j+1];
mat[j+1]=g;
}
}
}
int q=0;
int min=0;
for (int i=1;i<n-1 ;i++ )
{
if(((mat[i]-mat[1])<=k)&&((mat[n-1]-mat[i])<=k))
{
q=mat[n-1]-mat[i];
}
q=mat[n-1]*mat[i];
if ((q>min)&&(min==0))
{
min=q;
}
else if (q<min)
{
min=q;
}
}
System.out.println(min);
}
If these are the rules, what is the need to create a comment section ?
Donāt clarify the doubts.
Donāt ask questions. etc etc.
How can we develop coding skills then without getting even proper assistance ?
I am here to practice and improve my coding skills. Here, the problem statement contains a simple testcase, whereas the problem can contain complex testcases. Without knowing what went wrong how can I be able to solve the problem. At least give us two testcases instead of One, like one is complex and the other is simple.
And what about āJava is too slow for this problem (TLE), same algorithm in C/C++ works fine.ā hint? I think, it is similar to āWarning: large Input/Output data, be careful with certain languagesā warning. Because there are such problems, in which time limit multiplication is not enough. And if someone is programming only in Java he/she has no chance to solve such problem, so this hint simply tells āskip this oneā.