当前位置: 首页 > news >正文

网站制作方案摄影图片

网站制作方案,摄影图片,阿里云虚拟主机做2个网站吗,区块链 网站 怎么做比赛链接#xff1a;牛客竞赛_ACM/NOI/CSP/CCPC/ICPC算法编程高难度练习赛_牛客竞赛OJ A-小红的直角三角形_牛客周赛 Round 109 签到题#xff1a;用勾股定理即可通过此题#xff08;需要注意对共线情况的判断#xff09; 代码#xff1a; // Problem: 小红的直角三角…比赛链接牛客竞赛_ACM/NOI/CSP/CCPC/ICPC算法编程高难度练习赛_牛客竞赛OJ A-小红的直角三角形_牛客周赛 Round 109 签到题用勾股定理即可通过此题需要注意对共线情况的判断 代码 // Problem: 小红的直角三角形 // Contest: NowCoder // URL: https://ac.nowcoder.com/acm/contest/116945/A // Memory Limit: 2048 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org)#include bits/stdc.h using namespace std; #define int long long #define endl \n #define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); #define pii pairint,int #define fi first #define se second #define YES coutYesendl; #define NO coutNoendl; #define lbt(x) ((x) (-x)) const int INF 0x3f3f3f3f; const int inf 1e18; void solve() {int x,y,xx,yy;cinxyxxyy;int a x * x y * y;int b xx * xx yy * yy;if(y yy y 0 || x xx x 0){NOreturn ;}int c (xx - x) * (xx - x) (yy - y) * (yy - y);if(a b c || a c b || b c a) YESelse NO // coutfixedsetprecision(x) ; }signed main()// Dont forget pre_handle! {IOSint T1; // cinT;while(T--) solve(); return 0; } B-小红的好点对_牛客周赛 Round 109 乍一看题目很好读懂但是想不到很好的算法来实现然后再看一眼数据范围才100个点好了一道语法题用暴力去遍历即可通过。 // Problem: 小红的好点对 // Contest: NowCoder // URL: https://ac.nowcoder.com/acm/contest/116945/B // Memory Limit: 2048 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org)#include bits/stdc.h using namespace std; #define int long long #define endl \n #define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); #define pii pairint,int #define fi first #define se second #define YES coutYESendl; #define NO coutNOendl; #define lbt(x) ((x) (-x)) const int INF 0x3f3f3f3f; const int inf 1e18; bool ok(pii x,pii y) {int x1 x.fi,y1 x.se;int x2 y.fi,y2 y.se;double dis sqrt((x1 - x2) * (x1 - x2) (y1 - y2) * (y1 - y2));if(dis - 1.0) return false;return true; } void solve() {int n;cinn;vectorpii a(n1);for(int i1;in;i) cina[i].fia[i].se;int ans 0;for(int i1;in;i){for(int ji1;jn;j){if(ok(a[i],a[j])) ans ;}}coutansendl; // coutfixedsetprecision(x) ; }signed main()// Dont forget pre_handle! {IOSint T1; // cinT;while(T--) solve(); return 0; } C-小红的整数三角形_牛客周赛 Round 109 这道题就比较有意思了要求是让你找到一个点C然后使得ABC三个点组成的三角形的面积是一个正整数而且坐标也要是正整数那么我们可以在纸上画一画就不难发现当已知的两个点AB共线的时候这条边AB就可以作为三角形的底边那么我们只需要让点C到AB的距离是一个正整数就行了很容易就能想出来让点C在点A或点B的正上方或者正下方即可。 那么如果AB两点不共线呢那我们就可以让AB这条线作为一个直角三角形的斜边也就是A和B所围成的矩形的斜对角线那么这个时候的点C只要在A或B的正下方或者正上方就行了。 // Problem: 小红的整数三角形 // Contest: NowCoder // URL: https://ac.nowcoder.com/acm/contest/116945/C // Memory Limit: 2048 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org)#include bits/stdc.h using namespace std; #define int long long #define endl \n #define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); #define pii pairint,int #define fi first #define se second #define YES coutYESendl; #define NO coutNOendl; #define lbt(x) ((x) (-x)) const int INF 0x3f3f3f3f; const int inf 1e18; void solve() {int x1,x2,y1,y2;cinx1y1x2y2;int dx x2 - x1;int dy y2 - y1;if(dx){if(dx % 2 0) coutx1 y1 1endl;else coutx1 y1 2endl;}else{if(dy % 2 0) coutx1 1 y1endl;else coutx1 2 y1endl;} // coutfixedsetprecision(x) ; }signed main()// Dont forget pre_handle! {IOSint T1; // cinT;while(T--) solve(); return 0; } D-小红的马_牛客周赛 Round 109 这道题初看没有什么思路我一开始是想着遍历每一个可以放马的点但是想不到怎么去确定这几个点所以我们不妨用逆向思维来解决这道题我们是知道每一个兵的坐标的那么我们就可以根据每一个兵的坐标来存可能的马的放置点的坐标因为这个点放马的话这个马就可以吃这个兵那么反过来也就是这个位置上的兵能够被这个位置的马吃所以我们就可以根据这n个兵的位置累加每个点的八个方向的点然后最后再统计出最大的即可。 一定要注意在最后的遍历统计的时候要对坐标的合法性进行分析因为有减法所以可能导致出现不合法的坐标的出现 // Problem: 小红的马 // Contest: NowCoder // URL: https://ac.nowcoder.com/acm/contest/116945/D // Memory Limit: 2048 MB // Time Limit: 6000 ms // // Powered by CP Editor (https://cpeditor.org)#include bits/stdc.h using namespace std; #define int long long #define endl \n #define IOS ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); #define pii pairint,int #define fi first #define se second #define YES coutYESendl; #define NO coutNOendl; #define lbt(x) ((x) (-x)) const int INF 0x3f3f3f3f; const int inf 1e18; void solve() {int n;cinn;vectorpii a(n1);mappii,int mp;for(int i1;in;i){cina[i].fia[i].se;int x a[i].fi,y a[i].se;mp[{x-1,y2}] ;mp[{x1,y2}] ;mp[{x2,y1}] ;mp[{x2,y-1}] ;mp[{x1,y-2}] ;mp[{x-1,y-2}] ;mp[{x-2,y-1}] ;mp[{x-2,y1}] ;}int anx -1,any -1,num 0;for(auto i : mp){int sum i.se;if(sum num i.fi.fi 0 i.fi.se 0){num sum;auto t i.fi;anx t.fi;any t.se;}}coutanx anyendl; // coutfixedsetprecision(x) ; }signed main()// Dont forget pre_handle! {IOSint T1; // cinT;while(T--) solve(); return 0; }
http://www.pierceye.com/news/539923/

