当前位置:网站首页>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
边栏推荐
- Facebook and other large companies have leaked more than one billion user data, and it is time to pay attention to did
- C form application of C (27)
- 记一次excel XXE漏洞
- Leetcode32 longest valid bracket (dynamic programming difficult problem)
- [FPGA tutorial case 12] design and implementation of complex multiplier based on vivado core
- 80% of the diseases are caused by bad living habits. There are eight common bad habits, which are both physical and mental
- How to solve the problem of slow downloading from foreign NPM official servers—— Teach you two ways to switch to Taobao NPM image server
- 关于进程、线程、协程、同步、异步、阻塞、非阻塞、并发、并行、串行的理解
- 10个 Istio 流量管理 最常用的例子,你知道几个?
- HotSpot VM
猜你喜欢
如何修改表中的字段约束条件(类型,default, null等)
查询mysql数据库中各表记录数大小
Interface idempotency
Viewing and verifying backup sets using dmrman
Database, relational database and NoSQL non relational database
【可调延时网络】基于FPGA的可调延时网络系统verilog开发
Execution order of scripts bound to game objects
Lora gateway Ethernet transmission
The Research Report "2022 RPA supplier strength matrix analysis of China's banking industry" was officially launched
Exchange bottles (graph theory + thinking)
随机推荐
判断当天是当月的第几周
P7735-[noi2021] heavy and heavy edges [tree chain dissection, line segment tree]
Slow SQL fetching and analysis of MySQL database
Ybtoj coloring plan [tree chain dissection, segment tree, tarjan]
[Zhao Yuqiang] deploy kubernetes cluster with binary package
Basic use of MySQL (it is recommended to read and recite the content)
Comprehensive ability evaluation system
Global and Chinese markets for patent hole oval devices 2022-2028: Research Report on technology, participants, trends, market size and share
Python book learning notes - Chapter 09 section 01 create and use classes
[introduction to Django] 11 web page associated MySQL single field table (add, modify, delete)
Proof of Stirling formula
Développement d'un module d'élimination des bavardages à clé basé sur la FPGA
Ks003 mall system based on JSP and Servlet
KS008基于SSM的新闻发布系统
Pandora IOT development board learning (HAL Library) - Experiment 9 PWM output experiment (learning notes)
Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
Record the pit of NETCORE's memory surge
Chinese brand hybrid technology: there is no best technical route, only better products
Cf603e pastoral oddities [CDQ divide and conquer, revocable and search set]
MySQL learning record 13 database connection pool, pooling technology, DBCP, c3p0