搜索结果
查询Tags标签: 1083,共有 9条记录-
1083 List Grades
1083 List Grades Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student records of which the grades are in a given interval. Input Spe…
2022/2/4 23:44:48 人评论 次浏览 -
PAT甲级1083 List Grades (25 分)
排序 #include<iostream> #include<algorithm> using namespace std;struct stu{string name,kemu;int score; }; int cmp(stu a,stu b){return a.score>b.score; } int main() {int n;cin>>n;int m,k;stu s[n];for(int i=0;i<n;i++)cin>>s…
2021/11/17 23:14:06 人评论 次浏览 -
PAT甲级1083 List Grades (25 分)
排序 #include<iostream> #include<algorithm> using namespace std;struct stu{string name,kemu;int score; }; int cmp(stu a,stu b){return a.score>b.score; } int main() {int n;cin>>n;int m,k;stu s[n];for(int i=0;i<n;i++)cin>>s…
2021/11/17 23:14:06 人评论 次浏览 -
1083 是否存在相等的差 (20 point(s))
水题 * 3 。 #include <bits/stdc++.h> using namespace std;int main() {int n;map<int, int> ans; cin >> n;for(int front = 1; front <= n; front++){int contrary;cin >> contrary;// 计算并存入数组ans[abs(front - contrary)]++; }for(…
2021/9/16 23:05:08 人评论 次浏览 -
1083 是否存在相等的差 (20 point(s))
水题 * 3 。 #include <bits/stdc++.h> using namespace std;int main() {int n;map<int, int> ans; cin >> n;for(int front = 1; front <= n; front++){int contrary;cin >> contrary;// 计算并存入数组ans[abs(front - contrary)]++; }for(…
2021/9/16 23:05:08 人评论 次浏览 -
PAT (Advanced Level) Practice 1083 List Grades (25 分) 凌宸1642
PAT (Advanced Level) Practice 1083 List Grades (25 分) 凌宸1642 题目描述: Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student r…
2021/8/9 6:06:42 人评论 次浏览 -
PAT (Advanced Level) Practice 1083 List Grades (25 分) 凌宸1642
PAT (Advanced Level) Practice 1083 List Grades (25 分) 凌宸1642 题目描述: Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those student r…
2021/8/9 6:06:42 人评论 次浏览 -
PTA basic 1083 是否存在相等的差 (20 分) c++语言实现(g++)
给定 N 张卡片,正面分别写上 1、2、……、N,然后全部翻面,洗牌,在背面分别写上 1、2、……、N。将每张牌的正反两面数字相减(大减小),得到 N 个非负差值,其中是否存在相等的差? 输入格式: 输入第一行给出一个正整数 N(2 ≤ N ≤ 10 000),随后一行给出 1 到 N…
2021/5/13 20:25:20 人评论 次浏览 -
PAT 乙级 1083.是否存在相等的差 C++/Java
题目来源 给定 N 张卡片,正面分别写上 1、2、……、N,然后全部翻面,洗牌,在背面分别写上 1、2、……、N。将每张牌的正反两面数字相减(大减小),得到 N 个非负差值,其中是否存在相等的差? 输入格式: 输入第一行给出一个正整数 N(2 ≤ N ≤ 10 000),随后一行给…
2021/5/5 12:55:08 人评论 次浏览