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 ...
随机推荐
- sql-labs通关笔记(上)
sql-labs通关笔记(上) 这里我们先只讲解less-1到less-9 联合查询注入 Less-1:GET -Error based.Single quotes -string 界面 在url中加 ...
- 3568F-翼辉SylixOS国产操作系统演示案例
- “国产双系统”出炉,RK3568J非对称AMP:Linux+RTOS/裸机
"非对称AMP"双系统是什么 AMP(Asymmetric Multi-Processing),即非对称多处理架构."非对称AMP"双系统是指多个核心相对独立运 ...
- mysql语句大全-工作中常用整理(欢迎大家在评论区继续补充)
1.NOT EXISTS 和 NOT IN SELECT COUNT(ca.aaa) FROM xx ca WHERE NOT EXISTS( SELECT label.* FROM xxx labe ...
- Spark内核架构核心组件.txt
1.Application2.spark-submit3.Driver4.SparkContext5.Master6.Worker7.Executor8.Job9.DAGScheduler10.Tas ...
- vue - ES6模块化、promise、webpack打包(所在在学的朋友们先看这篇,看了不吃亏)
首先我要说明一下,没错,还是没有进入vue,刘备请诸葛亮三次都可以了吧,我这也是第三次了,也绝对是最后一次了,我应经摸透了因为,最后的webpack打包加上一个git学了过后我就去vue了. 为什么要 ...
- 记一次debian无法启动的解决经历
前言 有几台debian物理机突然无法开机了,断电重启后,一直卡在下面这个界面 参考了博客[linux]解决系统卡在ubuntu loading initial ramdisk 发现无法修复 在rec ...
- SSM中Mybatis的配置
注:数据库连接(此过程不当做本次笔记重点,只做简单概述) 1.创建并配置jdbc.properties文件 2.通过Druid连接池配置连接数据库 3.将数据源(dataSource)注入IOC 详细 ...
- mysql 二进制的读取与写入
插入语句 用binary转换函数可将字符串转为二进制 insert into mytable (id, bin) values(1, binary('abcdef')) 查询语句 用cast进行类型转 ...
- Linux-Cgroup V2 初体验
本文主要记录 Linux Cgroup V2 版本基本使用操作,包括 cpu.memory 子系统演示. 1. 开启 Cgroup V2 版本检查 通过下面这条命令来查看当前系统使用的 Cgroups ...