当前位置:网站首页>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
边栏推荐
- KS008基于SSM的新闻发布系统
- [FPGA tutorial case 11] design and implementation of divider based on vivado core
- What is the difference between gateway address and IP address in tcp/ip protocol?
- Query the number and size of records in each table in MySQL database
- Class A, B, C networks and subnet masks in IPv4
- C language -- structs, unions, enumerations, and custom types
- MySQL transaction isolation level
- AcWing 243. A simple integer problem 2 (tree array interval modification interval query)
- KS003基于JSP和Servlet实现的商城系统
- Plus d'un milliard d'utilisateurs de grandes entreprises comme Facebook ont été compromis, il est temps de se concentrer sur le did
猜你喜欢
![[adjustable delay network] development of FPGA based adjustable delay network system Verilog](/img/82/7ff7f99f5164f91fab7713978cf720.png)
[adjustable delay network] development of FPGA based adjustable delay network system Verilog
![Mlapi series - 04 - network variables and network serialization [network synchronization]](/img/fc/aebbad5295481788de5c1fdb432a77.jpg)
Mlapi series - 04 - network variables and network serialization [network synchronization]

Solution to the problem that the root account of MySQL database cannot be logged in remotely
![[Zhao Yuqiang] deploy kubernetes cluster with binary package](/img/45/6777fa919386e526dbb0d2c808a7f2.jpg)
[Zhao Yuqiang] deploy kubernetes cluster with binary package

Web components series (VII) -- life cycle of custom components

DM8 backup set deletion

Record the pit of NETCORE's memory surge

Chinese brand hybrid technology: there is no best technical route, only better products

Security xxE vulnerability recurrence (XXe Lab)

KS008基于SSM的新闻发布系统
随机推荐
Fundamentals of SQL database operation
Custom event of C (31)
TCP/IP协议里面的网关地址和ip地址有什么区别?
80% of the diseases are caused by bad living habits. There are eight common bad habits, which are both physical and mental
2/10 parallel search set +bfs+dfs+ shortest path +spfa queue optimization
How many of the 10 most common examples of istio traffic management do you know?
HotSpot VM
Codeforces Round #770 (Div. 2) B. Fortune Telling
The Research Report "2022 RPA supplier strength matrix analysis of China's banking industry" was officially launched
Cross domain and jsonp details
Global and Chinese markets for fire resistant conveyor belts 2022-2028: Research Report on technology, participants, trends, market size and share
Yyds dry goods inventory web components series (VII) -- life cycle of custom components
Hashcode and equals
Explain in simple terms node template parsing error escape is not a function
1291_Xshell日志中增加时间戳的功能
P7735-[noi2021] heavy and heavy edges [tree chain dissection, line segment tree]
MySQL master-slave replication
【按鍵消抖】基於FPGA的按鍵消抖模塊開發
Proof of Stirling formula
MySQL reads missing data from a table in a continuous period of time