#2933
TollRoads
N
oraşe sunt conectate între ele prin M
autostrăzi bidirecţionale, fiecare autostradă (a, b)
având un cost de tranzit c
ataşat. Se doreşte revizuirea sistemului de taxare, însă sunt câteva aspecte ce trebuie luate în calcul şi necesită investigaţie, deoarece o parte dintre cele N
oraşe sunt centre comerciale sau turistice importante. Se doreşte să se afle răspunsul la o serie de Q
întrebări de forma: (X, T)
– câte dintre celelalte N-1
oraşe au acces către oraşul X
, cu o taxă totală de cel mult T
către fiecare oraş?
Info Oltenia 2019
Problema | TollRoads | Operații I/O |
tollroads.in /tollroads.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54782166 | Utilizator | |
Fișier | tollroads.cpp | Dimensiune | 1.70 KB |
Data încărcării | 08 Decembrie 2024, 17:21 | Scor / rezultat | Eroare de compilare |
tollroads.cpp:1:1: error: 'FILE' does not name a type FILE *fin = freopen("tollroads.in", "r", stdin); ^ tollroads.cpp:2:1: error: 'FILE' does not name a type FILE *fout = freopen("tollroads.out", "w", stdout); ^ tollroads.cpp:9:1: error: 'vector' does not name a type vector < Edge > Adj[maxN]; ^ tollroads.cpp:10:7: error: 'maxN' was not declared in this scope int d[maxN],n,q; ^ tollroads.cpp:11:1: error: 'vector' does not name a type vector < int > h, H[maxN]; ^ tollroads.cpp:12:1: error: 'bitset' does not name a type bitset < maxN > inQ; ^ tollroads.cpp: In function 'int Dijkstra(int, int)': tollroads.cpp:20:13: error: 'inQ' was not declared in this scope inQ[i] = 1; ^ tollroads.cpp:21:13: error: 'd' was not declared in this scope d[i] = 0; ^ tollroads.cpp:22:13: error: 'H' was not declared in this scope H[0].push_back(i); ^ tollroads.cpp:26:13: error: 'inQ' was not declared in this scope inQ[i] = 0; ^ tollroads.cpp:27:13: error: 'd' was not declared in this scope d[i] = maxN; ^ tollroads.cpp:27:20: error: 'maxN' was not declared in this scope d[i] = maxN; ^ tollroads.cpp:31:24: error: 'H' was not declared in this scope for (int nod : H[t]) ^ tollroads.cpp:33:17: error: 'd' was not declared in this scope if (d[nod] != t) continue; ^ tollroads.cpp:35:27: error: 'Adj' was not declared in this scope for (Edge e : Adj[nod]) ^ tollroads.cpp:38:40: error: 'd' was not declared in this scope if (t + e.c <= Time && d[v] > t + e.c) ^ tollroads.cpp:41:26: error: 'inQ' was not declared in this scope if (!inQ[v]) ^ tollroads.cpp:43:25: error: 'h' was not declared in this scope h.push_back(v); ^ tollroads.cpp:49:9: error: 'H' was not declared in this scope H[t].clear(); ^ tollroads.cpp:50:17: error: 'h' was not declared in this scope while (!h.empty()) ^ tollroads.cpp:53:13: error: 'inQ' was not declared in this scope inQ[v] = 0; ^ tollroads.cpp:55:17: error: 'd' was not declared in this scope if (d[v] <= Time) ^ tollroads.cpp: In function 'int main()': tollroads.cpp:65:31: error: 'scanf' was not declared in this scope scanf("%d%d%d", &n, &m, &q); ^ tollroads.cpp:70:9: error: 'Adj' was not declared in this scope Adj[u].push_back(Edge{v, c}); ^ tollroads.cpp:77:42: error: 'printf' was not declared in this scope printf("%d\n", Dijkstra(u, t) - 1); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema TollRoads face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.