
语言基础
Wenmin_Yao
这个作者很懒,什么都没留下…
展开
-
杭电1001
题目是这么描述的: Problem Description Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + … + n.Input The input will consist of...原创 2018-08-02 20:56:28 · 1843 阅读 · 0 评论 -
杭电1002
我在写这个题目的过程中,主要遇到的问题是关于内存的。算法思路是:两个字符串数组来存A和B,获得它们的长度。逆向往前,按位相加,并且再加一个进位标志flag,存入字符数组C中,并且更新flag,为更高一位的按位加法所用。加完之后,如果flag等于1,说明最后一位产生了进位,所以在最后结果的最高为是1,其他位照常一个个输出。刚开始我是这么实现的://存字符串数组A,并且统计它的长度whi...原创 2018-08-22 20:47:06 · 475 阅读 · 0 评论 -
杭电1004
题目描述: Input contains multiple test cases. Each test case starts with a number N (0 < N <= 1000) – the total number of balloons distributed. The next N lines contain one color each. The color of...原创 2018-08-27 10:34:52 · 355 阅读 · 0 评论 -
杭电1006
Problem Description The three hands of the clock are rotating every second and meeting each other many times everyday. Finally, they get bored of this and each of them would like to stay away from th...原创 2018-09-01 10:33:12 · 640 阅读 · 0 评论 -
杭电1005
Problem Description A number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n).Input The i...原创 2018-09-03 21:20:36 · 502 阅读 · 2 评论 -
matlab文件读取空格自动填充问题
要往文件里面写一个矩阵,总共三列,代码为:fid = fopen(original_out_name,'w'); [r,c]=size(original_mat); for i=1:r for j=1:c fprintf(fid,'%5f\t',original_mat(i,j)); end fprintf(fid,'\r\n'); end fclose(fid);写了之后textread读出...原创 2019-05-21 21:32:43 · 2425 阅读 · 0 评论 -
keras报错:Process finished with exit code -1073740791 (0xC0000409)
训练3D-Unet的时候,训练过程没有问题,但是在预测的时候,报了这个错误,上网查,说是显存不够。但是,我的训练batch_size是比测试batch_size大的,也就是说,训练的时候比测试是更容易出现不够的情况的。所以觉得奇怪。查了别人写的帖子,试了一些方法:隔离GPU,在代码中添加 os.environ[“CUDA_VISIBLE_DEVICES”] = “-1”指定GPU,添加...原创 2019-07-21 22:12:58 · 1286 阅读 · 0 评论 -
Python文件路径空格问题
创建文件夹的时候,后面没有加 ‘/’,到循环体中再加,报错。 predict_res_save_path = 'predict_results/' + time.strftime("%Y_%m_%d_%H_%M_%S ", time.localtime()) if not os.path.exists('predict_res_save_path'): print...原创 2019-07-21 22:17:23 · 3664 阅读 · 0 评论