题目题意:求n个数中是否能够找到两个数 for(int i=0; i<n; ++i) cin>&g...
原创
2023-06-27 10:16:20
29阅读
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which cou
转载
2020-05-09 13:01:00
79阅读
2评论
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which cou
转载
2020-05-04 15:08:00
53阅读
2评论
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payments. However,
原创
2023-09-05 09:31:53
35阅读
这不双指针板子题吗????。 const int N=1e5+10; int a[N]; int n,m; int main() { cin>>n>>m; for(int i=0;i<n;i++) cin>>a[i]; sort(a,a+n); int l=0,r=n-1; bool ok=false;
转载
2021-02-17 21:14:00
32阅读
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which cou
转载
2018-03-27 08:12:00
26阅读
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which cou
转载
2018-07-28 20:47:00
48阅读
题目例如以下:
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coins as payme
转载
2017-05-16 19:08:00
55阅读
2评论
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visit
原创
2022-05-25 17:52:09
73阅读
1048 Find Coins (25 point(s))Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept a
原创
2022-09-15 10:49:33
42阅读
有N个钱币,要付账15,在N个钱币里面看看有没有两个正好和为15的。如果有多个,那么找V1比较小的那个,要自己先排个序。 (PS:一开始理解错了以为在原来的队伍里面找相邻的)
原创
2022-11-25 11:14:03
39阅读
#include<iostream>#include<stdio.h>#include<stdlib.h>#include<math.h>#include<string.h>#include<algorithm> #include<map>#include<vector>#inclu...
原创
2022-07-14 10:15:24
28阅读
返回目录题意给出n个正整数和一个正整数m, 间n个数字中是否存在一对数字a和b(a≤b), 使得a+b=m成立。如果有多对,输出a最小的那一对。样例(可复制)8 151 2 8 7 2 4 11 15样例输出4 11注意点map的大小不需要很大,也不能像500这么小,比1000大点就好了,如果map只开到500这么大,那map[m-i]会发生越界,测试点报段错误#in...
原创
2022-07-14 17:42:48
20阅读
1048. Find Coins (25)时间限制50 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueEva loves to collect coins from all over the universe, including some ot...
转载
2015-07-20 22:12:00
45阅读
2评论
#include <bits/stdc++.h>
using namespace std;
原创
2023-01-09 17:10:16
19阅读
返回目录题意有N枚硬币,给出每枚硬币的价值,现在要用这些硬币去支付价值为M的东西,问是否可以找到这样的
原创
2022-07-14 17:45:54
17阅读
1068 Find More Coins (30 point(
原创
2022-09-15 10:53:45
72阅读
N个钱币,要买goal元的东西接着是乱序的钱币;求满足可以正好不找零的情况,有给出把零钱最少的用的最多的那条; 没有No Solution第一个用了DFS,第二个01背包,一个从小到大,找到直接结束;一个从大到小,全结束后如果符合条件,显然是小的覆盖在大的上面
原创
2022-11-25 11:14:28
102阅读
1048Find Coins(25分)
Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds of coi...
原创
2022-09-19 15:53:33
66阅读
文章目录1 题目2 解析2.1 题意2.2 思路3 参考代码1 题目1068 Find More Coins (3
原创
2022-05-26 02:05:46
35阅读