第49期:Codeforces-Round #774(Div.2)

目录

​​​​​​A. Square Counting(tags:    math;   *800)

B. Quality vs Quantity(tags:    brute force;    constructive algorithms;     greedy;      sorting;    two pointers;  *800)

C. Factorials and Powers of Two(tags:    bitmasks;     brute force;    constructive algorithms;     math;      *1500)

D. Weight the Tree (tags:     constructive algorithms;    dfs and similar;     dp;     implementation;    trees;     *2000)

E. Power Board(tags:     brute force;  dp;  math; number theory; *2200)

F. Playing Around the Table(waiting)(tags:   constructive algorithms;     greedy;      implementation;      *2900)


​​​​​​A. Square Counting

tags:    math;   *800

第49期:Codeforces-Round #774(Div.2)_第1张图片

思路:意思就是s最多包含多少个n^{2}

#include
#define int long long
using namespace std;
int t,n,s;
signed main(){
	cin>>t;
	while(t--){
		cin>&g

你可能感兴趣的:(Codeforces,算法)