#define gc getchar_unlocked #include #include #include #include #include #include using namespace std; void scanint(int &x) { register int c = gc(); x = 0; for(;(c<48 || c>57);c = gc()); for(;c>47 && c<58;c = gc()) {x = (x<<1) + (x<<3) + c - 48;} } int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n; scanf("%d",&n); int i,j; int mat[3][n]; for(i=0;i