CodeForces660B【模拟—水】】的更多相关文章

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题目大意:给一个字符串…
题目链接:http://poj.org/problem?id=2864 题意:参照题目 哈哈哈,这个题discuss有翻译哦.水到我不想交了. #include <cstdio> #include <cstdlib> #include <cstring> ][]; int main(void) { int r, c; int i, j; int flag; || r != ) { memset(arr, , sizeof(arr)); ; i < r; i++)…