题解列表
题解 3016: 第几项
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long n=1,m,s=0; ci……
3011: 余数相同问题
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long long a,b,c; cin>>a……
计算分数加减表达式的值
摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; double sum=0; ……
题解 3011: 余数相同问题
摘要:解题思路:定义三个长整型变量,写循环和选择判断x;注意事项:在循环中输出完x后要终止循环,不然会超时;参考代码:#include <bits/stdc++.h>using namespace std;……
冶炼金属之列个不等式就出来了
摘要:解题思路:以375 353 259 2为例,上限集合:59/v>=2,53/v>=2,75/v>=3,下限集合:59/v>=3,53/v>=3,75/v>=4(下限求解出来需要加1)参考代码:#inc……
百钱买百鸡问题(易理解)
摘要:#include<iostream>
using namespace std;
main()
{
int a,b,c;
//100元买100只鸡
for(a=0;a<=100/5;a……
更小的数(不用真调换,只需要比较首位指针)
摘要:解题思路:注意事项:string类型用 .length()char字符数组char s[20]用 strlen(s) 参考代码:#include<iostream>
#include<s……
1319: 没有上司的晚会
摘要:# 没有上司的晚会
```cpp
/*
* 1319: 没有上司的晚会
* 贴脸的树形DP,hhh。已知关系结构是树形,数据范围 -- 考虑dp。
* dp[root][join] ……
蓝桥杯2023年第十四届省赛真题-平方差-找规律吧!
摘要:解题思路:总数减去只能被2整除,不能被4整除的数。参考代码:#include<iostream>
using namespace std;
int main()
{
int l=0,r……