您当前的位置: 首页 >  蓝桥杯

*DDL_GzmBlog

暂无认证

  • 0浏览

    0关注

    605博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

[Acwing | 蓝桥杯] 1209. 带分数 dfs

*DDL_GzmBlog 发布时间:2022-02-25 21:19:16 ,浏览量:0

前言

传送门 :

思路

可以使用 d f s dfs dfs暴力出一个 9 9 9位数的全排列

然后通过双重循环去分割

CODE
// Problem: 带分数
// Contest: AcWing
// URL: https://www.acwing.com/problem/content/1211/
// Memory Limit: 64 MB
// Time Limit: 1000 ms
// 
// Powered by CP Editor (https://cpeditor.org)

//��һ�δ��Ϻ�վ֮�� ��Ϊʹ��#define int long long TLE���¿��˺ܾõ�ʱ�� ���˼���ģ��
//����ʹ�ø��ӵ�ģ��

#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;
#define IOS  ios::sync_with_stdio(false);
#define CIT  cin.tie(0);
#define COT  cout.tie(0);

#define ll long long
#define x first
#define y second
#define pb push_back
#define endl '\n'
#define all(x) (x).begin(),x.end()


typedef priority_queue  Pri_m;
typedef pair pii;
typedef vector VI;
map mp;

const int N  = 10;
int n,cnt;
int num[N];//全排列结果
bool st[N];

int calc(int l,int r){
	int res = 0 ;
	for(int i = l;i            
关注
打赏
1657615554
查看更多评论
0.0667s