大模拟
阿晴0917
这个作者很懒,什么都没留下…
展开
-
Codeforces Round #604 (Div. 2) 解题报告
https://codeforces.com/contest/1265/problem/BA由?,a,b,c组成的串 将?改成a,b,c使得s相邻两个字符不相等起初有相邻相等-1思路 特判相邻两个相等且不为?输出-1判断i=0和i=len-1端点处 s[i]=?其余部分与左右都不相等#include<bits/stdc++.h>#include<string>...原创 2019-12-12 19:08:39 · 146 阅读 · 0 评论 -
Codeforces1262B 模拟
n<=1e5q1=max(a1)q2=max(a1,a2)qi=max(a1,…ai)输出序列p 1-n不同的数组成while顶多执行1e5次 再也不执行 然后走i->n复杂度最大2e5#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e6+5...原创 2019-11-27 14:49:48 · 140 阅读 · 0 评论 -
Codeforces864C 加油站 模拟
坐标轴 0-a bL油 f位置有加油站 k 正反次数不能走k次输出-1#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e5+5;const ll mod=1e9+7;const int INF=0x3f3f3f3f;#define IO ios::sync_...原创 2019-11-22 20:11:48 · 135 阅读 · 0 评论 -
E.FanFan的雀圣冒险 模拟
注意大四喜考虑全部14张牌其他只先计数13张牌的数量 相当于再摸#include<bits/stdc++.h>using namespace std;typedef long long ll;const int maxn=1e6+5;ll T,p1[105],p2[105],p3[105],p4[105],m;char c;void solve(){ memset(p...原创 2019-11-21 00:21:06 · 123 阅读 · 0 评论 -
Codeforces828B 时针模拟
使t1 t2在被时针划分后的同一区域 不会跨越激光或者看h m s是否在t1 t2之间double m/s多的话 h可能会超过12 double是3个指针的实际精确位置#include<bits/stdc++.h>using namespace std;typedef long long ll;#define IO ios::sync_with_stdio(false);...原创 2019-10-13 22:34:21 · 146 阅读 · 0 评论 -
Codeforces1191C 模拟
https://codeforces.com/contest/1191/problem/C注意ll n 1e18#include<bits/stdc++.h>#include<deque>using namespace std;#define IO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0)#defin...原创 2019-07-28 13:25:43 · 428 阅读 · 0 评论 -
Codeforces1191B. Tokitsukaze and Mahjong模拟
https://codeforces.com/contest/1191/problem/B#include<bits/stdc++.h>#include<deque>using namespace std;#define IO ios::sync_with_stdio(false);cin.tie(0);cout.tie(0) #define forn(i,n)...原创 2019-07-27 17:48:59 · 184 阅读 · 0 评论 -
Codeforces1187B s包含t所有字母数量的最小前缀子串长度
int num[30];vector<int> pos[30];int main(){ IO; int n,m; string s,t; cin>>n; cin>>s; for(int i=0;i<n;i++){ pos[s[i]-'a'].pb(i); } cin>>m; while(m--){ int a...原创 2019-07-06 17:15:27 · 218 阅读 · 0 评论 -
天平砝码 n进制 (进位问题)
你有一个天平和一些砝码,砝码质量分别为n0,n1,n2…n100(每种各1个)。问能否称出质量为k的物品。“称出”是指在天平左右放置一些砝码,使得两边质量之差恰好等于k。#include&lt;iostream&gt;#include&lt;cstdio&gt;#include&lt;cmath&gt;#include&lt;string&gt;#inc原创 2019-02-07 14:10:06 · 1044 阅读 · 0 评论 -
牛客寒假算法基础集训营2 B处女座与cf (模拟)
题目描述众所周知,处女座经常通过打cf来调节自己的心情。今天处女座又参加了一场cf的比赛,他知道了所有的提交记录,他想知道自己的得分和排在第几名。你知道处女座的cf账号是cnzCodeforces规则如下: 比赛一共2小时 比赛有5题,A题500分,B题1000分,C题1500分,D题2000分,E题2500分。 得分规则如下:在第0分钟完成某一题可以得到全...原创 2019-02-03 23:32:32 · 260 阅读 · 0 评论