acm
wang421289706
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj2503
#include #include #include using namespace std; int main(void) { char english[11],foreign[11]; mapbool>appear; //记录foreign与engliash的配对映射是否出现 maptranslate;转载 2014-10-22 15:16:41 · 228 阅读 · 0 评论 -
poj2109
#include #include using namespace std; int main(void) { double n,p; while(cin>>n>>p) cout<<pow(p,1.0/n)<<endl; //指数的倒数就是开n次方 return 0; }原创 2014-10-13 21:50:13 · 185 阅读 · 0 评论 -
poj1035
#include #include using namespace std; char dict[10001][16]; char word[51][16]; int DictNum=0; //字典计数器 int WordNum=0; //单词计数器 void Input(void); bool Change(char* wo转载 2014-10-16 09:44:34 · 188 阅读 · 0 评论 -
poj 2828
#include #include #include #define MAXN 200200 using namespace std; struct seg_tre{ int l,r; int cnt; }Node[3*MAXN]; struct person{ int pos,val; }P[MAXN]; int N,i; int ans[MAXN];转载 2014-11-18 22:05:11 · 234 阅读 · 0 评论 -
poj 1936
#include #include using namespace std; int main(long i,long j) { char s1[100000],s2[100000]; while(cin>>s1>>s2) { long len1=strlen(s1); long len2=strle转载 2014-10-16 14:22:37 · 220 阅读 · 0 评论 -
poj 2388
#include #include #include using namespace std; int main(void) { int n; while(cin>>n) { int* milk=new int[n+1]; for(int i=1;i<=n;i++)转载 2014-10-16 14:46:58 · 320 阅读 · 0 评论 -
poj3080
#include #include using namespace std; const int len=60; int main() { int i,j; int test; cin>>test; for(int t=1;t<=test;t++) { int n; cin>>n; char **DNA=new char*[n]; for(int p=0;p<n;转载 2014-10-16 12:22:02 · 251 阅读 · 0 评论 -
poj2299
一个乱序序列的 逆序数 = 在只允许相邻两个元素交换的条件下,得到有序序列的交换次数=各个元素的nixvshu原创 2014-10-16 16:10:30 · 184 阅读 · 0 评论 -
poj 3349
#include using namespace std; const __int64 prime=999983; class { public: __int64 len[6]; }leaf[100001]; typedef class hashtable{ public: __int64 len[6]; hashtable* next; hashtable(){ next=N转载 2014-10-16 23:49:22 · 349 阅读 · 0 评论 -
poj2777
#include using namespace std; int l,t,o; const int L=100005,T=35,O=100005; int colour; void swap(int &a,int &b) { int t=a; a=b; b=t; } struct Node { int l,r;转载 2014-11-20 10:39:06 · 321 阅读 · 0 评论 -
poj3274
#include #include using namespace std; const int size=100001; const int mod=99991; int feature[size][30]; //feature[i][j]标记第i只牛是否有特征j int sum[size][30]; //从第1到第i只牛,特征j总共出现了转载 2014-10-17 23:37:32 · 234 阅读 · 0 评论 -
poj1472
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1308998858 大致题意: 给出一段Pascial程序,计算其时间复杂度(能计算的项则计算,不能计算则化到最简的关于n的表达式O(n),并把各项根据n的指数从高到低排列),输出时,系数为0的项不输出,系数为1的项不输出系数,指数为1的项不输出指数。 一段程序只转载 2014-10-30 16:40:26 · 334 阅读 · 0 评论 -
poj1472
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1308998858 大致题意: 给出一段Pascial程序,计算其时间复杂度(能计算的项则计算,不能计算则化到最简的关于n的表达式O(n),并把各项根据n的指数从高到低排列),输出时,系数为0的项不输出,系数为1的项不输出系数,指数为1的项不输出指数。 一段程序只转载 2014-10-30 16:39:23 · 269 阅读 · 0 评论 -
poj2586
#include using namespace std; int main(void) { double s,d; while(cin>>s>>d) { bool flag=false; int surplus=0; if(s>=4*d)原创 2014-10-13 22:11:16 · 209 阅读 · 0 评论 -
poj1753
我自己写用了暴力搜索的方法,buxing原创 2014-09-28 21:46:02 · 200 阅读 · 0 评论 -
poj2965
与POJ1753相似,调试时放弃了原创 2014-09-29 20:23:57 · 210 阅读 · 0 评论 -
poj 3295
[cpp] view plaincopy /*代码一:自己构造栈*/ //Memory Time //212K 79MS #include using namespace std; int pp,qq,rr,ss,tt; //各个逻辑变量的值 typedef class STACK {转载 2014-10-26 17:31:23 · 297 阅读 · 0 评论 -
poj3252
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1301472836 大致题意: 输入两个十进制正整数a和b,求闭区间 [a ,b] 内有多少个Round number 所谓的Round Number就是把一个十进制数转换为一个无符号二进制数,若该二进制数中0的个数大于等于1的个数,则它就是一个Round Numbe转载 2014-10-27 14:41:40 · 212 阅读 · 0 评论 -
poj3273
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1301655498 大致题意: 给出农夫在n天中每天的花费,要求把这n天分作m组,每组的天数必然是连续的,要求分得各组的花费之和应该尽可能地小,最后输出各组花费之和中的最大值 解题思路: 经典的二分穷举 详细的思路我写在程序注释中,这样会更容转载 2014-10-27 21:24:05 · 190 阅读 · 0 评论 -
poj3258
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1301820293 大致题意: 一条河长度为 L,河的起点(Start)和终点(End)分别有2块石头,S到E的距离就是L。 河中有n块石头,每块石头到S都有唯一的距离 问现在要移除m块石头(S和E除外),每次移除的是与当前最短距离相关联的石头,要求移除m块转载 2014-10-27 22:42:06 · 355 阅读 · 0 评论 -
poj1845
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1309237394 大致题意: 求A^B的所有约数(即因子)之和,并对其取模 9901再输出。 解题思路: 要求有较强 数学思维 的题 应用定理主要有三个: 要求有较强 数学思维 的题 应用定理主要有三个: (1) 整转载 2014-10-27 19:46:05 · 251 阅读 · 0 评论 -
POJ 2635
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1309305108 大致题意: 给定一个大数K,K是两个大素数的乘积的值。 再给定一个int内的数L 问这两个大素数中最小的一个是否小于L,如果小于则输出这个素数。 解题思路: 首先对题目的插图表示无语。。。 高精度求转载 2014-10-27 18:31:20 · 187 阅读 · 0 评论 -
poj3122
转载请注明出处:優YoU http://user.qzone.qq.com/289065406/blog/1301969415 大致题意: 就是公平地分披萨pie 我生日,买了n个pie,找来f个朋友,那么总人数共f+1人 每个pie都是高为1的圆柱体,输入这n个pie的每一个尺寸(半径),如果要公平地把pie分给每一个人(就是所有人得到的pie尺寸一致,但是形状可以不同)转载 2014-10-28 16:50:49 · 248 阅读 · 0 评论 -
poj1328
#include #include #include using namespace std; struct point{ double left,right; }p[2010],temp; bool operator >(point a,point b){ return a.left>b.left; } int main(){ int r,n; int ca; whi原创 2014-10-13 21:37:52 · 246 阅读 · 0 评论 -
poj1840
#include #include using namespace std; short hash[37500001]; int main() { memset(hash,0,sizeof(hash)); int a1,a2,a3,a4,a5; int sum,sum1; while(cin>>a1>>a2>>a3>>a4>>a5) { for(int x1=-50;x1<原创 2014-10-18 00:36:59 · 183 阅读 · 0 评论
分享