会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ACBingo
Bingo的笔记本
新随笔
联系
订阅
管理
上一页
1
···
15
16
17
18
19
2014年7月28日
UVa10129,Play On Words
摘要: 给出n个单词,如果一个单词的尾和另一个单词的头字符相等,那么可以相连,问这n个单词是否可以排成一列。欧拉路应用,构图:一个单词的头尾字母分别作为顶点,每输入一个word,该word的头指向word的尾画一个有向边,并且记录每个顶点的出入度。利用dfs先判断是否为一个连通图,如果是的话则判断是否有且仅...
阅读全文
posted @ 2014-07-28 13:01 ACBingo
阅读(324)
评论(0)
推荐(0)
2014年7月26日
UVa816,Ordering Tasks,WA
摘要: #include #include #include #include #include #include #include using namespace std;const char*dirs="NESW";const char*turns="FLR";int r0,c0,dir,r1,c1,r...
阅读全文
posted @ 2014-07-26 17:45 ACBingo
阅读(317)
评论(1)
推荐(0)
2014年7月25日
UVa1225,Digit Counting
摘要: #include #include int main(){ int n; scanf("%d", &n); char s[100]; while(n--) { scanf("%s", s); int len = strlen(s); ...
阅读全文
posted @ 2014-07-25 23:17 ACBingo
阅读(463)
评论(0)
推荐(0)
UVa1586,Molar Mass
摘要: #include #include #include using namespace std;int main(){double c,h,o,n;int t,i,j;cin>>t;getchar();double ans;char s[100];while (t-->0){gets(s);c=0;h...
阅读全文
posted @ 2014-07-25 23:16 ACBingo
阅读(967)
评论(0)
推荐(0)
UVa1585 Score
摘要: #include #include #include using namespace std;int main(){ char s[100]; int i,j,n,ans; cin>>n; getchar(); while (n>0) { n--; ...
阅读全文
posted @ 2014-07-25 23:15 ACBingo
阅读(383)
评论(0)
推荐(0)
2014年7月24日
UVa12100,Printer Queue
摘要: 水题,1A过的数据才100,o(n^3)都能过,感觉用优先队列来做挺麻烦的,直接暴力就可以了,模拟的队列,没用stl#include #include #include #include #include #define maxn 100+5using namespace std;int mid[m...
阅读全文
posted @ 2014-07-24 16:20 ACBingo
阅读(425)
评论(0)
推荐(0)
UVa1595,Symmetry
摘要: 这题居然是1A过的.....最近无比失落的心情顿时愉悦起来~将数据全部读入先用二维数据来存储坐标(先把题做出来再说= =)题目中的x,y的坐标范围是-1W到1W....在数组下标里是不能用负数保存的(当然你偏用map当额没说= =),其实可以把x坐标左移1W个单位,这样最小坐标就从0开始了然后随便找...
阅读全文
posted @ 2014-07-24 14:57 ACBingo
阅读(641)
评论(0)
推荐(0)
上一页
1
···
15
16
17
18
19
公告