« first day (2713 days earlier)      last day (2606 days later) » 

11:00
I am writing a program to check 4 integer values form a rectangle or not..
That is what the problem is asking me in the link given above
But simply comparing the equal sides doesn't seem to do the trick
did you send me the wrong question?
@Mr.Xcoder hi
@LeakyNun Hi
Yeah I sent the wrong link
This is the correct link codechef.com/JAN18/problems/RECTANGL
@Monte it's can form
11:02
It <b> must </b> form bro
> Determine if there's a rectangle such that the lengths of its sides are a, b, c and d (in any order).
not:
> Determine if any quadrilateral with side lengths a, b, c and d must be a rectangle
> Source Limit: 50000 Bytes
Lol that's not very golfy
@Mr.Xcoder lol, I can do it under 20 bytes with Pyth
Ya? Well, I might give it a go
Yeah. the problem here is that I my algorithm is only comparing two equal sides as given in the test cases
My algorithm passes the test cases
but when I submit the problem it gives wrong answer
11:04
Oh you just have to check if they are equal 2-by-2?
So surely comparing the equal sides is not the only thing
Well you might want to test if they are all positive
@Monte maybe you forgot order
@Mr.Xcoder 10 bytes in Pyth (spoiler)
@LeakyNun I don't wanna see the spoiler, but do you check if they are positive or you don't bother to?
the latter
11:06
Oh that's going to be easy
Constraints
1 ≤ T ≤ 1,000
1 ≤ a, b, c, d ≤ 10,000
@Mr.Xcoder what do you mean by equal 2-by-2?
and numbers are positive
I have reached my chemistry queue for the day. Now I'll do math and no power in the universe can stop me
as pointed out by @LeakyNun check the constraints
No more aldehydes; Gromov is my animu babe now
11:06
1 hour ago, by Leaky Nun
Compute the limit: $$\lim_{x \to \infty} x \left( 1 + \frac 1 x \right)^x - ex$$
@BalarkaSen @Mr.Xcoder
@LeakyNun Why would I want to compute it?
because it's fun
To you perhaps
@Monte If you take one of them... it is equal to either 1 or 3 other values
@LeakyNun ooh, interesting. I doubt I have the necessary knowledge though, but I'll try
@BalarkaSen well I do have a calculus exam tomorrow
11:09
That's not an answer to my question!
Why would I want to compute it
:P
@LeakyNun @Mr.Xcoder any idea on how to determine the rectangle problem?
@Monte we already said it a thousand times
check if there are two pairs of equal numbers
Would you mind submitting your solution there?
Because I tried this approach and it gives WRONG ANSWER
11:11
We did it in a language that isn't there >_<
@LeakyNun Yours is invalid.
Try [3, 3, 3, 3]
ah, lol
@Monte wait
@Mr.Xcoder which language are you talking about?
Dude the site supports python
I have forgotten how to define the second fundamental form
rip
11:13
also PYTH
> PYTH, PYTH 3.5
@LeakyNun
Lol what is that
@Mr.Xcoder Try submitting your solution too over ther
Wait, not done yet. Gotta fix a bug
rippity rippity rip rip [starts beatboxing]
11:15
wabalalbadubdub
@LeakyNun 8 bytes in Pyth (spoiler)
@Mr.Xcoder lol
i see we have a man of high IQ with us
Hope it's valid.
::starts break dancing::
11:16
break dancing stopped being hip in the 90's
Thankfully
@Mr.Xcoder fails for [1, 2, 3, 4]
ya, too many broken necks
@LeakyNun and @Mr.Xcoder try submitting your solutions here codechef.com/JAN18/problems/RECTANGL
11:17
Yeah how could I be that dumb
@Monte We understood. Give us some time please
haha
patience
Guys make sure we are not checking a parallelogram in our algorithms
@Monte ugh
a parallelogram and a rectangle have exactly the same lengths
and my answer passed
yes dude
11:18
import java.util.Scanner;
import java.util.Arrays;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int T = sc.nextInt();
		for(int i=0;i<T;i++){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int c = sc.nextInt();
			int d = sc.nextInt();
			boolean x = (a==b && c==d) || (a==c && b==d) || (a==d && b==c);
			System.out.println(x ? "YES" : "NO");
		}
	}
}
@LeakyNun 9: iI2hlM.gk (Try it online!)
Now I hope it is valid
GOD DAMN.. Tried the same with C++.. Getting Wrong answer
@Monte post your code
#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
int t;
cin>>t;
while(t--)
{
int a[4];
for(int i=0;i<4;i++)
cin>>a[i];

sort(a,a+4);

if(a[0] == a[1] && a[2] == a[3])
{
cout<<"YES"<<endl;
}
else
{
bool flag = true;
for(int i=0;i<2;i+=2)
{
if(a[i] != a[i+1])
{
flag = false;
break;
}
}
if(flag)
cout<<"YES"<<endl;
else
cout<<"NO"<<endl;
}
}
return 0;
}
press ctrl+K before sending it
11:20
#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
    int t;
    cin>>t;
    while(t--)
    {
        int a[4];
        for(int i=0;i<4;i++)
            cin>>a[i];

        sort(a,a+4);

        if(a[0] == a[1] && a[2] == a[3])
        {
            cout<<"YES"<<endl;
        }
        else
        {
            bool flag = true;
            for(int i=0;i<2;i+=2)
            {
                if(a[i] != a[i+1])
                {
                    flag = false;
                    break;
Ugh... Ugh..
here basically I am sorting such that my comparisons are reduced
But doing the same thing
why are these coders invading the math chat
wrong room ?
@BalarkaSen Sorry brother.. Actually it was a math problem..
11:21
go back to PPCG
IT is related to math (we are checking whether there exist rectangles with the given set of sides)
go back to the opium dens
@BalarkaSen ಠ_ಠ
@LeakyNun any comments bro?
@Monte do you know how to spell "patience"?
11:23
hahahah sorry once again XD
idk what you did, but this passed:
#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
    int t;
    cin>>t;
    int a[4];
    while(t--)
    {
        for(int i=0;i<4;i++)
            cin>>a[i];

        sort(a,a+4);

        if(a[0] == a[1] && a[2] == a[3])
        {
            cout<<"YES"<<endl;
        }
        else
        {
            cout<<"NO"<<endl;
        }
    }
    return 0;
}
your program outputs nothing for 1 1 1 2 because your extraneous checking in the else part contains a break because a[0] == a[2] (both are 1)
@Monte
@Mr.Xcoder ` || (a == b && a == c && a == d)` is not needed
Ninja'd
Much, much nicer in C
11:27
@LeakyNun Yeah got my mistake.. Thank you
Where do you submit? Not the link, where on the page?
Oh perhaps I need an account
you need to create an account
sniped
@LeakyNun best of luck for your exams tomorrow bro
thanks
Yes ^^
11:31
Good luck; even though you don't need it
Yeah I'm sure your grade will be 200%
> Execution Time: 0.00 ಠ_ಠ
Not sure if he'll be giving the exam or taking the exam
@Monte take
I need to crack open the pages of DIFFERENTIAL GEOMETRY: A GEOMETRIC APPROACH
@LeakyNun You're having an exam tomorrow and I'm still in my winter holiday :)
11:34
I see
I think my rapper name is going to be A$AP Gau$$
@LeakyNun $-\frac e 2$
@Mr.Xcoder how?
According to Wolfram Alpha :P
11:39
very funny
his highness A$AP Gau$$
:P
kingly adjectives don't go with rapper names
Leaky Nun already sounds like a rapper's name
it doesn't sound very thuggish
also a little creepy
sounds like a nun that leaks
11:41
hahahah
Hi guys. I'm unsure if my proof that the set of cluster points is closed is any good. Didn't want to post a new question on this, maybe you can take a look?
Let $A \subseteq \mathbb R$ be a set and $H$ the set of all cluster points of $A$.

Let $x \in \mathbb R \setminus H$. Since $x$ is no cluster point there exists $\varepsilon \gt 0$, such that for all $a \in A$ we have $|a-x| \ge 2\varepsilon$.

For a cluster point $x_0 \in H$ there exists $a \in A$, such that $|a-x_0| \lt \varepsilon$. By the reverse triangle inequality

$$|x-x_0| = |x-a+a-x_0| \ge ||x-a| - |a-x_0|| \ge 2\varepsilon - \varepsilon = \varepsilon$$

Therefore $(x-\varepsilon,x+\varepsilon) \nsubseteq H$. But then $(x-\varepsilon,x+\varepsilon) \subseteq \mathbb R \setminus H$
I'm sure there's a topological proof @philmcole
Sure I wanted to keep it simple and used just $\mathbb R$.
don't you think using metric is not keeping it simple?
the "simple" proof is to use the definitions of those terms alone, in point-set topology, without assuming that the topology is equipped with a metric
that's controversial opinion
11:45
unless you follow crap like Rudin who defines metric before point-set topology
analysis I would say the simple proof is to use epsilon delta
For the more advanced mathmaticians it's sure a better thing to prove everything right away in the most abstract sense, but I'll stick with $\mathbb R$ for learning.
@LeakyNun metric should be defined before point-set topology. 90% of the time people work with metrizable spaces
> Let $x \in \mathbb R \setminus H$. Since $x$ is no cluster point there exists $\varepsilon \gt 0$, such that for all $a \in A$ we have $|a-x| \ge 2\varepsilon$.
@philmcole this line smells a little bit fishy
@LeakyNun Why?
11:48
how do you define a cluster point?
(we may have different definitions)
\o @MatheinBoulomenos
o/ @skullpatrol
@LeakyNun $x$ is a cluster point of $A$ if for all $\varepsilon \gt 0$ there exists $a \in A$, such that $0 \lt |a-x| \lt \varepsilon$
@philmcole exactly
so that line I just quoted is false
because of the $2 \varepsilon$?
11:49
no
because $a$ may be $x$
Ah I see.
How to you evaluate limits to infinity in general?
with gusto
@Mr.Xcoder I'm not aware of an algorithm
such an algorithm would be able to solve the halting problem, so it cannot exist
oh shaddup
11:51
@BalarkaSen I'm not kidding
if rudin is crap which book you believe is good?
you and your halting problem
you can encode the halting problem in real equality
so real equality is not decidable
whatever decidable means
i'll halt your problems up
:roasted:
11:53
@LeakyNun But, what do you think of first when you attempt to evaluate limits to infinity?
Large numbers
@Mr.Xcoder there are different tricks for different questions
I understand
conjugates
taylor expansion
l'hopital
plotting graphs :P
11:54
Yeah plotting the graph definitely shows it's $\approx -\frac e 2$
@BalarkaSen lol
@LeakyNun I changed two parts and excluded $\{a\}$. Did I solve it?
Let $A \subseteq \mathbb R$ be a set and $H$ the set of all cluster points of $A$.

Let $x \in \mathbb R \setminus H$. Since $x$ is no cluster point there exists $\varepsilon \gt 0$, such that for all $a \in A \setminus \{x\}$ we have $|a-x| \ge 2\varepsilon$.

For a cluster point $x_0 \in H$ there exists $a \in A$, such that $|a-x_0| \lt \varepsilon$. By the reverse triangle inequality

$$|x-x_0| = |x-a+a-x_0| \ge ||x-a| - |a-x_0|| \ge 2\varepsilon - \varepsilon = \varepsilon$$

Therefore $(x-\varepsilon,x+\varepsilon) \setminus \{x\} \nsubseteq H$. But since also $x \notin H$ we get $(x-\
@philmcole there is a slight error
$(x-\varepsilon,x+\varepsilon) \setminus \{x\} \nsubseteq H$ does not imply $(x-\varepsilon,x+\varepsilon) \subseteq \mathbb R \setminus H$
12:01
well, $\{1, 2\} \nsubseteq \{2, 3\}$ but also $\{1, 2\} \nsubseteq \{1, 4\}$, where $\Bbb R = \{1, 2, 3, 4\}$ and $H = \{2, 3\}$
it's an extraneous and erraneous statement
but we know that $x\in \Bbb R \setminus H$ by assumption
@MatheinBoulomenos that isn't the point
his overall logic is correct, but he mistakenly inserted that wrong statement
Can you tell me what the fix is so I can understand it?
you just need to delete that statement
you want to say $(x-\varepsilon,x+\varepsilon) \cap H = \emptyset$ instead of $(x-\varepsilon,x+\varepsilon) \setminus \{x\} \nsubseteq H$
12:05
$\varnothing$ \varnothing
$\emptyset$ \emptyset looks very ugly
@MatheinBoulomenos Thanks
I'll just use $\{x \mid x \in x\}$ instead
2
@MatheinBoulomenos lol
12:48
lol wtf?
The terms of the limit is not separable, but how does one knew that without drawing the graph?
[Random]
Yet another quasi finite proposal
(see rambles)
$f\in C^2([0,1])$ with $f''$ convex and $f(0)=f'(0)=0$ is it true that : $f''(1)+6f(1)\geq 4f'(1)$ ?
Hi,
2/ Determinate $n\in\mathbb N^*$ with $n^{n+1}+1$ is prime.
3/$u_0=3$, $u_{n+1}=u_n^2+1$. Is it true that : $\exists n \in \mathbb N, v_n \mod (2^{89}-1)=0$ ? Why ?

4/ $v_0=3$, $v_{n+1}=v_n^2-2$. Is it true that : $\exists n \in \mathbb N, u_n \mod (2^{89}-1)=0$ ? Why ?
5/Determine $F_{2 ^{2^{2018}}} \text { mod } (2^{89} -1)$ of the Fibonacci sequence (remember that $2^{89} -1$ is a prime integer).
13:24
Hello, please i have a function $f(t)=\int_0^{t}\dfrac{\Phi^{-1}(\tau)}{\tau^{1+\frac1n}}d\tau$ $f$ we have that $f$ is strictly increasing, continuous and satisfies $ \int_1^{\infty}\dfrac{\Phi^{-1}(\tau)}{\tau^{1+\frac1n}}d\tau=+\infty.$ why $f$ is surjective
13:35
Any help on matlab?
14:03
in other news:
in Rambles, 4 mins ago, by Secret
|S| = Holy holy holy holy holy ....
14:21
Imagine a set that failed to destroy itself. That... if consistent, would be something strictly larger than a proper class in a vague sense (as obviously no bijection can be written)
And thus you met God himself, holyholyholyholyholhyolholyohloylhoylohly..
static
is it true that $\displaystyle \left\lceil \frac 2 {2^{1/n}-1} \right\rceil = \left\lfloor \frac {2n} {\ln 2} \right\rfloor$ for all $n \in \Bbb N$?
What's the point of asking a question you know the answer to and that can be answered only through numerical computation or reading the appropriate entry of the OEIS?
3
 
1 hour later…
15:48
FInd the Error of this Proof : $S^2 $ is simply connected: Proof. Let a loop on $x_0$ of the sphere and take a point $p$ in the $ S^2 $ also not in the loop. Now $S^2 \setminus p$ is homeomorphic with the plane and tha plane is simply connected so the loop is homotopic to a point hence $S^2$ is simply connected
:)
i think there might be a problem if the point is on the interior of the loop or something
Balarka gave me this same exercise an year or so ago so I know where the problem is, but I won't tell you directly :P So which steps are surely correct in this "proof"?
haha really?
Yep, I don't know if it is in some standard book :P Where did you find it?
15:51
my proff gave it to me
dont know where he got it
Hi folks; I'm having trouble working through a Number Theory question. If anyone could help that would be greatly appreciated
"Show that one more than the product of any pair of twin primes is a perfect square"
What I've gotten up to is
soo i was thinking if the point is in the interior of the loop the way i will project the sphere to the plane will kinda "break" the loop? or it has nothing to do with that? @AlessandroCodenotti
because i always thought of projecting the sphere to the plane like opening up an onion or something
@ManolisLyviakis That'd be a problem indeed, but can another point which is not problematic always be found?
i guess no since i can always have a loop homotopic to the given loop that has this point on the inside? @AlessandroCodenotti ?
I'm stuck at this point
Question: "Show that one more than the product of any pair of twin primes is a perfect square"
but the loop is fixed here, while the point has to be picked
@Dark hint: what's the difference of $2$ consecutive squares?
@AlessandroCodenotti An odd number, right!
i cant see the problem if the point is on the outside
15:58
wow; thanks
Ok, so $S^2\setminus p$ is definitely homeomorphic to $\Bbb R^2$ and $\Bbb R^2$ is definitely simply connected so I agree that this looks right if the point is not in the image of the loop
Hi @Alessandro
or in the inside

« first day (2713 days earlier)      last day (2606 days later) »