G - Preparing for Exams】的更多相关文章

题目链接: https://vjudge.net/contest/251958#problem/G 具体思路: 圆内四边形内角互补,所以,如图所示. 证明,三角形oda和三角形obc相似. 第一步,角o都相等 第二步,证明角oda等于角obc.(角oda+角adc=180.角adc+角abc等于180(圆的性质,对顶角相加等于180,),所以,得证), 代码链接: #include<iostream> #include<string> #include<cstring>…
http://codeforces.com/contest/978/problem/G 感冒是真的受不了...敲代码都没力气... 题目大意: 期末复习周,一共持续n天,有m场考试 每场考试有如下信息: ①si表示知道第i门课的考试时间是在第si天的时候 ②di表示第i门课的考试时间 ③ci表示准备第i门课需要ci天的复习 在考试的那一天不能复习. 问n天中每一天都需要干啥? 三种情况,休息(输出0),复习(输出复习那一门科目的id),考试(输出m+1) 思路:按照di排序(即按照截止时间),然…
题意:你有\(n\)天的时间,这段时间中你有\(m\)长考试,\(s\)表示宣布考试的日期,\(d\)表示考试的时间,\(c\)表示需要准备时间,如果你不能准备好所有考试,输出\(-1\),否则输出你每天都在干什么,如果这一天你有考试,输出\(m+1\),如果你要准备第\(i\)场考试,输出\(i\),否则休息,输出\(0\). 题解:数据范围小,直接模拟,但我们需要先贪心,即每次都要先准备最早的考试,然后直接写两个\(for\)循环就行了. 代码: #include <iostream> #…
D. Exams Problem Description: 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. About every day we know exam for which one of m subjects can be passed on that day. Perhap…
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…
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…
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. About…
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…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard 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. About every day…
CF732D Exams 题目描述 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\) . About every day we know exam for which one of \(m\) subjects can be passed on that day. P…