|
0
Well you notice that you need exactly some linear number of operations. So inuitively you just find all a1^a2, a1^a3 ... a1^an. We do this because, from here, if in three operations we can get a1, a1^a1^ai = ai for any i. And the way to get a1 is to also find a1&a2, a2&a3 and a3&a1. Now all you have to do is notice that s1 = a1+a2 = a1^a2+2*a1&a2 and so on for any two numbers. Solve these three equations and three variables. you'll get a1 = (s1-s2+s3)/2. And then we are basically done. Total n+2 ops. |
|
0
That was an OP contest. Really good stuff. |
|
0
Then someone please explain why the problemsetter hasn't been given a million dollars to have shown a poly time solution to an NP complete problem. |
|
0
Hey, isn't finding a clique of size k NP-complete? I lost my mind after reading D cuz of that and not to mention I left C behind long long ago XD |
|
+4
Dang its been almost 3 hours since the system testing finished, how come no rating update yet? |
|
0
Cuz they haven't given out the rating updates yet. Look system testing started. It'll happen soon enough I guess. |
|
0
What why? |
|
0
Has the system testing finished? If so when will the ratings change? |
|
0
I don't think handle weighs in much unless you are a candidate master — from my personal experience. Also, as Errichto said, its usually used for interview prep more than anything. With regards to popularity in India — its almost a default in India to push(parental/family pressure and social pressure) for a engineering job or to become a doctor (medical). Its very odd and borderline frowned upon to actually do something other than the above mentioned. Since becoming a doctor and settling down requires a lot more money and investment of time, engineering(any branch really and from any of the many many colleges- top or bottom tier) is a popular choice. Given the cheap labour costs, lots of companies also come in to offer tons of SE jobs. Obviously more levels to it but bottom line is this has led to a serious boom in the number of engineering colleges, diluting the quality obviously, and also even people from chemical or mechanical or metallurgical engineering also apply for SE profiles. One can correlate the interest in SE jobs to the interview prep and then to CP as the default mode of preparation. Naturally, as the population of India is high, specifically the working population and the student population, the high CP numbers can be expected. Just to get a feel for it, you should check out the number of people who get attempt this exam called IIT JEE every year. Its an exam for a set of institutions called IITs after twelfth grad and the general thought process of most students is that IIT = great pay package (usually lots of software companies come here for placements). Some truth to it but the hype is incredible. |