摘要: "扫雷问题" cpp include include include using namespace std; int direct[8][2]={ {1,0}, {1,1}, {1, 1}, {0,1}, {0, 1}, { 1,0}, { 1,1}, { 1, 1} }; int main(){ 阅读全文
posted @ 2019-01-23 21:24 A-Little-Nut 阅读(194) 评论(0) 推荐(0) 编辑
摘要: "3n+1问题" cpp include include include using namespace std; map visited; int getlen(int n){ if(visited[n]==0) visited[n]=(n%2==0?1+getlen(n/2):1+getlen( 阅读全文
posted @ 2019-01-23 21:23 A-Little-Nut 阅读(175) 评论(0) 推荐(0) 编辑
摘要: "10进制转16进制" cpp include include using namespace std; int main(){ long long int n; cin n; cout 阅读全文
posted @ 2019-01-23 21:22 A-Little-Nut 阅读(237) 评论(0) 推荐(0) 编辑
摘要: "16进制转10进制" cpp include using namespace std; int main(){ long long int n; cin hex n; cout 阅读全文
posted @ 2019-01-23 21:20 A-Little-Nut 阅读(119) 评论(0) 推荐(0) 编辑
摘要: "16进制转为8进制" cpp include include using namespace std; int main(){ int n; cin n; for(int j=0; j s; for(int i=0; i 阅读全文
posted @ 2019-01-23 21:20 A-Little-Nut 阅读(206) 评论(0) 推荐(0) 编辑
摘要: "数列排序" cpp include include include using namespace std; int main(){ int n; cin n; vector vi(n, 0); for(int i=0; i vi[i]; sort(vi.begin(), vi.end()); f 阅读全文
posted @ 2019-01-23 21:19 A-Little-Nut 阅读(156) 评论(0) 推荐(0) 编辑
摘要: "特殊回文数" cpp include include using namespace std; int main(){ int n; cin n; if(n=0){ int t=a 10000+b 1000+c 100+b 10+a; cout 阅读全文
posted @ 2019-01-23 21:18 A-Little-Nut 阅读(167) 评论(0) 推荐(0) 编辑
摘要: "A+B问题" cpp include using namespace std; int main(){ int a, b; cin a b; cout 阅读全文
posted @ 2019-01-23 21:17 A-Little-Nut 阅读(170) 评论(0) 推荐(0) 编辑
摘要: "Fibonacci数列" cpp include using namespace std; int main(){ int a=1, b=1, n; cin n; if(n 阅读全文
posted @ 2019-01-23 21:16 A-Little-Nut 阅读(180) 评论(0) 推荐(0) 编辑
摘要: "圆的面积" cpp include include using namespace std; double pi=3.14159265358979323; //注意精度 int main(){ int r; cin r; cout 阅读全文
posted @ 2019-01-23 21:15 A-Little-Nut 阅读(157) 评论(0) 推荐(0) 编辑
摘要: "序列求和" cpp include using namespace std; int main(){ long long int n; cin n; cout 阅读全文
posted @ 2019-01-23 21:05 A-Little-Nut 阅读(151) 评论(0) 推荐(0) 编辑
摘要: ``` include include using namespace std; int main() { // int 转 string int number = 12; string str; stringstream ss; ss str; cout num; cout 阅读全文
posted @ 2019-01-23 20:39 A-Little-Nut 阅读(1060) 评论(0) 推荐(0) 编辑