枚举。

第一次遇见:

Your submission with number ***** for the problem 644 - Immediate Decodability has failed with verdict .

/*644 - Immediate Decodability
*/
# include <cstdio>
# include <cstring>int n;
char s[10][15];bool in(char *p, char *t)
{for (int i = 0; p[i]; ++i)if (!t[i] || p[i] != t[i]) return false;return true;
}int main()
{freopen("in.txt", "r", stdin);freopen("out.txt", "w", stdout);int T = 0;n = 0;while (~scanf("%s", s[n])){while (strcmp(s[n], "9"))scanf("%s", s[++n]);printf("Set %d", ++T);bool ok = true;for (int i = 0; i < n; ++i)for (int j = i+1; j < n; ++j){if (in(s[i], s[j]) || in(s[j], s[i])){ok = false;break;}}n = 0;puts(ok ? " is immediately decodable":" is not immediately decodable");}return 0;
}

/**/

转载于:https://www.cnblogs.com/JMDWQ/archive/2012/08/02/2620158.html

UVA 644 - Immediate Decodability相关推荐

  1. 644 - Immediate Decodability

    题目http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...

  2. 提取了下刘汝佳推荐的题号...

    今天闲来没事上uva oj提取了下刘汝佳推荐的acm题号,原始数据如下: Volume 0. Getting Started    10055 - Hashmat the Brave Warrior ...

  3. 初学者acm的练习题指南

    上机练习题参考题 忘了在哪找的啦~~希望对大家有帮助呦 <!--[if !supportLists]-->1.    <!--[endif]-->Programming Bas ...

  4. UVa Online Judge 工具網站

    UVa Online Judge 工具網站 转自http://www.csie.ntnu.edu.tw/~u91029/uva.html Lucky貓的ACM園地,Lucky貓的 ACM 中譯題目 M ...

  5. [搜索]UVa 129 困难的串

    题意:将一个包含两个相邻的重复子串的子串,称为"容易的串",其他为"困难的串". 输入正整数n和l,输出由前l个字符组成的,字典序第n小的困难的串. 输入样例: ...

  6. uva 401.Palindromes

    题目链接:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem ...

  7. Uva 3767 Dynamic len(set(a[L:R])) 树套树

    Dynamic len(set(a[L:R])) Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 https://uva.onlinejudge.org/in ...

  8. UVA 11752 超级幂

    UVA 11752 超级幂 Z - The Super Powers Time Limit:1000MS     Memory Limit:0KB     64bit IO Format:%lld & ...

  9. UVa 11174 - Stand in a Line

    http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&p ...

最新文章

  1. sklearn中的xgboost_xgboost来了
  2. 安装eclipse的maven插件
  3. AutoML简要概述
  4. python 对输入的单词进行字典排序_Python-对字典进行排序
  5. java常见_关于Java的常见误解
  6. 贵州:值得做好“水”文章
  7. 每天CookBook之Python-048
  8. 串口通信中接收数据时延迟处理与缓存处理的解决方案(C#)
  9. python怎么画出好看的统计图_python数据可视化之如何用matplotlib画出漂亮美观的趋势图...
  10. 关于中国男女的一些私密数据......
  11. 函数 strncpy、strncat、strncmp、strrchr 的实现
  12. js 实现 间隙滚动效果
  13. linux表白程序源码,程序员表白程序,开放源码在此!
  14. 傅立叶变换系列(二)傅立叶级数
  15. 010 Editor修改指令
  16. C# .net 集合-并发处理之文件读写处理
  17. 剪不断,理还乱——UML的四种关系
  18. 金山卫士开源软件之旅(十) KSafeMainproject的分析 1
  19. 高级项目管理师论文写作要点参考
  20. 多语言的测试注意事项

热门文章

  1. linux内核进程抢占,Re: Linux中进程能否被抢占
  2. redis常用命令getex_Redis常用命令
  3. win10计算机管理如何分区,windows10如何对电脑硬盘进行分区
  4. mysql脚本中如何写判断_mysql中如何写判断语句
  5. 华为户外模式怎么设置_华为FreeLace Pro降噪器效果怎么样?降噪开启和设置教程!...
  6. java字符串相关知识
  7. 长短期记忆网络_科研成果快报第181期:改进的长短期记忆网络用于长江上游干支流径流预测...
  8. woe分析_WOE和IV
  9. c语言求最后一个单词的长度,试题2:计算字符串最后一个单词的长度
  10. python汇总数据的程序_Python数据处理常用程序模块汇总