【CF1028B】Unnatural Conditions(构造)
2024-09-30 00:26:18
题意:给定n与m,要求构造两个长度不超过2230的数字x,y使得x,y各自的数位和>=n,x+y的数位和<=n
思路:
#include<cstdio>
#include<cstring>
#include<string>
#include<cmath>
#include<iostream>
#include<algorithm>
#include<map>
#include<set>
#include<queue>
#include<vector>
using namespace std;
typedef long long ll;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef pair<int,int> PII;
typedef vector<int> VI;
#define fi first
#define se second
#define MP make_pair
#define N 2100000
#define MOD 1000000007
#define eps 1e-8
#define pi acos(-1) int read()
{
int v=,f=;
char c=getchar();
while(c<||<c) {if(c=='-') f=-; c=getchar();}
while(<=c&&c<=) v=(v<<)+v+v+c-,c=getchar();
return v*f;
} void swap(int &x,int &y)
{
int t=x;x=y;y=t;
} int main()
{
// freopen("cf1028B.in","r",stdin);
// freopen("cf1028B.out","w",stdout);
int n,m;
scanf("%d%d",&n,&m);
for(int i=;i<=;i++) printf("");
printf("\n");
for(int i=;i<=;i++) printf("");
printf("");
return ;
}
最新文章
- storm集群部署和配置过程详解
- Google140道面试题
- Navicat for MySQL的服务器连接管理
- 【剑指offer】连续子数组最大和
- Epic - Tic Tac Toe
- UITableView优化技巧
- Unity 之 Redux 模式(第二篇)—— Rigidbody 改造,摄像机控制
- 电池和Adapter切换电路改进实验
- [译]Stairway to Integration Services Level 10 - 高级事件活动
- Python 函数简介 之二
- $.ajax 中的contentType
- TopCoder SRM 558 Div 1 - Problem 1000 SurroundingGame
- hdu 3473 划分树
- js 骂人不带脏字 (!(~+[]) + {})[--[~+";";][+[]] * [~+[]] + ~~!+[]] + ({} + [])[[~!+[]] * ~+[]] 图解
- 软件测试面试-必掌握的 Linux常用命令大全--2.0更新版!
- java 可设置最大内存
- 函数(二):input、raw_input、lambda、repr、map、filter、reduce、eval、exec、range、xrange
- C程序编程规范一
- IIS6独立用户建立网站的方法,提高网站安全性
- django错误笔记——URL
热门文章
- Java迭代器问题 有100个人围成一个圈从1开始报数,报到14的这个人就要退出,然后其他人重新开始,从1报数,到14退出问:最后剩下的是100人中的第几个人 用listIterator迭代元素,并对集合进行删除操作
- sql 经典加强巩固练习题
- linux :没有找到 ifconfig netstat
- python入门:最基本的用户登录
- 拓展jQuery的serialize(),将form表单转化为json对象
- 使用slot-scope复制vue中slot内容
- python 列表加法";+";和";extend";的区别
- Linux学习-账号管理
- SDOJ 3742 黑白图
- TOJ1698: Balanced Lineup