HDU TIANKENG’s rice shop(模拟)】的更多相关文章

HDU 4884 TIANKENG's rice shop 题目链接 题意:模拟题.转一篇题意 思路:就模拟就可以.注意每次炒完之后就能够接单 代码: #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N = 1005; int T, n, t, k, m; struct Person { int t, p, num, ans; } p[N];…
# include <cstdio> # include <algorithm> # include <cstring> # include <cstdlib> using namespace std; int max(int a,int b) { return a>b?a:b; } int main() { int T,n,t,k,m,i,hh,min,id,num,x; int last[1010];//最后一次開始炒饭的时间 int cot[10…
TIANKENG's rice shop 题目链接: http://acm.hust.edu.cn/vjudge/contest/123316#problem/J Description TIANKENG managers a pan fried rice shop. There are n kinds of fried rice numbered 1-n. TIANKENG will spend t time for once frying. Because the pan is so sma…
Problem Description TIANKENG managers a pan fried rice shop. There are n kinds of fried rice numbered 1-n. TIANKENG will spend t time for once frying. Because the pan is so small, TIANKENG can fry k bowls of fried rice with same kind at most. Assumin…
简单模拟,注意并不是完全按照FIFO的顺序.比如第i个人的id为k,那么就算第i+1人的id不为k,也会检查他后续的排队人是否有id为k的. #include <cstdio> #include <cstring> #include <cstdlib> #define MAXN 1005 typedef struct { int tt; int id; int num; int ans; } need_st; need_st needs[MAXN]; int main(…
HDU 4041 Eliminate Witches! (模拟题 ACM ICPC 2011 亚洲北京赛区网络赛题目) Eliminate Witches! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 863    Accepted Submission(s): 342 Problem Description Kaname Mado…
Thickest Burger Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 63    Accepted Submission(s): 60 Problem Description ACM ICPC is launching a thick burger. The thickness (or the height) of a piec…
Ugly Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 0    Accepted Submission(s): 0Special Judge Problem Description Everyone hates ugly problems.You are given a positive integer. You mu…
Football Games Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 802    Accepted Submission(s): 309 Problem Description A mysterious country will hold a football world championships---Abnormal Cup…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4814 题目大意: 把一个正整数表示为φ进制, φ = (1+√5)/2 . 且已知: 1. φ + 1 = φ 2 ,所以有11(φ) = 100(φ),且要求11要转变为100 2. 2 * φ 2  = φ3 + 1 . 解题思路: 观察发现,2 = 10.01.所以对于一个数N,能够从N/2 推导得到,是一个模拟的过程.我比赛的时候居然用了高速幂... 代码: #include<cstdio>…