摘要: #include<iostream> using namespace std; int ans; void f(int dian,int hua,int jiu) { if(dian == 0 && hua == 0 && jiu == 1) ans++; if(dian > 0) f(dian - 阅读全文
posted @ 2020-03-03 22:29 恶魔岛 阅读(79) 评论(0) 推荐(0) 编辑
摘要: #include<iostream> #include<bits/stdc++.h> using namespace std; int n = 50; string add(string a,string b) { a = a.substr(a.find_first_not_of('0')); b 阅读全文
posted @ 2020-03-03 20:30 恶魔岛 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 【编写程序,输人一个大于2的自然数,然后输出小于该数字的所有素数组成的列表。】所谓素数,是指除了1和自身之外没有其他因数的自然数,最小的素数是2,后面依次是3、5、7、11、13... c++代码: #include<iostream> #include<bits/stdc++.h> #define 阅读全文
posted @ 2019-12-30 21:26 恶魔岛 阅读(1730) 评论(0) 推荐(0) 编辑
摘要: 简单抓取网页的代码 import requests#导入requests包 from bs4 import BeautifulSoup#从bs4中导入BeauifulSoup包 import re#导入正则表达式的包 r = requests.get("http://baidu.com") r.en 阅读全文
posted @ 2019-12-29 22:57 恶魔岛 阅读(1299) 评论(0) 推荐(0) 编辑
摘要: 题目描述: AC代码: #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int maxn=10005,maxm=1005; int n,m,p; int clic[maxn],uncl 阅读全文
posted @ 2019-12-27 00:13 恶魔岛 阅读(294) 评论(0) 推荐(0) 编辑
摘要: 题目描述: AC代码: #include<iostream> #define int long long using namespace std; const int N = 30; int vis[N][30],n,temp[N]; int ans = 0; string s; void dfs( 阅读全文
posted @ 2019-12-27 00:08 恶魔岛 阅读(322) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://codeforces.com/contest/1280/problem/B #include<iostream> #include<cstring> #define int long long using namespace std; const int N = 65; i 阅读全文
posted @ 2019-12-25 19:57 恶魔岛 阅读(342) 评论(0) 推荐(0) 编辑
摘要: 直接附上代码 1 #include<iostream> 2 #include<malloc.h> 3 #define int long long 4 #define maxsize 100 5 using namespace std; 6 typedef char DataType; 7 typed 阅读全文
posted @ 2019-12-15 18:11 恶魔岛 阅读(483) 评论(0) 推荐(0) 编辑
摘要: 直接附上代码,不理解请看置逆那篇,链接:https://www.cnblogs.com/biaobiao88/p/12042132.html #include<bits/stdc++.h> #define int long long using namespace std; typedef stru 阅读全文
posted @ 2019-12-15 11:01 恶魔岛 阅读(2636) 评论(1) 推荐(0) 编辑
摘要: 指针是不能直接进行异或运算的,需要将指针转换成整型int或long,在Linux系统下只能是long,因为指针在win系统占4个字节,在Linux系统占6个字节。 以下为两个指针的异或运算实现指针的交换: #include <stdio.h> int main() { int *a,*b; unsi 阅读全文
posted @ 2019-12-15 10:34 恶魔岛 阅读(957) 评论(0) 推荐(0) 编辑