码迷,mamicode.com
首页 >  
搜索关键字:using    ( 53562个结果
状态压缩dp 最优配对问题
在空间中的n(n为偶数)个点,配成n对,然后使得每一个点在一个点对中。所有的点对的距离之和最小 #include #include #include #include #include #include #include #include #include #include #define INF 100000000 using namespace std; int n;...
分类:其他好文   时间:2015-04-30 10:46:30    阅读次数:118
hdu 1263 水果 sort对结构体中字符串二级排序
#include #include #include using namespace std; struct node { char name[90],place[90]; int num; }c[105]; bool cmp(node x,node y) { if(strcmp(x.place,y.place)<0) return true; if(strcmp(x.place,...
分类:编程语言   时间:2015-04-30 10:39:46    阅读次数:162
c# 获取某日期所在周的第一天和最后一天
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace WyfClass { public class tools { /// /// 得到...
分类:Windows程序   时间:2015-04-30 10:10:26    阅读次数:162
vector的size和capacity改变时空间分配的过程
当增加新元素(s)时,如果超过当时的容量,则容量会扩充至两倍。如果两倍容量仍不足,就扩张至足够大的容量。 以一个例子来说明: #include #include #include using namespace std; int main() { int i; vector iv(2,9); cout<<"size = "<<iv.size()<<endl; ...
分类:其他好文   时间:2015-04-30 09:05:42    阅读次数:116
C++ copy和copy_backward用法实例
#include #include #include using namespace std; int main() { // 数组大小为7 int myInts[] = {10,20,30,40,50,60,70}; // 容器大小为8,里面有8个7 vector myVector(8,7); // 1.将数组中的7个数复制到容器的第一个位置,将覆盖容...
分类:编程语言   时间:2015-04-30 09:03:50    阅读次数:183
福州大学第十届程序设计竞赛 -- 部分题解
题目传送:福州大学第十届程序设计竞赛 Problem A 神庙逃亡 水题 AC代码: #include #include #include using namespace std; int s, h, vx, vy; int main() { int w; cin >> w; while(w--){ cin >> s >> h >> v...
分类:其他好文   时间:2015-04-30 08:57:23    阅读次数:133
同余与模运算
发现自己还是看书少了,能从书上学到不少东西。 加减乘的模运算: #include using namespace std; int mul_mod(int a,int b,int n){ a %= n; b %= b; return (int)((long long)a * b % n); }///如果n本身超int,就要用高精度了 int add_mod(int a,int ...
分类:其他好文   时间:2015-04-30 08:53:44    阅读次数:185
HackerRank# Stock Maximize
原题地址不知道为什么要用动态规划做,明明是扫几遍就行了啊HackerRank上的题目特别喜欢long long类型啊,不用就爆。。代码: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std...
分类:其他好文   时间:2015-04-30 07:34:53    阅读次数:124
About using UTF-8 fields in MySQL
https://www.adayinthelifeof.nl/2010/12/04/about-using-utf-8-fields-in-mysql/I sometimes hear: “make everything utf-8 in your database, and all will be...
分类:数据库   时间:2015-04-30 07:34:45    阅读次数:182
MySQL常见的异常
1.ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)首先尝试:delete from mysql.user where user is NULL or user='';commit;...
分类:数据库   时间:2015-04-30 07:30:23    阅读次数:189
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!