水一水CF
qq_33883176
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
CF Educational Round 12, B
B. Shopping time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Ayush is a cashier at the shopping center. Recently his department has started原创 2016-04-28 10:46:51 · 387 阅读 · 0 评论 -
Educational Codeforces Round 15, problem: (B) Powers of Two
题意: 求两个数加起来是2的次方,这样的数对在数列中有多少组 题解: 爆搜直接over,做出来都有鬼,比较坑的是自己YY的log发生了莫名的错误,卡在第一组很久,颇为尴尬,正解是map,键值是数值,实值是该键值在数列中对应的个数,遍历直到2的32次方然后记录即可for(int i =1;i<32;i++){ ans+= mp[(1<<i)-x]; } mp[x]++;#inclu原创 2016-08-02 22:33:12 · 272 阅读 · 0 评论 -
Codeforces Round #363 (Div. 2), problem: (B)
题意:一个炸弹,可以消灭横竖所有墙,问是否能用一个boom消灭地图上所有墙题解:好吧,这个有点技巧,做法是计算每一列的墙数,存在sl[],计算每一排墙数,存在sh[]中。遍历每一个点,当这个点对应的sl[i]和sh[j]之和减去(这个点是否是墙)==墙数时,则这个点成立。(if(sh[i]+sl[j]-(maze[i][j]==’*’)==num))#include<iostream> #inclu原创 2016-07-20 22:56:23 · 166 阅读 · 0 评论 -
Codeforces Round #363 (Div. 2), problem: (A)
题意:就是一排粒子同时左右跑,求第一次相遇的时间。 题解:水的莫法,自己蠢的可以。只有在RL这个序列才有相遇的可能,然后计算每一次相遇时间去最小。需要注意n=1的情况。#include<iostream> #include<sstream> #include<string> #include<cstdlib> #include<vector> #include<map> #include<queu原创 2016-07-20 22:49:14 · 183 阅读 · 0 评论 -
Codeforces Round #364 (Div. 2), problem: (D) As Fast As Possible
题意: 一群人去一个地方,只有一辆车,已知人的速度,路程,车的速度,人数和每一次车的最大载客量,且每个人只能坐一次车。求最短到达时间。 题解: 人的行程分为走路和坐车,当且仅当走路的人和最后一批坐车的人同时到达时,时间最短,按照对称性,可以知道每一批人坐车和走路的时间都是一样的,所以最后是推公式得到坐车和走路的时间。#include <cstdio> #include <cstring> #i原创 2016-07-26 07:17:42 · 305 阅读 · 0 评论 -
Codeforces Round #364 (Div. 2), problem: (B) Cells Not Under Attack
题意: 给你一个地图。在其中安放炮塔。炮台可以打到与它同行同列的所有地方,求每一次安放一个炮台,剩余多少地方打不到题解: 每一次认为是减少了矩形的长和宽,对于安放的地方已有同行的炮台,则只是矩形长减一,对于安放的地方已有同列的炮台,则只是矩形宽减一。#include <cstdio> #include <cstring> #include <iostream> #include <algorit原创 2016-07-26 07:10:44 · 271 阅读 · 0 评论 -
CF初体验——Round #348, A
A题:(水题) A. Little Artem and Presents time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Little Artem got n stones on his birthday and now wa原创 2016-04-27 23:09:55 · 377 阅读 · 0 评论 -
CF初体验---Round #348,B
B题: B. Little Artem and Grasshopper time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Little Artem found a grasshopper. He brought it to hi原创 2016-04-27 23:28:47 · 322 阅读 · 0 评论 -
CF初体验---Round #348,C
C. Little Artem and Matrix time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Little Artem likes electronics. He can spend lots of time makin原创 2016-04-28 00:18:04 · 375 阅读 · 0 评论 -
CF初体验--Round #348,D
D. Little Artem and Dance time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Little Artem is fond of dancing. Most of all dances Artem likes原创 2016-04-28 00:46:56 · 455 阅读 · 0 评论 -
CF Educational Round 12, C
C. Simple Strings time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output zscoder loves simple strings! A string t is called simple if every pair原创 2016-04-28 10:31:42 · 386 阅读 · 0 评论 -
CF Educational Round 12,A
A. Buses Between Cities time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Buses run between the cities A and B, the first one is at 05:00 AM原创 2016-04-28 11:04:57 · 351 阅读 · 0 评论 -
Educational Codeforces Round 15, problem: (C) Cellular Network
题意: 几个城市,几个塔,在一条直线上,已知他们的坐标,每个城市至少在R这一范围内有一座塔的信号,求R得最小值 题解: 比较坑,自己YY的二指针,比赛的时候没有搞出来,颇为尴尬。几次遇到int爆数据的问题,以后记得改啊,没事别用int啊。 思路就是求每个城市到塔的最近距离求最大值,由于是不减数列,所以从第一个城市开始,找到离它最近的塔,那么之后的城市的最近的塔只会在后面出现,于是简化了复杂度原创 2016-08-02 22:51:51 · 238 阅读 · 0 评论
分享