909
  • 2024-08-02Codeforces Round 909 (Div. 3)--题目描述无法名状
    好吧,可能是我的文字功底太弱了,首先滴就是这个B题题目链接我一开始还以为这个能排序,就是算排完序之后的最大差,但是仔细一看题目,好像不要求使用排序,于是就尝试暴力做法。我发现的暴力做法是枚举k,直到k==n/2为止,当时是因为没有开longlong导致WA了,后面发现时间不是怎么多就没有
  • 2024-02-27Codeforces Round 909 (Div
    CodeforcesRound909(Div.3)A.GamewithIntegers显然就是还要不是三的倍数就能赢!intn; cin>>n; intk; while(n--) { cin>>k; if(k%3==0){ cout<<"Second"<<endl; }else{ cout<<"First"<<endl; } }B
  • 2024-02-08Codeforces Round 909 (Div. 3)
    题目链接A.若n是3的倍数,那么输出第二,因为不管先手如何操作,后手只要跟先手出的相反那么先手就永远不会赢其他情况,先手都能赢#include<bits/stdc++.h>usingnamespacestd;#defineintlonglongconstintN=1e5+10;voidsolve(){intn;cin>>n;if((n+1)%3==0|
  • 2023-12-09Codeforces Round 909 (Div. 3)
    https://codeforces.com/contest/1899  一个小游戏#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>usingnamespacestd;intn;intmain(){cin>>n;while(n--){intx;
  • 2023-12-04Codeforces Round 909 (Div. 3)
    CodeforcesRound909(Div.3)A#include<bits/stdc++.h>#defineintlonglong#defineendl'\n';usingnamespacestd;intn;voidsolve(){cin>>n;for(inti=1;i<=10;i++){if(i&1){if(n%3==0)n++;
  • 2023-11-21Codeforces Round 909 (Div. 3)
    CodeforcesRound909(Div.3)A.GamewithIntegers题意:给定一个数\(x\),\(A,B\)两人轮流进行操作,\(A\)先操作。每次给\(x\)加一或者减一,操作完后\(x\%3==0\)者获胜。判断获胜者。解题思路:判断\(A\)操作完是否能获胜,如果不能,那么一定是\(B\)获胜。代码:#include<bit
  • 2023-11-19Codeforces Round 909 (Div. 3)
    CodeforcesRound909(Div.3)基本情况第一次在CF上AC了超过一道题。(毕竟是Div3)B题卡住了很久。D没有深入思考。[B.250ThousandTonsofTNT](Problem-B-Codeforces)一开始死活过不了的代码:#include<iostream>#include<cstdio>#include<cstring>#inc
  • 2023-11-18Codeforces Round 909 (Div. 3) A-E
    CodeforcesRound909(Div.3)A.GamewithIntegers题意:两人轮流操作,可以加一或减一,若结果能被3整除则输出First,否则输出Second思路:若n不能被3整除,则第一个人可以直接通过加一或减一使结果被3整除,反之则一定不能代码:#include<bits/stdc++.h>usingnamespacestd;cons
  • 2023-10-17[909] Remove duplicated rows based on multiple columns in Pandas
    InaPandasDataFrame,youcanremoveduplicatedrowsbasedonmultiplecolumnsusingthedrop_duplicates()method.Here'showyoucandoit:importpandasaspd#SampleDataFramedata={'A':[1,2,3,2,1],'B':[