2021.1.23--vj补题】的更多相关文章

A - Marks CodeForces - 152A 题意:给出一个学生人数n,每个学生的m个学科成绩(成绩从1到9)没有空格排列给出.在每科中都有成绩最好的人或者并列,求出最好成绩的人数 思路:求每列成绩中最大的数的个数.求出每列成绩中的最大值,遍历每列的各行若值与最大值一样就用另一个数组标记出来,最后遍历标记数组记录下总个数,即为最终结果. 代码: #include<bits/stdc++.h> using namespace std; int main() { int n,m; cin…
A Treasure Hunt 注意负数和0的特殊处理.. 水题.. 然而又被Hack了 吗的智障 #include<bits/stdc++.h> using namespace std; int main() { int sa,sb,da,db,x,y; scanf("%d%d%d%d%d%d",&sa,&sb,&da,&db,&x,&y); sa=da-sa;sb=db-sb; if(sa<0)sa*=-1; if(…
A - A CodeForces - 478A 注意点: 和为0时要特判一下. 代码: #include<bits/stdc++.h> using namespace std; int main() { int a,b,c,d,e; cin>>a>>b>>c>>d>>e; int sum=0; sum=a+b+c+d+e; if(sum==0) { cout<<-1<<endl; } else { if(sum…
C - Win or Freeze CodeForces - 151C 题目内容: You can't possibly imagine how cold our friends are this winter in Nvodsk! Two of them play the following game to warm up: initially a piece of paper has an integer q. During a move a player should write any…
20165237 2017-2018-2 <Java程序设计>第四周考试补做及2-3章编程题 测试JDB: 用JDB调试上一个程序,输入1.2.3: 2-3章编程题代码托管 (程序的运行结果截图)…
A - Insomnia cure 题意:一共s只龙,每隔k,l,m,n只龙就会受伤,问这s只龙有多少龙是受伤的 思路:看起来题目范围并不是很多,直接进行循环判断 代码: 1 #include<iostream> 2 #include<cstdio> 3 #include<cmath> 4 #include<cstring> 5 #include<algorithm> 6 using namespace std; 7 int main(){ 8…
补题系列之西安网络赛1011 题目大意:给定一个椭球: 求它到原点的最短距离. 思路: 对于一个椭球的标准方程 x^2/a^2 + y^2/b^2 +z^2/c^2=1 来说,它到原点的最短距离即为min(a,b,c) 所以我们需要把原方程化为标准型. 这时候线代就排上用场了,注意到原方程是一个二次型. 化为标准型 1/(k1)*x^2+1/(k2)*y^2+1/(k3)*z^2=1 后  min(k1,k2,k3)即为答案 而这里的1/k1,1/k2,1/k3 就是二次型矩阵的特征值 如何求特…
网页设计课上实在无聊,便开始补题,发现比赛时候僵着的东西突然相通了不少 首先,"追妹"这题,两个队友讨论半天,分好多种情况最后放弃(可是我连题目都没看啊),今天看了之后试试是不是直接判断情况就可以,于是出现 #include<stdio.h> int main() { int T,n,m,a,b,u,v,i,flag; scanf("%d",&T); while(T--) { flag=; scanf("%d%d%d%d",&…
2018 HDU多校第四场赛后补题 自己学校出的毒瘤场..吃枣药丸 hdu中的题号是6332 - 6343. K. Expression in Memories 题意: 判断一个简化版的算术表达式是否合法. 题解: 注意细节即可. 代码: #include <bits/stdc++.h> using namespace std; int n; char s[505]; int main () { int T; cin>>T; for ( ; T; --T) { scanf(&quo…
2018 HDU多校第三场赛后补题 从易到难来写吧,其中题意有些直接摘了Claris的,数据范围是就不标了. 如果需要可以去hdu题库里找.题号是6319 - 6331. L. Visual Cube 题意: 在画布上画一个三维立方体. 题解: 模拟即可. 代码: #include <bits/stdc++.h> using namespace std; int a, b, c, R, C; char g[505][505]; int main () { int T; cin >>…