摘要:
A - Sum of Interior Angles 答案为 \(180(n-2)\)。 #include<iostream> #include<cstdio> using namespace std; int n; int main() { scanf("%d",&n); printf("%d", 阅读全文
posted @ 2023-09-27 19:09
Zhou_JK
阅读(11)
评论(0)
推荐(0)
摘要:
A - Painting 每次取 \(H,W\) 中较大者涂就是了,输出 \(\lceil \frac{n}{\max(H,W)}\rceil\)。 代码: #include<iostream> #include<cstdio> using namespace std; int h,w,n; int 阅读全文
posted @ 2023-09-27 19:08
Zhou_JK
阅读(31)
评论(0)
推荐(0)
摘要:
A - Takahashi Calendar 枚举 \(m\),再枚举 \(d_1\),判断一下是否合法即可。 #include<iostream> #include<cstdio> using namespace std; int m,d; int main() { scanf("%d%d",&m 阅读全文
posted @ 2023-09-27 19:08
Zhou_JK
阅读(55)
评论(0)
推荐(0)
摘要:
A - Regular Triangle 判断三个数是否相等。 #include<iostream> #include<cstdio> using namespace std; int A,B,C; int main() { scanf("%d%d%d",&A,&B,&C); if(A==B&&B= 阅读全文
posted @ 2023-09-27 19:06
Zhou_JK
阅读(29)
评论(0)
推荐(0)
摘要:
A - Thumbnail 直接按照题意模拟。。。 #include<iostream> #include<cstdio> #include<cmath> using namespace std; const int N=105; int n; int a[N]; int main() { scan 阅读全文
posted @ 2023-09-27 19:05
Zhou_JK
阅读(9)
评论(0)
推荐(0)
摘要:
A - Falling Asleep 找到第一个相等的位置,然后暴力往后加就是了。 #include<iostream> #include<cstdio> using namespace std; const int N=55; int n; string s[N]; string t; int a 阅读全文
posted @ 2023-09-27 19:05
Zhou_JK
阅读(16)
评论(0)
推荐(0)
摘要:
A - Ball Distribution \(k=1\) 时答案为 \(0\),否则答案为 \(n-k\)。 #include<iostream> #include<cstdio> using namespace std; int n,k; int main() { scanf("%d%d",&n 阅读全文
posted @ 2023-09-27 19:05
Zhou_JK
阅读(12)
评论(0)
推荐(0)
摘要:
A - Consecutive Integers 答案为 \(n-k+1\)。 #include<iostream> #include<cstdio> using namespace std; int n,k; int main() { scanf("%d%d",&n,&k); printf("%d 阅读全文
posted @ 2023-09-27 19:04
Zhou_JK
阅读(41)
评论(0)
推荐(0)
摘要:
A - DDCC Finals 直接模拟即可。 #include<iostream> #include<cstdio> using namespace std; int x,y; int main() { scanf("%d%d",&x,&y); int ans=0; if(x==1) ans+=3 阅读全文
posted @ 2023-09-27 19:04
Zhou_JK
阅读(41)
评论(0)
推荐(0)
摘要:
C - Product and GCD 令 \(P=\prod p_i^{c_i}\)。 对于某个 \(p_i^{c_i}\),要使得 \(\gcd(a_i)\) 尽可能大,肯定将每个 \(p_i\) 平均分给 \(n\) 个数最优,然后就没了。 #include<iostream> #includ 阅读全文
posted @ 2023-09-27 19:03
Zhou_JK
阅读(24)
评论(0)
推荐(0)