随笔分类 -  比赛记录

摘要:这场和div3差不多嘛(后来发现就是div3),就是网太卡10min交一发就不错了,简直自闭。 A 签到。 B 记录每一段的字母数,满足条件即:段数相同+字母相同+字母数下>=上。 #include<bits/stdc++.h> using namespace std; const int N=1e 阅读全文
posted @ 2019-06-20 08:51 hfctf0210 阅读(445) 评论(0) 推荐(0)
摘要:A 签到(code不贴了) PS:以后cf div2A(有时还有B)和atcoder <=200分(有时<=300)的题目不再贴code,不过可能也没几次比赛记录了。 B 高精度,枚举位数最短的可能,然后计算两个即可。 #include<bits/stdc++.h> using namespace 阅读全文
posted @ 2019-06-16 22:34 hfctf0210 阅读(253) 评论(0) 推荐(0)
摘要:A 签到(a-b problem不用贴了吧,以后atcoder小于300分题均不贴代码) B 发现选择的p,q一定是其中两点间的距离,于是可以O(n2)枚举两点,再O(n2)判断,其实可以做到O(n3)不过O(n4)就够了。 #include<bits/stdc++.h> using namespa 阅读全文
posted @ 2019-06-16 08:53 hfctf0210 阅读(173) 评论(0) 推荐(0)
摘要:A 签到 #include<bits/stdc++.h> using namespace std; char s[200002]; int n,a[20]; int main() { scanf("%s",s+1); n=strlen(s+1); for(int i=1;i<=n;i++)a[s[i 阅读全文
posted @ 2019-06-15 11:30 hfctf0210 阅读(230) 评论(0) 推荐(0)
摘要:AB 签到(A过水已隐藏) #include<bits/stdc++.h> using namespace std; const int N=505; int n,m,vis[N][N]; char mp[N][N]; int main() { scanf("%d%d",&n,&m); for(in 阅读全文
posted @ 2019-06-12 09:38 hfctf0210 阅读(264) 评论(0) 推荐(0)
摘要:ABCD 签到(A、B、C过水已隐藏) #include<bits/stdc++.h> using namespace std; const int N=2003; int n,m,ans,f1[N][N],f2[N][N],f3[N][N],f4[N][N]; char mp[N][N]; int 阅读全文
posted @ 2019-06-09 22:17 hfctf0210 阅读(400) 评论(0) 推荐(0)
摘要:A 太难了,一半时间刚这题还没做出来,简直自闭了。实际上分两种情况,一种很简单直接放,另一种就是要0,0,…,0,1,2,…,n,然后直接贪心,显然我是把情况判断错误一直没调出来。 #include <bits/stdc++.h> using namespace std; const int N=2 阅读全文
posted @ 2019-06-08 10:39 hfctf0210 阅读(314) 评论(0) 推荐(0)
摘要:要是有题目FST了就重新写 A 签到 #include<bits/stdc++.h> using namespace std; int T; long long n,k,ans; int main() { cin>>T; while(T--) { cin>>n>>k,ans=0; while(n) 阅读全文
posted @ 2019-06-06 09:58 hfctf0210 阅读(318) 评论(0) 推荐(0)
摘要:网太卡只好做划水选手,只做EF。 E 很容易发现第一个数是2k或者是3*2k-1,因为消去因子次数要尽可能多,然后可以直接dp一发转移还剩几个2/3即可,写起来有些麻烦 #include<bits/stdc++.h> using namespace std; const int N=1e6+7,mo 阅读全文
posted @ 2019-06-05 09:47 hfctf0210 阅读(161) 评论(0) 推荐(0)
摘要:A 签到,开long long(不开也pp不了) #include<bits/stdc++.h> using namespace std; long long a,b,ans; int main() { cin>>a>>b>>ans;ans*=2; if(a==b)ans+=a*2; else an 阅读全文
posted @ 2019-06-02 09:07 hfctf0210 阅读(309) 评论(2) 推荐(0)
摘要:AB 签到(A就是ans=180(n-2)所以不放code了) #include<bits/stdc++.h> using namespace std; int n,ans; char s[100001]; int main() { scanf("%s",s+1); n=strlen(s+1),an 阅读全文
posted @ 2019-06-02 08:54 hfctf0210 阅读(212) 评论(0) 推荐(0)
摘要:因为本人rating太低,这场比赛还要记rating就来划水了,果然垫底了。 6题都很水,于是头一次在网赛中AK,不过由于网卡+手速太慢还是成功垫底。 ABE 签到。不贴代码了,因为A考察字符串读入和for循环;B考察if语句的使用;E为这场CF的C题原题 C 枚举掷骰子掷到的点数,然后再暴力搜需要 阅读全文
posted @ 2019-05-19 22:09 hfctf0210 阅读(342) 评论(0) 推荐(0)
摘要:A 签到 #include<bits/stdc++.h> using namespace std; int T,n; char s[10001]; int main() { scanf("%d",&T);while(T--) { scanf("%d",&n); scanf("%s",s+1); in 阅读全文
posted @ 2019-05-16 17:36 hfctf0210 阅读(324) 评论(2) 推荐(0)
摘要:A 签到贪心题,特判了n=1或m=1的情况才发现2<=n,m<=1e5 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N=1e5+7; int n,m; ll ans,a[N],b[N]; i 阅读全文
posted @ 2019-05-15 08:20 hfctf0210 阅读(265) 评论(0) 推荐(0)
摘要:AB 签到(A是a-b problem就不放code了) #include<bits/stdc++.h> using namespace std; int r,g,b,n,ans; int main() { cin>>r>>g>>b>>n; for(int i=0;i*r<=n;i++) for(i 阅读全文
posted @ 2019-05-11 22:45 hfctf0210 阅读(349) 评论(2) 推荐(1)
摘要:A 签到,然而手残WA了一发,不过加上50分名次不变。 #include<bits/stdc++.h> using namespace std; int n,m; int main() { scanf("%d%d",&n,&m); m=n-m; if(m==n)printf("1"); else i 阅读全文
posted @ 2019-05-10 08:03 hfctf0210 阅读(174) 评论(0) 推荐(0)
摘要:为什么ABC那么多?建议Atcoder多出些ARC/AGC,好不容易才轮到AGC…… A 签到。就是以黑点为源点做多元最短路,由于边长是1直接bfs就好了,求最长路径。 #include<bits/stdc++.h> using namespace std; const int N=1007,dx[ 阅读全文
posted @ 2019-05-05 13:50 hfctf0210 阅读(353) 评论(0) 推荐(0)
摘要:什么垃圾比赛,A题说的什么鬼楞是没看懂。就我只会BD(其实C是个大水题二分),垃圾游戏,技不如人,肝败吓疯,告辞,口胡了E就睡觉了。 B 很容易发现,存在一种方案,使得相同字母连在一起,然后发现,当字母出现种类数大于等于4时,可以奇偶性相间地连接,然后讨论种类数<=3的:种类数为1,显然直接输出;种 阅读全文
posted @ 2019-05-01 23:49 hfctf0210 阅读(233) 评论(0) 推荐(0)
摘要:A 容易发现i,i+1至少有一个数出现,于是可以让尽量多的2和奇数出现 #include<bits/stdc++.h> using namespace std; int n,s1,s2; int main() { scanf("%d",&n); for(int i=1,x;i<=n;i++) { s 阅读全文
posted @ 2019-04-30 13:47 hfctf0210 阅读(294) 评论(0) 推荐(0)
摘要:A 签到 #include<bits/stdc++.h> using namespace std; int n,m,s[2],t[2],ans; int main() { scanf("%d%d",&n,&m); for(int i=1,x;i<=n;i++)scanf("%d",&x),s[x&1 阅读全文
posted @ 2019-04-25 08:22 hfctf0210 阅读(222) 评论(0) 推荐(0)