Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<stdio.h>
- #include<conio.h>
- #include<windows.h>
- #include<fstream>
- #include<time.h>
- using namespace std;
- vector<vector<int>> graph;
- void Macierz_Sasiedztwa_Add(vector<vector<int>> &graph, int x, int y){
- graph[x][y] = 1;
- graph[y][x] = 1;
- }
- int Macierz_Sasiedztwa_Check(int x, int y){
- if(graph[x][y] == 1)
- return 1;
- }
- int main()
- {
- fstream plik;
- plik.open("dane.txt", ios::in);
- if(plik.good() == true){
- plik >> x;
- plik >> y;
- Macierz_Sasiedztwa_Add();
- }
- plik.close();
- getch();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement