# include<iostream>
# include<string>
# include<vector>
bool find_(vector<char> &A,int i,char s)
{
for(int j = 0;j <= i;j++)
if(A[j] == s)
return true;
return false;
}
int main()
{
vector<char> A,B;
char c;
int count = 1;
while(cin.get(c))
{
if(c == '#')
break;
while(c != '\n')
{
A ...
Search found 4 matches
- Tue Jan 20, 2004 6:41 am
- Forum: Volume 101 (10100-10199)
- Topic: 10192 - Vacation
- Replies: 58
- Views: 23957
- Fri Jan 16, 2004 5:06 pm
- Forum: Volume 1 (100-199)
- Topic: 125 - Numbering Paths
- Replies: 56
- Views: 11369
125 numbering paths
if A is the adjacency matrix
summation from i = 1 to n-1(A ^ i) gives me the no of walk bet any two vert of len <= n-1
similarly i do upto 2(n-1) and see if the no has increased if it has then the no of paths is inf else the no of paths bet x and y is the entry[x][y] in the summed matrix ...
summation from i = 1 to n-1(A ^ i) gives me the no of walk bet any two vert of len <= n-1
similarly i do upto 2(n-1) and see if the no has increased if it has then the no of paths is inf else the no of paths bet x and y is the entry[x][y] in the summed matrix ...
- Fri Jan 09, 2004 6:51 am
- Forum: Volume 1 (100-199)
- Topic: 121 - Pipe Fitters
- Replies: 36
- Views: 6641
121 - pipefitters WA
I got the following code with all test cases i got my hands on to
it seems to work fine but WA
can anyone please help
BTW i dont know how to add my code to this page[/cpp]
it seems to work fine but WA
can anyone please help
BTW i dont know how to add my code to this page[/cpp]
- Wed Jan 07, 2004 9:55 am
- Forum: Volume 1 (100-199)
- Topic: 104 - Arbitrage
- Replies: 223
- Views: 37240
arbitage vol 1
i dont clearly understand the qn
say that a cyle 1 2 1 gives .04% profit
the is cycle 12112121 also valid arbitage seq (the length of cycle is less than the no of countries)
say that a cyle 1 2 1 gives .04% profit
the is cycle 12112121 also valid arbitage seq (the length of cycle is less than the no of countries)