摘要:
假设有一个一维序列,现在可以相邻两两交换,把它变成有序的序列,求最小交换次数,大家都知道求逆序对。如果现在有一个围圈的序列,一样两两相邻交换,此时怎么搞? 阅读全文
摘要:
strlen能不用就不用#include#include#include#include#include#include#include#includeusing namespace std;char s[100010];int a[30];int main(){ int i,L; while(ge... 阅读全文
摘要:
反证法证明得到 中点 满足题意#include#include#include#include#include#includeusing namespace std;int a[600];int ans;int main(){ int T,n,i,j; cin>>T; while(T--){ an... 阅读全文
摘要:
1203 背包(虽然数据吓人)1208 难度11224 难13001422 重温世界杯1501 Zipper1502 Regular Words1503Advanced Fruits2069Coin Change2078复习时间 难度120872612 Find a way bfs3008 阅读全文
摘要:
进制转化hdu1197#include#include#include#include#include#includeusing namespace std;int ans1,ans2,ans3;int _change(int u,int v){ int t=v,num=0; while(u>... 阅读全文
摘要:
Problem DescriptionThere must be many A + B problems in our HDOJ , now a new one is coming.Give you two hexadecimal integers , your task is to calcula... 阅读全文
摘要:
新手熟悉一下迪杰斯特拉。。。 一个人的旅行Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others... 阅读全文
摘要:
一:pow,曾经用递归溢出void _pow(int a,int b){ while(b){ if(b%2&1) { ans*a;b--; ans=ans*pow(pos(a,b/2),2); } else ans=ans*pow(pos(a,b/2),... 阅读全文
摘要:
http://blog.csdn.net/hackbuteer1/article/details/7450250//AW程序#include #include #include #include #define max 101#define maxnum 60#define maxint 10000... 阅读全文
摘要:
Kinds of FuwasTime Limit: 2 Seconds Memory Limit:65536 KBIn the year 2008, the 29th Olympic Games will be held in Beijing. This will signify the ... 阅读全文