
排序
coding__girl
这个作者很懒,什么都没留下…
展开
-
UVA 146 ID Codes
It is 2084 and the year of Big Brother has finally arrived, albeit a century late. In order to exercise greater control over its citizens and thereby to counter a chronic breakdown in law and order, th原创 2017-09-13 22:05:01 · 186 阅读 · 0 评论 -
STL之next_permutation函数对各种类型的全排列实例
详解next_permutation函数对各种变量类型的全排列。(1) int 类型的next_permutationint main(){ int a[3];a[0]=1;a[1]=2;a[2]=3; do{cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<endl;} while (next_permutation(a,a+3)); //参数3指的是要进行排列的长转载 2017-09-13 22:22:30 · 177 阅读 · 0 评论 -
UVA 299 Train Swapping
At an old railway station, you may still encounter one of the last remaining “train swappers”. A train swapper is an employee of the railroad, whose sole job it is to rearrange the carriages of trains.原创 2017-09-13 23:19:49 · 225 阅读 · 0 评论 -
uva 10008 What's Cryptanalysis?
Cryptanalysis is the process of breaking someone else’s cryptographic writing. This sometimes involves some kind of statistical analysis of a passage of (encrypted) text. Your task is to write a progra原创 2017-09-14 16:12:51 · 314 阅读 · 0 评论 -
uva 10041 Vito's Family
The world-known gangster Vito Deadstone is moving to New York. He has a very big family there, all of them living in Lamafia Avenue. Since he will visit all his relatives very often, he is trying to fi原创 2017-09-14 16:29:40 · 366 阅读 · 0 评论 -
uva 10107 What is the Median?
题意: 不断添加整数n到数组,每次输出当前所有数的中位数代码:#include <iostream>#include<cmath>#include<algorithm>using namespace std;int num[10000];int main(){ int n,i=0,length=0,median; while(cin>>n) {原创 2017-09-14 16:35:31 · 437 阅读 · 0 评论 -
uva 10327 Flip Sort
Sorting in computer science is an important part. Almost every problem can be solved effeciently if sorted data are found. There are some excellent sorting algorithm which has already acheived the lowe原创 2017-09-14 16:39:06 · 472 阅读 · 0 评论 -
uva 10050 Hartals
题意: 输入h代表罢工的周期,给定一定的天数,默认第一天为周日,输出罢工的天数,周五和周六不算代码:#include <iostream>#include<cstring>using namespace std;int main(){ int T,i,k,P,N,h,s; cin>>T; int day[3651];//记录当天是否罢工,若罢工记为1,否则为0原创 2017-09-14 16:22:11 · 271 阅读 · 0 评论 -
UVA 120 Stacks of Flapjacks
Background Stacks and Queues are often considered the bread and butter of data structures and find use in architecture, parsing, operating systems, and discrete event simulation. Stacks are also impor原创 2017-09-13 21:08:32 · 328 阅读 · 0 评论