搜索结果
查询Tags标签: cin,共有 547条记录-
【C++ Primer Plus 编程练习】——第7章
1 double ch7_1_harmonicaverage(double a, double b) {2 return 2 / (1 / a + 1 / b);3 }4 5 void ch7_1() {6 using namespace std;7 double a{0}, b{0};8 while (true) {9 cout << "a: ";10 cin >> a;11 …
2021/8/30 14:06:08 人评论 次浏览 -
2021CCPC online网络赛8.28题解
2021CCPC online网络赛 1001、Cut The Wire 签到题,按照题意来思考就行 开题时间:0:05 交题时间:0:39 问题:手速慢了,其次就是思考分类时过于复杂了,但又不能快速想清楚 #include<bits/stdc++.h> using namespace std; typedef long long ll;int main(){ios::…
2021/8/30 6:07:48 人评论 次浏览 -
2021CCPC online网络赛8.28题解
2021CCPC online网络赛 1001、Cut The Wire 签到题,按照题意来思考就行 开题时间:0:05 交题时间:0:39 问题:手速慢了,其次就是思考分类时过于复杂了,但又不能快速想清楚 #include<bits/stdc++.h> using namespace std; typedef long long ll;int main(){ios::…
2021/8/30 6:07:48 人评论 次浏览 -
牛客网笔试C++输入输出
目录函数相关知识输入数字1 输入包括两个正整数a,b,输入数据包括多组2 先输入组数n,再输入每组数据a和b3 输入包括两个正整数a,b,输入数据包括多组,如果输入为0则结束输入4 输入多组数据,每组第一个数为该组数据个数n,n为0时结束输入5 先输入组数,再输入每组数据,…
2021/8/27 20:37:02 人评论 次浏览 -
牛客网笔试C++输入输出
目录函数相关知识输入数字1 输入包括两个正整数a,b,输入数据包括多组2 先输入组数n,再输入每组数据a和b3 输入包括两个正整数a,b,输入数据包括多组,如果输入为0则结束输入4 输入多组数据,每组第一个数为该组数据个数n,n为0时结束输入5 先输入组数,再输入每组数据,…
2021/8/27 20:37:02 人评论 次浏览 -
贪心局限性
https://codeforces.com/contest/1561/problem/C 题目链接 t个测试样例,每个测试样例n个洞穴,接下来n行每行第一个m为该洞穴怪兽个数,接下来 m个数字为怪兽护甲,当且仅当英雄的能力大于怪兽护甲时才能击败该怪兽,击败后能力加1;错误代码:1 #include <bits/stdc++…
2021/8/25 23:10:06 人评论 次浏览 -
贪心局限性
https://codeforces.com/contest/1561/problem/C 题目链接 t个测试样例,每个测试样例n个洞穴,接下来n行每行第一个m为该洞穴怪兽个数,接下来 m个数字为怪兽护甲,当且仅当英雄的能力大于怪兽护甲时才能击败该怪兽,击败后能力加1;错误代码:1 #include <bits/stdc++…
2021/8/25 23:10:06 人评论 次浏览 -
AtCoder Beginner Contest 215【A - F】
比赛链接:https://atcoder.jp/contests/abc215/tasks A - Your First Judge 题意 如果一个字符串是 Hello,World! ,输出 AC ,否则输出 WA 。 题解 模拟。 代码 #include <bits/stdc++.h> using namespace std; int main() {ios::sync_with_stdio(false);cin.tie(…
2021/8/22 6:37:41 人评论 次浏览 -
AtCoder Beginner Contest 215【A - F】
比赛链接:https://atcoder.jp/contests/abc215/tasks A - Your First Judge 题意 如果一个字符串是 Hello,World! ,输出 AC ,否则输出 WA 。 题解 模拟。 代码 #include <bits/stdc++.h> using namespace std; int main() {ios::sync_with_stdio(false);cin.tie(…
2021/8/22 6:37:41 人评论 次浏览 -
Bellman-Ford算法
落谷题目p1993 #include<iostream> #include<cstdio> using namespace std; typedef struct item {/* data */int u;int v;int w; }Item; Item a[5000+5]; int n,m; int p; int dis[5000+5]; int main(){// cin >> n >> m;scanf("%d%d"…
2021/8/20 12:35:41 人评论 次浏览 -
Bellman-Ford算法
落谷题目p1993 #include<iostream> #include<cstdio> using namespace std; typedef struct item {/* data */int u;int v;int w; }Item; Item a[5000+5]; int n,m; int p; int dis[5000+5]; int main(){// cin >> n >> m;scanf("%d%d"…
2021/8/20 12:35:41 人评论 次浏览 -
【CCF-CSP】(13年12月)出现次数最多的数
问题描述给定n个正整数,找出它们中出现次数最多的数。如果这样的数有多个,请输出其中最小的一个。 输入格式输入的第一行只有一个正整数n(1 ≤ n ≤ 1000),表示数字的个数。输入的第二行有n个整数s1, s2, …, sn (1 ≤ si ≤ 10000, 1 ≤ i ≤ n)。相邻的数用空格分隔。…
2021/8/17 23:10:04 人评论 次浏览 -
【CCF-CSP】(13年12月)出现次数最多的数
问题描述给定n个正整数,找出它们中出现次数最多的数。如果这样的数有多个,请输出其中最小的一个。 输入格式输入的第一行只有一个正整数n(1 ≤ n ≤ 1000),表示数字的个数。输入的第二行有n个整数s1, s2, …, sn (1 ≤ si ≤ 10000, 1 ≤ i ≤ n)。相邻的数用空格分隔。…
2021/8/17 23:10:04 人评论 次浏览 -
PAT (Advanced Level) Practice 1121 Damn Single (25 分) 凌宸1642
PAT (Advanced Level) Practice 1121 Damn Single (25 分) 凌宸1642 题目描述: "Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken ca…
2021/8/14 23:10:21 人评论 次浏览 -
PAT (Advanced Level) Practice 1121 Damn Single (25 分) 凌宸1642
PAT (Advanced Level) Practice 1121 Damn Single (25 分) 凌宸1642 题目描述: "Damn Single (单身狗)" is the Chinese nickname for someone who is being single. You are supposed to find those who are alone in a big party, so they can be taken ca…
2021/8/14 23:10:21 人评论 次浏览