前言
有点一言难尽, 这次本来想的给大火减减压放了很多区域赛和省赛的签到题(还有一些是写过的题), 没想到打的并不是很理想, 还用了分数值想减少一些差距, 结果看起来好像让差距更大了, 尴尬
A题 Frozen Scoreboard
https://codeforces.com/gym/104076/problem/D
 济南站的中等题
 看起来就很ex的模拟题, 别人推荐的我自己还没写, 写了再更新题解
B题 Math master
https://codeforces.com/gym/103447/problem/D
 
 哈尔滨省赛的中等题
题意
给你一个分数, 让你化简, 化简的方式是分子分母各减去一个相同数字, 在保证分数值不变的同时将其化为最简
题解
https://blog.csdn.net/Tanya_xiaomai/article/details/130223013
 这个我写过题解
C题 Fibonacci

 上海区域赛的签到题
 https://codeforces.com/gym/102900/problem/G
题意
题目讲的很清楚, 公式都给出来了没什么好说的
题解
说打表是有原因的, 这题我就是打表出的
 给出打表代码然后自己推规律
void solve()
{
	n=t;
	vector<ll>fi(n+3);
	fi[1]=1;
	fi[2]=1;
    rep(i,3,n) fi[i]=fi[i-1]+fi[i-2];
	ans=0;
	rep(i,1,n)
		rep(j,i+1,n)
		{
			if(fi[i]*fi[j]%2) continue;
			ans++;
		}
	cout<<ans<<' ';
    return;
}
int main()
{
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	cin>>m;
	for(t=1;t<=m;t++)
        solve();
    return 0;
}
打出来30的表是这样的
 0 0 2 3 4 9 11 13 21 24 27 38 42 46 60 65 70 87 93 99 119 126 133 156 164 172 198 207 216 
 给这个序列表上下标再看看
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  22  23  24  25  26  27  28  29  30
0 0 2 3 4 9 11 13 21 24 27 38 42 46 60 65 70 87 93 99 119 126 133 156 164 172 198 207 216
将这个序列的差值算出来
 得到
 0 2 1 1 5 2 2 8 3 3 11 4 4…
 加粗的序列每隔开2个就+3, 其他元素随着加粗序列增加一次就+1
 别想着我给你全部推导出来, 自己动脑把公式推出来
 推不出来再看代码
 要学会打表找规律------lk学长
代码
#include<bits/stdc++.h>
#define ll long long
using namespace std;
int main()
{
	ll n;cin>>n;
    ll num=n/3;
	num--;
	ll ans=(num+1)*num;
	ans+=(num+1)*(n%3);
	ll cc=n/3;
	ans+=(4+3*(cc-1))*cc/2;
	cout<<ans<<endl;
	return 0;
}
D题 Mine Sweeper II

 这题也是上海站的签到题
 https://codeforces.com/gym/102900/problem/B
题意
就是扫雷的规则, 然后给你两个图, 让上面的数字和 和 下面的数字和相同
题解
作为一个acmer要学会从时空复杂度来考虑解法, 这题n和m都是1000, 只给了一秒钟, 那么dfs和bfs铁定超时, 再根据榜单上过的人这么多区域赛的时候过的人挺多, 就能知道这题肯定是脑筋急转弯猜结论
 看到可以修改 
     
      
       
        
         
         
           n 
          
         
           m 
          
         
        
          2 
         
        
       
      
        \frac {nm}{2} 
       
      
    2nm次
 先想整体, 假如上下不同的雷在 
     
      
       
        
         
         
           n 
          
         
           m 
          
         
        
          2 
         
        
       
      
        \frac {nm}{2} 
       
      
    2nm以内, 直接改成上图就行
 如果不同的雷大于 
     
      
       
        
         
         
           n 
          
         
           m 
          
         
        
          2 
         
        
       
      
        \frac {nm}{2} 
       
      
    2nm, 考虑一下将有雷的地方全部置换为没雷的地方模拟自己猜的结论结论是有雷和没雷的地区置换一下, 数字和是一致的, 置换后可以发现修改数在 
     
      
       
        
         
         
           n 
          
         
           m 
          
         
        
          2 
         
        
       
      
        \frac {nm}{2} 
       
      
    2nm以内
