给定一个正整数 \(n\) ,询问有多少种方式填充满图中 \(4n - 2\) 的图。
你可以使用的菱形:竖着摆放和横着摆放都是一种方案。
显然选择某个位置竖着摆放,其他所有地方只能横着摆放,这样的位置有 \(n\) 个。
具体图形见:https://codeforces.com/problemset/problem/1339/A
view
#include <bits/stdc++.h>
typedef long long ll;
void solve(){
int n; std::cin >> n;
std::cout << n << '\n';
}
int main() {
int _ = 1; std::cin >> _;
while (_--) {solve();}
return 0;
}
- Codeforces Diamonds Filling Round 633codeforces diamonds filling round 值域 线段codeforces diamonds educational codeforces round rated codeforces round 911 div codeforces round 864 div codeforces round 887 div codeforces round 863 div codeforces round 913 div codeforces round 915 div codeforces round 917 div