This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
int result[2][2]; | |
void multiplyTwoTwoMatrix(int result[][2], int m1[][2], int m2[][2]) { | |
result[0][0] = (m1[0][0] * m2[0][0] + m1[0][1] * m2[1][0]) % 10000; | |
result[0][1] = (m1[0][0] * m2[0][1] + m1[0][1] * m2[1][1]) % 10000; | |
result[1][0] = (m1[1][0] * m2[0][0] + m1[1][1] * m2[1][0]) % 10000; | |
result[1][1] = (m1[1][0] * m2[0][1] + m1[1][1] * m2[1][1]) % 10000; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <limits.h> | |
// paper color | |
#define WHITE 0 | |
#define BLACK 1 | |
class Paper { | |
private: | |
int x, y, size; |
NewerOlder