2016年12月24日
摘要: /* 1293. 3n+1数链问题 Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description 在计算机科学上,有很多类问题是无法解决的,我们称之为不可解决问题。然而,在很多情况我们并不知道哪一类问题可以解决,那一类问题不可解决。现 阅读全文
posted @ 2016-12-24 10:44 任我主宰 阅读(209) 评论(0) 推荐(0) 编辑
  2016年12月21日
摘要: #include<stack>#include<iostream>#include<queue>#include<string>#include<iomanip> using namespace std;bool visited[100]; //判断是否被访问过 bool searched[100] 阅读全文
posted @ 2016-12-21 15:26 任我主宰 阅读(216) 评论(0) 推荐(0) 编辑
  2016年11月26日
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 bool isoptr(char ch) { 7 if(ch == '+' || ch == '-' || ch == '*' || ch == '/' || ch == '^' || ch == 's' || ch =... 阅读全文
posted @ 2016-11-26 21:55 任我主宰 阅读(395) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int main(){ 7 int t; 8 cin>>t; 9 while(t--){ 10 int n; 11 cin>>n; 12 int a[n]; 13 ... 阅读全文
posted @ 2016-11-26 11:04 任我主宰 阅读(220) 评论(0) 推荐(0) 编辑
  2016年11月13日
摘要: 1 /*本篇为转载,在此申明,具体就是先设定从2以后所有的数都为质数,定为质数的数的倍数则不是质数,慢慢排除后面的数*/ 2 3 4 5 #include 6 #include 7 using namespace std; 8 const int N = 1300000;//第10万个数为1299709 9 int prime[N]; 10 bool notPrim... 阅读全文
posted @ 2016-11-13 22:14 任我主宰 阅读(316) 评论(0) 推荐(0) 编辑
  2016年11月2日
摘要: 1 /* 2 对于题目多读几遍,然后再关键字排序的时候,把对应的数组序号也排序, 3 EYDE 4 MBLR 5 THAN 6 MEKT 7 ETOE 8 EOTH 9 10 MEETME 11 BYTHEO 12 LDOAKT 13 REENTH 14 15 16 */ 17 #... 阅读全文
posted @ 2016-11-02 23:36 任我主宰 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 1 // Problem#: 1007 2 // Submission#: 4893204 3 // The source code is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License 4 // URI: http://creativecommons.or... 阅读全文
posted @ 2016-11-02 21:24 任我主宰 阅读(117) 评论(0) 推荐(0) 编辑
  2016年10月26日
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 int GetNum(string s){ 8 string ss; 9 ss = s; 10 int len = ss.length(); 11 int sum = 0; 12 in... 阅读全文
posted @ 2016-10-26 00:38 任我主宰 阅读(189) 评论(0) 推荐(0) 编辑
  2016年10月23日
摘要: 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int GetNum(string s){ 7 string ss; 8 ss = s; 9 int len = ss.length(); 10 int sum = 0; 11 int count=0; ... 阅读全文
posted @ 2016-10-23 14:32 任我主宰 阅读(238) 评论(0) 推荐(0) 编辑
  2016年10月22日
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 class Rational 7 { 8 public: 9 Rational(); 10 Rational(long numerator, long denominator); 11 long getNumerator()... 阅读全文
posted @ 2016-10-22 14:04 任我主宰 阅读(150) 评论(0) 推荐(0) 编辑