首页
Python
Java
IOS
Andorid
NodeJS
JavaScript
HTML5
【
UVaLive 6608 Cabin Baggage (水题)
】的更多相关文章
UVaLive 6608 Cabin Baggage (水题)
题意:给定四个数代表长宽高和重,问你是不是满足下面条件,长不高于56,宽不宽于45,高不高于25,或者总和不大于125,并且重量不高于7. 析:判断输出就好,注意这个题是或,不要想错了. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cma…
UVALive 4764 简单dp水题(也可以暴力求解)
B - Bing it Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submit Status Practice UVALive 4764 Description I guess most of you played cards on the trip to Harbin, but I'm sure you have never played the following card game. Thi…
UVaLive 6802 Turtle Graphics (水题,模拟)
题意:给定一个坐标,和一行命令,按照命令走,问你有多少点会被访问超过一次. 析:很简单么,按命令模拟就好,注意有的点可能走了多次,只能记作一次. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <i…
UVaLive 6858 Frame (水题)
题意:给定一个矩形框架,给定一个小矩形,问你能不能正好拼起来. 析:很简单么,就三种情况,如果是1*1的矩形,或者是1*2的一定可以,然后就是上面和下面正好能是小矩形的整数倍,左右是少一,两个就是整数倍. 最后一种是,每一边都减1,是小矩形的整数倍. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include…
Argus UVALive - 3135(优先队列 水题一道)
有一系列的事件,它每Period秒钟就会产生编号为qNum的事件,你的任务是模拟出前k个事件,如果多个事件同时发生,先处理qNum小的事件 今天再看看数据结构.. #include <iostream> #include <cstdio> #include <sstream> #include <cstring> #include <map> #include <set> #include <vector> #includ…
UVa 12709 && UVaLive 6650 Falling Ants (水题)
题意:给定 n 个长方体的长,宽,高,让你求高最大的时候体积最大是多少. 析:排序,用高和体积排序就好. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #include…
UVALive 6858——分类讨论&&水题
题目 链接 题意:对于一个$n \times m$的矩阵的最外一圈,问是否能用$k \times 1$的方块填满 分析 考虑左右两边的情况,分类讨论,切记考虑所有可能的情形. #include<bits/stdc++.h> using namespace std; int n, m; bool judge(int k) { ) return true; ) { ) { ) % k == ) return true; ) % k == && m % k == ) return t…
UVALive 6862——结论题&&水题
题目 链接 题意:求满足$0 \leq x \leq y \leq z \leq m$且$x^j + y^j = z^j, \ j=2 \cdots n$的三元组的对数 分析 由费马大定理:整数$n >2$时,关于$x, y, z$的方程 $x^n + y^n = z^n$ 没有正整数解. 因此,我们只需考虑$j=2$的情况.对于$j>2$时,只存在$x=0, \ y=z$的解. #include<bits/stdc++.h> using namespace std; typed…
UVALive 2318 水题
给出c 个竞争者.v 个投票人.每个投票人的投票顺序.问你谁会胜出.在第几轮.完全是个水题.比赛的时候debug接近两个点没过.因此差点放弃了整场比赛.猜测是错在找最大和第二大的序号哪里错的.因为我换了一种方法就AC了. 以后该尝试着删掉debug不过的代码.重写.最近比赛总是被虐成狗.不知道是不是被失望了.或者. 好好努力吧.只是希望自己每次都能有所进步就好了.总是行走在路上.其实很难. #include<stdio.h> #include<string.h> #include&…
UVaLive 6591 && Gym 100299L Bus (水题)
题意:略. 析:不解释,水题. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #include <cmath> #include <iostream> #include <cstring> #include <set>…