Afişează mesaje
|
Pagini: [1]
|
1
|
Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Problem: Marbles Game - solution
|
: Februarie 24, 2016, 01:56:38
|
Very neat! I would have never thought of self-edges.
(3) seems non-trivial (unless I miss something). I will try to sketch my idea of the proof:
1. Assume there is at least one 0. Let X be the number of 0s and (N-X) the number of non 0s. There are X self-edges (positions with 0 marbles). Any Y consecutive non 0s give Y incoming edges - the previous 0 position could have had 1..Y marbles. So in total N-X incoming non-self edges. That gives a total of "at least" N incoming edges. If we consider (1) we get "at least" == "exactly".
2. There is no 0. Let MIN=the minimum number of marbles in any cup. Subtract MIN marbles from each cup (that's N*MIN marbles in total), apply 1. and add N*MIN marbles to each starting position for a move.
Cosmin, did you have a similar idea in mind?
|
|
|
2
|
Comunitate - feedback, proiecte si distractie / Blog / Răspuns: Problem: Marbles Game
|
: Februarie 03, 2016, 14:54:13
|
I tried looking for an invariant but then I noticed that from any position I can transition to a configuration where all the marbles are in the first bin (so I cannot easily eliminate any combination). If I could only find a way to go backwards from any position to the same "everything in one bin" configuration that would be great...
Mihai, I believe that having no limit on M makes the problem more interesting (and harder). Do you already have a solution for M <= N?
Later edit: for M <= N it is possible to create one big stack of marbles in one bin, distribute them and then take them one by one (from "right" to "left" modulo N) to form the second pattern.
|
|
|
5
|
Comunitate - feedback, proiecte si distractie / Off topic / Răspuns: Introducere in algoritmi
|
: Mai 15, 2010, 00:54:26
|
Mie mi se pare foarte valoroasa cartea asta. M-am apucat sa o rasfoiesc in anul 4 de facultate, vrand sa imi aduc aminte anumite chestii si am fost uimit sa descopar o gramada de lucruri noi, la care nu m-as fi putut gandi singur( cu alte cuvinte nu as fi stiut ce sa 'caut pe net'). Cred ca este o resursa foarte buna pentru cei care se pregatesc singuri si au nevoie de o oarecare indrumare.
|
|
|
10
|
Comunitate - feedback, proiecte si distractie / Scrie articole / Răspuns: Siruri de sufixe
|
: Aprilie 06, 2008, 01:50:18
|
Super tare articolul. Am vazut insa in finalul articolului recomandarea folosirii algoritmilor in O(N) memorie, dar cu toate astea nu am gasit nicaieri in articol cum se face asta. Ar trebui poate explicat cum se calculeaza toate LCP-urile consecutive in O(N) folosind doar ultima linie din matricea P, reducand astfel memoria la O(N).
|
|
|
11
|
infoarena - concursuri, probleme, evaluator, articole / Concursuri / Concours France-IOI
|
: Noiembrie 01, 2007, 20:00:25
|
Pentru cei care stiu cat de cat franceza si vor sa participe la un concurs weekend-ul asta pe site-ul de pregatire ( chipurile pt IOI) al francezilor: http://www.france-ioi.org/concours/index.phpLa ultimul concurs au fost interesante problemele( puteti sa le gasiti in arhiva) insa e posibil ca acum sa fie ceva mai usor din cauza numarului de participanti si a rezultatelor din vara Site-ul are o gramada de probleme, dar din cate am vazut cele mai interesante pot fi vazute doar cu invitatie. Edit: am uitat sa zic ca inscrierea la concurs( deschisa oricui) se face trimitand un mail organizatorilor cu id-ul de pe site. Este recomandat daca participati( sau vreti) sa trimiteti cat mai repede mail-ul pentru ca acces-ul la probleme nu se face automat.
|
|
|
|