0
i Graphen nur zu üben ... unter Eingabe von Adjazenzliste ... kann es aber nicht ... Hilfe bitte ...wie die Adjazenzliste von meinem Vektor drucken
#include <iostream>
#include<vector>
#include<stdio.h>
using namespace std;
#define MAX 10000//maximum node
vector<int >edges[MAX];
vector<int>cost[MAX];
int main()
{
int n,e,i;
scanf("%d%d",&n,&e);
for(int i=1;i<=e;i++)
{
int x,y;
scanf("%d%d",&x,&y);
edges[x].push_back(y);
cost[x].push_back(1);
}
return 0;
}
'std :: cout << what_you_want_to_print << std :: endl;' – OMGtechy