目录
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
思路:意思就是s最多包含多少个。
#include<bits/stdc++.h>
#define int long long
using namespace std;
int t,n,s;
signed main(){
cin>>t;
while(t--){
cin>&g