码迷,mamicode.com
首页 >  
搜索关键字:while bpmn    ( 28585个结果
归并排序
1 #include 2 void MERGE(int *A,int p,int q,int r){ 3 int i,j,k; 4 int *B=malloc((r-p+1)*sizeof(int)); 5 i=p;j=q+1;k=0; 6 while(i<=q&&...
分类:其他好文   时间:2014-07-02 21:04:07    阅读次数:155
分支-04. 出租车计价(15)
#includeusing namespace std;int main(){ double miles; int time,fee; while(cin>>miles>>time){ if(miles<=3) fee=10+(time/5)*2; else if(miles<=10) ...
分类:其他好文   时间:2014-07-02 19:13:40    阅读次数:241
分支-06. 成绩转换(15)
#includeusing namespace std;int main(){ int p; while(cin>>p) if(p>=90) cout=80) cout=70) cout=60) cout<<"D"<<endl; else cout<<"E"<<endl; r...
分类:其他好文   时间:2014-07-02 18:57:53    阅读次数:152
分支-14. 简单计算器(10)
1 #include 2 using namespace std; 3 int main(){ 4 int a,b; 5 char s; 6 while(cin>>a){ 7 cin>>s>>b; 8 if(s=='+') 9 ...
分类:其他好文   时间:2014-07-02 17:36:14    阅读次数:149
分支-15. 日K蜡烛图(15)
1 #include 2 using namespace std; 3 int main(){ 4 float o,h,l,c; 5 while(cin>>o>>h>>l>>c){ 6 if(co) 9 couto&&h>c)14 ...
分类:其他好文   时间:2014-07-02 17:29:47    阅读次数:264
字符串-02. 删除字符串中的子串(20)
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 string s1, s2; 6 getline(cin, s1); 7 getline(cin, s2); 8 while(s1.find(s...
分类:其他好文   时间:2014-07-02 17:17:29    阅读次数:281
分支-03. 三天打鱼两天晒网(15)
#includeusing namespace std;int main(){ int days; while(cin>>days){ if(days%5=1) cout<<"Fishing in day "<<days<<endl; else cout<<"Drying in day ...
分类:其他好文   时间:2014-07-02 14:50:19    阅读次数:198
UVA 10883 Supermean 上下取对数防溢出
题目链接:点击打开链接 溢出了半天,觉累不爱 #include #include using namespace std; #define ll int int main(){ ll Cas= 1, T; cin>>T; while(T--){ ll n; cin>>n; double sum = 0, a; double hehe = 0; for(ll i =...
分类:其他好文   时间:2014-07-02 09:43:47    阅读次数:201
归并排序
void merge_array(int list1,int list1_size,int list2,int list2_size) { int i,j,k; i=j=k=0; //声明临时数组用暂存归并结果 int list[list1_size + list2_size]; while(i < list1_size && j < l...
分类:其他好文   时间:2014-07-02 09:13:46    阅读次数:213
ACM:二分查找,以及利用二分法来找上下界
(一)二分的模版: int binary_search(int *array, int length, int key) { int start = 0, end = length - 1; while(end >= start) { int middle = start + (end - start) / 2; int tmp = array[middle]; if(tmp <...
分类:其他好文   时间:2014-07-02 08:19:05    阅读次数:211
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!