贪心+二分+逆序获取最小字典序输出 摘要:解题思路:首先得知道什么是最长递增子序列LIS,自行百度,一般有两种做法,一种是一维线性dp复杂度为n^2,另一种是贪心+二分,符合本题的要求。1、很明显游客名单这是一个严格递增子序列,那就按规则建立…… 题解列表 2024年05月22日 0 点赞 0 评论 367 浏览 评分:9.9
1951:求平方和 摘要:参考代码:#include<stdio.h>#include<math.h>int main(){int a=3;int b=4; scanf("%d%d",&a,&b); printf(…… 题解列表 2024年05月23日 0 点赞 0 评论 473 浏览 评分:9.9
1075: 台球碰撞 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cmath> using namespace std; double l,w,x,y,r,a,v,s; i…… 题解列表 2024年05月24日 1 点赞 0 评论 312 浏览 评分:9.9
2042: 杨辉三角 摘要:解题思路:注意事项:注意const int N=1e3+5不是1e3如果是1e3会数据越界参考代码:#include <bits/stdc++.h>using namespace std;typede…… 题解列表 2024年05月25日 0 点赞 0 评论 273 浏览 评分:9.9
简单易懂,看懂给个好评! 摘要:解题思路:注意事项:参考代码:h = 0q = 0hours = []n = int(input())for i in range(n): q += 1 a, b = map(int, i…… 题解列表 2024年05月26日 2 点赞 0 评论 304 浏览 评分:9.9
题解 2881: 图像相似度 摘要:```cpp #include using namespace std; typedef long long ll; const int N =1e3; ll a[N][N],b[N][N…… 题解列表 2024年05月26日 0 点赞 0 评论 229 浏览 评分:9.9
1074数字整除(数学除法) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ char arr[200]; while(scanf("%s",arr)!=EOF) { if(arr[0]=…… 题解列表 2024年05月26日 1 点赞 0 评论 467 浏览 评分:9.9
编写题解 2902: 输出最高分数的学生姓名 摘要:```c #include struct Student{ int score; char name[20]; }students[100]; int main() …… 题解列表 2024年05月27日 1 点赞 0 评论 417 浏览 评分:9.9
编写题解 2917: 奇数单增序列 摘要:```c #include int main() { int num,nums[500],odd_nums[500],i,j,temp; scanf("%d",&num); f…… 题解列表 2024年05月27日 0 点赞 0 评论 351 浏览 评分:9.9
编写题解 2918: 成绩排序 摘要:```c #include #include struct Student{ char name[20]; int score; }students[20],temp_st…… 题解列表 2024年05月27日 0 点赞 0 评论 352 浏览 评分:9.9