[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分类 流传最广的一种分类: 初期: 一.基本算 ...
随机推荐
- Azure .Net应用架构原型
本文介绍一种部署在azure 上.net 应用的一种常用架构对接者.这个角色可以是Api GateWay或代理或负载均衡器.目的有多方面,集中管理机器的注册和监控,安全,负载均衡,请求过滤,反向代理等 ...
- openssl之aes加密(源码分析 AES_encrypt 与 AES_cbc_encrypt ,加密模式)
首先要了解AES加密是什么,以及几种加密模式的区别.之后才是编程.具体的编程案例,在下面的链接. openssl之aes加密(AES_cbc_encrypt 与 AES_encrypt 的编程案例) ...
- UNIX 环境高级编程 文件和目录
函数stat , fstat , fstatat , lstat stat函数返回与此文件有关的信息结构. fstat函数使用已打开的文件描述符(而stat则使用文件名) fstatat函数 为一个相 ...
- java中的Reference
这两天又重新学习了一下Reference,根据网上的资源做了汇总. Java中的引用主要有4种: 强引用 StrongReference: Object obj = new Object(); obj ...
- Hypergraph Models超图模型
最近看了篇Paper(Hyperspectral Image Classification Through Bilayer Graph-Based Learning),里面出现了一个超图(Hyperg ...
- CSS Div固定在网页顶部、底部、左侧、右侧
Div固定在网页顶部 .header { width:100%; height:80px; background-color:#FAFAFA; position:fixed; top:; left:; ...
- 《DSP using MATLAB》示例Example7.14
代码: M = 20; alpha = (M-1)/2; l = 0:M-1; wl = (2*pi/M)*l; Hrs = [1, 1, 1, zeros(1, 15), 1, 1]; % Idea ...
- Mac OS安装php-redis扩展
下载php-redis(用于php5.x的版本),地址:https://nodeload.github.com/nicolasff/phpredis/zip/master. 如果是php7.2,选择p ...
- matplotlib ----- 清空图片
关闭单个图: fig = plt.figure(0) # 新图 0 plt.savefig() # 保存 plt. close(0) # 关闭图 0 关闭所有图不用管 fig 号码 fig = p ...
- lapis 集成openresty最新版本cjson 问题的解决
备注: 为了解决安装了lapis.同时又希望使用新版nginx 以及openresty 的特性(stream ...) 1. 解决方法 参考: https://github.com/leaf ...