ZOJ 3782 G - Ternary Calculation 水】的更多相关文章

LINK:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3782 题意:给出3个数和两个符号(+-*/%) 思路:拿到题目还以为是要写波兰表达式,仔细一看固定的数和固定的符号,直接if判断好了 /** @Date : 2017-03-23-21.31 * @Author : Lweleth (SoungEarlf@gmail.com) * @Link : https://github.com/ * @Version :…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3782 题意:把输入的三元运算用计算机运算出来. ;          cin>>a>>n>>b>>m>>c;                                        s1=a*b;                               s1=a/b;                       …
Ternary Calculation Time Limit : /2000ms (Java/Other) Memory Limit : /65536K (Java/Other) Total Submission(s) : Accepted Submission(s) : Problem Description Complete the ternary calculation. Input There are multiple test cases. The first line of inpu…
LINK:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3778 题意:有n道菜,每道菜需要\(a_i\)道工序,有m个锅可以同时做不同菜,问最小时间. 思路:水题,但要注意最小需要的时间显然是最大的\(a_i\)值,剩下的就是求个均,求个余的事了. /** @Date : 2017-03-24-14.35 * @Author : Lweleth (SoungEarlf@gmail.com) * @Link : http…
A. Power Consumption Calculation 题目连接: http://www.codeforces.com/contest/10/problem/A Description Tom is interested in power consumption of his favourite laptop. His laptop has three modes. In normal mode laptop consumes P1 watt per minute. T1 minute…
Problem 1057: Hkhv的水题之二 Time Limits:  1000 MS   Memory Limits:  65536 KB 64-bit interger IO format:  %lld   Java class name:  Main Description 杨神喜欢字符串,于是他写程序随机生成了n个长度不大于100的字符串.但是他认为这里面有一些字符串是一样的.比如,abcd,bcda,cdab,dabc这4个他认为就是一样的. 因此,杨神想知道,这些随机生成的字符串…
题目链接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3959 AC代码 #include <cstdio> #include <cstring> #include <ctype.h> #include <cstdlib> #include <iostream> #include <algorithm> #include <cmath> #inc…
题目链接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3958 AC代码 #include <cstdio> #include <cstring> #include <ctype.h> #include <cstdlib> #include <iostream> #include <algorithm> #include <cmath> #inc…
Information Entropy Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge Information Theory is one of the most popular courses in Marjar University. In this course, there is an important chapter about information entropy. Entropy is t…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1796 题意: 四个人玩游戏,已知三个人的输赢情况,求第四个人的输赢情况. 思路: 设第一个人赢的次数为x输的次数为y 则 x+a1+a2+a3=y+b1+b2+b3 x+y=a1+b1 所以 x=(2*b1+b2+b3-a2-a3)/2 y=a1+b1-x #include<iostream> #include<cstdio> using namespace…