题意: 给n*m个格子,初始时每个格子中有个数值为0,部分格子中含有炸弹,每个炸弹爆炸可以将周围的8个非炸弹格子中的数值加1,求全部炸弹炸完后那些非0且非炸弹格子中的数是多少. 思路: 另开一个矩阵,每炸弹一炸就9个格子全加1,全炸完后再输出时判断是否为0,若是则输出'-',否则,若是炸弹格子则输出'*',若是数字就输出该数字. #include <bits/stdc++.h> using namespace std; ][];//统计数值 int n, m; ][]; void cal(in…
NBUT 1105  多连块拼图 Time Limit:1000MS     Memory Limit:65535KB     64bit IO Format:  Practice  Appoint description:  System Crawler  (Aug 12, 2016 9:32:14 AM) Description 多连块是指由多个等大正方形边与边连接而成的平面连通图形. -- 维基百科 给一个大多连块和小多连块,你的任务是判断大多连块是否可以由两个这样的小多连块拼成.小多连块…
题意: 给出多个double数,去掉其最小的和最大的,再对余下的求均值. 思路: 再输入时将最大和最小去掉,顺便统计非最值的和,输出时除一下个数即可. #include <bits/stdc++.h> using namespace std; int main() { //freopen("input.txt", "r", stdin); int n; while(~scanf("%d",&n)) { ) { cout<…
[1186] Get the Width 时间限制: 1000 ms 内存限制: 65535 K 问题描述 It's an easy problem. I will give you a binary tree. You just need to tell me the width of the binary tree. The width of a binary tree means the maximum number of nodes in a same level. For exampl…
题意: 每行给出一个人名和一个int值,人名可重复出现.要求对同一个人名统计int值,最大的先输出,若相同,则按照人名出现次数,若再相同,则按照人名字典序. 思路: 输入完全部进行排序,写个比较函数传进去sort即可. #include <bits/stdc++.h> using namespace std; struct node { ]; int lik; int tim; }a[]; map<string, int> mapp2;//名字映射为int比较好处理 int cmp…
题意:给一棵人名树,按层输出,同层则按名字的字典序输出. 思路:首先对每个人名做索引,确定其在哪一层,按层装进一个set,再按层输出就自动排好序了. #include <bits/stdc++.h> using namespace std; vector< set<string> > ord; //每层一个set,自动按照字典序排好了 map<string,int> mapp; //作哈希用 int main() { //freopen("inpu…
相关log如下: 01-01 08:04:26.299 867 3220 E Camera2Client: syncWithDevice: Camera 0: Timed out waiting sync with HAL01-01 08:04:26.799 867 867 E Camera2Client: syncWithDevice: Camera 0: Timed out waiting sync with HAL01-01 08:04:27.310 867 867 E Camera2Cl…
public class Camera.Parameters extends Object java.lang.Object    ↳ android.hardware.Camera.Parameters Class Overview     类概述 相机的服务设置. 使相机参数生效,应用程序必须调用setparameters(相机参数.).例如,在setwhitebalance(字符串)被称为,白平衡不实际上改变了之前setparameters(相机参数.)被称为参数变化的对象. 不同的设备可…
[1635] Explosion 时间限制: 10000 ms 内存限制: 65535 K 问题描述 there is a country which contains n cities connected by n - 1 roads(just like a tree). If you place TNT in one city, all the roads connect these city will be destroyed, now i want to destroy all the…
转自 http://blog.sina.com.cn/s/blog_78ea87380101eixi.html 此文实现一个简单地水面倒影效果,通过rtt相机 获取倒影纹理, 水的基本实现方法(参考前一博文:osg通过glsl实现一个平面的水效果(法线贴图)),具体代码如下:   vertex定点着色器: varying vec3 lightdir;           //切线空间灯光向量; varying vec3 eyedir;             //切线空间眼点向量; varyin…