Codechef October Challenge 2018 游记 CHSERVE - Chef and Serves 题目大意: 乒乓球比赛中,双方每累计得两分就会交换一次发球权. 不过,大厨和小厨用了另外一种规则:双方每累计得 K 分才会交换发球权.比赛开始时,由大厨发球. 给定大厨和小厨的当前得分(分别记为 P1 和 P2),请求出接下来由谁发球. 思路: \((P1+P2)\%K\)判断奇偶性即可. 代码链接 BITOBYT - Byte to Bit 题目大意: 在字节国里有三类居民…
比赛链接:https://www.codechef.com/FEB18,题面和提交记录是公开的,这里就不再贴了 Chef And His Characters 模拟题 Chef And The Patents 模拟题 Permutation and Palindrome 模拟题 Car-pal Tunnel 结论比较简单 Broken Clock 求余弦的n倍角,可以用复数的快速幂解决 $cos(a)=x \\ sin(a)=\sqrt{1-x^2} \\ cos(na) = Re((x+\sq…
Preface 老年菜鸡终于开始打CC了,由于他太弱了所以只能打Div2 因为台风的原因challenge并没有写,所以水了个Rank7 A Football SB模拟题不解释 #include<cstdio> #include<iostream> #define RI register int using namespace std; const int N=155; int t,n,a[N],b[N],ans; int main() { for (scanf("%d&…
第一次写泰勒展开:本地和CC差距好大 题目大意 大厨住的城市里办了一场美食节.一条街上开设了$N$个摊位,编号为$1∼N$.这天开始时,第$i$个摊位的食物会导致食物中毒的概率是$P_i$.在这一天中,大厨发现某些摊位可能会根据顾客的反馈提供没那么有毒的食物.你需要处理$Q$个询问,询问有以下两类: 0 L R:求出:如果要吃遍$[L,R]$内所有摊位的食物,那么不会食物中毒的概率是多少:1 L R T:$[L,R]$中的所有摊位的食物会导致食物中毒的概率变为了原来的$T$倍.$T$是一个小于$…
Codeforces Avito Code Challenge 2018 D. Bookshelves 题目连接: http://codeforces.com/contest/981/problem/D Description Mr Keks is a typical white-collar in Byteland. He has a bookshelf in his office with some books on it, each book has an integer positive…
https://www.codechef.com/JAN17 Cats and Dogs 签到题 #include<cstdio> int min(int a,int b){return a<b?a:b;} int main(){ int T,a,b,c; for(scanf("%d",&T);T;--T){ scanf("%d%d%d",&a,&b,&c); puts(c%==&&c/<=a+…
The Street Problem Code: STREETTA https://www.codechef.com/problems/STREETTA Submit Tweet All submissions for this problem are available. Read problems statements in Mandarin Chineseand Russian. The String street is known as the busiest street in Cod…