自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Dosth_Magic

你不能停止努力。

  • 博客(72)
  • 资源 (5)
  • 收藏
  • 关注

原创 UVa1592 Database

#include#include#include#include#includeusing namespace std;const int ROW = 10000 + 10;const int COL = 10 + 5;int n,m;mapIDcache;vectorStrcache;vectorText[ROW];struct node{ int x,y;

2015-02-28 11:18:42 1531

原创 不要犹豫

四级分出来了,低分飘过,但是显示出我的英语成绩不足,看来这一年半真的没有什么大的成绩,稍有羞愧,所以,加油吧,没有什么困难时不能克服的。

2015-02-28 11:07:04 531

原创 励志贴

都说激动的时候不要下决定,但对于现在的我学习还是最重要的,不多说别的,不要再以后怀疑自己,跟着自己的自己的直觉走,一路走到黑。所以继续坚持吧,不想太多,坚持,不做享受,堕落的事情以及思想,坚定自己,就够了。

2015-02-27 14:54:13 431

原创 UVA1592 Database

#include#include#include#include#include#include#includeusing namespace std;mapmaps;int p[10008][6];int main(){ int n,m; lop:while(cin>>n>>m){ string s,t; maps.clear

2015-02-23 12:33:25 700

原创 UVAThe blocks problem VECTOR的使用

#include#include#include#includeusing namespace std;const int maxn = 30;int n;vector pile[maxn];void find_block(int x, int& p, int& h){ for(p=0; p < n;p++) for(h=0; h < pile[p].s

2015-02-16 16:20:51 467

原创 还是不懂

还不想动脑子,坚持~

2015-02-16 01:50:21 420

原创 1001 Sum Problem

#include#includeusing namespace std;int main(){ long long a; while(cin>> a){ if(a%2 == 0) cout << a/2 * (a+1) << "\n\n"; else cout << (a+1)/2 *a << "\n\n"; } return

2015-02-16 01:05:56 401

原创 UVA10474 where is the Marble? STL初步

#include#includeusing namespace std;const int maxn = 10000;int main(){ int n, q, x, a[maxn], kase = 0; while(cin >> n >> q && n){ cout << "CASE# " << ++kase << ":" << endl;

2015-02-16 00:53:33 445

原创 模板

#includeint sum(int* begin, int* end){ int* p = begin; int ans = 0; for(int *p = begin; p != end; p++) { ans += *p; printf("%d\n",*p); } printf

2015-02-16 00:08:53 350

原创 再谈结构体

#includeusing namespace std;struct Point{ int x,y; Point(int x=0, int y=0):x(x),y(y){}};Point operator + (const Point& A, const Point& B){ return Point(A.x + B.x, A.y + B.y);}ostream

2015-02-16 00:02:46 634

原创 字符串

string很慢sstream更慢应谨慎使用#include#include#includeusing namespace std;int main(){ string line; while(getline(cin, line)){ int sum = 0, x; stringstream ss(line);

2015-02-15 23:50:53 322

原创 引用

#includeusing namespace std;void swap2(int& a, int& b){ int t = a; a = b; b = t;}int main(){ int a = 3, b = 4; swap2(a, b); cout << a << " " << b << "\n"; return 0;}

2015-02-15 23:48:09 400

原创 C++框架

#includeint main(){ int a,b; while(scanf("%d%d",&a,&b) == 2) printf("%d\n", a+b); return 0;}输入输出流#include#includeusing namespace std;const int maxn = 100 + 10;int A[maxn];int

2015-02-15 23:45:35 569

原创 生成1~n的排列

#includevoid print_permutation(int n, int * A, int cur){//cur已经填好的位置个数 if(cur == n){//递归边界 for(int i = 0; i<n; i++) printf("%d ",A[i]); printf("\n"); }else for(int i = 1;

2015-02-13 16:01:16 440

原创 UVa12325 - Zombie's Treasure Chest

#include#includeusing namespace std;int main(){ int k,t=0; scanf("%d", &k); while(k--){ long long n,s1,s2,v1,v2,x,best=0; scanf("%lld%lld%lld%lld%lld",&n,&s1,&v1,&s2,&v

