自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(25)
  • 资源 (3)
  • 收藏
  • 关注

原创 UVa483 - Word Scramble

#include #include #define N 100void rev(char *str){ int i, len = strlen(str); for (i = 0; i < len / 2; i++) { str[i] = str[i] ^ str[len - 1 - i]; str[len - 1 - i] = str[

2012-03-31 15:38:14 1374

原创 UVa10107 What is the Median?

#include #include #include #include using namespace std;int main(){ vector v; long long n; while (cin >> n) { v.push_back(n); sort(v.begin(), v.end()); int

2012-03-28 20:45:22 882

原创 UVa387 - A Puzzling Problem

#include #include #define MAX 16#define N 4typedef struct node { int shape[N][N]; int startx, starty; int row, col;} node;node inode[MAX];int shapenum;int vis[N][N];int dfs(in

2012-03-26 18:11:35 713

原创 stl的set,multiset, map, multimap, deque, list, stack, queue, priority_queue

set实际上是平衡二叉树,需要声明头文件#includeInsert:将元素插入集合中使用前向迭代器对集合中序遍历使用反向迭代器reverse_iterator可以反向遍历集合,需要用到rbegin()和rend()方法。erase:删除的对象可以是某个迭代器位置上的元素、等于某键值的元素、一个区间上的元素和清空集合(clear)。find:对集合进行搜索,如果找到查找的键值,

2012-03-15 22:40:44 1429

原创 UVa197 - Cube(TLE)

/* Time Limit exceeded 还有没有什么更好的方法*/#include #include #include #define MAX 200#define N 4#define BUFLEN 30typedef struct point3 { int x, y, z;} point3;typedef struct typea { point

2012-03-13 12:56:10 1302

原创 UVa185 - Roman Numerals

#include #include #include #define BUF_LEN 40void split_input(char *buf, char *a, char *b, char *c);int is_correct(char *a, char *b, char *c);int cal_value(char *a);int map(char c);int cal_

2012-03-04 21:39:40 758

原创 UVa485 - Pascal's Triangle of Death

#include #include #define MAX 300char a[MAX][MAX][MAX];void reverse(char *from, char *to);void call_sum(char *first, char *second, char *result);int main(){ char res[MAX]; int flag = 1; int

2012-03-02 21:38:25 1262

原创 UVa102 - Ecological Bin Packing

#include#define MAX 3int a[MAX][MAX];int main(void){ int i, j, k, m, resi, resj, resk; int min; int total; #ifndef ONLINE_JUDGE freopen("d:\\UVa\\uva_in.txt", "r", stdin);

2012-03-02 21:37:53 825

原创 UVa10018 - Reverse and Add

#include #include #define MAX 20int is_palindrome(char *str);void reverse(char *from, char *to);int main(){ int n; unsigned int a, b, sum; int count; char buf[MAX], temp[MAX];

2012-03-02 21:37:14 660

原创 UVa10189 - Minesweeper

#include #define MAX 101char a[MAX][MAX];int main(){ int m, n; int i, j; int nCase = 0;#ifndef ONLINE_JUDGE freopen("d:\\UVa\\uva_in.txt", "r", stdin);#endif while ((sca

2012-03-02 21:36:42 878

原创 UVa495 - Fibonacci Freeze

#include #include #include #include using namespace std;char Fib[5001][1100] = {"0","1","1"};void add(char a[],char b[], char c[]){ int len_a = strlen(a),len_b = strlen(b); int len_c = len

2012-03-02 21:36:08 1011

原创 UVa10334 - Ray Through Glasses

#include #include #define MAX 1000void reverse(char *from, char *to);void call_add(char *first, char *second, char *result);char Fin[MAX][MAX];int main(){ char f[MAX], s[MAX], r[MAX]; i

2012-03-02 21:35:30 611

原创 UVa10579 Fibonacci Numbers

#include #include #define MAX 1000void reverse(char *from, char *to);void call_add(char *first, char *second, char *result);int main(){char f[MAX], s[MAX], r[MAX];int n;int i;while (scanf("%

