摘要: Co-prime Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3587 Accepted Submission(s): 1419 Proble 阅读全文
posted @ 2016-08-02 22:36 俺叫王梦涵 阅读(183) 评论(0) 推荐(1) 编辑
摘要: Problem Description Ignatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单词数量(单词本身也是自己的前缀). Input 输入数据的第一部分是一张单词表,每行一个单词,单词的长度不超过10,它们代表 阅读全文
posted @ 2016-07-31 10:16 俺叫王梦涵 阅读(131) 评论(0) 推荐(1) 编辑
摘要: A binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the left and right subtree 阅读全文
posted @ 2016-07-30 16:20 俺叫王梦涵 阅读(178) 评论(0) 推荐(0) 编辑
摘要: B. Cells Not Under Attack time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output B. Cells Not U 阅读全文
posted @ 2016-07-25 01:10 俺叫王梦涵 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Ouli 阅读全文
posted @ 2016-07-23 03:52 俺叫王梦涵 阅读(159) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; set mys; int main(){ string st; set ::iterator it; while(cin>>st) mys.insert(st); for(it=mys.begin();it!=mys.end();it++){ s... 阅读全文
posted @ 2016-07-21 03:06 俺叫王梦涵 阅读(1233) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include using namespace std; double dis[205][205]; int a[205],b[205],n; void floyd() { for(int k=1;k>n) { if(n==0) break; for(int i=1;i>a[i... 阅读全文
posted @ 2016-07-21 01:52 俺叫王梦涵 阅读(138) 评论(0) 推荐(0) 编辑
摘要: 畅通工程续 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 44889 Accepted Submission(s): 16651 Problem 阅读全文
posted @ 2016-07-21 01:31 俺叫王梦涵 阅读(242) 评论(0) 推荐(0) 编辑
摘要: Square Problem Description Given a set of sticks of various lengths, is it possible to join them end-to-end to form a square? Input The first line of 阅读全文
posted @ 2016-07-19 10:40 俺叫王梦涵 阅读(825) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { string s; cin>>s; for(int i=0;i<s.size();i++) { s[i]^=32; } cout<<s<<endl; } 阅读全文
posted @ 2016-07-18 10:28 俺叫王梦涵 阅读(284) 评论(0) 推荐(0) 编辑