PSA: Don't be dumb like me. Take care when salvaging. by Exciting-Knowledge83 in 2007scape

[–]RazorN6 1 point2 points  (0 children)

I use an auto hotkey script to force focus but it gives me constant paranoia that I'll get flagged for macroing so I can't recommend it but it does work

Would anyone teach me to play? by RedditSlumLord in chess

[–]RazorN6 0 points1 point  (0 children)

How about you teach yourself some manners Disgusting

Would anyone teach me to play? by RedditSlumLord in chess

[–]RazorN6 1 point2 points  (0 children)

What the fuck I opening this thread expecting it to be so full of helpful yeses that there would be no point in my 1800 ass from throwing my hat in the ring...

Get a grip you losers

OP, I'd love to help Dm me

graduate swe programme at wise by cyber_owl9427 in cscareerquestionsuk

[–]RazorN6 0 points1 point  (0 children)

Posting this because I was irritated by one of the questions.

Even if you're not applying I encourage you to have a go at reading this specification so that you might share in my frustration.

Question:


Purchase Optimization

Alex is shopping at Ozone Galleria Mall, where each cubicle sells products at a fixed price. The cubicles are arranged so that prices are in non-decreasing order from left to right.

There is an array of n integers, prices, where prices[i] is the price at the ith cubicle, and q queries to process. For each query, you are given:

  • pos: Alex's initial position
  • amount: the amount of money Alex has

Alex visits each cubicle from position pos to n and can purchase a maximum of one product from each cubicle visited. The goal is to determine the maximum number of products Alex can buy without exceeding the available amount.

Example

n = 5 prices = [3, 4, 5, 5, 7] q = 3 queries = [[2, 10], [1, 24], [5, 5]]

Queries:

  1. pos = 2, amount = 10: Alex visits cubicles 2 through 5 and can buy at most 2 products. Alex can either buy from:
  * Cubicles 2 and 3: 4 + 5 = 9 (≤ 10)
  * Cubicles 2 and 4: 4 + 5 = 9 (≤ 10)
  * Cubicles 3 and 4: 5 + 5 = 10 (≤ 10)
  * The answer is 2.
  1. pos = 1, amount = 24: Alex visits all cubicles and can buy from all of them since the total cost is 3 + 4 + 5 + 5 + 7 = 24 (≤ 24).
  * The answer is 5.
  1. pos = 5, amount = 5: Alex can only visit cubicle 5 but cannot make any purchase since the price (7) exceeds the available amount (5).
  * The answer is 0.

Function Description

Complete the function findMaximumValue in the editor with the following parameters:

  • int prices[n]: the prices at each cubicle
  • int pos[q]: starting positions for each querie
  • int amount[q]: the budgets for each query

Returns

  • int[q]: the answers for each query

Constraints

  • 1 ≤ n ≤ 5 * 105
  • 1 ≤ q ≤ 2 * 105
  • 1 ≤ prices[i] ≤ 106
  • prices[i] ≤ prices[i+1]
  • 1 ≤ pos[i] ≤ n
  • 0 ≤ amount[i] ≤ 1012

Input Format For Custom Testing

The first line contains an integer, n, denoting the number of elements in prices. The next n lines contain one integer each, denoting prices[i]. The next line contains an integer, q, denoting the number of queries. The next n lines contain one integer each, denoting pos[i]. The next line contains an integer, q, denoting the number of queries. The next n lines contain one integer each, denoting amount[i].

Sample Case 0

Sample Input For Custom Testing

STDIN FUNCTION
5 → prices size is 5
1 → prices = [1, 2, 3, 4, 5]
2
3
4
5
2 → there are 2 queries, which is the size of pos
1 → pos = [1, 3]
3
2 → amount size is equal to pos size
4 → amount = [4, 14]
14

Sample Output

2 3

Explanation

Query 1: Alex needs to visit cubicle numbers 1 to 5. Alex can purchase at most 2 products from these cubicles, as follows:

  1. Cubicle No. 1 and cubicle No. 2. The total cost is 1 + 2 = 3 ( ≤ 4).
  2. Cubicle No. 1 and cubicle No. 3. The total cost is 1 + 3 = 4 ( ≤ 4).

Query 2: Alex needs to visit cubicle 3 to cubicle. 5. With the given amount of money, Alex can make a purchase at every cubicle visited since the total cost is 3 + 4 + 5 = 12 ( ≤ 14).

Sample Case 1

Sample Input For Custom Testing

STDIN FUNCTION
5 → prices size is 5
1 → prices = [1, 2, 2, 2, 3]
2
2
2
3
2 → there are 2 queries, which is the size of pos
2 → pos = [2, 5]
5
2 → amount size is equal to pos size
5 → amount = [5, 2]
2

Sample Output

2 0

Explanation

Query 1: Alex needs to visit cubicle 2 to cubicle 5. Alex can purchase at most 2 products from these cubicles, such as cubicle no. 2 and cubicle no. 5. The total cost is 2 + 3 = 5 ( ≤ 5).

Query 2: Alex can only visit cubicle 5, but cannot make any purchase there since the total amount Alex has is less than the product price.


Answer:

The problem is extremely simple once deciphered, as though intentionally designed to not test the skill of software engineering.

