Programming › Re: This Was a Jane Street interview question by xokol8: 5:10am On Jun 24, 2024 |
The answer? turmacs: If you hate/don't know math, kindly close this thread now  For those of you that hope to work at Hedge fund companies, Jane Street, Citadel or other trading firms, expect stuff's like these at your interviews 
If you can't solve it and would like to know how to solve it, kindly quote me so I'd know that somebody is interested in the solution and I would drop the solution with explanations here.
Problem statement Let us call the Euclidean mean of a permutation P the value of the expression |P1 - 1| + |P2 - 2| +....+ |Pn - n|. As an example, for the permutation [1,2,3], the Euclidean mean is |1 - 1| + |2 - 2| + |3 - 3| = 0, and for the permutation [3,1,2], the Euclidean mean is |3 - 1| + |1 - 2| + |2 - 3| = 2 + 1 + 1 = 4.
Given two whole numbers n and k, as inputs, Find a permutation P of length n such that it's Euclidean mean is equal to k, or report that no such permutation exists.
A permutation of length n is an array of n distinct integers that contains integers from 1 to n in random order. For example [2,4,1,3] is a permutation of length 4, but [3,3,1] is not a permutation because 3 appears twice in the array, and [1,3,7] is also not a permutation because n = 3 but there is 7 in the array. Also note that |x - y| represents the absolute value of x - y.
Input The first line consists of an integer t (1 ≤ t ≤ 104) ---- The number of test cases. The only line of each test case consists of two integers n and k (1 ≤ n ≤ 2⋅105, 0 ≤ k ≤ 1012), the length of the permutation and the required Euclidean mean.
Output For each test case if no such permutation exits, output "No". Otherwise, in the first line, output "Yes", and in the second line, output n distinct integers P1,P2,…,Pn (1 ≤ pi ≤ n) ----- A suitable permutation.. If there are multiple solutions, you can output any of them.
Example Input 8 3 4 4 5 7 0 5 16 8 14 112 777 5 12 5 2 Output Yes 3 1 2 No Yes 1 2 3 4 5 6 7 No Yes 8 2 3 4 5 6 1 7 No Yes 5 4 3 1 2 Yes 2 1 3 4 5 |
|
Literature › Re: A Song Unsong (A Marked Standalone Story) by xokol8: 12:12am On Feb 27, 2024 |
Hi Obehi,
Really great story and even more engaging storytelling.
If you're ever ready to submit to a publisher and require a proofreader prior, do contact me on xokola8@gmail.com
P.S: do you mean "unsung" in the title? |
Jobs/Vacancies › Re: Please Hire Me For Any Legit Remote Work by xokol8: 11:18pm On Feb 21, 2024 |
So,Oga LegallyBlunt, here's someone who meets your "criteria" for your yet unadvertised position, or should I say non-existent job? Hopefully you offer them the job you claim to have. Even though i highly doubt you have a job for anyone. My point being, you're just another poser! IreMIDE1: I am also available and I have all those requirements. I am a freelancer, who can work as a writer for works home and abroad, I have samples to prove that. I can also enter data. |
Jobs/Vacancies › Re: Please Hire Me For Any Legit Remote Work by xokol8: 1:33am On Feb 21, 2024 |
Offer her a job if you want to. Or better still, post your vacant position under replies, let her apply if interested. All these talk of laptop and electricity is unnecessary. blackpanthar: I have silently watched your matter since your first post.
YOU WANT REMOTE WORK..... but do you have a GOOD LAPTOP? steady internet nkor? what about LIGHT.
Because of timezone difference, if I am sending jobs and you are in nigeria and its NIGHT, NO LIGHT... worse you're in remote ikorodu, HOW THEN WILL YOU MEET TARGET. |
Jobs/Vacancies › Re: Whiteboard Animation Video Editor Needed! by xokol8: 1:30am On Feb 21, 2024 |
Definitely. Tenshades: 5k for a 8 to 12min video must be foolery. |
Literature › Re: Poem: For A While by xokol8: 10:44am On Feb 19, 2024 |
I didn't use AI. But for research purposes, what AI can I use to sound like me? And I never claimed to be a poet. I'm an editor. My job is to make you better. We're not fighting. Peace out. heniford2: you used AI to correct my poem which I wrote rather than write urs 😅 thanks why don't you compose something without AI over Sabi 🤔 |
Literature/Writing Ads › Re: Unscripted Fate by xokol8: 7:44am On Feb 19, 2024 |
Hi there, it's your favorite editor  So, I have a bit of time this morning so as a public service, here's a few edits: lumycr8: Collins is portrayed ... (Your use of the word "portrayed here makes me feel like you're reviewing this work, not writing it. You are the narrator, so narrate. I would recommend: Collins is handsome. He...and so on. Be descriptive. Show, don't tell. as a handsome young man who had an advanced brain for his age and exposure. He became fascinated with science and technological related stuff at a tender age, but was limited because of the condition of his environment and other factors. But despite this, he was determined to make something out of what he knew, so he kept pursuing knowledge. As the universe would have it, he was given an admission based on scholarship to study his desired course in one of the most prestigious university in the country. He met and fell in love with a girl in the university, who made him discover himself and what his true purpose was.
On the other hand, Temi is depicted (same as above) as a beautiful and confident girl who exudes grace and poise. She perfectly defines beauty with brains theory, a touch of Arrogance to complete the description. But behind this facade is a lady who had struggled with fear and competition. She lived with trying to please her grandpa, the Chairman of the company, that she is rightfully the heir to the family company and not her half brother, discrimination being a major factor. Along the line, she met a guy who understood her and was ready to support her journey, but during the course of this, they were able to uncover some deep secret about the company and her grandfather So, It's a pretty good synopsis, but the last paragraph is missing the element of suspense. Fix that. |
Literature › Re: Poem: For A While by xokol8: 7:22am On Feb 19, 2024 |
Edited by yours truly Edits/notes in parenthesis. Crawl like a slowpoke(?) Plugged(plugged doesn't really describe a slowpoke, the imagery is incomplete here) in (on) it's feet(s) Torn between hurricanes Souls where(were) born anew Thanks to sanity(...OK...?) We merry(how about: we are/were merry?) for in tears Like a star in fading sky we hope Mortals begget vails(OK...?) For a while we smiled For a while we cried For a while we wish(wished?) For a while.....! heniford2: Crawl like a slowpoke Plugged in it's feets Torn between hurricanes Souls where born anew Thanks to sanity We merry for in tears Like a star in fading sky we hope Mortals begget vails For a while we smiled For a while we cried For a while we wish For a while.....! |
Literature/Writing Ads › Re: Book Writing Service - Non-fiction by xokol8: 8:24am On Feb 06, 2024 |
HI Dvea, do you think you could throw some work my way? I'm open to an arrangement that will be mutually beneficial. |
Literature › Re: Screenwriting by xokol8: 4:31pm On Feb 04, 2024 |
I do. |
Literature › Re: Seeking For A Proofreader by xokol8: 11:20am On Jan 31, 2024 |
I will do a two-page sample edit of your WIP, showing tracked changes for free. If you are satisfied after that, we can discuss terms. Twitter: @TeacherN9, email: xokola8@gmail.com |
|
|
|
|
|
|
|
|
|
|
|
|
|
Business › Re: Get 5 Extra Hours When You Signup On VA Patrick, Nigeria's #1 VA Agency by xokol8: 8:44am On Aug 02, 2023 |
Sounds like a nice platform.
Meanwhile, contact xokola8@gmail for -Coursework - Academic paper - Proposal - Literature review - Critique paper
Reliable, chill and confidential assistance. |
Literature › Undergraduate And Postgraduate Students Get It Here by xokol8(op): 3:12pm On Aug 01, 2023 |
If your Project Supervisor is showing you shege with your project, this is for you.
1. Get a project sample from your school library and pattern your manuscript exactly like it. Don't deviate, these our lecturers dont appreciate creativity. Just follow the format so they can let you go.
2. Use so many sources and reference them on every page. Define your terms clearly. And if you're using abbreviations, have a list of them immediately after your TOC, then footnote every abbreviation on every page. Its a lot of repetitive work, but that's how they want it, so give it to them like that especially if you're in the humanities. If you're in social sciences or engineering, your own is good. For you, its less about the writing format and more about the content, so make sure your research is tight and properly documented.
3. Lastly, use double spacing, Times New Roman, size 12 cos those guys can't see anything smaller, sorry for them biko.
Remember, its better to have your project work edited for a token than to risk your efforts being misunderstood by your supervisor because your arguments are not flowing, and having to rewrite and rewrite over and over again.
If you need me, I'm here : 08068973078/xokola8@gmail.com and my prices are very very friendly.
Peace! |
Education › Re: Free Research Project Write-ups (2 Slots Available) by xokol8: 1:44pm On Aug 01, 2023 |
I sent you a whatsapp msg. |
Education › Have You Finished Writing Your Undergraduate Project? by xokol8(op): 7:46am On Aug 01, 2023 |
If your Project Supervisor is showing you shege with your project, this is for you.
1. Get a project sample from your school library and pattern your manuscript exactly like it. Don't deviate, these our lecturers dont appreciate creativity. Just follow the format so they can let you go. I'm not saying copy the contents, no. Keep your content, but format your project exactly like the ones in your department's library. If you don't know how to format a document, chat me up and I may be able to help you with instructions.
2. Use so many sources, and reference them on every page. Define your terms clearly. And if you're using abbreviations, have a list of them immediately after your TOC, then footnote every abbreviation on every page. Its a lot of repetitive work, but that's how they want it, so give it to them like that especially if you're in the humanities. If you're in social sciences or engineering, your own is good. For you, its less about the writing format and more about the content, so make sure your research is tight and properly documented.
3. Lastly, use double spacing, Times New Roman, size 12 cos those guys can't see anything smaller, sorry for them biko.
Remember, its better to have your project work edited for a token, than to risk your efforts being misunderstood by your supervisor because your arguments are not flowing properly.
If you need me, I'm here : 08068973078/xokola8@gmail.com and my prices are very very friendly.
Peace! |
Education › Re: All 2020/2021 Final Year Students Thread by xokol8: 8:46pm On Jun 13, 2023 |
If you're in final year having issues with completing your project work, I can help you. Whatsapp 08068973078 |
Literature › How Many Tribes Are In Kaduna State? by xokol8(op): 12:16pm On Jun 04, 2023*. Modified: 7:59am On Aug 01, 2023 |
There seems to be many tribes that people don't even know about in Kaduna. For instance, have you heard of the Kamaku tribe? I was doing research on them, and most people don't even they exist. |
Literature/Writing Ads › Re: Let Me Proofread Your Blog/website Articles. by xokol8(op): 6:39am On Jun 03, 2023 |
Don't hesitate. Call or text 08068973078 |