代码
/*
⣿⣿⣿⣿⣿⣿⡷⣯⢿⣿⣷⣻⢯⣿⡽⣻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣇⠸⣿⣿⣆⠹⣿⣿⢾⣟⣯⣿⣿⣿⣿⣿⣿⣽⣻⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣻⣽⡿⣿⣎⠙⣿⣞⣷⡌⢻⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣿⣿⡄⠹⣿⣿⡆⠻⣿⣟⣯⡿⣽⡿⣿⣿⣿⣿⣽⡷⣯⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣷⣿⣿⣿⡀⠹⣟⣾⣟⣆⠹⣯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢠⡘⣿⣿⡄⠉⢿⣿⣽⡷⣿⣻⣿⣿⣿⣿⡝⣷⣯⢿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣯⢿⣾⢿⣿⡄⢄⠘⢿⣞⡿⣧⡈⢷⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⢸⣧⠘⣿⣷⠈⣦⠙⢿⣽⣷⣻⣽⣿⣿⣿⣿⣌⢿⣯⢿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣟⣯⣿⢿⣿⡆⢸⡷⡈⢻⡽⣷⡷⡄⠻⣽⣿⣿⡿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⣿⣏⢰⣯⢷⠈⣿⡆⢹⢷⡌⠻⡾⢋⣱⣯⣿⣿⣿⣿⡆⢻⡿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⡎⣿⢾⡿⣿⡆⢸⣽⢻⣄⠹⣷⣟⣿⣄⠹⣟⣿⣿⣟⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⡇⢸⣯⣟⣧⠘⣷⠈⡯⠛⢀⡐⢾⣟⣷⣻⣿⣿⣿⡿⡌⢿⣻⣿⣿
⣿⣿⣿⣿⣿⣿⣧⢸⡿⣟⣿⡇⢸⣯⣟⣮⢧⡈⢿⣞⡿⣦⠘⠏⣹⣿⣽⢿⣿⣿⣿⣿⣯⣿⣿⣿⡇⢸⣿⣿⣾⡆⠹⢀⣠⣾⣟⣷⡈⢿⣞⣯⢿⣿⣿⣿⢷⠘⣯⣿⣿
⣿⣿⣿⣿⣿⣿⣿⡈⣿⢿⣽⡇⠘⠛⠛⠛⠓⠓⠈⠛⠛⠟⠇⢀⢿⣻⣿⣯⢿⣿⣿⣿⣷⢿⣿⣿⠁⣾⣿⣿⣿⣧⡄⠇⣹⣿⣾⣯⣿⡄⠻⣽⣯⢿⣻⣿⣿⡇⢹⣾⣿
⣿⣿⣿⣿⣿⣿⣿⡇⢹⣿⡽⡇⢸⣿⣿⣿⣿⣿⣞⣆⠰⣶⣶⡄⢀⢻⡿⣯⣿⡽⣿⣿⣿⢯⣟⡿⢀⣿⣿⣿⣿⣿⣧⠐⣸⣿⣿⣷⣿⣿⣆⠹⣯⣿⣻⣿⣿⣿⢀⣿⢿
⣿⣿⣿⣿⣿⣿⣿⣿⠘⣯⡿⡇⢸⣿⣿⣿⣿⣿⣿⣿⣧⡈⢿⣳⠘⡄⠻⣿⢾⣽⣟⡿⣿⢯⣿⡇⢸⣿⣿⣿⣿⣿⣿⡀⢾⣿⣿⣿⣿⣿⣿⣆⠹⣾⣷⣻⣿⡿⡇⢸⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡇⢹⣿⠇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠻⡇⢹⣆⠹⣟⣾⣽⣻⣟⣿⣽⠁⣾⣿⣿⣿⣿⣿⣿⣇⣿⣿⠿⠛⠛⠉⠙⠋⢀⠁⢘⣯⣿⣿⣧⠘⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⡈⣿⡃⢼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⡙⠌⣿⣆⠘⣿⣞⡿⣞⡿⡞⢠⣿⣿⣿⣿⣿⡿⠛⠉⠁⢀⣀⣠⣤⣤⣶⣶⣶⡆⢻⣽⣞⡿⣷⠈⣿
⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠘⠁⠉⠉⠉⠉⠉⠉⠉⠉⠉⠙⠛⠛⢿⣄⢻⣿⣧⠘⢯⣟⡿⣽⠁⣾⣿⣿⣿⣿⣿⡃⢀⢀⠘⠛⠿⢿⣻⣟⣯⣽⣻⣵⡀⢿⣯⣟⣿⢀⣿
⣿⣿⣿⣟⣿⣿⣿⣿⣶⣶⡆⢀⣿⣾⣿⣾⣷⣿⣶⠿⠚⠉⢀⢀⣤⣿⣷⣿⣿⣷⡈⢿⣻⢃⣼⣿⣿⣿⣿⣻⣿⣿⣿⡶⣦⣤⣄⣀⡀⠉⠛⠛⠷⣯⣳⠈⣾⡽⣾⢀⣿
⣿⢿⣿⣿⣻⣿⣿⣿⣿⣿⡿⠐⣿⣿⣿⣿⠿⠋⠁⢀⢀⣤⣾⣿⣿⣿⣿⣿⣿⣿⣿⣌⣥⣾⡿⣿⣿⣷⣿⣿⢿⣷⣿⣿⣟⣾⣽⣳⢯⣟⣶⣦⣤⡾⣟⣦⠘⣿⢾⡁⢺
⣿⣻⣿⣿⡷⣿⣿⣿⣿⣿⡗⣦⠸⡿⠋⠁⢀⢀⣠⣴⢿⣿⣽⣻⢽⣾⣟⣷⣿⣟⣿⣿⣿⣳⠿⣵⣧⣼⣿⣿⣿⣿⣿⣾⣿⣿⣿⣿⣿⣽⣳⣯⣿⣿⣿⣽⢀⢷⣻⠄⠘
⣿⢷⣻⣿⣿⣷⣻⣿⣿⣿⡷⠛⣁⢀⣀⣤⣶⣿⣛⡿⣿⣮⣽⡻⣿⣮⣽⣻⢯⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⢀⢸⣿⢀⡆
⠸⣟⣯⣿⣿⣷⢿⣽⣿⣿⣷⣿⣷⣆⠹⣿⣶⣯⠿⣿⣶⣟⣻⢿⣷⣽⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢀⣯⣟⢀⡇
⣇⠹⣟⣾⣻⣿⣿⢾⡽⣿⣿⣿⣿⣿⣆⢹⣶⣿⣻⣷⣯⣟⣿⣿⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢀⡿⡇⢸⡇
⣿⣆⠹⣷⡻⣽⣿⣯⢿⣽⣻⣿⣿⣿⣿⣆⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⢸⣿⠇⣼⡇
⡙⠾⣆⠹⣿⣦⠛⣿⢯⣷⢿⡽⣿⣿⣿⣿⣆⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃⠎⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⢀⣿⣾⣣⡿⡇
⣿⣷⡌⢦⠙⣿⣿⣌⠻⣽⢯⣿⣽⣻⣿⣿⣿⣧⠩⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⢰⢣⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⢀⢀⢿⣞⣷⢿⡇
⣿⣽⣆⠹⣧⠘⣿⣿⡷⣌⠙⢷⣯⡷⣟⣿⣿⣿⣷⡀⡹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣈⠃⣸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠟⢀⣴⡧⢀⠸⣿⡽⣿⢀
⢻⣽⣿⡄⢻⣷⡈⢿⣿⣿⢧⢀⠙⢿⣻⡾⣽⣻⣿⣿⣄⠌⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠛⢁⣰⣾⣟⡿⢀⡄⢿⣟⣿⢀
⡄⢿⣿⣷⢀⠹⣟⣆⠻⣿⣿⣆⢀⣀⠉⠻⣿⡽⣯⣿⣿⣷⣈⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⢀⣠⠘⣯⣷⣿⡟⢀⢆⠸⣿⡟⢸
⣷⡈⢿⣿⣇⢱⡘⢿⣷⣬⣙⠿⣧⠘⣆⢀⠈⠻⣷⣟⣾⢿⣿⣆⠹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⣠⡞⢡⣿⢀⣿⣿⣿⠇⡄⢸⡄⢻⡇⣼
⣿⣷⡈⢿⣿⡆⢣⡀⠙⢾⣟⣿⣿⣷⡈⠂⠘⣦⡈⠿⣯⣿⢾⣿⣆⠙⠻⠿⠿⠿⠿⡿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢋⣠⣾⡟⢠⣿⣿⢀⣿⣿⡟⢠⣿⢈⣧⠘⢠⣿
⣿⣿⣿⣄⠻⣿⡄⢳⡄⢆⡙⠾⣽⣿⣿⣆⡀⢹⡷⣄⠙⢿⣿⡾⣿⣆⢀⡀⢀⢀⢀⢀⢀⢀⢀⢀⢀⢀⢀⢀⣀⣠⣴⡿⣯⠏⣠⣿⣿⡏⢸⣿⡿⢁⣿⣿⢀⣿⠆⢸⣿
⣿⣿⣿⣿⣦⡙⣿⣆⢻⡌⢿⣶⢤⣉⣙⣿⣷⡀⠙⠽⠷⠄⠹⣿⣟⣿⣆⢙⣋⣤⣤⣤⣄⣀⢀⢀⢀⢀⣾⣿⣟⡷⣯⡿⢃⣼⣿⣿⣿⠇⣼⡟⣡⣿⣿⣿⢀⡿⢠⠈⣿
⣿⣿⣿⣿⣿⣷⣮⣿⣿⣿⡌⠁⢤⣤⣤⣤⣬⣭⣴⣶⣶⣶⣆⠈⢻⣿⣿⣆⢻⣿⣿⣿⣿⣿⣿⣷⣶⣤⣌⣉⡘⠛⠻⠶⣿⣿⣿⣿⡟⣰⣫⣴⣿⣿⣿⣿⠄⣷⣿⣿⣿
*/
#include <cstdio>
#include <iostream>
#include <algorithm>
#include <queue>
#include <cmath>
#include <cstring>
#include <string>
#include <stack>
#include <deque>
#include <map>
#include <set>
#include <bitset>
#include <unordered_map>
#include <unordered_set>
using namespace std;
#define ll long long
#define endl "\n"
#define S second
#define F first
#define ln cout<<endl;
#define rep(i, a, b) for (ll i = (a); i <= (b); i++)
#define repr(i, a, b) for (ll i = (a); i < (b); i++)
#define rrep(i, a, b) for (ll i = (b); i >= (a); i--)
#define rrepr(i, a, b) for (ll i = (b); i > (a); i--)
#define mem(a) memset((a),0,sizeof (a));
#define yes cout<<"YES"<<endl;
#define no cout<<"NO"<<endl;
#define debug cout<<"here!"<<endl;
ll cnt,n,m,t,ans,ant;
const int N=2e5+10;
const int INF=0x3f3f3f3f;
const ll llINF=0x3f3f3f3f3f3f3f3f;
ll arr[N];
string str;
inline ll read()
{
    char c = getchar();int x = 0,s = 1;
    while(c < '0' || c > '9') {if(c == '-') s = -1;c = getchar();}//是符号
    while(c >= '0' && c <= '9') {x = x*10 + c -'0';c = getchar();}//是数字
    return x*s;
}
void solve()
{
	cin>>n>>m;
	ans=(n*m)>>1;
	string s1[1010];
	string s2[1010];
	rep(i,1,n) cin>>s1[i];
	rep(i,1,n) cin>>s2[i];
	rep(i,1,n)
		repr(j,0,m)
		{
			if(s1[i][j]!=s2[i][j]) ans--;
			if(ans<0) break;
		}
	if(ans>=0)
		rep(i,1,n) cout<<s1[i]<<endl;
	else 
	{
		rep(i,1,n)
		{
			repr(j,0,m) 
				if(s1[i][j]=='.') cout<<'X';
				else cout<<'.';
			ln
		}	
	}
    return;
}
int main()
{
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    //所有输入用cin
    //所有输出用cout
	
        solve();
    return 0;
}
E题 Takeaway
https://codeforces.com/gym/103145/problem/I
 
 东北省赛的签到题
 并不是很能理解这题还能wa的学弟
 属于读懂题意就能ac的模拟
