zzulioj--1824--BOOM(模拟水)】的更多相关文章

1824: BOOM Time Limit: 1 Sec  Memory Limit: 128 MB Submit: 25  Solved: 5 SubmitStatusWeb Board Description 爆破组有n包***,每包***有一定的药量,现在需要爆破A,B两个地点,A地点可以放置两包***,B地点只能放置一包***,爆破的效果为两地点药量的乘积,请给出最好效果. Input 多实例.每个实例第一行是一个正整数N,代表有N个*** 接下来一行有N个数字,分别代表每一个***的药…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049    Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
Flow Layout Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 3091   Accepted: 2148 Description A flow layout manager takes rectangular objects and places them in a rectangular window from left to right. If there isn't enough room in one r…
感觉模拟题用函数分块写比较清晰~传参的话,字符串要么直接全局,或者指针也是容易操作,总之思路清晰,然后分块清晰,模拟wa的少吧. 这题水题,不说了. #include <bits/stdc++.h> using namespace std; typedef long long LL; int n,m; int ma[110][5]; void init() { for(int i=1;i<=n;i++) { for(int j=1;j<=4;j++) ma[i][j]=-1; }…
背景 NOIP2005复赛提高组第一题 描述 某校的惯例是在每学期的期末考试之后发放奖学金.发放的奖学金共有五种,获取的条件各自不同:1)     院士奖学金,每人8000元,期末平均成绩高于80分(>80),并且在本学期内发表1篇或1篇以上论文的学生均可获得: 2)     五四奖学金,每人4000元,期末平均成绩高于85分(>85),并且班级评议成绩高于80分(>80)的学生均可获得: 3)     成绩优秀奖,每人2000元,期末平均成绩高于90分(>90)的学生均可获得:…
题意:蚂蚁在木棍上爬,速度1cm/s,给出木棍长度和每只蚂蚁的位置,问蚂蚁全部下木棍的最长时间和最短时间. 模拟一下,发现其实灰常水的贪心... 不能直接求最大和最小的= =.只要求出每只蚂蚁都走长路下木棍时的最大值,和走短路时的就行了. 代码: /* * Author: illuz <iilluzen@gmail.com> * Blog: http://blog.csdn.net/hcbbt * File: uva10714.cpp * Lauguage: C/C++ * Create Da…
http://acm.hdu.edu.cn/showproblem.php?pid=4891 给出一个文本,问说有多少种理解方式. 1. $$中间的,(s1+1) * (s2+1) * ...*(sn+1), si表示连续的空格数. 2.{}中间,即 | 的个数+1. 就是模拟 #include <iostream> #include <cstring> #include <cstdio> #include <algorithm> #include <…
题目链接:http://codeforces.com/contest/832/problem/B B. Petya and Exam time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output It's hard times now. Today Petya needs to score 100 points on Informatics…
A. Hongcow Learns the Cyclic Shift time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Hongcow is learning to spell! One day, his teacher gives him a word that he needs to learn to spell. Bein…
#include <bits/stdc++.h> using namespace std; int main() { int T,n,a,b; while(cin>>T) { while(T--) { cin>>n; ; ;i<=n-;i++) { cin>>a>>b; ans=min(ans,a+b); } cout<<ans<<endl; } } ; } C. Captcha Cracker题目大意:给一个字符串…