摘要: 1 #include 2 using namespace std; 3 4 void sepreate(int m, int a[]){ 5 a[0]=0; 6 int i=1; 7 while(m){ 8 a[i++]=m%10; 9 m/=10; 10 a[0]++; 11 } 12 } ... 阅读全文
posted @ 2018-11-21 16:23 nefuer 阅读(172) 评论(0) 推荐(0)
摘要: 1 #include 2 using namespace std; 3 4 5 int main(){ 6 int n; 7 vector a; 8 cin>>n; 9 for(int i=0; i>x; 12 a.push_back(x); 13 } 14 sort(a.begin(), a.end());... 阅读全文
posted @ 2018-11-21 10:09 nefuer 阅读(105) 评论(0) 推荐(0)
摘要: 1 #include 2 using namespace std; 3 4 string xtob(char x) { 5 switch(x) { 6 case '0': 7 return "0000"; 8 case '1': 9 return "0001"; 10 c... 阅读全文
posted @ 2018-11-21 10:07 nefuer 阅读(172) 评论(0) 推荐(0)
摘要: 1 #include 2 using namespace std; 3 4 5 int main() { 6 long long n; 7 scanf("%x", &n); 8 cout<<n; 9 10 } 阅读全文
posted @ 2018-11-21 10:06 nefuer 阅读(128) 评论(0) 推荐(0)
摘要: 1 #include 2 using namespace std; 3 4 string btox(string b){ 5 if(b=="0000") return "0"; 6 if(b=="0001") return "1"; 7 if(b=="0010") return "2"; 8 if(b=="0011") return "3";... 阅读全文
posted @ 2018-11-21 10:05 nefuer 阅读(244) 评论(0) 推荐(0)
摘要: 1 #include 2 using namespace std; 3 4 int main(){ 5 int n; 6 cin>>n; 7 vector res; 8 for(int i=1; i<10; i++){ 9 for(int j=0; j<10; j++){ 10 for(int k=0... 阅读全文
posted @ 2018-11-21 10:02 nefuer 阅读(132) 评论(0) 推荐(0)
摘要: #include #include using namespace std; int myAtoi(string str) { string s=""; int result; bool flag=true; for(int i=0; i= '0' && str[i] > Int; char st[1000000]; for(int j=0; ... 阅读全文
posted @ 2018-11-12 21:51 nefuer 阅读(333) 评论(0) 推荐(0)
摘要: 求下面方程的 一个根: 根:f(x) = x 3 -5x 2 +10x-80 = 0。若求出的根是 若求出的根是a ,则要求 |f(a)| <= 10 -6 阅读全文
posted @ 2018-11-06 08:47 nefuer 阅读(130) 评论(0) 推荐(0)
摘要: 1 int binarySearch(int a[], int size, int p) { 2 int L = 0;//左端点 3 int R = size - 1;//右端点 4 int result = -1; 5 while( L a[L]) { 10 L = C + 1; 11 }else { 12 ... 阅读全文
posted @ 2018-11-05 09:00 nefuer 阅读(90) 评论(0) 推荐(0)
摘要: #include #include using namespace std; void Merge(int a[], int low , int mid, int high){ int i = low; int j = mid+1; int k = 0; int *temp = (int *)malloc((high -low +3) *sizeof(int));... 阅读全文
posted @ 2018-06-05 17:06 nefuer 阅读(135) 评论(0) 推荐(0)