Jump to content

Nineshadow

Member
  • Posts

    8,210
  • Joined

  • Last visited

Everything posted by Nineshadow

  1. Nineshadow

    Great news! I got my 3T yesterday and IT'S FUCK…

    Told you it's awesome.
  2. It makes you wonder how terrible GPU drivers for Linux are. Because I doubt Avalanche Studios mismanaged openGL so poorly.
  3. Ok, I'm just kidding. I mean, come on, to use the phone as a "desktop" you need to have the dock, cables, a monitor, a keyboard and a mouse. It's not that convenient. It has the same problem as Windows Continuum.
  4. Nineshadow

    One plus 3T ~540€ LG G6 ~760€ Huawei M10 ~660€…

    I'll suggest OnePlus 3T again D: Why is it 540 EUR though? I assume you must be buying it locally, right? The LG G6 looks like the best android smartphone of the moment, but I'm not sure if I'd want to spend the extra money for one.
  5. Nineshadow

    G fucking G. I'm getting the whole 455€ back fo…

    You really won't notice the difference. At least I didn't, and I came from an LG G3.
  6. Nineshadow

    G fucking G. I'm getting the whole 455€ back fo…

    More like a refresh I guess. Difference from snapdragon 820 to 821 is just clock speed iirc. The 3T also comes in an 128GB option. 64GB default. The front camera got an upgrade from 8MP to 16MP. Battery upgrade from 3000mAh to 3400mAh. The phone is the same otherwise. Well, the colour of gray of the model is slightly darker, but that's about it.
  7. Nineshadow

    G fucking G. I'm getting the whole 455€ back fo…

    I have a OnePlus 3 and it's really awesome.
  8. Nineshadow

    G fucking G. I'm getting the whole 455€ back fo…

    https://oneplus.net/3t
  9. @Sauron More specifically, to generate the k-th permutation given the frequency of digits: Consider the number x with n digits, d0,d1,...,dn-1. Order the digits such that d1<=d2<=...<=dn. Let the frequencies with which the digits appear in the number x be f0,f1,...,f9. Then the number of distinct permutations of the digits of x will be nr=n!/(f0!*f1!*...*f9!). We are basically eliminating all the permutations in which only identical digits are permuted. We don't need to generate all the permutations to reach the k-th permutation. So we do this: 1.Calculate the number of distinct permutations which begin with the smallest digit d0: p=(n-1)!/((f0-1)!*f1!*...*f9!)=nr*f0/n 2.If p>n, then the permutation we're looking for begins with the digit d0. We continue searching for the second digit, eliminating the digit d0 from x, equivalent to decrementing f0, in a recursive manner. 3.If p<n, then the permutation begins with a larger digit, and we go back to step 1, while keeping our results included into p. 4.If p=n, then we've used all the digits of x, and we've calculated the permutation. You can also think about it using the factorial number system. This works fine, except it's not fast enough for this problem. Or at least the next step isn't, the step in which you turn the permutation into the required number.
  10. The one that gives you problems to solve I guess. Finding just the k-th permutation isn't that hard. You can do it pretty easily with the factorial number system, at least theoretically. But additionally, you need to find the number made from that permutation, modulo 109+7. Yes, 109+7 is a prime number, which will make calculations easier if modular arithmetic arises later on. But so far...eh? I don't have too many useful ideas. I thought about writing the permutation as a number in base 109+7. That should be pretty cool. In that situation, the modulo will be just the least significant digit of the permutation. However, the issue is actually calculating the permutation in base 109+7, without having to do it in base 10 and then converting it.
  11. A safe has a very special kind of "lock". It displays a "public key", made out of two parts : a vector of integers v={v0,v1,...,v9} and an integer k. To gain access to the safe, you must calculate the k-th integer (in ascending order) which can be formed with v0 digits of 0, v1 digits of 1, v2 digits of 2 and so on, modulo 109+7. Examples : v={1,1,0,0,0,0,0,0,0,0}: for k=1, the answer is 1 for k=2, the answer is 10 v={1,1,1,0,0,0,0,0,0,0}: for k=1, the answer is 12 for k=2, the answer is 21 for k=5, the answer is 201 v={1,2,0,0,0,0,0,0,0,0}: for k=2, the answer is 101 Note that the number you are asked for can start with 0. If it starts with 0-s, the 0-s simply get discarded, meaning that 012=12, and 000012=12. Restrictions you are given <=5.000 queries. the number you need to form will have at most 70.000 digits (v0+v1+v2+...+v9<=70.000) k <= 1012 a solution is guaranteed time : 2sec memory : 65536 kbytes ___________________________________________________________________________________________________ I think it is clear that the problem asks what's the k-th lexicographic permutation of a certain set. For example, if v={1,1,1,0,0,0,0,0,0,0}, then the first permutation will look like this : {0,1,2}. If v={1,2,0,0,0,0,0,0,0,0}, the first permutation will look like this : {0,1,1}. It should also be noted that k is pretty small compared to the number, considering the amount of digits it can have. However, the interesting part comes when we take into consideration the modulo. Calculating the modulo for a number with 70.000 digits is not at all convenient. So there's definitely something else in play here. @fizzlesticks
  12. Oh, and this is why I remember this post. I saw it a couple of weeks ago(if not a few months) on these forums, and I was really wondering why would AMD sue a lens manufacturer. Here it is: It should also be noted they are going after MediaTek as well. More exactly, AMD is going after anyone who is using MediaTek technology it seems. iirc Adreno has some licenses for Radeon so they aren't going after them I guess.
  13. True. Still, I doubt it will even be featured on PS Now. There's always a chance though ?. Nevertheless, I think I'll end up playing it at a friend of mine after all.
  14. Oh man, maybe I won't need to buy a PS4 to play Bloodborne after all. Also, this is a pretty interesting move against Xbox Game Pass, which similarly gives you access to quite a lot of games for a monthly fee. Up until now, PS Now was mainly used for backwards compatibility, but now it will also give you a larger array of games to play for the PS4. Pretty ok I guess.
  15. Here's a little program that calculates pi using the probability of picking two random coprime integers. #include <bits/stdc++.h> using namespace std; int n=1000000,k=0; double prob,pi,realPi=atan(1)*4; int main() { mt19937_64 rng; rng.seed(chrono::system_clock::now().time_since_epoch().count()); uniform_int_distribution<uint64_t> r; for(int i=1;i<=n;++i) { uint64_t a=r(rng),b=r(rng); if(__gcd(a,b)==1) k++; } prob=(double)k/n; pi=sqrt(6.0/prob); cout<<setprecision(64)<<"Generated value : "<<pi<<endl<<"Actual value of pi : "<<realPi<<endl<<"Error : "<<pi-realPi<<endl<<"Precision : "<<100-abs(pi-realPi)/realPi*100<<" %"; return 0; }
  16. It's around ~$275 right now, which isn't too expensive, but I don't have a TV in my room so I'd need to get that as well. Or at least upgrade my monitor, since my current one is pretty ancient.
  17. I'm pretty sure most XB1 "exclusives" are Microsoft exclusives, as you can usually also find them on Windows. PS4 is doing a lot better in this regard. Well, better if you already own a PS4. I really want to play Bloodborne but I'm not going to buy a console just for a single game. At least not now D: Keep your PS4. It has some pretty great games. Horizon Zero Dawn and Nier Automata came out pretty recently iirc.
  18. I just finished replaying through Sleeping Dogs for the 3rd time last week and I still feel kinda empty. D: But the game which made me feel the most empty?Hmm...that's a good question. I seriously have no idea, each one is special in its own right.
  19. What? The compiler used by game developers doesn't have any importance here.
  20. LG G Flex: curved screen. LG G6 : small bezels And it seems like everyone is working on embedded fingerprint scanners right now. Yes, even LG.
  21. No, it won't be $500 at launch, but it will come pretty close to that in a few months. The price on LG flagships drops like crazy.
  22. As far as the regional restrictions are concerned: yes, they aren't good, but they aren't a deal breaker either. The phone is still mostly the same. At least they didn't decide to not release one of their flagship phones in Europe, unlike cough* someone else cough*.
  23. Nineshadow

    Just watched Arrival. What an amazing movie. Ea…

    Yeah, it definitely was the ending.
×