自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Bingo

  人生要学会沉淀,沉淀经验,沉淀心情,沉淀自己。

  • 博客(80)
  • 资源 (8)
  • 收藏
  • 关注

原创 UVA 297 Quadtrees

#include struct Tnode { char color; Tnode *child[4];};Tnode node[1365];int count;Tnode *deal(char *word, int &move, int a, int b, int *Color) { Tnode *root = &node[count++]; root->color =

2014-07-31 18:25:17 1610

原创 UVA 112 Tree Summing

#include char input() { char temp; temp = getchar(); while (temp == ' ' || temp == '\n') temp = getchar(); return temp;}bool deal(int v, bool *leaf) { bool max = false, l = false, r = fals

2014-07-31 11:04:20 1638

原创 UVA 540 Team Queue

#include#includeint Q[5005][1005];int hash[1000000];int main() { int T = 0, n, m; int last = 1003, num = 1004; while (scanf("%d", &n), n) { printf("Scenario #%d\n", ++T); memset(Q, -1, siz

2014-07-30 21:01:48 1546

原创 UVA 490 Rotating Sentences

#include #include int main() { char str[200][200] = {0}; int n, max = 0; for (n = 0; gets(str[n]); n++) if (max < strlen(str[n])) max = strlen(str[n]); for (int i = 0; i < max; i++) { f

2014-07-30 16:45:55 1591

原创 UVA 457 Linear Cellular Automata

#include int main() { int t; scanf("%d", &t); while (t--) { int arr[15]; for (int i = 0; i < 10; i++) scanf("%d", &arr[i]); int day[55][45] = {0}; day[0][20] = 1; for (int i = 1; i <

2014-07-30 16:01:41 1640

原创 UVA 694 The Collatz Sequence

#include int main() { long long a, l; int num = 0; while (scanf("%lld%lld", &a, &l) && !(a == -1 && l == -1)) { printf("Case %d: A = %lld, limit = %lld, number of terms = ", ++num, a, l); int

2014-07-30 15:10:51 1557

原创 UVA 489 Hangman Judge

#include #include int main() { int n; while (scanf("%d", &n), n+1) { getchar(); printf("Round %d\n", n); char s1[200], s2[200], s3[200], s4[200]; int arr[30] = {0}, brr[30] = {0}; gets(

2014-07-30 14:31:39 1679

原创 UVA 488 Triangle Wave

#include int main() { int t; scanf("%d", &t); while (t--) { int len, num; scanf("%d%d", &len, &num); while (num--) { for (int j = 0; j < len; j++) { for (int k = 0; k <= j; k++)

2014-07-28 20:42:55 1576

原创 UVA 445 Marvelous Mazes

#include #include int main() { char str[300]; while (gets(str)) { int len = strlen(str), sum = 0; for (int i = 0; i < len ; i++) { if(str[i] >= '0' && str[i] <= '9') sum += str[i] - '0

2014-07-28 20:08:18 1721

原创 UVA 414 Machined Surfaces

#include int main() { int n; while (scanf("%d", &n), n) { getchar(); int min = 100, sum = 0, num = n; while (n--) { int count = 0; char str[30]; gets(str); for (int i = 0; i < 25

2014-07-28 19:14:18 1699

原创 UVA 494 Kindergarten Counting Game

#include #include int main() { char str[300]; while (gets(str)) { int count = 0; int len = strlen(str); for (int i = 0; i < len; i++) { if ((str[i] >= 'A' && str[i] = 'a' &&str[i] <= 'z'

2014-07-28 18:34:18 1542

原创 UVA 458 The Decoder

#include #include int main() { char str[300]; while (gets(str)) { int len = strlen(str); for (int i = 0; i < len; i++) str[i] -= 7; puts(str); } return 0;}

2014-07-28 18:21:03 1640

原创 UVA 10300 Ecological Premium

#include int main() { int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n); long long sum = 0; while (n--) { int a, b, c; scanf("%d%d%d", &a, &b, &c); sum += a * c; }

2014-07-28 18:07:15 1634

原创 UVA 10071 Back to High School Physics

#include int main() { int v, t; while (scanf("%d%d", &v, &t) != EOF) printf("%d\n", 2 * v * t); return 0;}

2014-07-28 17:53:30 1633

原创 UVA 10055 Hashmat the Brave Warrior

#include int main() { long long a, b; while (scanf("%lld%lld", &a, &b) != EOF) printf("%lld\n", b > a? b - a: a - b); return 0;}

