文明大学生

数学公式

2019年10月7日

J - Just Terraffic! Gym - 101177J

摘要: #include #define inf 0x3f3f3f3f using namespace std; /* 一道dp题,看来自己还是需要继续努力呀 dp[i]表示的是1-i个时间,所能够完美表示的2轮的车有多少个 状态转移 满足条件 dp[i]=dp[i-2]+1 dp[i]=dp[i-3] 并且如果dp[i-2]+1!=dp[3],说明有多种情况,虽然能够分好 */ int a[3500... 阅读全文

posted @ 2019-10-07 20:52 文明大学生 阅读(177) 评论(0) 推荐(0)

A - Anticlockwise Motion Gym - 101177A

摘要: #include<bits/stdc++.h> using namespace std; /* 直接针对平方来找 每次走的是个折线 */ pair<int,int> work(int x) { int y=(int)sqrt(x*1.0+0.5); pair<int,int>ans; if(y&1&&y*y==x) { ans.first=ans.second=(-(y-1)>>1); retur 阅读全文

posted @ 2019-10-07 10:36 文明大学生 阅读(139) 评论(0) 推荐(0)

导航