当前位置:网站首页>Blue Bridge Cup 2015 CA provincial competition (filling the pit)
Blue Bridge Cup 2015 CA provincial competition (filling the pit)
2022-06-29 16:03:00 【Hua Weiyun】
1、 Integer solution of the equation

#include<bits/stdc++.h>using namespace std;int main(){ for(int a=1;a<35;a++){ for(int b=1;b<35;b++){ for(int c=1;c<35;c++){ if(a*a+b*b+c*c==1000){ cout<<a<<" "<<b<<" "<<c<<" "<<endl; } } } } return 0;}answer :10
2、 The galaxy bomb

use excel Calculated
A1 Write death as 2014-11-9
C1=B1-A1
adjustment B1 until C1=1000
answer : 2017-08-05
3、 Wonderful numbers

Convert the sum of squares and cubes to a string , String concatenation , String sort , Determine whether the string is equal to 0123456789
#include<bits/stdc++.h>using namespace std;string num2str( double i) { stringstream ss; string s; ss<<i; ss>>s; return s;}int main(){ for(int a=1;a<10000;a++){ int b=a*a; int c=a*a*a; string temp=num2str(b)+num2str(c); sort(temp.begin(),temp.end()); if(temp=="0123456789"){ cout<<a<<endl; return 0; } } return 0;}answer :69
6、 The number of brand types

What I think of is the knowledge of permutation and combination of high school mathematics problems 
The vague memory is like this
DFS How to write it
#include<bits/stdc++.h>using namespace std;int pais[13];vector<int> path;int ans=0;int countof(vector<int> path,int pai){ int count=0; for(int i=0;i<path.size();i++){ if(path[i]==pai){ count++; } } return count;}void dfs(int n,vector<int>&path){ if(n==0){ ans++; return; } for(int i=0;i<13;i++){ if(countof(path,pais[i])<4){ path.push_back(pais[i]); dfs(n-1,path); path.pop_back(); } } } int main(){ for(int i=1;i<=13;i++) { pais[i-1]=i; } dfs(13,path); cout<<ans<<endl;}7、 Bracelet style

8、 Drink exchange

Simulation is enough
#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; int res=n; while(n>=3){ int temp=n/3; n-=(temp*3); n+=(temp); res+=(temp); } cout<<res;}9、 Base dice


10、


边栏推荐
- 架构实战营模块五作业
- 等保测评结论为差,是不是表示等保工作白做了?
- ROS2机器人f1tenth之CLI工具基础
- Alipay "security lock" was selected as an excellent case in the "child care program" of the ICT Institute: more than 330000 users have opened game protection
- 【云原生】Nacos-TaskManager 任务管理的使用
- Stlink troubleshooting
- Where has lifeifei reached in his key "embodied intelligence"?
- How to create a login page in WordPress
- I want to know where I can open an account in Nanning? In addition, is it safe to open a mobile account?
- C. Most Similar Words
猜你喜欢

BS-GX-018 基于SSM实现在校学生考试系统

golang操作NSQ分布式消息队列

京东联盟API - 万能转链接口 - 京品库接口 - 接口定制

Three development trends of enterprise application viewed from the third technological revolution

事件相关电位ERP的皮层溯源分析

墨天轮“高可用架构”干货文档分享(含Oracle、MySQL、PG资料124篇)

LeetCode-64-最小路径和

Pre war minesweeping: five measures for vulnerability management

面试官:说一下MySQL事务隔离级别?

C learning 2: heap and stack
随机推荐
Pre war minesweeping: five measures for vulnerability management
作为开发人员,无代码开发平台 iVX 你有必要了解一下
To prevent enterprise data leakage, use the fortress machine of network security products!
Stlink troubleshooting
12.udp protocol -bite
Taro中添加小程序 “lazyCodeLoading“: “requiredComponents“,
leetcode:42. 接雨水【双指针很优雅】
如何在 WordPress 中创建登录页面
Swoole TCP distributed implementation
Cerebral Cortex:从任务态和静息态脑功能连接预测儿童数学技能
云原生数据库查询优化-统计信息与行数估计
LeetCode-470-用Rand7()实现Rand10()
Introduction to radar related contents
C learning 2: heap and stack
动作捕捉系统用于苹果采摘机器人
微信公告号自动回复使用图灵机器人实现智能回复
如何在你的 wordpress 网站中添加搜索框
【大家的项目】 Rbatis ORM官网上线
如何使用SMS向客户传递服务信息?指南在这里!
C. Where‘s the Bishop?