上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
摘要: 创建一个项目。Tab继承自TabActivity.main.xml: Tab.classpackage com.example.Tab;import android.app.TabActivity;import android.graphics.Color;import android.os.Bundle;import android.view.LayoutInflater;import android.widget.TabHost;import android.widget.Toast;public class Tab extends TabAc... 阅读全文
posted @ 2013-07-17 15:25 Norcy 阅读(3003) 评论(0) 推荐(0) 编辑
摘要: 用惯了Eclipse,再来使用IntelliJ IDEA真是很难适应。设置1:字体修改IDE的字体:设置-Appearance-Look and Feel-OverRide设置你想要的字体。我设置的【微软雅黑】。修改编辑器的字体(也就是代码的字体):设置-Editor-Color&Font,默认的scheme是不可以更改的,你需要save as,建立一个新的(名字可以随意写个,My Font)。修改控制台的字体:跟编辑器字体在项目栏的一列上,如图设置2:修改tab键和编辑器的光标位置,IntelliJ IDEA默认时,光标是可以随意放置的,用惯了Eclipse的人会觉得很不方便。修改光 阅读全文
posted @ 2013-07-15 00:48 Norcy 阅读(514) 评论(0) 推荐(0) 编辑
摘要: uva 10494 - If We Were a Child AgainIf We Were a Child AgainInput:standard inputOutput:standard outputTime Limit:7seconds“Oooooooooooooooh!If I could do the easy mathematics like my school days!!I can guarantee, that I’d not make any mistake this time!!”Says a smart university student!!But his teach 阅读全文
posted @ 2013-07-13 16:00 Norcy 阅读(822) 评论(0) 推荐(0) 编辑
摘要: uva748 - ExponentiationExponentiationProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many computer systems.This problem requires that you write a program to compute the e 阅读全文
posted @ 2013-07-12 15:05 Norcy 阅读(469) 评论(0) 推荐(0) 编辑
摘要: uva 465 - OverflowOverflowWrite a program that reads an expression consisting of two non-negative integer and an operator. Determine if either integer or the result of the expression is too large to be represented as a ``normal'' signed integer (typeintegerif you are working Pascal, typeinti 阅读全文
posted @ 2013-07-12 14:23 Norcy 阅读(987) 评论(0) 推荐(0) 编辑
摘要: /*1.高精度加法2.高精度减法 3.高精度乘法 4.高精度除以低精度 5.高精度对低精度的取余 必要时可以将全局的int替换成long long.除了main函数的返回值int用到除法和取余的时候可能需要把全局的int替换成long long */#include #include #include #include using namespace std;#define maxn 30000struct bign{ int len, s[maxn]; bign() { memset(s, 0, sizeof(s)); len = 1; }... 阅读全文
posted @ 2013-07-12 14:12 Norcy 阅读(459) 评论(0) 推荐(0) 编辑
摘要: uva 694 - The Collatz Sequence这道题值得一提的是,用int会超出运算范围,所以while里面会陷入死循环而超时。故要用long long.顺便地,int 范围差不多在 2,000,000,000 二十亿左右,看测试数据都知道超int了。/*这道题值得一提的是,用int会超出运算范围,所以while里面会陷入死循环而超时。故要用long long.顺便地,int 范围差不多在 2,000,000,000 二十亿左右,看测试数据都知道超int了。 */#include #include using namespace std;int main(){ long l... 阅读全文
posted @ 2013-07-12 02:36 Norcy 阅读(419) 评论(0) 推荐(0) 编辑
摘要: uva414 - Machined Surfaces/*水题,值得一提的是,getline使用时注意不能让它多吃回车键,处理方法可以用getchar。 */#include #include #include using namespace std;int main(){ int n; while (cin >> n, n) { getchar(); //第一个回车键会被getline拿去,所以要用getchar处理这个回车 定义在cstdio string s[n]; int blac... 阅读全文
posted @ 2013-07-11 22:50 Norcy 阅读(310) 评论(0) 推荐(0) 编辑
摘要: uva 490 - Rotating Sentences很奇葩的一个题目,题意有多不清楚我就不说了,题目很简单,但是坑很多,一个比一个大,具体可以百度之,但是……同样思路的代码别人AC了我却WA,慢慢一步一步比较之后,才发现这题目(还是uva这个古老的OJ?)的奇葩之处。网上的代码怎么尼玛的都是用一个数组去存储字符串的长度呢?虽然说会比较省时,但是我直接用string的size()函数怎么就错了呢!!!这个是AC的代码#include #include using namespace std;int main(){ string s[102]; int index = 0, max... 阅读全文
posted @ 2013-07-11 22:18 Norcy 阅读(571) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;int main(){ int a; cin >> a; assert(a>0); //assert,a>0时没问题,a<=0时 程序抛出异常 cout << a << endl; system("pause");} 阅读全文
posted @ 2013-07-10 23:55 Norcy 阅读(205) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页