上一页 1 2 3 4 5 6 7 8 ··· 19 下一页
摘要: 阶乘求和 只要后9位的话,那就只考虑后9位! 如何只算后9位?有一个很经典的运算:取模。 回想入门c语言时做过一道题,给定三位数,要求进行数字翻转。 比如给定n,n=123,要翻转成321。 一个做法是令a1=n%10,a2=(n%100)/10,a3=n/100 输出a1*100+a2*10+a3 阅读全文
posted @ 2024-03-08 23:12 liyishui 阅读(34) 评论(0) 推荐(0)
摘要: 题意: 这道题第一眼咋看以为是图论,但是要抽象成图论的话就会变成: 给定一个无向图,要求对点染色,使得任意相邻点之间颜色不能相同,试问最少的颜色数是多少? 发现转化成图论后好像也没有什么图论算法可以解决,这个转化不是很有效。 往往不知道怎么下手时可以试着考虑极端情况,比如考虑上界/下界,答案很小会怎 阅读全文
posted @ 2024-03-07 22:19 liyishui 阅读(36) 评论(0) 推荐(0)
摘要: A. Entertainment in MAC 这道没细看题意,挺困的,猜了一下.. 观察到n是偶数且很大,但是样例的长度却没有很长。 而且长度越长对字典序容易越大,所以猜测只复制一次。 从样例找规律:如果字符串s比翻转后的字符串s'小,则原样输出;否则进行翻转,再复制一次。 代码: #includ 阅读全文
posted @ 2024-03-06 01:16 liyishui 阅读(186) 评论(0) 推荐(0)
摘要: 问题一: 报错: /usr/bin/ld: /usr/local/lib/libprotobuf.a(arena.cc.o): relocation R_X86_64_TPOFF32 against symbol `_ZN6google8protobuf8internal9ArenaImpl13th 阅读全文
posted @ 2024-02-03 02:16 liyishui 阅读(452) 评论(0) 推荐(0)
摘要: 系统:win10 目的:想跑一下wisper.cpp 前置操作:把该项目git下来后打算make,一make就报错 注意,图里其实有两种错误,第一种是process_begin: CreateProcess(NULL,xxx) failed,第二种是error:'thread' is not a m 阅读全文
posted @ 2024-02-02 14:03 liyishui 阅读(2457) 评论(0) 推荐(0)
摘要: 倒叙讲题预警() 传送门:https://codeforces.com/contest/1925 D.Good Trip 题意:有n个小盆友,其中m对是好盆友,每队好盆友有友谊度fi。老师要举办k次远足,每次挑一对小盆友去,被挑到的小盆友友谊值+1。如果一对儿童不是朋友,那么他们的友谊值为0,在以后 阅读全文
posted @ 2024-01-28 17:11 liyishui 阅读(62) 评论(0) 推荐(0)
摘要: layout: ../../layouts/MarkdownPostLayout.astro title: 'Educational Codeforces Round 152 (Rated for Div. 2)' pubDate: 2024-01-11 description: '一些训练' au 阅读全文
posted @ 2024-01-11 23:25 liyishui 阅读(23) 评论(0) 推荐(0)
摘要: layout: ../../layouts/MarkdownPostLayout.astro title: 'MIT6.828 Lab1-1(分析boot.S文件)' pubDate: 2024-01-10 description: 'something about 6.828' author: ' 阅读全文
posted @ 2024-01-10 21:10 liyishui 阅读(65) 评论(0) 推荐(0)
摘要: layout: ../../layouts/MarkdownPostLayout.astro title: '记一次失败的CS144 Lab0尝试' pubDate: 2024-01-03 至 2024-01-07 description: 'something about 6.828' autho 阅读全文
posted @ 2024-01-07 23:56 liyishui 阅读(120) 评论(0) 推荐(0)
摘要: layout: ../../layouts/MarkdownPostLayout.astro title: '记一次失败的CS144 Lab0尝试' pubDate: 2024-01-03 至 2024-01-07 description: 'something about 6.828' autho 阅读全文
posted @ 2024-01-07 22:49 liyishui 阅读(114) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 19 下一页