SMU Spring 2023 Contest Round 2(待补
M. Different Billing
#include <map>
#include <set>
#include <cmath>
#include <queue>
#include <cstdio>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <iostream>
#include <algorithm>
#define inf 0x3f3f3f3f
#define endl '\n'
#define int long long using namespace std; const int N = 1e5 + 10, mod = 1e9 +7; //typedef long long ll;
typedef pair<int,int> PII;
//queue<PII> q1;
map<vector<int>, int > mp;
vector<int> a;
deque<char> s;
//priority_queue <int,vector<int>,greater<int> > q2;
int n,m,t,k;
/*
*/
void solve()
{
cin >> n >> m;
if(m == 0){
cout << n << ' ' << 0 << ' ' << 0 << endl;
return ;
}
int x = m / 2500 ;
for(int i = 0;i <= x;i ++){
int y = (m - i * 2500) / 1000;
if((n - x - y ) >= 0 && (i * 2500 + y * 1000 == m)){
cout << n - i - y << ' ' << y << ' ' << i << endl;
return;
}
}
cout << -1 << endl;
}
signed main()
{
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
int Ke_scholar = 1;
//cin >> Ke_scholar ;
while(Ke_scholar--)
solve();
return 0;
}
SMU Spring 2023 Contest Round 2(待补的更多相关文章
- 2015 Astar Contest - Round 3 题解
1001 数长方形 题目大意 平面内有N条平行于坐标轴的线段,且不会在端点处相交 问共形成多少个矩形 算法思路 枚举4条线段的全部组合.分别作为矩形四条边.推断是否合法 时间复杂度: O(N4) 代码 ...
- codeforces round 422 div2 补题 CF 822 A-F
A I'm bored with life 水题 #include<bits/stdc++.h> using namespace std; typedef long long int LL ...
- codeforces round 421 div2 补题 CF 820 A-E
A Mister B and Book Reading O(n)暴力即可 #include<bits/stdc++.h> using namespace std; typedef lon ...
- codeforces round 420 div2 补题 CF 821 A-E
A Okabe and Future Gadget Laboratory 暴力 #include<bits/stdc++.h> using namespace std; typedef l ...
- Codeforces round 419 div2 补题 CF 816 A-E
A Karen and Morning 水题 注意进位即可 #include<bits/stdc++.h> using namespace std; typedef long long i ...
- Educational Codeforces Round 23 A-F 补题
A Treasure Hunt 注意负数和0的特殊处理.. 水题.. 然而又被Hack了 吗的智障 #include<bits/stdc++.h> using namespace std; ...
- codeforces round 418 div2 补题 CF 814 A-E
A An abandoned sentiment from past 水题 #include<bits/stdc++.h> using namespace std; int a[300], ...
- codeforces round 417 div2 补题 CF 812 A-E
A Sagheer and Crossroads 水题略过(然而被Hack了 以后要更加谨慎) #include<bits/stdc++.h> using namespace std; i ...
- April Fools Day Contest 2019: editorial回顾补题
A. Thanos Sort time limit per test 1 second memory limit per test 256 megabytes input standard input ...
- codeforces round 416 div2 补题 CF 811 A B C D E
A. Vladik and Courtesy 水题略过 #include<cstdio> #include<cstdlib> #include<cmath> usi ...
随机推荐
- Linux多网卡的bond模式原理
Linux多网卡绑定 网卡绑定mode共有7种: bond0,bond1,bond2,bond3,bond4,bond5,bond6,bond7 常用的有三种: mode=0: 平衡负载模式, ...
- Ethercat设备数据 转 EthernetIP项目案例
1 案例说明 1. 设置网关采集EtherCAT设备数据 2. 把采集的数据转成EthernetIP协议转发给其他系统. 2 VFBOX网关工作原理 VFBOX网 ...
- Gitlab的安装和使用
安装和配置必要的依赖项 yum install dnf sudo dnf install -y curl policycoreutils openssh-server #将SSH服务设置成开机自启动 ...
- 【经验分享】Docker容器部署方法说明
前 言 本案例适用开发环境: Windows开发环境:Windows 7 64bit.Windows 10 64bit Linux开发环境:Ubuntu 18.04.4 64bit 虚拟机:VMwa ...
- JSON 的了解?
1., JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式.(为了和其他语言进行交互)2. 数据格式简单, 易于读写, 占用带宽小{'age':'12', ' ...
- 使用FastReport报表动态更新人员签名图片
在一些报表模块中,需要我们根据用户操作的名称,来动态根据人员姓名,更新报表的签名图片,也就是电子手写签名效果,本篇随笔介绍一下使用FastReport报表动态更新人员签名图片. 1.设计FastRep ...
- 屏幕分辨率基础概念PX,PT,DP,DPR,DPI说明
屏幕分辨率基础概念说明 缩写 全称 说明 PX Device Pixels 设备像素,指设备的物理像素 PX CSS Pixels CSS像素,指CSS样式代码中使用的逻辑像素 DOT Dot 点,屏 ...
- git 怎么将某个开发分支最近几次的提交合并成一次提交
1. 切换到开发分支: git checkout dev 2. 运行交互式 rebase 命令,并指定要合并的提交数量(在这个例子中是最近的3次提交): git rebase -i HEAD~3 3. ...
- [oeasy]python0 113_字符编码_VT100控制码_iso_8859_1_拉丁字符_latin
拉丁字符 回忆上次内容 上次回顾了字型编码的进化过程 7-bit 的 点阵字库 终于让 字母.数字.标点 明确了字型 但是 7-bit 的 ascii中 没有法文字符的位置 添加图 ...
- oeasy教您玩转vim - 25 - 更多颜色
更多颜色 回忆上节课内容 我们上次深入了配色方案 定义了自己的配色方案 oeasy 建立了自己的配色 oeasy 在状态栏应用了自己的配色 明确能用的颜色 先胡乱地尝试一下修改颜色代码 hi ...