09 2011 档案

各种排列组合的代码
摘要:一.产生类循环排列输入样例3 2输出样例0 0 00 0 10 1 00 1 11 0 01 0 11 1 01 1 1#include <iostream> #include <ctime> using namespace std ; int A[100] ; void Print_permutation(int n, int *A , int cur) { int i , j ; if (cur == n) { /*for (i = 0 ; i < n ; ++ i) { cout << A[i] << " " ; 阅读全文

posted @ 2011-09-17 00:52 evilying 阅读(2871) 评论(0) 推荐(0)

UVA Where's Waldorf? 暴力string搜索
摘要:Where's Waldorf? Given a m by n grid of letters, ( ), and a list of words, find the location in the grid at which the word can be found. A word matches a straight, uninterrupted line of letters in the grid. A word can match the letters in the grid regardless of case (i.e. upper and lower case le 阅读全文

posted @ 2011-09-16 14:26 evilying 阅读(297) 评论(0) 推荐(0)

401 Palindromes
摘要:PalindromesA regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA"is a palindrome because it is the same when the string is read from left to right as when the string is read from right to left.A mirrored string is a 阅读全文

posted @ 2011-09-13 15:20 evilying 阅读(491) 评论(0) 推荐(0)

c++按位操作符
摘要:c++按位操作符顾名思义,按位运算符允许按照位来操作整型变量。可以把按位运算符应用于任意signed和unsigned整型,包括char类型。但是,它们通常应用于不带符号的整型。这些运算符的一个常见应用是在整型变量中使用单个的位存储信息。例如标记,它用于描述二进制状态指示符。可以使用一个位来描述有两个状态的值:开或关、男或女,真或假。也可以使用按位运算符处理存储在一个变量中的几个信息项。例如,颜色值常常记录为三个八位值,分别存储颜色中红、绿和蓝的强度。这些常常保存到四字节变量中的三个字节。第四个字节也不会浪费,包含表示颜色透明度的值。显然,要处理各个颜色成分,需要从变量中分离出各个字节,按位运 阅读全文

posted @ 2011-09-11 20:10 evilying 阅读(1147) 评论(0) 推荐(0)

ACM题目难度分级列表
摘要:#IDTitleSolved byDifficulty1100The 3n + 1 problem2648512102Ecological Bin Packing106082310071Back to High School Physics95543410055Hashmat the Brave Warrior943235272TEX Quotes819236458The Decoder728947136Ugly Numbers67294810038Jolly Jumpers63194910035Primary Arithmetic626841010018Reverse and Add6061 阅读全文

posted @ 2011-09-11 19:15 evilying 阅读(5437) 评论(0) 推荐(0)

Android 对话框(Dialog)大全
摘要:Activities提供了一种方便管理的创建、保存、回复的对话框机制,例如onCreateDialog(int), onPrepareDialog(int, Dialog), showDialog(int), dismissDialog(int)等方法,如果使用这些方法的话,Activity将通过getOwnerActivity()方法返回该Activity管理的对话框(dialog). onCreateDialog(int):当你使用这个回调函数时,Android系统会有效的设置这个Activity为每个对话框的所有者,从而自动管理每个对话框的状态并挂靠到Activity上。这样,每个对话. 阅读全文

posted @ 2011-09-08 10:42 evilying 阅读(213) 评论(0) 推荐(0)

导航