不给题解也不给代码, 自己想
F题 Easy Math Problem
https://codeforces.com/gym/103145/problem/E
 
 也是个签到题, 可惜没什么人去写
题意
给出一个数字p, 可以乘上任意一个数字a得到b=a*p, 然后输出n个数, 每个数都是b的因子, 这n个数字之和==b
题解
1= 1 3 \frac {1}{3} 31+ 1 2 \frac {1}{2} 21+ 1 6 \frac {1}{6} 61
代码
#include<iostream>
using namespace std;
int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		unsigned long long p;
		cin>>p;
		cout<<6*p<<" 3\n";
		cout<<p<<" "<<2*p<<" "<<3*p<<endl;
	}
}
G题 City
https://codeforces.com/gym/103145/problem/K
 
 中等题, 感觉学弟们稍微想一想还是能做的
 这题不是最小生成树, 但是却需要并查集+排序
 
 懒了, 有学弟不会的再来问, 虽然很推荐补这题, 但是感觉应该没多少学弟会来补, 不会再来问我
代码
#include<bits/stdc++.h>
#define ll long long
using namespace std;
const ll N=3e5+5;
ll t,n,m,q,f[N],cnt[N];
struct E
{
	ll u,v, k;
}ed[N];
ll find(ll x)
{
	if(f[x]==x) return x;
	return f[x]=find(f[x]);
}
bool cmp(E a,E b)
{
	return a.k<b.k;
}
void solve()
{
	vector<ll> ans(N);map<ll,ll> mp;
    cin>>n>>m>>q;vector<ll> b;
	for(int i=1;i<=n;i++) f[i]=i,cnt[i]=1;
	for(int i=1;i<=m;i++)
	{
		scanf("%lld%lld%lld",&ed[i].u,&ed[i].v,&ed[i].k);
	}
	sort(ed+1,ed+m+1,cmp);
	ll num=0;
	for(int i=m;i>=1;i--)
	{
		ll fu=find(ed[i].u),fv=find(ed[i].v);
		if(fu!=fv)
		{
			f[fu]=fv;
			num-=cnt[fu]*(cnt[fu]-1),num-=cnt[fv]*(cnt[fv]-1);
		    cnt[fv]=cnt[fu]+cnt[fv];
			num+=cnt[fv]*(cnt[fv]-1);
		    
		}
	   mp[ed[i].k]=max(mp[ed[i].k],num);
	}
	
	ll cc=0;
	for(auto & tt:mp)
	 b.push_back(tt.first);
    
	while(q--)
	{
		ll op;scanf("%lld",&op);
		auto pos=lower_bound(b.begin(),b.end(),op);
		if(pos==b.end())
			cout<<"0\n";
		else 
		    cout<<mp[*pos]/2<<endl;
	}
	
}
int main()
{
   cin>>t;
   while(t--)
   {
	   solve();
   }
}
现在CF炸了先这样吧, 等CF好了继续更新










![[oeasy]python0145_版本控制_git_备份还原](https://img-blog.csdnimg.cn/img_convert/af1665be24a9537f9a9bec1c4b2da1d8.png)


![[计算机图形学]相机与透镜(前瞻预习/复习回顾)](https://img-blog.csdnimg.cn/55ce0064aa1b4ac2ac9166dca4d818c1.png)





