当前位置:网站首页>Lambda expression learning
Lambda expression learning
2022-07-06 04:10:00 【whitewall_ nine】
#include<iostream>
#include<map>
using namespace std;
#define rep(i,l,r) for(int i=(l);i<=(r);i++)
#define per(i,l,r) for(int i=(l);i>=(r);i--)
#define ll long long
#define pii pair<int, int>
#define mset(s,t) memset(s,t,sizeof(t))
#define mcpy(s,t) memcpy(s,t,sizeof(t))
#define fir first
#define pb push_back
#define sec second
#define sortall(x) sort((x).begin(),(x).end())
inline int read () {
int x = 0, f = 0;
char ch = getchar();
while (!isdigit(ch)) f |= (ch=='-'),ch= getchar();
while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
return f?-x:x;
}
template<typename T> void print(T x) {
if (x < 0) putchar('-'), x = -x;
if (x >= 10) print(x/10);
putchar(x % 10 + '0');
}
const int mod = 998244353;
ll x;
map<ll, ll> cnt;
void solve() {
cin >> x;
auto f = [&](auto f, ll x) -> ll {
if (cnt[x]) return cnt[x];
if (x <= 4) return x;
return cnt[x] = f(f, x / 2) * f(f, (x+ 1) / 2) %mod;
};
cout << f(f, x) << endl;
}
int main () {
int t;
t = 1;
while (t --) solve();
return 0;
}
[&] To use this , Use this representation to capture all external variables so that you can assign values to other variables
边栏推荐
- 关于进程、线程、协程、同步、异步、阻塞、非阻塞、并发、并行、串行的理解
- 查询mysql数据库中各表记录数大小
- MySQL transaction isolation level
- Figure application details
- DM8 backup set deletion
- 记一次excel XXE漏洞
- 使用JS完成一个LRU缓存
- Conditionally [jsonignore]
- Pandora IOT development board learning (HAL Library) - Experiment 9 PWM output experiment (learning notes)
- Practical development of member management applet 06 introduction to life cycle function and user-defined method
猜你喜欢

MLAPI系列 - 04 - 网络变量和网络序列化【网络同步】

Développement d'un module d'élimination des bavardages à clé basé sur la FPGA

【leetcode】1189. Maximum number of "balloons"

Execution order of scripts bound to game objects

Lora gateway Ethernet transmission

Esp32 (based on Arduino) connects the mqtt server of emqx to upload information and command control

math_极限&微分&导数&微商/对数函数的导函数推导(导数定义极限法)/指数函数求导公式推导(反函数求导法则/对数求导法)

MySql数据库root账户无法远程登陆解决办法

What is the difference between gateway address and IP address in tcp/ip protocol?

Network security - Security Service Engineer - detailed summary of skill manual (it is recommended to learn and collect)
随机推荐
Ipv4中的A 、B、C类网络及子网掩码
[Zhao Yuqiang] deploy kubernetes cluster with binary package
Le compte racine de la base de données MySQL ne peut pas se connecter à distance à la solution
MLAPI系列 - 04 - 网络变量和网络序列化【网络同步】
Mysql数据库慢sql抓取与分析
80% of the diseases are caused by bad living habits. There are eight common bad habits, which are both physical and mental
[disassembly] a visual air fryer. By the way, analyze the internal circuit
Stable Huawei micro certification, stable Huawei cloud database service practice
About some basic DP -- those things about coins (the basic introduction of DP)
IDEA编译JSP页面生成的class文件路径
Plus d'un milliard d'utilisateurs de grandes entreprises comme Facebook ont été compromis, il est temps de se concentrer sur le did
Brief tutorial for soft exam system architecture designer | general catalog
Slow SQL fetching and analysis of MySQL database
Script lifecycle
[FPGA tutorial case 11] design and implementation of divider based on vivado core
The global and Chinese market of negative pressure wound therapy unit (npwtu) 2022-2028: Research Report on technology, participants, trends, market size and share
记一次excel XXE漏洞
Cf603e pastoral oddities [CDQ divide and conquer, revocable and search set]
KS008基于SSM的新闻发布系统
20、 EEPROM memory (AT24C02) (similar to AD)