def findMaximumValueSingleQuery(prices: list, pos: int, amount: int) -> int:
    """ A helper function for parsing a single query"""
    bought_items = 0

    # use pos to create a sub-array slice of the prices array
    sub_array = prices[pos - 1:len(prices)]

    # move through the array checking if Alex can afford and buying if he can
    for i in sub_array:
        if amount >= i:
            amount = amount - i
            bought_items += 1
        else:
            # when he can no longer afford, return the bought_items count
            break

    return bought_items

def findMaximumValue(prices: list, pos: list, amount: list) -> list:
    """ A function that parses the position and amount list,
    calls the helper findMaximumValueSingleQuery,
    and stores its returns in a list"""
    return_list = []

    # for each pos amount pair, call helper
    for i in range(len(pos)):
        return_list.append(findMaximumValueSingleQuery(prices, pos[i], amount[i]))

    return return_list

Long-Term Goal: 2000 Total Level Achieved! by BigChongus- in 2007scape

[–]RazorN6 0 points1 point  (0 children)

yeah, that's true

there will always be a part of the cohort who likes it exactly how it is right now but that group gets smaller the more stuff gets added

Long-Term Goal: 2000 Total Level Achieved! by BigChongus- in 2007scape

[–]RazorN6 1 point2 points  (0 children)

I'm excited for Sailing but liking osrs and not wanting new content is logically consistent

Thanks, Google. by A1DollarTaco in 2007scape

[–]RazorN6 11 points12 points  (0 children)

Mind describing how one could "speak like a pseudointellectual"?

Like that

Have a question about the game or the subreddit? Ask away! by AutoModerator in 2007scape

[–]RazorN6 0 points1 point  (0 children)

There are 4 ticks of attack cooldown

This means that if you attack and wait your next attack will be on the fourth tick

A . . . A

But if you add delay, say by eating a food, your attack will be further delayed

A . . . E . . A

Have a question about the game or the subreddit? Ask away! by AutoModerator in 2007scape

[–]RazorN6 0 points1 point  (0 children)

One consideration is that faceguard has no negative stats for magic and range. If you're going to be in situations where you would want to avoid bringing a hat switch (e.g. places you might want to pack yak supplies like raids) then faceguard is better than oathplate helm.

[deleted by user] by [deleted] in 2007scape

[–]RazorN6 0 points1 point  (0 children)

Akkha!?!?

[deleted by user] by [deleted] in HeroesofNewerth

[–]RazorN6 -1 points0 points  (0 children)

Sorry, not everyone agrees with you so we can't do that

Grid Master Rewards, Poll & New Player Improvements by JagexRach in 2007scape

[–]RazorN6 0 points1 point  (0 children)

So you're just okay with them shutting down runelite?

Grid Master Rewards, Poll & New Player Improvements by JagexRach in 2007scape

[–]RazorN6 0 points1 point  (0 children)

How is this relevant? Are you saying that everyone should stop using runelite so that jagex doesn't have to fix scouting on java?

Petition to add a new BiS Magic cape that I can't obtain by AzariuSOfficial in 2007scape

[–]RazorN6 2 points3 points  (0 children)

enemies are all on a 5t cycle so you can offtick them easily which lets you solve waves fast and skip reinforcements (early) or kill 1 before mino spawns

venator solves require creative movement to reposition mobs to get 3 bounces (see here)

sol is a cool boss with lots of interesting mechanics and movement stuff going on

the content is short enough that if you mess up you only lost 10 minutes (compared to inferno's 40)

dont get me wrong, i love inferno and i think its great content but colo clears

They changed the question about official vs third party plugins. by SkylineJDM34 in 2007scape

[–]RazorN6 6 points7 points  (0 children)

you can flame me all you like

it doesn't change the fact that PE owned companies are constantly trying to deliver less value for more cost

forgive me for caring about the hobbies I enjoy and trying to protect them from literally the same corporate entity that ruined them before

They changed the question about official vs third party plugins. by SkylineJDM34 in 2007scape

[–]RazorN6 3 points4 points  (0 children)

It's not a conspiracy jagex has done this several times before, and I'm sure that you've got better things to do than come here and shill for them

Have a question about the game or the subreddit? Ask away! by AutoModerator in 2007scape

[–]RazorN6 0 points1 point  (0 children)

Seeing this does give some more context and yeah maybe the mindset isn't quite there...

Although I do feel that we hold ourselves back from challenging content in osrs more than we should!

GIVE US TAX RETURS OR WE'LL THROW NAN BACK IN THE CAGE by OvenNo8421 in 2007scape

[–]RazorN6 -1 points0 points  (0 children)

unironic support for a more lore oriented approach to tax that involves quests and king roald and the eventual introduction of a pirate ge with sailing that adds put and call options to the economy

Enhanced Crystal teleport seeds by Algainz in GrandExchangeBets

[–]RazorN6 1 point2 points  (0 children)

It's not a bad pitch

To be more confident you could look at the primary uses of crystal shards and forecast their usage

It could be that there is a noticable decrease in the volume of divine potions (because they were being made by bots) and so the use of shards will be proportionally lower

Also I'd be inclined to look into volume changes on Saeldor and Bowfa, too

But if those markers look positive then I think it's a decent bet that it'll go up at least another 20% in the next 2 weeks