相关文章:

  • 加强网站微信公众号平台建设php 5.4 wordpress
  • 比价网站开发东莞微客巴巴做网站
  • 怎么免费搭建自己的网站交互网站建设
  • 网站架构 规划考研网站做刷词
  • 昆山网站建设kshuituo适合seo优化的站点
  • 免费十八种禁用网站圣诞网站怎么做
  • 做网站排名赚钱吗安卓开发快速入门
  • 南宁百度网站建设求个网站或者软件
  • 岳阳网站项目建设报道网站建设色调的
  • 站长平台怎么添加网站南京市高淳县建设厅网站
  • 广州市住房和城乡建设厅网站首页一键制作自己的app软件
  • 设一个网站链接为安全怎么做微博内容放到wordpress
  • 好的网站设计培训学校wordpress主题 表白
  • 做网站服务器系统模板网站的建设方式与方法
  • 网站建设需要的公司市住房城乡建设部网站
  • 网站备案 厦门怎样做自己的购物网站
  • 旅行社应做哪些网站wordpress新建页面发布内容
  • 网站建设业中国宁波网天一论坛
  • 代表网站开发的logo小程序制作推广费用
  • 建个大型网站要多少钱怎么建自己的网址
  • 网站建站模板做网站一般的尺寸
  • 西安网站设设学校品牌建设
  • 工信部网站备案查询做网站用的大图
  • 手机版网站图片自适应怎么做找快照网站查询
  • 建设网站推广文案浙江网警
  • 笑话网站域名网站做优化效果怎么样
  • 正规网站建设网站制作婚庆网站的设计意义
  • 用服务器如何做网站拌合站建站方案
  • 如何给公司做网站网站建设板块建议
  • 微信公众号链接网站怎么做网站开发与维护宣传册