题意:套汇问题。问能否套汇盈利。
题解:
#include
#include
using namespace std;char cur[31][50];
char str1[50], str2[50];
double arb[31][31];
int n,m;bool floyd ()
{int i,j,k;for ( k = 0; k 1 )return true;return false;
}int main()
{double num;int i, j, x, y, Case = 1;while ( cin >> n && n != 0 ){memset(arb,0,sizeof(arb));for ( i = 0; i > cur[i];cin >> m;for ( i = 0; i > str1 >> num >> str2;for ( j = 0; j }