您当前的位置: 首页 > 

钟钟终

暂无认证

  • 8浏览

    0关注

    233博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

10/2 模拟题+倍增lca+zkw线段树

钟钟终 发布时间:2022-10-02 23:56:30 ,浏览量:8

P8289 [省选联考 2022] 预处理器

一道省选的模拟题,虽然说思路简单,但是实现的技巧真的很多。 总结一下: 1.当getline接收一整行数据时,注意在前一个接受的数据后用getchar接收换行符。 2.使用 stringstream可将接收的一整行数据用字符串数组存起来。 3.复习了字符串find函数和substr函数。 4.采用map实现字符串的映射,由于不可嵌套转换,因此转换后需要对字符串进行标记。

#include 
#define int long long
#define endl '\n'
#define ios (ios::sync_with_stdio(false),cin.tie(0),cout.tie(0))
using namespace std;
const int inf=1e18;
const int N=7e6+5;
const int mod=1e9+7;
bool cmp(int a,int b){return a>b;}
int n,g;
mapmp;
string s;
string dfs(string s)
{
    string ss;
    for(int i=0,j;i            
关注
打赏
1664378814
查看更多评论
0.0979s