[POJ] Bode Plot
Description
You are to write a program to determine VR for different values of w. You will need two laws of electricity to solve this problem. The first is Ohm's Law, which states v2 = iR where i is the current in the circuit, oriented clockwise. The second is i = C d/dt (v1-v2) which relates the current to the voltage on either side of the capacitor. "d/dt"indicates the derivative with respect to t.
Input
Output
Sample Input
1.0 1.0 1.0 9
0.01
0.031623
0.1
0.31623
1.0
3.1623
10.0
31.623
100.0
Sample Output
0.010
0.032
0.100
0.302
0.707
0.953
0.995
1.000
1.000
/*
一道无聊的数学题
推导出公式即可
*/
#include<iostream>
#include<cmath>
#include<stdio.h>
using namespace std; int main()
{
double vs, r, c;
int n;
cin>>vs>>r>>c;
cin>>n; while(n-->0)
{
double w;
cin>>w; double vr = r*c*w*vs*sqrt(1/(r*c*w*r*c*w+1)); printf("%.3lf\n", vr);
} return 0;
}
[POJ] Bode Plot的更多相关文章
- POJ 1045:Bode Plot
Bode Plot Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 13392 Accepted: 8462 Descri ...
- POJ1045 Bode Plot
题目来源:http://poj.org/problem?id=1045 题目大意: 如图所示的交流电路,假设电路处于稳定状态,Vs为电源电压,w是频率,单位为弧度每秒,t表示时间. 则:V1 = Vs ...
- 1045 Bode Plot
题目链接:http://poj.org/problem?id=1045 一道数学物理题, 推理公式:http://www.cnblogs.com/rainydays/archive/2013/01/0 ...
- POJ题目排序的Java程序
POJ 排序的思想就是根据选取范围的题目的totalSubmittedNumber和totalAcceptedNumber计算一个avgAcceptRate. 每一道题都有一个value,value ...
- POJ 题目分类(转载)
Log 2016-3-21 网上找的POJ分类,来源已经不清楚了.百度能百度到一大把.贴一份在博客上,鞭策自己刷题,不能偷懒!! 初期: 一.基本算法: (1)枚举. (poj1753,poj2965 ...
- (转)POJ题目分类
初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. ...
- poj分类
初期: 一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. ( ...
- poj 题目分类(1)
poj 题目分类 按照ac的代码长度分类(主要参考最短代码和自己写的代码) 短代码:0.01K--0.50K:中短代码:0.51K--1.00K:中等代码量:1.01K--2.00K:长代码:2.01 ...
- POJ题目分类(按初级\中级\高级等分类,有助于大家根据个人情况学习)
本文来自:http://www.cppblog.com/snowshine09/archive/2011/08/02/152272.spx 多版本的POJ分类 流传最广的一种分类: 初期: 一.基本算 ...
随机推荐
- .NET Web开发技术简单整理 转
.NET Web开发技术简单整理 原文:http://www.cnblogs.com/SanMaoSpace/p/3157293.html 在最初学习一些编程语言.一些编程技术的时候,做的更多的是如何 ...
- JavaScript HTML Handlebars Template
/********************************************************************* * JavaScript HTML Handlebars ...
- Jmeter用表格查看结果
Sample#:编号类似id Start Time:开始时间 Thread Name:线程名称 Label:请求名称 Sample Time:取样时间ms Status:状态 Bytes:接受字节数 ...
- Linux shell字符串截取与拼接
一 Linux 的字符串截取很有用.有八种方法. 假设有变量 var=http://www.linuxidc.com/123.htm 1 # 号截取,删除左边字符,保留右边字符. echo ${va ...
- BZOJ4547 Hdu5171 小奇的集合 【矩阵快速幂优化递推】
BZOJ4547 Hdu5171 小奇的集合 Description 有一个大小为n的可重集S,小奇每次操作可以加入一个数a+b(a,b均属于S),求k次操作后它可获得的S的和的最大值.(数据保证这个 ...
- scrapy 伪装代理和fake_userAgent的使用
伪装浏览器代理 在爬取网页是有些服务器对请求过滤的不是很高可以不用ip来伪装请求直接将自己的浏览器信息给伪装也是可以的. 第一中方法: 1.在setting.py文件中加入以下内容,这是一些浏览器的头 ...
- Tornado的入门研究
1.为啥要了解Tornado 首先,Tornado是大神写出来的,如果学习python的话,参照Tornado的源码是一件非常好的事情,属于FaceBook的开源代码 其次,Tornado就是我们在 ...
- PF不明内存泄露已解决,白头发也没了(转)
在使用OpenExpressApp进行WPF应用开发过程中遇到多个内存泄漏的地方,在上一篇中求助了一个内存泄露问题[WPF不明内存泄露原因,头发都白了几根],本篇与大家分享一下如何解决此问题的过程. ...
- 如何定位占用cpu过高的线程
如何定位占用cpu过高的线程 近来发现平台应用响应越来越慢,通过top命令发现,cpu占用率越来越高 1. 首先根据top命令,发现占用cpu最高的进程PID:3075. 通过ps aux | gre ...
- Requirejs简单介绍
具体详情请进入官网查阅:http://requirejs.org 一.什么是Requirejs RequireJS是一个非常小巧的JavaScript模块载入框架,是AMD规范最好的实现者之一. 二. ...