2020牛客多校第九場 解題報告(AEFIK)

2021-10-08 23:06:02 字數 3392 閱讀 9843

def x(i):

return 2**i

str = input()

str = str.replace("2(","x(")

print(eval(str))

#include #define ll long long

#define sc(a) scanf("%d", &a)

#define sc2(a, b) scanf("%d%d", &a, &b)

#define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c)

#define scl(a) scanf("%lld", &a)

#define scl2(a, b) scanf("%lld%lld", &a, &b)

#define ss(a) scanf("%s", a)

#define mem(a, b) memset(a, b, sizeof(a))

#define pii pair#define ll __int128

using namespace std;

const ll mod = 998244353;

inline void print(__int128 x)

if (x > 9)

print(x / 10);

putchar(x % 10 + '0');

}template inline void read(_tp &x)

inline ll pow(ll a, ll b)

return ans;

}mapnum1; //存放x質因子和需要冪的數ai

mapnum2; //存放y質因子和需要冪的數bi

mapans; //共同質因子和需要冪的數

int main()

if (x != 1)

num1[x] = 1;

for (ll i = 2; i * i <= y; i++) //y質因子分解

if (y % i == 0)

if (y != 1)

num2[y] = 1;

for (auto p : num1)

}ll res = 1;

for (auto p : ans) //所有共同質因子冪次累乘

res = res * pow(p.first, p.second) % mod;

print(res % mod);

system("pause");

return 0;

}

#include #define ll long long

#define sc(a) scanf("%d", &a)

#define sc2(a, b) scanf("%d%d", &a, &b)

#define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c)

#define scl(a) scanf("%lld", &a)

#define scl2(a, b) scanf("%lld%lld", &a, &b)

#define ss(a) scanf("%s", a)

#define mem(a, b) memset(a, b, sizeof(a))

#define pii pairusing namespace std;

const double pi = acos(-1.0);

const int mod = 1e9 + 7;

const int maxn = 1e6+5;

const int inf = 0x3f3f3f3f;

struct node

v.push_back(mii);//每天取最便宜的

}sort(v.begin(),v.end());//從小到大排

cout<#define ll long long

#define sc(a) scanf("%d", &a)

#define sc2(a, b) scanf("%d%d", &a, &b)

#define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c)

#define scl(a) scanf("%lld", &a)

#define scl2(a, b) scanf("%lld%lld", &a, &b)

#define ss(a) scanf("%s", a)

#define mem(a, b) memset(a, b, sizeof(a))

#define pii pairusing namespace std;

const int maxn = 1e5+5;

int cnt[maxn],a[maxn];

int main()

int bas=0,ca=0;

for(int i=1;i<10;i++)

}for(int i=1;i<10;i++)

}for(int i=0;i<10;i++)}}

string b;

for(int i=ca;i>=1;i--)

if(t)b+=t+'0'; //最後進製

reverse(b.begin(),b.end());//字串反轉

cout<#define ll long long

#define sc(a) scanf("%d", &a)

#define sc2(a, b) scanf("%d%d", &a, &b)

#define sc3(a, b, c) scanf("%d%d%d", &a, &b, &c)

#define scl(a) scanf("%lld", &a)

#define scl2(a, b) scanf("%lld%lld", &a, &b)

#define ss(a) scanf("%s", a)

#define mem(a, b) memset(a, b, sizeof(a))

#define pii pairusing namespace std;

const int maxn = 1e5+5;

vectorv[maxn];

int pre[maxn],dep[maxn],maxd[maxn];

void add(int a,int b)

void dfs(int s,int fa)

}int main()

dep[n]=0;//根節點深度為0

dfs(n,-1);

int p=1;

while(t--)

//dep[p]就是第一種情況

//(maxd[p]+1)/2就是第二種情況

cout

return 0;

}

2019牛客多校第九場

由題意可設x y kp bx y kp b x y kp b代入第二個式子中可以得到kpx bx x2 c mod kpx bx x 2 equiv c mod kpx bx x2 c modp p p 第一項是p的倍數可以約掉,所以有x2 bx c 0 m od x 2 bx c equiv 0 ...

2020牛客多校第七場 解題報告BDH

include define ll long long define sc a scanf d a define sc2 a,b scanf d d a,b define sc3 a,b,c scanf d d d a,b,c define scl a scanf lld a define scl2...

牛客多校第九場補題(待完善)

i the crime solving plan of groundhog 題目大意 給定一組由 0 9 組成的數,組成兩個數使乘積最小。解題思路 用陣列儲存 0 9 的個數,先從 1 9 選最小的作為其中乙個乘數,其餘的數組成所能表達的最小的數。難點應該是大數乘法 這個也不難 include in...