Pagini recente » Borderou de evaluare (job #3313680) | Borderou de evaluare (job #809777) | Profil IamandiiAna | Borderou de evaluare (job #809782) | Borderou de evaluare (job #2152307)
Borderou de evaluare (job #2152307)
Raport evaluator
Compilare:
user.cpp: In function ‘void DFS(int)’:
user.cpp:3:300: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
using namespace std;ifstream fin("sortaret.in");ofstream fout("sortaret.out");vector <int> L[NMax];int n, m, K;int drum[NMax];bool viz[NMax];inline void Citire(){int i, x, y;fin >> n >> m;for(i = 1; i <= m; i++){fin >> x >> y;L[x].push_back(y);}}void DFS(int nod){int i, j;viz[nod] = 1;for(j = 0; j < L[nod].size(); j++){i = L[nod][j];if(!viz[i])DFS(i);}drum[++K] = nod;}inline void SortareTop(){int i;for(i = 1; i <= n; i++)if(!viz[i])DFS(i);}inline void Afisare(){int i;for(i = n; i >= 1; i--)fout << drum[i] << " ";fout << "\n";}int main(){Citire();SortareTop();Afisare(); return 0;}
^
| Test |
Timp executie |
Memorie folosita |
Mesaj |
Punctaj/test |
| 1 | 0ms | 1908kb | OK | 10 |
| 2 | 0ms | 1916kb | OK | 10 |
| 3 | 0ms | 1924kb | OK | 10 |
| 4 | 0ms | 1944kb | OK | 10 |
| 5 | 4ms | 1976kb | OK | 10 |
| 6 | 8ms | 2028kb | OK | 10 |
| 7 | 20ms | 2172kb | OK | 10 |
| 8 | 28ms | 2276kb | OK | 10 |
| 9 | 56ms | 2620kb | OK | 10 |
| 10 | 84ms | 2948kb | OK | 10 |
| Punctaj total | 100 |