首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
Jinx_K
2026年3月10日 16:33
组队刷题 题解:
P1307
回复 0
|
赞 0
|
浏览 33
#include <iostream> #include <cstdio> #include <algorithm> #include <cmath> #include <vector> using namespace std; typedef struct{ float volume; float price;//price per mL for each beverage; float totalprice; }beverage; bool cmp(const beverage &...
yourgaba233
2026年3月9日 18:11
组队刷题 题解:C语言解法,按性价比刷题
P1307
回复 0
|
赞 0
|
浏览 34
#include <stdio.h> #include <stdlib.h> void mySort(int w[],int m[],float f[],int n){//冒泡排序 int i,j,temp; float ft; for(i=0;i<n-1;i++){ for(j=1;j<n-i;j++){ if(...
uly
2026年3月4日 19:33
组队刷题 题解:
P1307
回复 0
|
赞 6
|
浏览 79
#include <bits/stdc++.h> using namespace std; typedef struct question { double w;//题数 double m;//体力 }q; bool cmp(question a, question b) { return a.m/a.w<b.m/b.w; } int main() { int total,n; while(cin>>total>>n) { if(total==-1||n=...
litery
2026年2月12日 21:35
组队刷题 题解:
P1307
回复 0
|
赞 3
|
浏览 179
#include <bits/stdc++.h> using namespace std; struct timu{ int w; int m; double xiaolv; bool operator <(const timu& b)const{ return xiaolv>b.xiaolv; } }; int main(){ int mt,n; while(cin>>mt>>n&&mt!=-1&...
08193003
2024年3月22日 13:49
组队刷题 题解:为什么不对 我这个struct就多定义了一个 就只能a
P1307
回复 6
|
赞 12
|
浏览 1.7k
#include<bits/stdc++.h> using namespace std; struct bankuai{ double a; double b; double c=b/a; }aa[1005]; bool cmp(bankuai a1,bankuai a2){ return a1.c<a2.c; } int main(){ int m,n; while(cin>>m>>n){ if(n==-1&&m==-1) break; for(int i=0;i&...
牧濑
2026年2月10日 18:47
组队刷题 题解:按照每个专题的效率排序,一个一个刷过去就行
P1307
回复 0
|
赞 4
|
浏览 148
#include <iostream> #include <vector> #include <algorithm> #include <iomanip> using namespace std; struct node{ int m; int w; double r;//每题所需精力 }; int main(){ int zjl;//总精力 int zt;//专题数 while(cin>>zjl>>zt){ if(zjl==-1&&...
cczz
2025年8月7日 15:47
组队刷题 题解:
P1307
回复 0
|
赞 7
|
浏览 706
#include<bits/stdc++.h> using namespace std; struct Node { int cnt; int cost; } node[1005]; int main() { int m, n; while (cin >> m >> n) { if (m == -1 && n == -1) break; for (int i = 0; i < n; i++) { cin &...
阿灿
2025年3月22日 16:15
组队刷题 题解:
P1307
回复 0
|
赞 14
|
浏览 1.3k
#include<bits/stdc++.h> using namespace std; struct node{ double m;//毫升 double w;//价格 double d;//单位价格 }; bool cmp(node a,node b){ return a.d < b.d; } int main(){ int x,n,i; while(cin>>x>>n&&x!=-1){ node juice[1000]; for(i=0;i<n;i++){ c...
swaggy
2025年3月1日 14:02
组队刷题 题解:
P1307
回复 1
|
赞 11
|
浏览 1.1k
想问一下大佬们这个为什么只有40%的正确率啊,在哪出错了呢 #include <iostream> #include<algorithm> using namespace std; struct Node { int w; int m; double rate; }; double function1(int w,int m) { return w/m; } bool cmp(struct Node a,struct No...
chenxx
2025年3月1日 11:31
组队刷题 题解:
P1307
回复 0
|
赞 12
|
浏览 1.2k
#include<bits/stdc++.h> using namespace std; struct node{ int num; int e; double pre; }; bool cmp(const node& a,const node& b){ return a.pre<b.pre; } int main(){ int to...
1
2
题目
组队刷题
题解数量
20
发布题解
在线答疑
热门题解
1
组队刷题 题解:
2
组队刷题 题解:
3
一模一样
4
组队刷题 题解:
5
组队刷题 题解:为什么不对 我这个struct就多定义了一个 就只能ac20%
6
组队刷题 题解:
7
组队刷题 题解:
8
组队刷题 题解:和1478好像,也是按那个思路写的,但是通过率只有60%,求解答一下
9
组队刷题 题解:
10
组队刷题 题解: