上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 47 下一页
摘要: 我最后一个样例是特判过的,可以利用栈来完成这题 阅读全文
posted @ 2019-03-31 12:18 Asurudo 阅读(477) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 public: 4 string baseNeg2(int N) 5 { 6 string ss; 7 int n = N; 8 stack s; 9 int a; 10 ... 阅读全文
posted @ 2019-03-31 12:17 Asurudo 阅读(383) 评论(0) 推荐(0) 编辑
摘要: 1 class Solution 2 { 3 public: 4 vector prefixesDivBy5(vector& A) 5 { 6 vector v(A.size()); 7 int rnt = 0; 8 for(int i = 0; i< A.size()... 阅读全文
posted @ 2019-03-31 12:16 Asurudo 阅读(245) 评论(0) 推荐(0) 编辑
摘要: 可以用来估算运行时间,以及一些题目可能用到 1 :2 2 :4 3 :8 4 :16 5 :32 6 :64 7 :128 8 :256 9 :512 10 :1024 11 :2048 12 :4096 13 :8192 14 :16384 15 :32768 16 :65536 17 :1310 阅读全文
posted @ 2019-03-30 20:59 Asurudo 阅读(679) 评论(0) 推荐(0) 编辑
摘要: 1 typedef long long ll; 2 3 ll mi(ll a,ll b,ll m) 4 { 5 if(!b) 6 7 return (ll)0; 8 9 ll rnt = 1; 10 while(b>0) 11 12 { 13 if(b&0x1) 14 15 rn... 阅读全文
posted @ 2019-03-30 17:23 Asurudo 阅读(168) 评论(0) 推荐(0) 编辑
摘要: //整数分解 如400: 2 4 \n 5 2 map<int,int> prime_factor(int n) { map<int,int> res; for(int i = 2;i * i <= n;i ++) while(n % i==0) { ++res[i]; n/=i; } if(n!= 阅读全文
posted @ 2019-03-27 20:13 Asurudo 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #define pb push_back 3 #define _for(i,a,b) for(int i = (a);i = 1;i --) cout 0;) {s[++len] = inte%10;inte /= 10;}; 34 return (*this); 35 } 36 37 HP HP::operator * (const H... 阅读全文
posted @ 2019-03-27 18:02 Asurudo 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #define pb push_back 3 #define _for(i,a,b) for(int i = (a);i < (b);i ++) 4 #define INF 0x3f3f3f3f 5 6 using namespace std; 7 8 const int maxn = 5003; 9 10 long long solve(lo... 阅读全文
posted @ 2019-03-27 16:50 Asurudo 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #define pb push_back 3 #define _for(i,a,b) for(int i = (a);i < (b);i ++) 4 #define INF 0x3f3f3f3f 5 6 using namespace std; 7 8 const int maxn = 5003; 9 10 int main() 11 { 12... 阅读全文
posted @ 2019-03-27 15:41 Asurudo 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #define pb push_back 3 #define _for(i,a,b) for(int i = (a);i < (b);i ++) 4 #define INF 0x3f3f3f3f 5 6 using namespace std; 7 8 const int maxn = 5003; 9 10 int main() 11 { 12... 阅读全文
posted @ 2019-03-27 15:18 Asurudo 阅读(162) 评论(0) 推荐(0) 编辑
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 47 下一页