原题链接:

https://vjudge.net/problem/UVA-644

AC代码:

#include <bits/stdc++.h>
using namespace std;int main()
{string a[26];int t = 0;int flag = 0;int cases = 1;while (getline(cin, a[t])){if (a[t][0] == '9'){for (int i = 0; i < t; i++){for (int j = 0; j < t; j++){if (i == j)continue;int len = min(a[i].length(), a[j].length());int cnt = 0;for (int k = 0; k < len; k++){if (a[i][k] == a[j][k]){cnt++;}elsebreak;}if (cnt == len){flag = 1;}}}if (flag)cout << "Set " << cases << " is not immediately decodable" << endl;elsecout << "Set " << cases << " is immediately decodable" << endl;cases++;t = 0;flag = 0;}elset++;}return 0;
}

直接暴力

UVA-644 Immediate Decodability相关推荐

  1. UVA 644 - Immediate Decodability

    枚举. 第一次遇见: Your submission with number ***** for the problem 644 - Immediate Decodability has failed ...

  2. 644 - Immediate Decodability

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

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

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

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

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

  5. UVa Online Judge 工具網站

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

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

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

  7. uva 401.Palindromes

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

  8. 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 ...

  9. UVA 11752 超级幂

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

  10. UVa 11174 - Stand in a Line

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

最新文章

  1. SQL性能下降原因及Join查询
  2. java 枚举 或运算_Objective-C 枚举 中位运算 的使用
  3. 00600 ora 关闭oracle_ORA-00600的解决方法?
  4. 寻宝机器人科技竞赛_第19届广西青少年机器人竞赛组织工作筹备会暨广西青少年科技辅导员交流活动在贺州举行...
  5. java 错误日期转正确日期_Java日期格式转换-错误的月份
  6. ubuntu安装Linux网络配置,CentOS和Ubuntu系统简要网络配置及常用网络管理工具汇总...
  7. linux和win10运行效率,Ubuntu与Win10周年版Ubuntu Bash性能对比
  8. rcp异步多参数实例
  9. SPOJ HIGH Highways
  10. 【网络安全工程师面试合集】—黑客常用的端口及攻击方法汇总
  11. B站、字节跳动等上榜2021福布斯中国最佳雇主榜;中兴发布“5G 智能T恤”:可监测呼吸;Linux 5.13 发布|极客头条...
  12. Java基础提高学习笔记2
  13. npm run build 出错 npm: 6.5.0-next.0 should be = 3.0.0
  14. 79.iOS 设备的UI规范和iOS各控件默认高度
  15. python归并排序算法实现_排序算法之归并排序(附 Python 与 JS 实现)
  16. css3字体加粗的问题
  17. 均方误差(MSE)和均方根误差(RMSE)和平均绝对误差(MAE)
  18. 第三课:布尔逻辑与逻辑门
  19. Redis应用项目---抢红包功能(一)
  20. dlib疲劳检测_dlib库检测人脸使用方法与简单的疲劳检测应用

热门文章

  1. 数学建模英文论文写作002之Introduction引言
  2. oledb access OleDbParameter 防注入,验证用户名密码
  3. bzoj 1017 魔兽地图DotR
  4. android 悬浮窗口透明,悬浮视频窗口可调透明度_LG Optimus G Pro_手机Android频道-中关村在线...
  5. android 点击文本框,android 文本框部分文字的点击事件
  6. html5编写一个手机app的首页
  7. 计算机考证看哪种书(全了)
  8. Android APK+Dex文件反编译及回编译工具(APKDB)v.1.9.2 正式版
  9. Linux memwatch 的使用
  10. vercel+vue生成免域名静态网站