![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
#include <bits/stdc++.h> using namespace std; #define LL long long const int mod = 1e9 + 7; const int maxn = 1e5 + 10; int N; int num[maxn]; LL dp[maxn]; map<int, int> mp; int main() { scanf("%d", &N); for(int i = 1; i <= N; i ++) scanf("%d", &num[i]); num[N + 1] = 10; memset(dp, 0, sizeof(dp)); dp[1] = 1; for(int i = 2; i <= N+1; i ++) { mp.clear(); for(int j = 1; i - j >= 1 && j <= 9; j ++) { if(mp[num[i - j]] == 0) { mp[num[i - j]] = 1; dp[i] += dp[i - j]; dp[i] %= mod; continue; } else break; } dp[i] %= mod; } printf("%lld\n", dp[N+1] % mod); return 0; }
![](https://i-blog.csdnimg.cn/blog_migrate/8f900a89c6347c561fdf2122f13be562.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/961ddebeb323a10fe0623af514929fc1.gif)
#include <bits/stdc++.h> using namespace std; const double pi = 3.1415926; int N; int L, R; int main() { scanf("%d%d", &L, &R); double x = 1.0 * R * cos(1.0 * L / R); double y = 1.0 * R * sin(1.0 * L / R); printf("%.3lf %.3lf\n", x, -1.0 * y); printf("%.3lf %.3lf\n", x, y); return 0; }