解题过程
开场开A,A题shl看错题意,被制止。然后开始手推A,此时byf看错E题题意,开始上机。推出A的规律后,shl看了E题,发现题意读错。写完A题,忘记判断N=0的情况,WA+1。过了A后,shl重新写E,lfw开始开J题,E题过不了样例,lfw多次起立让shl调试,然后shl拿到E的一血,lfw之后过了J。byf开始开I题,shl口胡出M做法,然后lfw和shl一起推G题。byf过了I题后,shl推出G题,byf去写。然后lfw开始计算几何,经过查错后过掉,然后shl开始开M题,过掉后还剩最后半小时,无题可做。
最后罚时很多,因为前期签到题过得太慢,A题40+分钟才过,J题1小时40分钟才过。
题解
A - Adrien and Austin
题解:给你n给石头,下标依次为1~n,然后两个人轮流取石头,每次取1~k个连续下标的石头,最后不能取得输掉比赛。问你谁会获胜。
找规律,首先,n==0时,第一个人必败。k==1时,n为奇数时先手必胜。k>1时,先手必胜.
参考代码:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
1 #include<bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 const int mod=1e9+7; 5 LL quick_pow(LL a,LL b) 6 { 7 LL ans=1; 8 while(b) 9 { 10 if(b&1) ans=ans*a%mod; 11 a=a*a%mod; 12 b>>=1; 13 } 14 return ans; 15 } 16 int main() 17 { 18 int t; 19 scanf("%d",&t); 20 int l24=quick_pow(24,mod-2); 21 while(t--) 22 { 23 int n; 24 scanf("%d",&n); 25 LL ans=1; 26 ans=ans*n%mod; 27 ans=ans*(n+1)%mod; 28 ans=ans*(n+2)%mod; 29 ans=ans*(n+3)%mod; 30 ans=ans*l24%mod; 31 printf("%lld\n",ans); 32 } 33 }
B - Tournament
Unsolved.
C - Cherry and Chocolate
Unsolved.
D - Country Meow
队友写的.题解:https://blog.csdn.net/liufengwei1/article/details/89303612
参考代码:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
1 #include<bits/stdc++.h> 2 #define maxl 110 3 #define eps 1e-8 4 struct point 5 { 6 double x,y,z; 7 point(double a=0,double b=0,double c=0) 8 { 9 x=a;y=b;z=c; 10 } 11 }; 12 13 int npoint,nouter; 14 point pt[maxl],outer[4],res; 15 double radius,tmp,ans; 16 17 inline double dist(point p1,point p2) 18 { 19 double dx=p1.x-p2.x,dy=p1.y-p2.y,dz=p1.z-p2.z; 20 return (dx*dx+dy*dy+dz*dz); 21 } 22 23 inline double dot(point p1,point p2) 24 { 25 return p1.x*p2.x+p1.y*p2.y+p1.z*p2.z; 26 } 27 28 inline void ball() 29 { 30 point q[3];double m[3][3],sol[3],L[3],det; 31 int i,j; 32 res.x=res.y=res.z=radius=0; 33 switch(nouter) 34 { 35 case 1: res=outer[0];break; 36 case 2: 37 res.x=(outer[0].x+outer[1].x)/2; 38 res.y=(outer[0].y+outer[1].y)/2; 39 res.z=(outer[0].z+outer[1].z)/2; 40 radius=dist(res,outer[0]); 41 break; 42 case 3: 43 for(int i=0;i<2;i++) 44 { 45 q[i].x=outer[i+1].x-outer[0].x; 46 q[i].y=outer[i+1].y-outer[0].y; 47 q[i].z=outer[i+1].z-outer[0].z; 48 } 49 for(int i=0;i<2;i++) 50 for(int j=0;j<2;j++) 51 m[i][j]=dot(q[i],q[j])*2; 52 for(int i=0;i<2;i++) 53 sol[i]=dot(q[i],q[i]); 54 if(fabs(det=m[0][0]*m[1][1]-m[0][1]*m[1][0])<eps) 55 return; 56 L[0]=(sol[0]*m[1][1]-sol[1]*m[0][1])/det; 57 L[1]=(sol[1]*m[0][0]-sol[0]*m[1][0])/det; 58 res.x=outer[0].x+q[0].x*L[0]+q[1].x*L[1]; 59 res.y=outer[0].y+q[0].y*L[0]+q[1].y*L[1]; 60 res.z=outer[0].z+q[0].z*L[0]+q[1].z*L[1]; 61 radius=dist(res,outer[0]); 62 break; 63 case 4: 64 for(int i=0;i<3;i++) 65 { 66 q[i].x=outer[i+1].x-outer[0].x; 67 q[i].y=outer[i+1].y-outer[0].y; 68 q[i].z=outer[i+1].z-outer[0].z; 69 sol[i]=dot(q[i],q[i]); 70 } 71 for(int i=0;i<3;i++) 72 for(int j=0;j<3;j++) 73 m[i][j]=dot(q[i],q[j])*2; 74 det=m[0][0]*m[1][1]*m[2][2] 75 + m[