
CodeForces
小天位
这个作者很懒,什么都没留下…
展开
-
CodeFroces 834B. The Festive Evening
It's the end of July – the time when a festive evening is held at Jelly Castle! Guests from all over the kingdom gather here to discuss new trends in the world of confectionery. Yet some of the things...原创 2018-02-09 22:21:32 · 323 阅读 · 0 评论 -
Codeforces Round #476 (Div. 2)D. Single-use Stones
点击打开题目链接贪心+判断原创 2018-04-26 11:54:23 · 496 阅读 · 0 评论 -
Codeforces Round #476 (Div. 2) C. Greedy Arkady
点击打开题目链接知道了当第一个人比那 k-1 个人多分一次x就是最优策略 和 对分糖果的次数进行枚举就差不多了当分i次的时候,有 (i-1)*x(k-1)+x+i<=n;x=n/((i-1)*k+1)不过当枚举到 i 次 x>m 的时候要重新对这个分i进行判断,此时 x 就等于最大值 m 了,要是还可以得出能够在分 i 次的结果,就可以对这个 i*m 进行判断了#include <...原创 2018-04-26 11:53:01 · 222 阅读 · 0 评论 -
Codeforces Round #476 (Div. 2) B. Battleship
用暴力就可以过,不过晚上做的时候被题面和自己的英语水平唬着了,没做。也是签到题吧,不过自己写的比较乱点击打开题目链接#include <iostream>#include <cstdio>#define maxn 105using namespace std;int main(){ int n,k,x,y; cin>>n>>...原创 2018-04-26 11:43:35 · 318 阅读 · 0 评论 -
Codeforces Round #476 (Div. 2) A. Paper Airplanes
点击打开题目链接签到题#include <iostream>using namespace std;int main(){ int k,n,s,p; cin>>k>>n>>s>>p; long long sum=0; sum=(n%s!=0 ? n/s+1:n/s); sum*=k; ...原创 2018-04-26 11:40:08 · 163 阅读 · 0 评论 -
CodeForces - 831D Office Keys
题意解析二分贪心#include <iostream>#include <algorithm>#include <cstdio>#define ll long long#define maxn 100010using namespace std;int n,k,p;int a[maxn],b[maxn];int main(){ cin&...原创 2018-04-03 12:06:44 · 208 阅读 · 0 评论 -
codeforces831c 思维
题意:一个比赛中,n裁判依次给你打分,第i个裁判给了A[i]分,但你记性不好,没有记住所有得分,连初始分都忘记了,只记得m个加完分后的总分B[i](不是按顺序的),且B[i]互不相同。问:初始分有多少种可能的情况。点击打开链接#include <iostream>#include <cstdio>#include<algorithm>#include &l...原创 2018-04-02 20:41:53 · 239 阅读 · 0 评论 -
Sonya and Queries CodeForces - 714C
Today Sonya learned about long integers and invited all her friends to share the fun. Sonya has an initially empty multiset with integers. Friends give her tqueries, each of one of the following type:...原创 2018-03-24 17:58:32 · 168 阅读 · 0 评论 -
CodeForces 845C Two TVs
题意:现在我们有一个电视清单,有两个电视,电视清单上有每一个节目的开始时间和结束时间。 电视不能接连不间断的播放,例如TV1播放完1-2点的节目后不能接着播放2-3点的电视,除非在TV2上播放,如果TV2也正在播放则不能播放完清单。Input31 22 34 5OutputYESInput41 22 32 31 2OutputNO #include <iostream...原创 2018-02-10 19:22:26 · 288 阅读 · 0 评论 -
CodeForces - 834C The Meaningless Game
Slastyona and her loyal dog Pushok are playing a meaningless game that is indeed very interesting.The game consists of multiple rounds. Its rules are very simple: in each round, a natural number k is ...原创 2018-02-09 22:24:23 · 245 阅读 · 0 评论 -
CodeForces - 844B Rectangles
You are given n × m table. Each cell of the table is colored white or black. Find the number of non-empty sets of cells such that:All cells in a set have the same color.Every two cells in a set share ...原创 2018-02-09 22:29:58 · 311 阅读 · 0 评论 -
Codeforces Round #477 (rated, Div. 2, based on VK Cup 2018 Round 3)
点击打开A题链接#include<bits/stdc++.h>using namespace std;const int MAX = 105;int n,s;int h[MAX],m[MAX],mins[MAX];int main(){ cin>>n>>s; //t[0] = 0; for(int i=0;i<n;++...原创 2018-04-30 02:34:34 · 208 阅读 · 0 评论