Pagini: [1]   În jos
  Imprimă  
Ajutor Subiect: 001 Plimbare  (Citit de 4525 ori)
0 Utilizatori şi 1 Vizitator pe acest subiect.
ditzone
Vizitator
« : August 11, 2006, 11:02:21 »

Aici puteti pune intrebari despre problema Plimbare.
« Ultima modificare: August 11, 2006, 12:02:17 de către ditzone » Memorat
cos_min
Nu mai tace
*****

Karma: 48
Deconectat Deconectat

Mesaje: 493


live


Vezi Profilul
« Răspunde #1 : August 11, 2006, 11:56:33 »

hmm scz de intrebare si ora la care intreb ... da pot exista mai mmulte sol.? si in acest caz se afiseaza orcare? nu se precizeaza
Memorat

vid...
ditzone
Vizitator
« Răspunde #2 : August 11, 2006, 11:59:15 »

Da, se poate afisa oricare, atentie insa ca ciclul trebuie sa aiba lungime maxima.
Memorat
pauldb
Nu mai tace
*****

Karma: 821
Deconectat Deconectat

Mesaje: 1.901



Vezi Profilul
« Răspunde #3 : August 11, 2006, 14:50:33 »

Stiu ca e cam tarziu sa intreb [chiar foarte tarziu]  Embarassed, but here it goes...poate totusi mi se raspunde:

Poate aparea aceasi drum de mai multe ori in fisierul de intrare?
Memorat

Am zis Mr. Green
vladut.forum
Vizitator
« Răspunde #4 : August 11, 2006, 15:18:41 »

sa iti raspund din enuntzu problemei:

Pe urmatoarele N * (N – 1) / 2 linii vor fi cate doi intregi x, y separati prin exact un spatiu, cu semnificatia ca intre obiectivul x si obiectivul y exista o strada cu sensul de la x la y.

si apoi

Anul acesta orasul in care au ajuns olimpicii are proprietatea curioasa ca exista cate o strada intre oricare doua obiective, dar strada are un singur sens de mers.

concluzia o tragi singur
Memorat
Cosmin
Echipa infoarena
Nu mai tace
*****

Karma: 351
Deconectat Deconectat

Mesaje: 1.799



Vezi Profilul
« Răspunde #5 : August 11, 2006, 15:21:10 »

Nu nu poate aparea!
Memorat
pocaitu
De-al casei
***

Karma: -26
Deconectat Deconectat

Mesaje: 141



Vezi Profilul
« Răspunde #6 : August 11, 2006, 16:13:51 »

de ce mi-a dat eroarea asta de compilare?
 Brick wall
In file included from /usr/include/c++/3.3/backward/fstream.h:31,
                 from jtemp.cpp:1:
/usr/include/c++/3.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
jtemp.cpp:2: error: `long int j1\' redeclared as different kind of symbol
/usr/include/bits/mathcalls.h:239: error: previous declaration of `double
   j1(double)\'
 Brick wall

[Editat de bogdan2412: nu mai abuza de smiley-uri Tongue ]
« Ultima modificare: August 11, 2006, 19:04:52 de către bogdan2412 » Memorat

This is not a signature ! I repeat, this is not a signature !
greco
Nu mai tace
*****

Karma: 144
Deconectat Deconectat

Mesaje: 434



Vezi Profilul
« Răspunde #7 : August 11, 2006, 17:16:51 »

Pentru ca simbolul "j1" este deja definit intr-o librarie pe care ai folosit-o, in cazul de fata in math.h.

Cod:
J0(3)                                     Linux Programmer's Manual                                     J0(3)

NAME
       j0, j0f, j0l, j1, j1f, j1l, jn, jnf, jnl, y0, y0f, y0l, y1, y1f, y1l, yn, ynf, ynl - Bessel functions

SYNOPSIS
       #include <math.h>

       double j0(double x);
       double j1(double x);
       double jn(int n, double x);
       double y0(double x);
       double y1(double x);
       double yn(int n, double x);

       float j0f(float x);
       float j1f(float x);
       float jnf(int n, float x);
       float y0f(float x);
       float y1f(float x);
       float ynf(int n, float x);

       long double j0l(long double x);
       long double j1l(long double x);
       long double jnl(int n, long double x);
       long double y0l(long double x);
       long double y1l(long double x);
       long double ynl(int n, long double x);

Concluzia: gcc de windows nu e gcc. Implementati si testati pe Linux daca vreti sa fiti sigur ca totul merge asa cum va asteptati.

De fapt, era destul de usor de descifrezi acel mesaj din moment ce avea o singura eroare care spune "error: `long int j1\' redeclared as different kind of symbol". Cand vezi asa ceva, principalul e sa treci peste diversele warninguri (care, evident, nu vor opri compilarea), si sa te uiti direct in locurile in care apare cuvantul "error". Bafta pe viitor in evitarea acestui tip de probleme Wink.
« Ultima modificare: August 11, 2006, 17:19:14 de către greco » Memorat

Jump in the cockpit and start up the engines
Remove all the wheelblocks there's no time to waste
Gathering speed as we head down the runway
Gotta get airborne before it's too late.
pocaitu
De-al casei
***

Karma: -26
Deconectat Deconectat

Mesaje: 141



Vezi Profilul
« Răspunde #8 : August 11, 2006, 18:49:49 »

 Mai exista o eroare foarte dubioasa !
 Sunt curios daca are vreo logica
 Spre exemplu dupa ce execut functia asta n si k devine 0;De ce? Confused
if(st[k]==i&&k>1)
       {if(k>max1)
   {max1=k;
    memcpy(v,st,sizeof(st));
    }
          viz[st[k]]=0;
           k--;}
deci, imediat ce se executa memcpy k devine 0 ,la fel si n;
Memorat

This is not a signature ! I repeat, this is not a signature !
bogdan2412
Echipa infoarena
Nu mai tace
*****

Karma: 410
Deconectat Deconectat

Mesaje: 951



Vezi Profilul
« Răspunde #9 : August 11, 2006, 19:01:47 »

Asta se poate intampla daca v are o dimensiune mai mica decat st de exemplu Confused sau daca ai un compilator de windows mai prost asa Smile
« Ultima modificare: August 11, 2006, 19:08:08 de către bogdan2412 » Memorat
Pagini: [1]   În sus
  Imprimă  
 
Schimbă forumul:  

Powered by SMF 1.1.19 | SMF © 2006-2013, Simple Machines