int main() {
static unsigned test[] = {
+ // clang-format off
// m, n, u..., v..., cq..., cr....
1, 1, 3, 0, 1, 1, // Error, divide by 0.
1, 2, 7, 1,3, 0, 7,0, // Error, n > m.
4, 3, 0,0x0000fffe,0,0x00008000, 0x0000ffff,0,0x00008000, 0xffffffff,0, 0x0000ffff,0xffffffff,0x00007fff, // Shows that mult-sub quantity cannot be treated as signed.
4, 3, 0,0xfffffffe,0,0x80000000, 0x0000ffff,0,0x80000000, 0x00000000,1, 0x00000000,0xfffeffff,0x00000000, // Shows that mult-sub quantity cannot be treated as signed.
4, 3, 0,0xfffffffe,0,0x80000000, 0xffffffff,0,0x80000000, 0xffffffff,0, 0xffffffff,0xffffffff,0x7fffffff, // Shows that mult-sub quantity cannot be treated as signed.
+ // clang-format on
};
int i, n, m, ncases, f;
unsigned q[10], r[10];
int main() {
static unsigned short test[] = {
+ // clang-format off
// m, n, u ..., v ..., result.
1, 1, 7, 3, 21,0,
1, 1, 2, 0xFFFF, 0xFFFE,0x0001, // 2*FFFF = 0001_FFFE.
2, 3, 400, 65535, 500, 100, 65534, 0x0D40,0x9A4F,0xFE70,0x01F5,0xFFFD,
4, 4, 65535, 65535, 65535, 65535, 65535, 65535, 65535, 65535,
1, 0, 0, 0, 65534, 65535, 65535, 65535,
+ // clang-format on
};
int i, n, m, ncases;
unsigned short result[10];