摘要: 找新朋友 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3596 Accepted Submission(s): ... 阅读全文
posted @ 2016-05-17 20:38 弃用博客 阅读(139) 评论(0) 推荐(0)
摘要: 数字N的因子就是所有比N小又能被N整除的所有正整数,如12的因子有1,2,3,4,6. 你想知道你的另一半吗? Input 输入数据的第一行是一个数字T(1#include using namespace std;#define N 500005int a[N+5];int main(){... 阅读全文
posted @ 2016-05-15 09:32 弃用博客 阅读(148) 评论(0) 推荐(0)
摘要: #include using namespace std; int main() { int j,i,k,n,m,t; int a[100002]; scanf("%d",&t); for (j=1;j maxsum) ... 阅读全文
posted @ 2016-05-14 15:49 弃用博客 阅读(98) 评论(0) 推荐(0)
摘要: #include using namespace std; int main() { int j,i,k,n,m,t; int a[100002]; scanf("%d",&t); for (j=1;j<=t;j++) { ... 阅读全文
posted @ 2016-05-14 15:21 弃用博客 阅读(103) 评论(0) 推荐(0)
摘要: 1.#include #include #include using namespace std;int main(){ char a[60]; char b[60]; int score; while(scanf("%s",a)!=EOF){ if (!s... 阅读全文
posted @ 2016-05-12 13:17 弃用博客 阅读(129) 评论(0) 推荐(0)
摘要: #include #include #include using namespace std;int main(){ int T; char s1[1010],s2[1010]; cin>>T; for(int q=1;q=l2) k=l1; else k=l... 阅读全文
posted @ 2016-05-11 23:54 弃用博客 阅读(115) 评论(0) 推荐(0)
摘要: #include #include #include using namespace std;#define N 1000char s1[N];char s2[N];int main(){ int k,i,j; int l1,l2; int a[N]={0}; int b[N]={0};... 阅读全文
posted @ 2016-05-11 21:09 弃用博客 阅读(141) 评论(0) 推荐(0)
摘要: 传送门:http://acm.split.hdu.edu.cn/showproblem.php?pid=2136 利用素数打表的筛选法 #include #include #include using namespace std; int a[1000000]; int main(... 阅读全文
posted @ 2016-05-07 01:04 弃用博客 阅读(182) 评论(0) 推荐(0)
摘要: 算是一个小技巧的水题吧,关键要画图才能明白 注意一定是首尾相连的形状情况,因为有两刀是重合的,以题目4,6为例,所以按照图中的标记全部切割是4+6-2,2是重合的切割标记数量,数学意义上是4,6的最大公约数,这样如果4人,则1+8 2+3 4+5 6+7,如果6人,则1+2 3+4 5+6...... 阅读全文
posted @ 2016-05-05 02:29 弃用博客 阅读(157) 评论(0) 推荐(0)
摘要: 1、cin 1、cin.get() 2、cin.getline() 3、getline() 4、gets() 5、getchar() 1、cin>> 用法1:最基本,也是最常用的用法,输入一个数字: #include using namespace std; main... 阅读全文
posted @ 2016-04-28 11:20 弃用博客 阅读(141) 评论(0) 推荐(0)