A multiplication game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6028 Accepted: 3013 Description Stan and Ollie play the game of multiplication by multiplying an integer p by one of the numbers 2 to 9. Stan always starts with p =…
首先有SG(k)=mex(SG(k/2),SG(k/3)--SG(k/9)),SG(0)=0,通过打表可以发现当$n\in[1,1]\cup [10,18]\cup [163,324]--$,规律大概就是$[18^{k-1}+1,18^{k}/2]$时SG的值为0(即必败),那么只需要判断一下n是否能满足这个区间即可. 1 #include<cstdio> 2 long long n,t; 3 int main(){ 4 while (scanf("%lld",&n…
Matrix Multiplication Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 18173 Accepted: 3912 Description You are given three n × n matrices A, B and C. Does the equation A × B = C hold true? Input The first l…