题解列表

筛选

盾神与积木游戏 结构体与优先队列

摘要: #### 利用优先队列的自动排序,将每个人按照需要的积木数量排序,在获取数据时若持有数大于目标数则不将其塞进优先队列里面。 ##### 用while循环判断遍历优先队列里面的最小所需数是否小于总……

字符串解题,代码简短简单

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    string str;    getline(cin,……

不需要数组,简单运算

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    int a=0 , n=0 , m=0;    flo……

简单题,但也要注意一下审题

摘要:解题思路:注意事项:这题其他的没啥很简单主要注意一下结束循环后sum分两种情况,一种是恰好相等,另一种是大于n。参考代码:#include <iostream>#include<cmath>using……

构造数字排序(C++)

摘要:解题思路:使用数字排序 控制格式输出注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){        int a,b,c,……

1092: A+B for Input-Output Practice

摘要:这题就是前几题的综合,没啥好说的。#include<bits/stdc++.h> using namespace std;   int main(){     int n,a,m,sum; ……