Skip to content

Instantly share code, notes, and snippets.

View ellemedit's full-sized avatar
🏠
Working from home

Marshall Han ellemedit

🏠
Working from home
  • Seoul
  • 14:43 (UTC +09:00)
View GitHub Profile
#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;
}
#include <stdio.h>
#include <limits.h>
// paper color
#define WHITE 0
#define BLACK 1
class Paper {
private:
int x, y, size;