2015-02-13 00:26:39 768

原创 UVA 1374 - Power Calculus

#include#include#include#include#include#include#include#define ll long long#define oo 10000007using namespace std;int way[1005],num;bool DFSID(int x, int step){ int i; if(num > st

2015-02-13 00:14:29 525

原创 UVa1354 mobile computering

#include#include#include#define INF 0x3f3f3f3f#define max(a,b) ((a)>(b)?(a):(b))#define min(a,b) ((a)<(b)?(a):(b))using namespace std;const int N = 6;const int MAXN = (1<<N);int t, n, i, j, v

2015-02-12 23:58:53 678

原创 UVa140 - Bandwidth

#include#include#include#include#includeusing namespace std;const int maxn = 30;int a[maxn],b[maxn],n,best,k[10]={1};bool g[maxn][maxn],vis[maxn];bool read(){ char c=0,d=0; best=1<<30

2015-02-12 23:36:52 566

原创 UVa129 - Krypton Factor

#include#includeusing namespace std;const int maxn = 85;int n,l,cnt,S[maxn];int dfs(int cur){ if(cnt++ == n){ for(int i=0; i<cur; i++){ if(i&&i%4==0&&i%64!=0) cout<<" ";

2015-02-12 23:14:26 619

原创 UVa524 - Prime Ring Problem

#include#include#include#includeusing namespace std;int prime[32];int visit[18];int queue[18];int size[18];int ans[18][100000][18];void dfs(int d, int n){ if(d == n && !prime[queue[d-1]

2015-02-12 22:56:11 434

原创 抽屉原理

桌上有十个苹果,要把这十个苹果放到九个抽屉里,无论怎样放,我们会发现至少会有一个抽屉里面至少放两个苹果。这一现象就是我们所说的“抽屉原理”。 抽屉原理的一般含义为:“如果每个抽屉代表一个集合,每一个苹果就可以代表一个元素,假如有n+1个元素放到n个集合中去,其中必定至少有一个集合里有两个元素。” 抽屉原理有时也被称为鸽巢原理。它是组合数学中一个重要的原理。

2015-02-12 21:53:17 474

原创 UVa10976 - Fractions Again?!

#include#include#includeusing namespace std;int main(){ int k; while(cin >> k && k){ vectora[2]; for(int i=k+1; i<=2*k; i++) if( k*i%(i-k)==0 ){ a[0].p

2015-02-12 21:39:12 410

原创 UVa11059 - Maximum Product

#include#includeusing namespace std;vector a;int main(){ int n, b, k = 0; while(cin >> n){ for(int i=0; i> b; a.push_back(b); } long long y = 1, maxy = 0; for(int

2015-02-12 21:18:20 626

原创 UVa10976 - Fractions Again?!

#include#include#includeusing namespace std;int main(){ int k; while(cin >> k && k){ vector a[2]; for(int i = k+1; i <= 2*k; i++) if(k*i%(i-k) == 0){ a

2015-02-12 01:07:22 583 3

原创 UVa725 - Division

#include#include#includeusing namespace std;set num[7];int n,cnt,x,y[7];bool z;void judge(){ x = n*y[1]; if(x>98765){ z = true; return; } num[1].insert(x/10000)

2015-02-12 01:00:32 525

原创 UVa230 - Borrowers

#include#include#include#include#include#includeusing namespace std;struct book{ string author; int status;};map books;vector name;bool compare(string a, string b){ if(books[a].

2015-02-12 00:05:01 2737

原创 UVaUVa 1595 - Symmetry

#include#include#includeusing namespace std;struct point{ double x, y; bool operator < (const point&a)const{ if(a.y == y) return a.x > x; else return a.y > y; }};vect

2015-02-11 23:17:42 614

原创 UVa10391 - Compound Words

#include#include#includeusing namespace std;set dict;int main(){ string s; while(cin >> s) dict.insert(s); s.clear(); for(set::iterator it = dict.begin(); it != dict.end(

2015-02-11 22:29:31 456

原创 UVa10763 - Foreign Exchange

