
数论
文章平均质量分 63
YANGHONG_WA
这个作者很懒,什么都没留下…
展开
-
CodeChef FEB16 数组
CodeChef FEB16 数组 Chef has an array A consisting of N integers (1-based indexing). He asks you to perform the following operation M times: for i = 2 to N: Ai = Ai + Ai-1 Your task is原创 2016-09-23 12:23:32 · 394 阅读 · 0 评论 -
Intel Code Challenge Final Round (Div. 1 + Div. 2, Combined)
因为C题卡住了,这次炸了.我以为模拟肯定T了,所以就写了拓展欧几里得.然后就被欧几里得坑了.用拓展欧几里得做,要把横向和纵向运动分开.x轴: f(x)=t%2n,2n−t%2n f(x)=t\%2n,2n-t\%2n y轴: f(x)=t%2m,2m−t%2m f(x)=t\%2m,2m-t\%2m 然后把这两个公式展开一下,在拓展欧几里得求一下就完事了.(调试出翔)#include <cs原创 2016-10-17 09:40:57 · 351 阅读 · 0 评论