码迷,mamicode.com
首页 >  
搜索关键字:cin    ( 7874个结果
Codeforces Round #195 (Div. 2) A. Vasily the Bear and Triangle
水题,注意数据范围即可#include #include #include using namespace std;typedef pair Point;int main(){ int x,y; cin >> x >>y; Point a,b; if((x>0 && y > ...
分类:其他好文   时间:2014-06-16 10:47:47    阅读次数:226
寻找最大的数
#include#includeusing namespace std;char c[100],ans[100];int main(){ int len; cin>>len; while(len--) { cin>>c; int m; cin>>m; int len=strlen(c); int b...
分类:其他好文   时间:2014-06-12 07:40:23    阅读次数:215
uva Children's Game
非常巧妙的题目,巧用cmp,注意cmp的重载 #include #include using namespace std; string a[55]; bool cmp(string a, string b){ return a+b > b+a; } int main(int argc, char const *argv[]) { int n; while(cin >...
分类:其他好文   时间:2014-06-11 06:10:28    阅读次数:293
Codeforces Round #249 (Div. 2) A - Queue on Bus Stop
水题#include #include #include using namespace std;int main(){ int n,m; cin >> n >> m; int cnt = 0, sum = 0; for(int i = 0 ; i > a; i...
分类:其他好文   时间:2014-06-10 16:38:18    阅读次数:226
Codeforces Testing Round #10 A. Forgotten Episode
水题,注意数据范围#include using namespace std;int main(){ long long n,a; cin >> n; long long sum =(n*(n+1))>>1; for(int i = 0 ; i >a; sum ...
分类:其他好文   时间:2014-06-10 12:47:58    阅读次数:233
Codeforces Testing Round #10 B. Balancer
水题,只要遍历一遍,不够平均数的,从后面的借,比平均数多的,把多余的数添加到后面即可,注意数据范围#include #include #include using namespace std;int main(){ int n; cin >> n; vector a(n); ...
分类:其他好文   时间:2014-06-10 12:42:12    阅读次数:176
Codeforces Round #252 (Div. 2) A - Valera and Antique Items
水题#include #include #include #include using namespace std;int main(){ int n,v; cin >> n >> v; vector res; for(int i = 0; i > k; for...
分类:其他好文   时间:2014-06-10 09:24:16    阅读次数:337
Codeforces Round #251 (Div. 2) C. Devu and Partitioning of the Array
注意p的边界情况,p为0,或者 p为k奇数+偶数 = 奇数奇数+奇数 = 偶数#include #include #include #include #include using namespace std;int main(){ int n,k,p; long a; cin >>...
分类:其他好文   时间:2014-06-09 20:20:23    阅读次数:243
逆序单链表
#include using namespace std;struct Node{ Node *next; int elem;};void creatList(Node* &head){ head = new Node; int elem; cin>>elem; ...
分类:其他好文   时间:2014-06-09 17:50:43    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!