You are viewing a single comment's thread. Return to all comments →
My C solution with O(1) time complexity
#include<stdio.h> int main() { int t,x,y; scanf("%d",&t); while(t--) { scanf("%d%d",&x,&y); x=x%4; y=y%4; if((x==0) || (x==3) || (y==0) || (y==3)) printf("First\n"); else printf("Second\n"); } return 0; }
A Chessboard Game
You are viewing a single comment's thread. Return to all comments →
My C solution with O(1) time complexity