题解列表
c++十六进制转八进制
摘要:#include<bits/stdc++.h>using namespace std;const int N=100000;using ll=long long;char ch[]={'0&#……
蓝桥杯2023年第十四届省赛真题-三国游戏-贪心+前缀和
摘要:解题思路: 贪心的选择使得获胜方人数与另外两方人数和的差最大,因此优先选择差最大的事件注意事项: 获胜仅有三种情况,要么x要么y要么z参考代码:n = int(input())
x = list(m……
回文串(简单易懂c语言)
摘要:解题思路:先把a数组倒叙赋值给b数组,接着比较a,b数组是否相等注意事项:参考代码: #include <stdio.h>
蓝桥杯历届试题-翻硬币
摘要:参考代码:#include<bits/stdc++.h>
using namespace std;
vector<int>v;
int main()
{
string s,ss;
ci……
蓝桥杯2023年第十四届省赛真题-接龙数列
摘要:解题思路:注意事项:参考代码:#include <iostream>#include <string>using namespace std;int dp[10];int main(){ int n……
python(简单直白--贪心)
摘要:解题思路:
假设X胜利求出每次i事件发生时的分差,存放在X_lst数组中,然后对其进行降序排序(贪心思维),对其进行求和直至sum不大于0,
求和个数即X胜利时可能发生的最大事件数……
蓝桥杯2023年第十四届省赛真题-子串简写
摘要:解题思路:注意事项:参考代码:常人思路(超时)#include <bits/stdc++.h> using namespace std;int K;long long ans=0;string S;c……