CodeForces专题提供CodeForces的最新资讯内容,帮你更好的了解CodeForces。
http://codeforces.com/contest/887/problem/B A 给定一个二进制数,问可否去掉一些数字,使其为64的倍数。 转化为只需要计算以某个1为开头,后面的0可否等于或者超过6个即可 #include <bits/stdc++.h> using namespace std; /* */ string s; int main() { cin>>s; boo
http://codeforces.com/contest/887/problem/D 一个模特有两种活动。 ① 拍照片,挣钱 a。 ②开演唱会,花费b 给定模特这两种工作的时间表。 模特可以选定一个时间举办一个座谈会,那么他拍照片的钱变c。开演唱会会花费d。 要求再模特座谈会之前和后len天 都不能赔钱。 要求你输出最小的座谈会天数。 没有输出-1.。 思路:枚举第i天作为 开始的茶话会的时间(
好久不写博客,把最近的cf题解补回来。 A. Borya's Diagnosis time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output It seems that Borya is seriously sick. He is goin
A. Div. 64 time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Top-model Izabella participates in the competition. She wants to impress judges
Description Hands that shed innocent blood! There are n guilty people in a line, the i-th of them holds a claw with length Li. The bell rings and every person kills some of people in front of him. All
第一次CF涨分啊,真**不容易。 A. Greed time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Jafar has n cans of cola. Each can is described by two integers:
Description In a dream Marco met an elderly man with a pair of black glasses. The man told him the key to immortality and then disappeared with the wind of time. When he woke up, he only remembered th
Description Ralph has a magic field which is divided into n × m blocks. That is to say, there are n rows and m columns on the field. Ralph can put an integer in each block. However, the magic field do
作对一个题还涨分,我这分数是有多低,B题明知道爆表还不会改,难受。 A. QAQ time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output "QAQ" is a word to denote an expression of crying.
靠着写CF的题解艰难维持博客浏览量,不过涨分了还是蛮高兴的。最后一秒过C题也是相当刺激。 A. Chess For Three time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Alex, Bob and Carl will soo
题目地址:http://codeforces.com/contest/897/problem/C C. Nephren gives a riddle time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output What are you doing
Hacker, pack your bags! time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output It's well known that the best way to distract from something is to
又一次涨分,虽然上次也在涨分,但没心情写博客,就做出一个题,补题体验感也不好,这次C题看了一个半小时没做出来,真是水的可以。 A. Scarborough Fair time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Are you
http://codeforces.com/contest/900/problem/C 题意: 给出一个长度为n的1-n的全排列,一个数ai为有效的,当且仅当ai为1-i这i个数中最大。 现在让你删除一个数,使得有效的数的数目最大。 一开始往线段树方面去想,想了个很麻烦的写法,写到一半发现不用这么麻烦。 直接用set维护一下就行了,设当前数为ai,通过set可以知道ai前面有多少个比ai大的数。维
A: A. Hungry Student Problem time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Ivan's classes at the university have just finished, and now h
继续涨分,希望下次蓝名。 A. Find Extra One time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output You have n distinct points on a plane, none of them lie on O
http://codeforces.com/contest/900 好菜的说qwq A 给定一些点,问可否去掉一个点是,使这些点都在y轴的一侧。 四种情况。 #include <bits/stdc++.h> using namespace std; int main() { int m,a,b; int sum1=0; int sum2=0; scanf("%d",&m);
伤心总是难免的,明明是送分场,愣是掉了61分。 A. Rounding time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasya has a non-negative integer n. He wants to round i
哎............ A. Splitting in Teams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There were n groups of students which came to write a t
大意: 判断一个连续的月份数组是否正确 思路: 没被hack,挂了(惨) 没有考虑完全,需要的数组应该包括 平年 平年 平年 闰年 平年 平年 平年 暴力查询匹配即可。 水题