2014-07-28 16:51:41 1657

原创 UVA 10494 (暑假-高精度 -D - If We Were a Child Again)

#include #include #include int main() { char str_1[10001], op; long Max; while (scanf("%s %c%ld", str_1, &op, &Max) != EOF) { printf("%s %c %ld\n", str_1, op, Max); if (op == '/') print

2014-07-28 15:30:22 1642

原创 UVA 465 (暑假-高精度 -B - Overflow)

#include #include #include int main() { int Max = 2147483647; char str_1[10001], str_2[10001], op; while (scanf("%s %c %s", str_1, &op, str_2) != EOF) { printf("%s %c %s\n", str_1, op, s

2014-07-28 11:21:12 1582

原创 UVA 424 Integer Inquiry

#include #include int main() { char str_1[120], sum[200] = {0}; while (gets(str_1)) { char str[120] = {0}; int len = strlen(str_1); if (len == 1 && str_1[0] == '0') break; for (int i =

2014-07-28 10:45:44 1595

原创 UVA 299 Train Swapping

#include int main() { int t; scanf("%d", &t); while (t--) { int n; scanf("%d", &n); int arr[60] = {0}; for (int i = 0; i < n; i++) scanf("%d", &arr[i]); for (int i = 0; i < n; i++)

2014-07-28 09:48:39 1494