//超时的#include#includeusing namespace std;vector a;vector b;int n,x,y;int main(){ while( cin >> n && n ){ int t = 1; for(int i = 0; i < n; i++){ cin >> x >> y;

2015-02-11 22:08:12 635

原创 UVa1596 - Bug Hunt

#include#include#include#includeusing namespace std;string s0, s, s1, s2, left_value,right_value;int bug;map a;map value;string get_value(string x, string arr){ unsigned int t = 0; st

2015-02-11 21:50:32 1277

原创 find_last_of()

1.函数find_first_of()和 find_last_of() 执行简单的模式匹配,如在字符串中查找单个字符c。函数find_first_of() 查找在字符串中第1个出现的字符c,而函数find_last_of()查找最后一个出现的c。匹配的位置是返回值。如果没有匹配发生,则函数返回-1.

2015-02-11 21:50:03 966

原创 string::npos

string 类将 npos 定义为保证大于任何有效下标的值。

2015-02-11 14:56:43 455

原创 uva10935 - Throwing cards away I

#include#includeusing namespace std;int n;vector cards;int main(){ while(cin >> n && n){ int first = 1; for(int i = 1; i <= n; i++) cards.push_back(i); co

2015-02-11 02:36:49 541

原创 uva1594 - Ducci Sequence

#include#include#includeusing namespace std;const int maxn = 1010;vector a;int t, n;bool is_zero(){ int p, q = 0; for(int i = 0; i < maxn; i++) { q = 0; p = a[0];

2015-02-11 02:25:15 584

原创 UVa 12100 - Printer Queue(模拟)

#include#includeusing namespace std;vectorqueue;int main(){ int t; cin >> t; while(t--){ int n,m,x,cnt = 0; cin >> n >> m; while(n--){ cin >> x;

2015-02-11 02:00:51 594

原创 UVA12504 - Updating a Dictionary

#include#include#include#include#include#includeusing namespace std;struct key_value{ string key,value;};setkey;vectorchange[3];map dict[2];int main(){ int t, flag = 1; key_va

2015-02-11 01:18:01 784

原创 坚持

你最后说的很对,是太着急了首先,你不要在意基础,比如,你是什么专业等等,这些都是外部环境造成的,跟你没关系第二,你不想放弃也是对的,贵在坚持,没有别的法子你的目标是学编程,做ACM是现在你可以选择的最佳的途径,编程是非常有深度的东西,练ACM可以让你静下心来往深入去钻研你缺乏一个深入学习编程的环境,这通过进入ACM集训队可以解决,你不要着

2015-02-10 16:36:46 496

原创 uva12166 - Equilibrium Mobile

#include#include#include#include#includeusing namespace std;struct Node{ string s; unsigned long long t; Node *left, *right; Node():t(0), left(NULL), right(NULL){}};Node *root;

2015-02-10 15:14:13 772

原创 uva1600 - Patrol Robot

#include#include#includeusing namespace std;const int maxn = 25;struct Node{ int a,b,c; Node *p[4]; Node(int a=0, int b=0, int c=0):a(a),b(b),c(c){}};int m,n,k,maze[maxn][maxn];boo

2015-02-10 14:57:19 711

原创 uva127 - "Accordian" Patience

Time limit: 3.000 seconds限时:3.000秒 Problem问题You are to simulate the playing of games of "Accordian" patience, the rules for which are as follows:模拟玩一个“手风琴”纸牌游戏,规则如下:Deal cards on

2015-02-10 00:12:36 742

chrome修复工具

chrome一直有问题,有时候能用,然后就上不了csdn,google,这个工具很好用

2018-11-06

p5js代码库

交互式可视化工具,学习前端可视化入门代码库,非常简单有趣

2018-10-18

初学论文制作PPT

初学论文,面对全是英语的文章,还是很难理解的,要多看,更要掌握看文章的方法。 掌握该问的核心思想,学习研究经验。把该论文的ppt做出来,意味着掌握的差不多了

2017-09-21

Qt+OpenGL程序

Qt+OpenGL程序

2017-08-23

C++Qt教程源码

学习youtobe上经典C++Qt教程的代码,有想要学习的可以下下来看看

2017-08-23

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除