摘要: //c++中int转为string #include <iostream>#include <string>using namespace std;int main(){ int i,j,k; string s(""); char *temp = new char; sprintf(temp,"%d",1234); s += string(temp); cout<<s<<endl; cout<<s[0]<<" "<<s[1]<<" 阅读全文
posted @ 2012-09-04 22:52 加拿大小哥哥 阅读(501) 评论(0) 推荐(0) 编辑
摘要: Leftmost DigitTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 8550 Accepted Submission(s): 3296Problem DescriptionGiven a positive integer N, you should output the leftmost digit of N^N.InputThe input contains several test cases. The first line of 阅读全文
posted @ 2012-09-04 22:06 加拿大小哥哥 阅读(512) 评论(0) 推荐(0) 编辑
摘要: 前m大的数Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5596 Accepted Submission(s): 1986Problem Des... 阅读全文
posted @ 2012-09-04 12:36 加拿大小哥哥 阅读(493) 评论(0) 推荐(0) 编辑
摘要: TroubleTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2961 Accepted Submission(s): 893Problem DescriptionHassan is in trouble. His mathematics teacher has given him a very difficult problem called 5-sum. Please help him.The 5-sum problem is defi 阅读全文
posted @ 2012-09-04 08:55 加拿大小哥哥 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Regular PolygonTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65768/65768 K (Java/Others)Total Submission(s): 2515 Accepted Submission(s): 782Problem DescriptionIn a 2_D plane, there is a point strictly in a regular polygon with N sides. If you are given the distances between it and N vertexes 阅读全文
posted @ 2012-09-04 08:19 加拿大小哥哥 阅读(332) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示