原创 UVA 152 (暑假-排序、检索 -D - Tree's a Crowd)

#include #include int main() { int arr[100010][3]; int n = 0 ; for ( int i = 0; scanf("%d%d%d", &arr[i][0], &arr[i][1], &arr[i][2]) && (arr[i][0] || arr[i][1] || arr[i][2]); i++, n++); int brr[

2014-07-28 08:51:30 1615

原创 UVA 10474 (暑假-排序、检索 -C - Where is the Marble?)

#include int main() { int n, q; int count = 0; while (scanf("%d%d", &n, &q) && n) { printf("CASE# %d:\n", ++count); int arr[10100], brr[10100]; for (int i = 0; i < n; i++) { scanf("%d",

2014-07-27 20:17:52 1537

原创 UVA 644 (暑假-字符串(2)-E - Immediate Decodability)

#include #include #include int main() { char str[100][100]; int num = 0; for (int i = 0; gets(str[i]); i++) { if (str[i][0] == '9') { int kong = 0; for (int j = 0; j < i; j++) { if

2014-07-27 19:07:14 1552

原创 UVA 10815 (暑假-字符串(2) -D - Andy's First Dictionary)

#include #include #include int cmp_string(const void *a, const void *b){ return strcmp((char *)a, (char *)b);}int main() { char str[210], word[150010][50] = {0}; int n; int count = 0; whi

2014-07-27 16:12:09 1604

原创 UVA 10361 (暑假-字符串(1) -C - Automatic Poetry)

#include #include int main() { int t; scanf("%d", &t); getchar(); while (t--) { char s1[200], s2[200]; gets(s1); gets(s2); int len = strlen(s1); for (int i = 0; i < len; i++) { if

2014-07-27 14:29:02 1565

原创 UVA 10916 Factstone Benchmark

#include #include int main() { int year; while (scanf("%d", &year), year) { int n = (year - 1940) / 10; double k = pow(2.0, n) * log(2.0); double sum = 0; int i; for (i = 1; sum <= k; i

2014-07-27 10:14:29 1635

原创 UVA 11044 (暑假-数学(3) -B-Searching for Nessy)

#include int main() { int t; scanf("%d", &t); while (t--) { int a, b; scanf("%d%d", &a, &b); printf("%d\n", (a /3) * (b/3) ); } return 0;}

2014-07-27 08:46:11 1646

原创 UVA 253 Cube painting

#include int dat[24][6] = {{1,2,3,4,5,6},{1,4,2,5,3,6},{1,5,4,3,2,6},{1,3,5,2,4,6}, {2,6,3,4,1,5},{2,1,4,3,6,5},{2,3,1,6,4,5},{2,4,6,1,3,5}, {3,2,6,1,5,4},{3,6,5,2,1,4},{3,1,2,5,6,4},{3,5,

2014-07-26 22:11:10 1482

原创 UVA 10025 The ? 1 ? 2 ? ... ? n = k problem

#include #include #include int main() { int t; scanf("%d", &t); while (t--) { int n, num; scanf("%d", &num); num = abs(num); n = int(sqrt(num)); while (n * (n + 1) / 2 < num) { n++

2014-07-26 19:53:05 1595

原创 UVA 10061 How many zero's and how many digits ?

#include #include const int primes[150]={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,21

2014-07-26 18:53:06 1594

原创 UVA 10110 Light, more light

#include #include int main() { long int n; while (scanf("%ld", &n), n) { if ( long(sqrt(n)) * long(sqrt(n)) == n) printf("yes\n"); else printf("no\n"); } return 0;}

2014-07-26 16:22:09 1562

原创 UVA 10250 The Other Two Trees

#include #include int main() { double x1, y1, x2, y2; double x3, y3, x4, y4; double a, b; while (scanf("%lf%lf%lf%lf", &x1, &y1, &x2, &y2) != EOF) { if (fabs(x1 - x2) < 1e-8 && fabs(y1 - y2)

2014-07-26 15:31:49 1544

原创 UVA 400 (暑假-排序、检索(2)-F- Unix ls)

#include#include#includeint cmp(const void *a,const void *b){ return strcmp((char *)a,(char *)b);}int main(){ int i,j,k,max_len,n; int h_num,l_num,num_len; char str[110][100]; while(scanf(

2014-07-26 14:25:57 1535

原创 UVA 10785 (暑假-排序、检索(2)-E-The Mad Numerologist )

#include #include #include #include using namespace std;int main() { char sound[] = {"AUEOI"}; char consonant[] = {"JSBKTCLDMVNWFXGPYHQZR"}; int t, k = 0; scanf("%d", &t); while (k++ < t

2014-07-26 14:23:29 1583

原创 UVA 123 (暑假-排序、检索(2)-B-Searching Quickly)

#include #include #include #include using namespace std;int cmp_string(const void *_a, const void *_b){ return strcmp((char*)_a, (char*)_b);}int main() { char word[55][15]; char title[210

2014-07-26 14:18:58 1755

原创 UVA 755 (暑假-排序、检索(2)-D-487--3279 )

#include #include #include #include #include using namespace std;char chan[27] = {"22233344455566677778889999"};//字符变为数字函数int change(char *str){ int sum = 0; for (int i = 0; i < strlen(s

2014-07-26 14:18:35 1474

原创 UVA 156 (暑假-排序、检索(2)-A-Ananagrams)

#include #include #include using namespace std;int cmp_char(const void *_a, const void *_b){ char *a = (char*)_a; char *b = (char*)_b; return *a - *b;}int cmp_string(const void *_a, const

2014-07-26 14:09:44 1563

原创 UVA 10050(暑期-线性表-H- Hartals)

#include int main() { int t; scanf("%d", &t); while (t--) { int day, n; scanf("%d%d", &day, &n); int arr[3700] = {0}, count = 0; for (int i = 0; i < n; i++) { int num; scanf("%d", &

2014-07-26 09:33:52 1597

原创 UVA 11111 (暑期-线性表-G- Generalized Matrioshkas)

#include #include #include using namespace std;int main() { long long arr[10000] = {0}, brr[5000][2] = {0}, n = 0; while (scanf("%lld", &arr[n]) != EOF) { if (getchar() == '\n') { int coun

2014-07-22 19:43:44 1550

原创 UVA 442 (暑期-线性表-F-Matrix Chain Multiplication)

#include #include int main() { int n, arr[30][10]; scanf("%d", &n); getchar(); //读入矩阵 for (int i = 0; i < n; i++) { char c = getchar() - 'A'; scanf("%d%d", &arr[c][0], &arr[c][1]); getch

2014-07-22 14:47:24 1575

原创 UVA 10392 (暑假-数论- G - Factoring Large Numbers)

#include #include int main() { long long num; while (scanf("%lld", &num) && num != -1) { for (long long i = 2; i <= sqrt(num); i++) while (num % i == 0) { printf(" %lld\n", i); n

2014-07-22 08:48:57 1610

GeoLite2-City.mmdb IP 数据库更新于 2022-05-23

GeoLite2 GeoIP GeoIP2

2023-06-21

AutoHotkey 中文手册

AutoHotkey 中文手册

2017-08-06

数学之美 pdf

数学之美

2017-06-29

Java性能优化指南1.4版

Java性能优化指南1.4版

2017-06-27

用Python进行自然语言处理(中文)

用Python进行自然语言处理(中文)

2017-06-27

WEKA教程完整版

WEKA 教程 数据挖掘

2017-06-19

MyEclipse2015 Stable2.0补丁

2016-09-09

空空如也

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

TA关注的人

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