https://codeforces.com/contest/1150/problem/A

题解:朴素

/*
*@Author:   STZG
*@Language: C++
*/
#include <bits/stdc++.h>
#include<iostream>
#include<algorithm>
#include<cstdlib>
#include<cstring>
#include<cstdio>
#include<string>
#include<vector>
#include<bitset>
#include<queue>
#include<deque>
#include<stack>
#include<cmath>
#include<list>
#include<map>
#include<set>
//#define DEBUG
#define RI register int
#define endl "\n"
using namespace std;
typedef long long ll;
//typedef __int128 lll;
const int N=100+10;
const int M=100000+10;
const int MOD=1e9+7;
const double PI = acos(-1.0);
const double EXP = 1E-8;
const int INF = 0x3f3f3f3f;
int t,n,m,k,p,l,r,u,v;
int ans,cnt,flag,temp,sum;
int a[N],b[N];
char str;
struct node{};
int main()
{
#ifdef DEBUGfreopen("input.in", "r", stdin);//freopen("output.out", "w", stdout);
#endif//ios::sync_with_stdio(false);//cin.tie(0);//cout.tie(0);//scanf("%d",&t);//while(t--){scanf("%d%d%d",&n,&m,&r);for(int i=1;i<=n;i++)scanf("%d",&a[i]);for(int i=1;i<=m;i++)scanf("%d",&b[i]);ans=r;for(int i=1;i<=n;i++)for(int j=1;j<=m;j++)ans=max(ans,r/a[i]*b[j]+r%a[i]);cout<<ans<<endl;//}#ifdef DEBUGprintf("Time cost : %lf s\n",(double)clock()/CLOCKS_PER_SEC);
#endif//cout << "Hello world!" << endl;return 0;
}

Stock Arbitraging相关推荐

  1. 【CodeForces - 1150A】Stock Arbitraging (贪心,水题)

    题干: Welcome to Codeforces Stock Exchange! We're pretty limited now as we currently allow trading on ...

  2. Codeforces Round #556 (Div. 1Div. 2)

    Codeforces Round #556 (Div. 1&&Div. 2) 题号 题目 知识点 A Stock Arbitraging 贪心 B Tiling Challenge 贪 ...

  3. 【73套】Epic Stock Media配乐音效素材合集包

    [73套]Epic Stock Media配乐音效素材合集包 大小:114G丨WAV Epic Stock Media 系列音效合辑 包含了战争电影音效.史诗梦幻音效.日常生活音效.森林环境音效.电影 ...

  4. [Swift]LeetCode901. 股票价格跨度 | Online Stock Span

    ★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★ ➤微信公众号:山青咏芝(shanqingyongzhi) ➤博客园地址:山青咏芝(https://www.cnblog ...

  5. Best Time to Buy and Sell Stock II

    题目: Say you have an array for which the i th element is the price of a given stock on day i. Design ...

  6. 121-Best Time to Buy and Sell Stock

    题目: Say you have an array for which the ith element is the price of a given stock on day i. If you w ...

  7. 1578: [Usaco2009 Feb]Stock Market 股票市场

    1578: [Usaco2009 Feb]Stock Market 股票市场 Time Limit: 10 Sec  Memory Limit: 64 MB Submit: 414  Solved:  ...

  8. 大宗商品(Bulk Stock)交易

    大宗商品(Bulk Stock) 是指可进入流通领域,但非零售环节,具有商品属性用于工农业生产与消费使用的大批量买卖的物质商品.在金融投资市场,大宗商品指同质化. 可交易. 被广泛作为工业基础原材料的 ...

  9. 99_leetcode_Best Time to Buy and sell Stock

    Say you have an array for which the ith element is the price of a given stock on day i. If you were ...

最新文章

  1. 如何写一个完善的c++异常处理类
  2. hdu1846巴什博弈(java)
  3. keras cnn注意力机制_从发展历史视角解析Transformer:从全连接CNN到Transformer
  4. reactjs组件的生命周期:创建时和更新时
  5. .dll文件存在但是不显示_一招巧妙解决U盘内文件明明存在,打开U盘而内容却不显示的问题...
  6. PHP编写命令行脚本和后台运行程序的注意事项
  7. QQ浏览器如何添加并进入书签地址?QQ浏览器添加并进入书签地址的方法
  8. linux动态库加载RPATH,RUNPATH
  9. 《Java程序员职场全攻略:从小工到专家》连载十五:我们不是爱加班
  10. 使用ffmpeg将ASS字幕打进视频流中
  11. 使用shell脚本实现everthing的功能
  12. Xshell7绿色版使用公钥对免密连接虚拟机(centos7.9-保姆级)
  13. 滴滴入局同城货运,一场闪电战,还是持久战?
  14. 八年级计算机考试试题奥运会,八年级信息技术考试试题及答案
  15. optaplanner学习笔记(二)OptPlanner求解步骤及配置
  16. SVN报错:Cannot checkout from svn: svn: E155000: 'F:\SVN-Flx\。。。。' is alrea
  17. 新浪微博营销的方式与技巧都有哪些呢?
  18. tableau货架图制作_Tableau代写制作地图可视化和树形图、条形图
  19. Altera FPGA 远程更新
  20. 赞!原来还有这些免费图片下载网站(内附部分爬虫代码)

热门文章

  1. java 字节取位_java位 、字节 、字符的梳理
  2. python判断是否是英文字母_用python如何判断字符串是纯英文
  3. 蓄水池问题c语言编程,蓄水池大作战
  4. php生成zip文件,使用PHP处理zip压缩文件之ZipArchive
  5. oracle数据库的model,Oracle 11g学习笔记–model子句
  6. VSC为_计及功率控制模式的VSC-MTDC交直流并列运行系统概率潮流计算
  7. 九十七、轻松搞定Python中的PDF办公自动化系列
  8. 七十二、Python | Leetcode字符串系列(下篇)
  9. tensorflow笔记
  10. K折交叉验证和pipeline