【Codeforces 140A】New Year Table】的更多相关文章

[链接] 我是链接,点我呀:) [题意] 题意 [题解] 算出来每个盘子要占用多少角度. 然后乘n看看是不是小于等于2π就好 (精度最好定在1e-7) [代码] #include <bits/stdc++.h> #define ll long long #define double long double using namespace std; const int N = 3e5; double pi = acos(-1.0); int n; double R,r; double sqr(d…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Arthur has bought a beautiful big table into his new flat. When he came home, Arthur noticed that the new table is unstable. In total the table A…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Vanya has a table consisting of 100 rows, each row contains 100 cells. The rows are numbered by integers from 1 to 100 from bottom to top, the c…
[题目链接]:http://codeforces.com/contest/509/problem/A [题意] 给你一个递推式f[i][j] = f[i-1][j]+f[i][j-1]; 让你求f[i][j]的最大值; [题解] 傻逼题 [Number Of WA] 0 [完整代码] #include <bits/stdc++.h> using namespace std; #define lson l,m,rt<<1 #define rson m+1,r,rt<<1|…
[codeforces 415D]Mashmokh and ACM 题意:美丽数列定义:对于数列中的每一个i都满足:arr[i+1]%arr[i]==0 输入n,k(1<=n,k<=2000),问满足[数列长度是k && 数列中每一个元素arr[i]在1~n之间 && 数列中元素可以重复]的数列有多少个?结果对10^9+7取余 解题思路:dp[i][j]表示长度是j,最后一位是i的种数 if(kk%i==0) dp[kk][j+1]+=dp[i][j] #inc…
[题目链接]:http://codeforces.com/contest/765/problem/C [题意] 枚举游戏先拿到k分的人胜; 然后两个人一个人得了a分,一个人得了b分; 问你最多可能进行了多少场比赛; (要求恰好完成); [题解] 假设这些东西 t1 = a%k,t2 = b%k; w1 = a/k,w2 = b/k; 如果w1和w2都是正数,那么双方都有赢; 则可以把余数都在对方赢的那一场里面用掉; 即t1放在对方赢的某一场里面(全部); 当然; 如果都恰好整除了,即t1和t2都…
[题目链接] 点击打开链接 [算法] G中最大的数一定也是a中最大的数.          G中次大的数一定也是a中次大的数. 第三.第四可能是由最大和次大的gcd产生的 那么就不难想到下面的算法: 1. 令p为G中最大的数.在G中删除p,a中加入p.         2 . 对于a中的所有其他数(设为q),在G中删除2个gcd(p, q). 3. 若G为空则结束:否则回到(1). [代码] #include<bits/stdc++.h> using namespace std; #defin…
time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output People do many crazy things to stand out in a crowd. Some of them dance, some learn by heart rules of Russian language, some try to become a…
time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Petr wants to make a calendar for current month. For this purpose he draws a table in which columns correspond to weeks (a week is seven consequ…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output On the Literature lesson Sergei noticed an awful injustice, it seems that some students are asked more often than others. Seating in the class lo…