This, essentially, is my algorithm:
Read data into a matrix (the data matrix)
Create another matrix (the sum matrix), the last column of which is copied from the data matrix
For each column (except the last) of the data matrix, starting from the last column:
For each element of that column ...
Search found 8 matches
- Fri Jul 07, 2006 10:49 pm
- Forum: Volume 1 (100-199)
- Topic: 116 - Unidirectional TSP
- Replies: 226
- Views: 65982
- Fri May 19, 2006 12:47 pm
- Forum: C++
- Topic: please clarify me why it gives me "Compile Error"
- Replies: 3
- Views: 2706
- Fri May 19, 2006 6:53 am
- Forum: C++
- Topic: including <ios>
- Replies: 5
- Views: 3024
- Thu May 18, 2006 8:48 pm
- Forum: C++
- Topic: including <ios>
- Replies: 5
- Views: 3024
Well, I tried that, and it compiled on both my machine and on the compiler there. However, it said that my program gave the wrong answer, so I try running the program on my computer. The correct output should look like
(x - 17.716)^2 + (y - 0.735)^2 = 15.733^2
x^2 + y^2 - 35.433x - 1.470y + 66.865 ...
(x - 17.716)^2 + (y - 0.735)^2 = 15.733^2
x^2 + y^2 - 35.433x - 1.470y + 66.865 ...
- Thu May 18, 2006 7:24 pm
- Forum: C++
- Topic: including <ios>
- Replies: 5
- Views: 3024
including <ios>
In one of the files that I've submitted, I wrote
ostringstream o;
o << fixed << setprecision(3);
I made sure to include
#include <iomanip>
#include <sstream>
#include <string>
#include <cmath>
#include <vector>
#include <iostream>
using namespace std;
And this all worked perfectly fine on ...
ostringstream o;
o << fixed << setprecision(3);
I made sure to include
#include <iomanip>
#include <sstream>
#include <string>
#include <cmath>
#include <vector>
#include <iostream>
using namespace std;
And this all worked perfectly fine on ...
- Tue May 16, 2006 5:41 pm
- Forum: C++
- Topic: sorting a double Array using <algorithm>
- Replies: 3
- Views: 2503
- Mon May 15, 2006 7:06 pm
- Forum: Bugs and suggestions
- Topic: Bizarre compiler warnings
- Replies: 3
- Views: 2441
- Mon May 15, 2006 8:53 am
- Forum: Bugs and suggestions
- Topic: Bizarre compiler warnings
- Replies: 3
- Views: 2441
Bizarre compiler warnings
I've never had any weird problems getting my submitted code to be compiled, but all the sudden I can't figure out what's going on.
My C++ program begins:
1 #include <iterator>
2 #include <ctype.h>
3 #include <iostream>
4 #include <vector>
5 #include <algorithm>
6
7 using namespace std;
8 ...
My C++ program begins:
1 #include <iterator>
2 #include <ctype.h>
3 #include <iostream>
4 #include <vector>
5 #include <algorithm>
6
7 using namespace std;
8 ...