码迷,mamicode.com
首页 >  
搜索关键字:arpa    ( 165个结果
[CodeForces850C]Arpa and a game with Mojtaba
题目大意: 给你一个包含n个数的数列,两个人轮流对数列进行如下操作: 选择一个质数p和一个正整数k,将数列中所有能被p^k整除的数除以p^k。 最后不能操作者负。 问先手是否有必胜策略。 思路: 显然,结果不直接与数列中数的值有关,而与数列中每个数的质因数及其次数有关,因此我们可以将每个质因数分开考 ...
分类:其他好文   时间:2017-09-29 22:57:15    阅读次数:231
【Codeforces 851D Arpa and a list of numbers】
Arpa的数列要根据GCD变成好数列。 ·英文题,述大意: 给出一个长度为n(n<=5000000)的序列,其中的元素a[i]<=106,然后输入两个数x,y(x,y<=109)现在有两种操作:①支付x的代价删除一个数。②支付y的代价将一个数加1。题目要求支付最少的代价,使得原序列所有元素的GCD不 ...
分类:其他好文   时间:2017-09-18 14:55:21    阅读次数:200
TCP套接字编程
基本函数库 #include<cstring> #include<cstdlib> #include<unistd.h> #include<netinet/in.h> #include<sys/socket.h> #include<sys/types.h> #include <arpa/inet.h ...
分类:其他好文   时间:2017-09-13 21:15:18    阅读次数:121
Codeforces 850C E. Arpa and a game with Mojtaba
对每个数统计其素数因子各次方数的数,然后通过y = (x>>i) | (x&((1<<(i-1))-1)) 模拟delete x and add to the list 操作,用grund函数将每个因子的情况映射为NIM问题中一个堆的情况,再按NIM问题的求解方法求解 参考链接 https://ww ...
分类:其他好文   时间:2017-09-07 20:23:36    阅读次数:184
20170906
水题 T1 Arpa and a research in Mexican wave CodeForces - 851A 1 #include<cstdio> 2 int n,k,t; 3 int main() 4 { 5 scanf("%d%d%d",&n,&k,&t); 6 if(t>=k&&t< ...
分类:其他好文   时间:2017-09-06 21:24:18    阅读次数:238
Codeforces Round #432 (Div. 2, based on IndiaHacks Final Round 2017) D
Arpa has found a list containing n numbers. He calls a list bad if and only if it is not empty and gcd (see notes section for more information) of num ...
分类:其他好文   时间:2017-09-06 10:59:53    阅读次数:218
Codeforces Round #432 A
A - Arpa and a research in Mexican wave 思路:模拟 AC代码: ...
分类:其他好文   时间:2017-09-05 22:02:51    阅读次数:163
Codeforces Round #432 B
Arpa and an exam about geometry 题意:a b c3个点在二维平面上构成一个三角形,问是否存在一个点,使得三角形绕点旋转一定角度后可以使得a到b,b到c的位置上 思路:易得,所求的点一定是abc三点共圆的圆心,且ab,bc所对的圆心角相等,即ab=bc,且abc不共线 ...
分类:其他好文   时间:2017-09-05 21:53:39    阅读次数:206
Codeforces Round #432 (Div. 2) D. Arpa and a list of numbers(暴力)
枚举质数,判断是否超过临界值。临界值就是将不是因子中不含这个素数的数的个数乘以x和y的较小值,是否小于当前最小值。 ...
分类:其他好文   时间:2017-09-05 14:40:04    阅读次数:359
Codefroces432 div2 A,B,C
A. Arpa and a research in Mexican wave Arpa is researching the Mexican wave. There are n spectators in the stadium, labeled from 1 to n. They start th ...
分类:其他好文   时间:2017-09-05 10:03:48    阅读次数:237
165条   上一页 1 ... 5 6 7 8 9 ... 17 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!