摘要:
A Briefcases Full of Money 题目大意: 输入各个面值钞票的数量,根据题目中的面值,求出和最大的钞票面值 如果有相同的输出钞票数最少的 #include<bits/stdc++.h> using namespace std; const int maxn=100005; lo 阅读全文
摘要:
https://vjudge.net/contest/426643#status/805533348 A 第一遍看错题了qwqqqq #include <cstdlib> #include<bits/stdc++.h> using namespace std; int main( ) { int k 阅读全文
摘要:
https://ac.nowcoder.com/acm/contest/12606 D 你的朋友偷偷地选了N个连续的正数,从1到100的整数,让你猜它们的和是多少(偶数或奇数或不能确定) 思路:因数据范围<10,故我选择打表 #include<bits/stdc++.h> using namespa 阅读全文
摘要:
A 一共n个人,去a餐厅的有a人,去b餐厅有b人,两个都去的有c人,求没有去的有多少,如果数据不合理或没去的人数少于1,输出-1 #include<bits/stdc++.h> using namespace std; #define ll long long int main() { int n, 阅读全文
摘要:
A 用一个数组标记一下出现的数字,按顺序输出出现过的数字 #include<bits/stdc++.h> using namespace std; int main() { int n,m,a[20],b[20]={0},f=0,i,x; cin>>n>>m; for(i=0;i<n;i++){ c 阅读全文
摘要:
A 题目大意:给出每位医生的s,d,每位医生只有在si, si + di, si + 2di, ....工作,按顺序访问医生,一天只能访问一位,求访问完所有医生需要多少天 解题思路:按顺序模拟,先输入医生的总人数,第一个医生的s,d,while循环模拟每一天,如果天数符合,输入下一个医生的s,d,直 阅读全文