Problem link
A solution in c++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
#pragma GCC optimize("Ofast,no-stack-protector") | |
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native") | |
#pragma GCC optimize("unroll-loops") | |
/// Typedef | |
typedef long long ll; | |
#define sc1(a) scanf("%lld",&a) | |
#define sc2(a,b) scanf("%lld %lld",&a,&b) | |
#define pf1(a) printf("%lld\n",a) | |
#define pf2(a,b) printf("%lld %lld\n",a,b) | |
#define mx 100007 | |
#define mod 100000007 | |
#define PI acos(-1.0) | |
#define size1 998244353 | |
#define pb push_back | |
int main() | |
{ | |
ll k, prime, m, tc, num, t = 4; | |
sc2(num, m); | |
ll ans = 1; | |
for(ll i = 0; i < num + m; i++){ | |
ans = (ans * 2) % size1; | |
} | |
pf1(ans); | |
} |
0 Comments
If you have any doubts, Please let me know