题解列表
一点小思路,参考参考参考.....
摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int b,sum,n; scanf("%d",&n); while(scanf("%d……
贪心思想+排序+二分=好像会,但就是有点问题
摘要:解题思路:首先,一定得把价格重新排序,然后就是买谁?肯定买价格高的先,因为价高的肯定不会是赠品啊,并且我选择了价格高的两件商品的话,我的赠品价格也是肯定不低的,所以从高位开始遍历。其次,确定我选好了两……
编写题解 2840: 向量点积计算
摘要:package arrLast;
//题目 2840: 向量点积计算
import java.util.Scanner;
public class t_2840 {
public static……
编写题解 1099: 校门外的树(简单版)
摘要:解题思路:利用布尔数组注意事项:参考代码:package arrLast;
//题目 1099: 校门外的树
import java.util.Scanner;
public class t_1……
编写题解 2837: 年龄与疾病
摘要:解题思路:注意事项:参考代码: public static void main(String args[]) {
Scanner sc=new Scanner (System.in);
i……
编写题解 1043: [编程入门]三个数字的排序 选择排序
摘要: #include
int main()
{
int arr[3] = { 0 };
scanf("%d %d %d", &arr[0] ,&arr[……
分解因数分解因数分解因数
摘要:解题思路:注意事项:参考代码://因数分解
#include<iostream>
using namespace std;
int ans,n,t;
void f(int a,int b)
……