课后1002三个数最大值的求解方法 解题思路:条件表达式1、条件运算符。它是一个三目运算符,由?:组成。2、条件表达式。由条件运算符组成条件表达式。一般形式为:表达式1?表达式2:表达式3其求值规则是:如果表达式1的值为真,则以表达式2的值作为整个条件表达式的值,否则就以表达式3的值作为整个条件表达式的值。 题解列表 2024年04月24日 0 点赞 0 评论 503 浏览 评分:0.0
七行简便 编写题解 2847: 找第一个只出现一次的字符 摘要:解题思路:if n.count(i)==1:注意事项:else: print('no')参考代码:n=input()for i in n: if n.count(i)==1:…… 题解列表 2024年04月24日 0 点赞 0 评论 942 浏览 评分:0.0
蓝桥杯2024年第十五届省赛真题-数字诗意 最优雅写法 ```cpp#include#defineintlonglongusingnamespacestd;signedmain(){intn=1,m,res=0;cin>>n;while(n--){cin>>m;res+=((m&(m-1))==0);}cout 题解列表 2024年04月23日 4 点赞 3 评论 2032 浏览 评分:10.0
编写题解 1622: 蓝桥杯算法训练VIP-字符删除 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char arr[21] = { 0 },ch=0; int d = 0; gets(arr); ch=getc…… 题解列表 2024年04月23日 0 点赞 0 评论 887 浏览 评分:9.9
2821: 开关灯 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>typedef long long ll;const int N=1e5;ll a[N];using namespace s…… 题解列表 2024年04月23日 0 点赞 0 评论 581 浏览 评分:0.0
第一个带类的程序 摘要:解题思路:注意事项:参考代码: import java.util.Scanner;class Data{ private int year,month,day; public void …… 题解列表 2024年04月23日 0 点赞 0 评论 697 浏览 评分:9.9
2990: 十进制到八进制 摘要:解题思路:注意事项:参考代码:import java.lang.*; import java.math.BigDecimal; import java.util.Scanner; pub…… 题解列表 2024年04月23日 0 点赞 0 评论 475 浏览 评分:0.0
STL deque优雅方案 摘要:解题思路:使用STL队列维护m个连续奇数注意事项:参考代码:#include<iostream> #include<cmath> #include<deque> using namespace …… 题解列表 2024年04月23日 0 点赞 0 评论 484 浏览 评分:0.0
最匹配矩阵 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<vector>#include<utility>using namespace std;int Difference…… 题解列表 2024年04月23日 0 点赞 0 评论 651 浏览 评分:0.0
分布式队列AC做法——主要看偏移量,与元素值无关 摘要:参考代码:import java.io.*; import java.util.*; public class Main { static BufferedReader in = n…… 题解列表 2024年04月23日 2 点赞 0 评论 1231 浏览 评分:9.9