Exam(贪心)】的更多相关文章

题意:告诉你n 个科目的考试日期,在考试当天不能复习,每一个科目的最早复习时间不能早于考试时间的t天,每一天你可以复习完一科,也只能复习一科,求最晚的复习时间!. 析:由于题目给定的时间都在1900 ~ 2100 之间,所以先预处理时间,然后把每个科目按照考试时间最晚的优先策略进行排序,从后向前扫,看看能不能在规定时间内完成复习,然后维护一个优先队列,这个优先策略是开始时间减去 t 最大的优先,因为我们是从后向前找,肯定是越大越应该完成,要不然就完不成了,如果中间有完成不成的,就是不可能,否则就…
CF-1093 1093A - Dice Rolling 输出x/2即可 #include<bits/stdc++.h> using namespace std; int main() { int t; cin >> t; while (t--) { int x; cin >> x; cout << x / 2 << endl; } return 0; } 1093B - Letters Rearranging 当且仅当字符串中所有字符都相同时,…
A. Dice Rolling 把\(x\)分解为\(a * 6 + b\),其中\(a\)是满6数,\(b\)满足\(1 <= b < 6\),即可... #include <iostream> #include <cstdio> using namespace std; int main(){ int T; scanf("%d", &T); while(T--){ int x; scanf("%d", &x);…
Exam Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1028    Accepted Submission(s): 510 Problem Description As this term is going to end, DRD needs to prepare for his final exams. DRD has n exa…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3721 容易的贪心题,排个序.. //STATUS:C++_AC_840MS_6272KB #include <functional> #include <algorithm> #include <iostream> //#include <ext/rope> #include <fstream> #include…
Exam Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1944    Accepted Submission(s): 948 Problem Description As this term is going to end, DRD needs to prepare for his final exams. DRD has n exa…
题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3721 来源:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=26644#problem/F Final Exam Arrangement Time Limit: 4 Seconds      Memory Limit: 65536 KB      Special Judge In Zhejiang Univ…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mishka is trying really hard to avoid being kicked out of the university. In particular, he was doing absolutely nothing for the whole semes…
链接:https://codeforces.com/contest/1282/problem/C 题意:  有一个人参加考试,考试只有两种题,一种是简单题,每道题耗时固定为a:另一种是困难题,每道题耗时固定为b,保证b>a.解出一道题得分都是1.考试的规则并不只是写多少题得多少分,鼓励提前交卷.假如你没有提前交卷,那么有一部分的题目会列为“必做题”,当“必做题”的题目没有全部被完成的话,这门课就算0分:否则得到与题数相同的分数,包括“必做”和“非必做”的. 题意: 题意很明显需要按题目的“必做时…
题意:有n门课,价值之和为m,每门课的价值可能是0到m 一门价值为x的课需要花至少x+1时间准备才能通过 问不管价值如何分配都能通过至少k门课的最小总准备时间 m,n,k<=1e9 思路: #include<bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned int uint; typedef unsigned long long ull; typedef pair<int,int&g…
D. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasiliy has an exam period which will continue for n days. He has to pass exams on m subjects. Subjects are numbered from 1 to m. Ab…
题目链接: A. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Student Valera is an undergraduate student at the University. His end of term exams are approaching and he is to pass exactly …
A. Vanya and Cubes time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vanya got n cubes. He decided to build a pyramid from them. Vanya wants to build the pyramid as follows: the top level of…
D. Lazy Student   Student Vladislav came to his programming exam completely unprepared as usual. He got a question about some strange algorithm on a graph — something that will definitely never be useful in real life. He asked a girl sitting next to…
C. Vanya and Exams Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/492/problem/C Description Vanya wants to pass n exams and get the academic scholarship. He will get the scholarship if the average grade mark for all the ex…
A. Exams Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/480/problem/A Description Student Valera is an undergraduate student at the University. His end of term exams are approaching and he is to pass exactly n exams. Valera…
In Zhejiang University, there are N different courses labeled from 1 to N. Each course has its own time slot during the week. We can represent the time slot of a course by an left-closed right-open interval [s, t). Now we are going to arrange the fin…
HDU 4442 Physical Examination(贪心) 题目链接http://acm.split.hdu.edu.cn/showproblem.php?pid=4442 Description WANGPENG is a freshman. He is requested to have a physical examination when entering the university. Now WANGPENG arrives at the hospital. Er-.. Th…
Physical Examination Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6155 Accepted Submission(s): 1754 Problem Description WANGPENG is a freshman. He is requested to have a physical examination wh…
题目链接: http://codeforces.com/contest/606/problem/D D. Lazy Student time limit per test2 secondsmemory limit per test256 megabytes 问题描述 Student Vladislav came to his programming exam completely unprepared as usual. He got a question about some strange…
题目: C. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Student Valera is an undergraduate student at the University. His end of term exams are approaching and he is to pass exactly ne…
After the data structures exam, students lined up in the cafeteria to have a drink and chat about how much they have enjoyed the exam and how good their professors are. Since it was late in the evening, the cashier has already closed the cash registe…
C. Vanya and Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vanya wants to pass n exams and get the academic scholarship. He will get the scholarship if the average grade mark for al…
D. Exams time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Vasiliy has an exam period which will continue for n days. He has to pass exams on m subjects. Subjects are numbered from 1 to m. Ab…
B. Petya and Exam 题目链接 题意 给你一串字符,在这个串中所有出现的字符都是\(good\)字符,未出现的都是\(bad\)字符, 然后给你另一串字符,这个字符串中有两个特殊的字符,一个是\(?\)这个字符只能被\(good\)字符代替,另一个是\(*\)这个能被忽略,或者被\(bad\)字符组成的字符串代替. 然后给你n个字符串,问你是否能通过代替原本串中的符号来变得. 思路 首先判断原本串中是否存在\(*\)字符如果不存在,那么下面的串的长度就应该和原本串的长度相等.如果存…
1692: [Usaco2007 Dec]队列变换 Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 1383  Solved: 582[Submit][Status][Discuss] Description FJ打算带他的N(1 <= N <= 30,000)头奶牛去参加一年一度的“全美农场主大奖赛”.在这场比赛中,每个参赛者都必须让他的奶牛排成一列,然后领她们从裁判席前依次走过. 今年,竞赛委员会在接受队伍报名时,采用了一种新的登记规则:他们把所…
Wooden Sticks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 15564    Accepted Submission(s): 6405 Problem Description There is a pile of n wooden sticks. The length and weight of each stick a…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56784    Accepted Submission(s): 19009 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
1691: [Usaco2007 Dec]挑剔的美食家 Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 786  Solved: 391[Submit][Status][Discuss] Description 与很多奶牛一样,Farmer John那群养尊处优的奶牛们对食物越来越挑剔,随便拿堆草就能打发她们午饭的日子自然是一去不返了.现在,Farmer John不得不去牧草专供商那里购买大量美味多汁的牧草,来满足他那N(1 <= N <= 100,…
http://codeforces.com/contest/738/problem/D Galya is playing one-dimensional Sea Battle on a 1 × n grid. In this game a ships are placed on the grid. Each of the ships consists of bconsecutive cells. No cell can be part of two ships, however, the shi…