2018年6月25日
摘要: 题目具体描述见:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=276 C++11代码如下: 阅读全文
posted @ 2018-06-25 16:14 Pink.Pig 阅读(928) 评论(0) 推荐(0) 编辑
摘要: 详细题目描述见:https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=342 输出表: C++11代码如下: 阅读全文
posted @ 2018-06-25 14:21 Pink.Pig 阅读(261) 评论(0) 推荐(0) 编辑
  2018年6月24日
摘要: C++ 11 代码如下: 阅读全文
posted @ 2018-06-24 21:30 Pink.Pig 阅读(432) 评论(0) 推荐(0) 编辑
摘要: 问题: 在Tex中,做双引号的" `` ",右双引号是" '' "(两个回车左边的).输入一篇包含双引号的文章,你的任务是把它转换成TeX的格式。 样例输入: "To be or not to be,"quoth the Bard,"that is the question".样例输出: ``To 阅读全文
posted @ 2018-06-24 20:57 Pink.Pig 阅读(547) 评论(0) 推荐(0) 编辑
摘要: 在 n×n 方阵里填入 1,2,...n×n, 要求填成蛇形(n<=8)。例如,n=4 时方阵为: 10 11 12 1 9 16 13 2 8 15 14 3 7 6 5 4 分析:使用二维数组,并使每次填入的坐标为(x,y),按照蛇形移动坐标即可 C++代码如下: 阅读全文
posted @ 2018-06-24 17:23 Pink.Pig 阅读(297) 评论(0) 推荐(0) 编辑
  2018年6月23日
摘要: 有 n 盏灯,编号为 1~n 。第1个人把所有灯打开,第2个人按下所有编号为2的倍数的开关(这些灯将被关掉),第3个人按下所有编号为3的倍数的开关(其中关掉的灯将被打开,开着的灯将被关闭),一次类推。一共有k个人,问最后有哪些灯开着?输入n和k,输出开着的灯的编号。k<= n <=1000; 样例输 阅读全文
posted @ 2018-06-23 20:05 Pink.Pig 阅读(374) 评论(0) 推荐(0) 编辑
  2018年6月12日
摘要: 1 #include 2 #include 3 using namespace std; 4 5 void convert(vector&s, int n, int base) { 6 static char digit[] = 7 { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E 阅读全文
posted @ 2018-06-12 15:50 Pink.Pig 阅读(771) 评论(0) 推荐(0) 编辑
  2018年6月6日
摘要: 安装 tensorflow-gpu 版本后,需要安装相应的 CUDA 和 cuDNN 注意版本问题:tensorflow-gpu 1.7以及之后的版本要安装 CUDA 8.0 以上的版本,tf 1.7 之下的安装 CUDA 8.0 之下的 ,安装 cuDNN 时要根据 CUDA 的版本来选择 运行时 阅读全文
posted @ 2018-06-06 18:19 Pink.Pig 阅读(19759) 评论(0) 推荐(0) 编辑
摘要: 使用 安装完成 jupyter notebook 之后,在命令行界面输入 "jupyter notebook "指令打开时,出现错误:ModuleNotFoundError: No module named 'markupsafe._compat' 解决方法:在 markupsafe 文件夹下添加一 阅读全文
posted @ 2018-06-06 17:06 Pink.Pig 阅读(8578) 评论(0) 推荐(0) 编辑
摘要: 安装完 tensorflow 后在 PyCharm 中导入时显示找不到,可设置如下: PyCharm 中依次打开 File -> Settings -> Project:PycharmProject -> Project Interpreter ,将 Project Interpteter 选择为自 阅读全文
posted @ 2018-06-06 14:16 Pink.Pig 阅读(10643) 评论(0) 推荐(1) 编辑