It is not that x^0 + 1 = 1 + 1 = 1.
Try to div by x^0 + 1:
x^2 - x^2
-------------------
x^2 + 2x + 4 : x^0 + 1
-x^2 - x^2
-------------------
-x^2 + 2x + 4
+x^2 + x^2
-------------------
x^2 + 2x + 4
you got a neverending loop.
Search found 8 matches
- Wed Mar 15, 2006 2:35 am
- Forum: Volume 105 (10500-10599)
- Topic: 10586 - Polynomial Remains
- Replies: 6
- Views: 5218
- Tue Jan 24, 2006 7:25 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10359 - Tiling
- Replies: 12
- Views: 7093
- Tue Jan 24, 2006 7:04 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10359 - Tiling
- Replies: 12
- Views: 7093
- Tue Jan 24, 2006 5:16 pm
- Forum: C++
- Topic: Compile error, could someone take a look?
- Replies: 1
- Views: 1735
Compile error, could someone take a look?
Could someone compile it using gcc and show me what is wrong (since it works in dev-cpp).
#include <cstdlib>
#include <iostream>
using namespace std;
typedef struct {
int len;
char digits[100];
} bint;
bint *results[251];
void init_bint(bint *b)
{
for( int i = 0; i < 100; i++ )
b->digits[i ...
#include <cstdlib>
#include <iostream>
using namespace std;
typedef struct {
int len;
char digits[100];
} bint;
bint *results[251];
void init_bint(bint *b)
{
for( int i = 0; i < 100; i++ )
b->digits[i ...
- Tue Jan 24, 2006 4:40 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10311 - Goldbach and Euler
- Replies: 98
- Views: 33772
- Tue Jan 24, 2006 2:09 pm
- Forum: Volume 103 (10300-10399)
- Topic: 10359 - Tiling
- Replies: 12
- Views: 7093
10359 - Tiling - CE
Could anyone take a look and tell me why I got CE? (it works on my computer)
// cut...
// cut...

- Fri Jan 20, 2006 12:56 am
- Forum: Volume 105 (10500-10599)
- Topic: 10583 - Ubiquitous Religions
- Replies: 33
- Views: 20388
- Thu Jan 19, 2006 10:46 pm
- Forum: Volume 105 (10500-10599)
- Topic: 10583 - Ubiquitous Religions
- Replies: 33
- Views: 20388
10583 - Runtime Error :(
#include <cstdlib>
#include <iostream>
#include <list>
using namespace std;
int main(int argc, char *argv[])
{
int n, m, l, r, d, w, c = 0, x = 0;
list<int> lista;
while( cin >> n >> m ) {
if( n == 0 and m == 0 )
break;
int *students[n+1];
int religions[n+1], temp[n+1];
c++; d = 1 ...
#include <iostream>
#include <list>
using namespace std;
int main(int argc, char *argv[])
{
int n, m, l, r, d, w, c = 0, x = 0;
list<int> lista;
while( cin >> n >> m ) {
if( n == 0 and m == 0 )
break;
int *students[n+1];
int religions[n+1], temp[n+1];
c++; d = 1 ...