Re: another mouse and cheese problem... in a 2d field :P Programming Software Development by VernonDozier …dimensions) and x*y numbers, (pieces of cheese on each square) calculate the best way for…]totalcheese[a][b][/ICODE] represents the amount of cheese eaten on the optimal path from (a,b)…be the path where you eat the most cheese. If [ICODE]a == x[/ICODE], there…[a][b] = totalcheese[a][b+1] + cheese[a][b][/ICODE]. That should be enough to get… another mouse and cheese problem... in a 2d field :P Programming Software Development by gregorynoob … y (the field dimensions) and x*y numbers, (pieces of cheese on each square) calculate the best way for the mouse…, 1) to (x, y), he has to get as many cheese as possible... also you can only move closer to the… Re: Will the mouse get the cheese? Community Center Geeks' Lounge by ZZucker I hope the cheese is not made in China. Re: another mouse and cheese problem... in a 2d field :P Programming Software Development by ArkM It's C++ programming forum. Where is C++ in your post?.. Re: another mouse and cheese problem... in a 2d field :P Programming Software Development by Salem > i'd just like a clue Draw a grid on some paper, and experiment with various strategies. I always seem to get the same answer. Re: another mouse and cheese problem... in a 2d field :P Programming Software Development by ArkM Excellently: now we have a forum where Salem (not gregorynoob) training his talents for algorithmes design... Also we have empty slogan: "We only give homework help to those who show effort"... Re: another mouse and cheese problem... in a 2d field :P Programming Software Development by gregorynoob well okay if this post has caused that much trouble for you ArkM, call a mod to remove it, i don't care really. And thanks for help to Vernon and Salem. Re: another mouse and cheese problem... in a 2d field :P Programming Software Development by gregorynoob Ok, so i've found the possibly best solution to the problem using recursion with memoization... in case someone wants the code, here it is: [CODE] #include <cstdio> #include <cstring> #include <algorithm> #define MAX 1000 int X, Y; int map[ MAX ][ MAX ]; int memo[ MAX ][ MAX ]; int rec( int x, int y ) { if( x <… Re: the best food / snack you discovered this week? Community Center Geeks' Lounge by UrbanKhoja cheese toastie......... YUM!!!!! Re: What do you wish you were eating right now? Community Center Geeks' Lounge by jaepi Cheese ramen. Re: 3 word story Community Center Geeks' Lounge by mister-fett Cheese. Due to Re: 3 word story Community Center Geeks' Lounge by ~s.o.s~ cheese, have some Re: Change-a-Letter-or-Two-Game Community Center Geeks' Lounge by christina>you cheese Re: Change-a-Letter-or-Two-Game Community Center Geeks' Lounge by arjunsasidharan cheese How to Implement the Type-safe Builder Pattern in Kotlin Programming Software Development by dimitrilc … private lateinit var cheese: Cheese private constructor(toppings: Toppings, condiment: Condiment, cheese: Cheese) : this(){ this.toppings = toppings this.condiment = condiment this.cheese = cheese } fun build(): Burger… Help with subtotal Programming Software Development by onlinegear …(ActionEvent event) { if (PizzaCombo4.getSelectedItem().equals("Cheese and tomato")) { priceLabel13.setText("3.50…actionPerformed(ActionEvent event) { if (PizzaCombo10.getSelectedItem().equals("Cheese and tomato")) { priceLabel37.setText("3.50… C++ Program using Stacks, and Random Number Generator. Please Help.... Programming Software Development by danielle23 …[]) { stack dough; //stack components sauce; cheese; pepperoni; finished; int units; int current_pizza … if ( rand () / 32767.0 < cheese ) { if(!cheese.empty ()) pepperoni.push (cheese.pop()) } if ( rand () / 32767.0… Need help making timer Programming Software Development by idislikemacs …print('You were told to find the Legendary Cheese,', 'not the exit!') userinput = (input('…print('You were told to find the Legendary Cheese,', 'not the exit!') userinput = (input('…print('You were told to find the Legendary Cheese,', 'not the exit!') userinput = (input('… Re: Help with subtotal Programming Software Development by peace_of_mind …; public void actionPerformed(ActionEvent event) { if (PizzaCombo10.getSelectedItem().equals("Cheese and tomato")) { priceLabel37.setText("3.50"); total… A C++ CGI Problem Programming Software Development by mister-fett …cgi-bin/test.cgi?cheese=cheese&[/url] is supposed to output: cheese = cheese I would like cheese today. I also …*argv[]) { cgi form = init(); string cheese; form.find( "cheese", cheese ); cout<<"<html>"…;; cout<<cheese; cout<<"</html>"; … Adding to a date, checking if past expiration date Programming Software Development by banannamoofin …Name" for cheese in cheeseDictionary: print cheese," ",cheeseDictionary[cheese]["date"]," ",cheeseDictionary[cheese]["life"],"… 1: idInput = raw_input("Please enter the ID of the cheese to be added. ") if cheeseDictionary.has_key(idInput): print … Reading Data from a File Not Putting Data Correctly Into an Array Plz Help Programming Software Development by marcolanza24 …ink"; string Aitem2 = "pen"; string Aitem3 = "cheese"; string Aitem4 = "bag"; string Aitem5 = "milk…[1] = "pen" [2] = "juice" [3] ="cheese" =>[2] count = 2 ... [0] = "milk" [1… pizza order returns !@#$% Programming Software Development by cbsinc … custPizza); private: char custCrust; char custSize; int pepperoni; int cheese; double totalCost; }; /*class Order { public: Order(); const …; custSize == 'L') costOfPizza = 17;*/ costOfTop = (custPizza.pepperoni + custPizza.cheese) * toppings; // the cost of all toppings totalCost = costOfPizza + costOfTop; … Error: Not declared in scope. Programming Software Development by danthegreat … Burger { private: double patty; double bun; double cheese; public: Burger(); double getPatty(); double getBun(); double…Burger::getBun() { return bun; } double Burger::getCheese() { return cheese; } void Burger::setPatty(double p) { patty = p; }… challenge... Programming Software Development by damyt01 …gt; t = 'I love cheese; cheese is my favourite besides melted cheese.' >>> t.replace ('cheese', 'shredded gorgonzola', 1) &…gt;>>'I love shredded gorgonzola; cheese is my favourite besides shredded cheese.' Awesome, solution but I want to … solution only replaces 1 keyword - the first 'cheese'. what if i want to change the next to… Output problem Programming Software Development by Tenjune …quot;1. Overloaded Pizzas\n"); printf("2. Extreme Cheese Overload\n"); printf("3. Classic Italian Pizza\n…\n", 749.00); printf("2. Meat N' Cheese Overload Pizza Square Php%.2f\n", 501.00); printf…2f\n", 199.00); printf("15. Meat N' Cheese Overload Php%.2f\n", 349.00); printf("\nMay… Re: Output problem Programming Software Development by YAMNA MIDHAT …("1. Overloaded Pizzas\n"); printf("2. Extreme Cheese Overload\n"); printf("3. Classic Italian Pizza\n…2f\n", 749.00); printf("2. Meat N' Cheese Overload Pizza Square Php%.2f\n", 501.00); printf…%.2f\n", 199.00); printf("15. Meat N' Cheese Overload Php%.2f\n", 349.00); printf("\nMay… Re: challenge... Programming Software Development by Gribouillis …re pattern = re.compile("cheese") data = 'I love cheese; cheese is my favourite besides cheese.' count = -1 def …, this technique allows you to replace "cheese" with any substring computed when the replacement… is required. You could replace cheese by the current time for example. For references… Re: C++ Program using Stacks, and Random Number Generator. Please Help.... Programming Software Development by MrSpigot Your declarations in main() are wrong. Use commas to separate the object names instead of semicolons. i.e. stack dough, sauce,cheese,pepperoni,finished; Try that, then let us know if there are other problems. Re: C++ Program using Stacks, and Random Number Generator. Please Help.... Programming Software Development by danielle23 Ok, I tried that. Set them up as stack dough, sauce,cheese,pepperoni,finished; Same problems. The first error actually goes right to the cin << dough;, says there's no match for operator>> (??) Something else has to be wrong... Thanks for your response, btw.