摘要:
题解: https://files.cnblogs.com/files/clrs97/2021CCPCguilin.zip Code: A. A Hero Named Magnus #include <bits/stdc++.h> #define pb push_back #define mp ma 阅读全文
摘要:
A. 公交线路 检查坐对方向和坐反方向两种情况对应的报站序列是否符合输入,如果都符合那就是''Unsure'',否则可以确定有没有坐反。 #include<cstdio> const int N=15; int n,m,S,T,i,A,B,a[N],b[N]; bool check(int d){ 阅读全文
摘要:
题解: https://files.cnblogs.com/files/clrs97/2020icpc-macau-analyze.zip Code: A. Accelerator #include<cstdio> #include<vector> using namespace std; type 阅读全文
摘要:
题解: https://files.cnblogs.com/files/clrs97/ZJCPC2021analyze.zip Code: A. League of Legends #include<cstdio> using namespace std; #define rep(i,n) for( 阅读全文
摘要:
题解: https://files.cnblogs.com/files/clrs97/ZJCPC2020analyze.zip Code:(Part) A. AD 2020 #include<cstdio> int f[10005][13][33],is[10005][13][33],i,j,lim 阅读全文
摘要:
A. Total Eclipse 根据题意,每次要选择一个极大连通块,将里面所有数同时减小,直到最小值变成$0$,然后将变成$0$的点删除,分裂成多个连通块再接着做。 将整个过程倒过来看,变成按照$b$的值从大到小依次加入每个点。加入每个点$x$时遍历与$x$相连的所有边$(x,y)$,如果$y$在 阅读全文
摘要:
Trial Round: Obraz 按题意模拟。 #include<cstdio> const int N=1005; int n,m,i,j;char a[N],b[N][N]; int main(){ scanf("%d%d",&n,&m); for(i=n;i;i--)for(scanf(" 阅读全文
摘要:
Trial Round: Kwadrat 分解质因数后判断每个质因数的幂是奇数还是偶数,如果是奇数则补成偶数。 时间复杂度$O(\sqrt{n})$。 #include<cstdio> long long n,ans=1;int i,j; int main(){ scanf("%lld",&n); 阅读全文