2012-03-02 21:34:58 493

原创 UVa10220 - I Love Big Numbers !

#include #include #define MAX 3000void reverse(char *from, char *to);void call_mult(char *first, char *second, char *result);char map[MAX][MAX] = {"1", "1", "2", "6"};int main(){ char b

2012-03-02 21:34:12 1106

原创 UVa10183 - How Many Fibs?

#include #include #define MAX 150char Fib[5 * MAX][MAX] = {"0", "1", "2"};int Fib_len[MAX] = {1, 1};void call_add(char *first, char *second, char *result);void reverse(char *from, char *to);

2012-03-02 21:30:56 757

原创 UVa10519 - !! Really Strange !!

#include #include #define MAX 11000void reverse(char *from, char *to);void call_mult(char *first, char *second, char *result);void call_minus(char *first, char *second, char *result);void cal

2012-03-02 21:29:58 483

原创 UVa10219 - Find the ways !

#include #include #define MAX 11000void reverse(char *from, char *to);void call_mult(char *first, char *second, char *result);void call_minus(char *first, char *second, char *result);void cal

2012-03-02 21:29:21 430

原创 UVa10303 - How Many Trees?

#include #include #define MAX 650#define N 1005char map[N][MAX] = {"0", "1", "2"};char buf[MAX], temp[MAX];char F[MAX], S[MAX], Res[MAX];;void reverse(char *from, char *to);void call_mult(c

2012-03-02 21:28:37 548

原创 UVa10007 - Count the Trees

#include #include #define MAX 800#define N 310char map[N][MAX] = {"0", "1"};char buf[MAX], temp[MAX];char F[MAX], S[MAX], Res[MAX];;void reverse(char *from, char *to);void call_mult(char *f

2012-03-02 21:27:19 702

原创 UVa10006 - Carmichael Numbers

#include #define MAX 65010int prime[MAX];int is_prime(int a);long long big_mod(int a, int n, int m);int is_ok(int n);int main(){ int i, n; #ifndef ONLINE_JUDGE freopen("d:

2012-03-02 21:26:17 617

原创 UVa369 - Combinations

#include long gcd(long a, long b);void divideGcd(long *a, long *b);long c(long n, long k);int main(){ long n, m; while (scanf("%ld%ld", &n, &m) && (n + m)) { printf("%ld th

2012-03-02 21:25:29 868

原创 UVa530 - Binomial Showdown

#include long gcd(long a, long b);void divideGcd(long *a, long *b);long c(long n, long k);int main(){ long n, m; while (scanf("%ld%ld", &n, &m) && (n + m)) { printf("%ld\n"

2012-03-02 21:24:50 619

原创 图的支配集问题

program test;const maxn = 100; type ghtype = array[1..maxn, 1..maxn] of integer; settype = set of 1..maxn; ltype = array[1..maxn] of settype; var g:ghtype; n,l:integer; f:text

2012-03-02 21:22:48 1281

原创 UVa294 - Divisors

#include #define MAX 32000int prime[MAX];int len;int is_prime(int n);void init();int counter(int n);int main(){ int l, u; int i, j; int n; int now; int max; int num

2012-03-02 17:42:39 472

原创 UVa 10450 - World Cup Noise

#include long long Fib(int n);int main(){ int i; int nCase; int n; scanf("%d", &nCase); for (i = 0; i < nCase; i++) { scanf("%d", &n); printf("Scenario #

2012-03-02 17:39:43 475

flash精彩实例chm

介绍flash基本操作以及mtv制作和as

2009-11-20

Linux C编程一站式学习

添加了GFDL许可证,正式网络发布。第三部分还很粗糙,错误也有不少,有待改进。第一部分和第二部分已经比较成熟,第二部分还差三章没写。

2009-09-11

Ubuntu Linux实用学习教程.pdf

Ubuntu 完全基于 Linux 操作系统, 可以免费得到社区及专业机构的支持。庞大的社区是它成长的沃土,请向这片动人的热忱敞开心扉。

2009-09-11

空空如也

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

TA关注的人

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