
暴力模拟
WangRenFengzzZ
人生有些事不做可能没啥影响,但是那些事是做可能会影响的一生!
展开
-
codeforce 984B. Minesweeper
B. Minesweeper time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output One day Alex decided to remember childhood when computers were not too powe...原创 2018-05-16 20:57:33 · 297 阅读 · 0 评论 -
Educational Codeforces Round 35 A. Nearest Minimums
【题目链接】:Educational Codeforces Round 35 (Rated for Div. 2)A. Nearest Minimums time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output ...原创 2018-08-14 10:33:22 · 189 阅读 · 0 评论 -
UVA 10976 Fractions Again?!【暴力/分子分母】
【题意】:给你一个数k,求所有使得1/k = 1/x + 1/y成立的x≥y的整数对。枚举y从k+1到2*k, 1/k-1/y 结果的分子是1,分母是整数即可!#include<bits/stdc++.h>using namespace std;int x1[10005],y1[10005];int main(){ int k; int x,y; ...原创 2018-08-14 11:51:30 · 171 阅读 · 0 评论 -
CF 1003C Intense Heat【前缀和+枚举】
The heat during the last few days has been really intense. Scientists from all over the Berland study how the temperatures and weather change, and they claim that this summer is abnormally hot. But an...原创 2018-08-08 14:58:34 · 231 阅读 · 0 评论 -
CF A.Mishka and Contest【双指针/模拟】
#include<bits/stdc++.h>using namespace std;int a[5001];int main(){ int i,j; int n,m; while(~scanf("%d%d",&n,&m)){ int cnt=0; memset(a,0,sizeof(a)); ...原创 2018-08-08 16:11:49 · 178 阅读 · 0 评论 -
Codeforces Round #466 (Div. 2) A. [n个点,最少去掉多少个点使剩下的点的最大距离不超过k。]
A. Points on the line time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output We’ve got no test cases. A big olympiad is coming up. But th...原创 2018-08-13 12:32:47 · 273 阅读 · 0 评论 -
2017北京 ACM ICPC E - Cats and Fish
There are many homeless cats in PKU campus. They are all happy because the students in the cat club of PKU take good care of them. Li lei is one of the members of the cat club. He loves those cats ver...原创 2018-08-22 17:35:05 · 306 阅读 · 0 评论 -
aoj 0033 Ball【dfs/枚举】
有一个形似央视大楼(Orz)的筒,从A口可以放球,放进去的球可通过挡板DE使其掉进B裤管或C裤管里,现有带1-10标号的球按给定顺序从A口放入,问是否有一种控制挡板的策略可以使B裤管和C裤管中的球从下往上标号递增。 输入:第一行输入数据组数N。接下来N行为N组具体数据,每组数据中有10个整数,代表球的放入顺序。 输出:对于每组数据,若策略存在,输出YES;若不存在,输出NO ;...原创 2018-08-17 10:30:55 · 199 阅读 · 0 评论 -
ACM-ICPC 2018 徐州赛区网络预赛 F map模拟
给n个框架,每个给k个坐标,问最长的连续出现的坐标值长度。 思路:map直接记录就行了,只不过需要注意的是同一个框架会出现相同坐标。 #include <bits/stdc++.h>#define INF 0x3f3f3f3f#define LL long longusing namespace std;typedef pair<int,int>P;map...原创 2018-09-11 09:43:42 · 111 阅读 · 0 评论