#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int MAXN = 100;
Type: Posts; User: enakta13
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
const int MAXN = 100;
G[u].push back(v);
here G[5] is a vector
u,v are int
below are the codes:
template <class T> string toStr(const T &x){
stringstream s; s << x; return s.str();
}
template <class T> int toInt(const T &x){
stringstream s; s << x; int r; s >> r;...
Soved......... Finally
Thanks for not helping guys...
I learn the hard way
But where is the code to get the output?
input:
1 2
1 3
Desired O/P:
0 1 1
1 0 0
1 0 0
Here 1 and 2 are linked thus 2 and 1 are linked too, so the value of matrix at 01 and 02 is 1
yes right!
i want to input values as
a[0][0]=1 a[0][1]=3
a[1][0]=2 a[1][1]=3
1 3
2 3
i want an adjacency matrix from this as:
m[0][0]=0, m[0][1]=0, m[0][2]=1
right i should have written the code as:
for(i=0;i<10;i+=3)
sorry my mistake, a minor mistake..
i think this is invalid
for(i=0;i<10;i+3)
{
--- some codes---
}
How can I return a 1-D array c[100]?
main()
{
int a[10][5],j,i;
for(j=0;j<5;j++)
for(i=0;i<10;i++)
scanf("%d",&a[i][j]);
prior(a,j);
return 0;
}
I want to enter the values in this format:
2
7 8 9
1 2 3
7 8
4
4 5 6
7 5 3
4 0 9
7 3 6