
Codeforces
文章平均质量分 61
elorole
细磨专研
展开
-
Codeforces #493 div.2(A, B, C)
A.模拟#include <iostream>#include <cstdio>#include <algorithm>using namespace std;int main(){ int n, sum = 0;; int a[15], pos[1005]; scanf("%d", &am原创 2018-08-13 10:48:56 · 170 阅读 · 0 评论 -
Codeforces #495 div.2(A, B, C)
A.模拟#include <iostream>using namespace std;int n, d, ans;int a[105];int main(){ cin >> n >> d; for(int i = 1; i <= n; i++) cin>> a[i]; ans +=...原创 2018-08-13 11:02:22 · 170 阅读 · 0 评论 -
Manthan, Codefest 18 (rated, Div. 1 + Div. 2)(A,B,C, D)
比赛链接:http://codeforces.com/contest/1037 A: 题意:把n用尽可能少的划分,使得1-n的所有数都能表示出来(选的时候要么选一次,要么不选)比如6=1+2+3,这样就可以表示出1-6的所有数。 题解:这题有很多解法,但思想都是二进制。其实看n的最高位是第几位就行了,比如6(110)最高位是第3位。答案就是3。还有一种解法,本质一样,只不过可以给出具体划分方...原创 2018-09-03 16:58:19 · 369 阅读 · 0 评论 -
Codeforces Round 508(DIv.2) (A, B, C, D)
A 模拟题解: 用cnt[i][j]表示第字母i(0-25)在字符串(0-j)的出现次数。 然后枚举一下cnt[i][n-1]的最小值即可。#include <iostream>#include <cstdio>#include <cmath>#include <cstring>using namespace std;cons...原创 2018-09-07 16:29:51 · 210 阅读 · 0 评论