C++小白训练第五天
以下为牛客挑战
今日收获
- 存放相同的东西的序号时候可以用vectorvectorf(N);这样就不会像二维数组一样被动区间递归变化不大的f[i]=f[i-1]+{-1,1,0}
复制代码 牛客周赛 Round 123
(34条未读私信) 牛客竞赛_ACM/NOI/CSP/CCPC/ICPC算法编程高难度练习赛_牛客竞赛OJ
小红玩牌
A-小红玩牌_牛客周赛 Round 123
解题代码
[code]#include#define int long long#define lll __uint128_t#define PII pair#define endl '\n'using namespace std;#define yn(ans) printf("%s\n", (ans)?"Yes":"No");//快速打印#define YN(ans) printf("%s\n", (ans)?"YES":"NO");#define REP(i, e) for (int i = 0; i < (e); ++i)#define REP1(i, s, e) for (int i = (s); i > t; while (t--)#define TESTconst int N=2e5+10,M=1e3+10,mod=1e9+7;int a[N],b[N],c[N],pre[N];signed main(){ std::ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int n1,n2; string s1,s2; cin>>n1>>s1; cin>>n2>>s2; if(n1>n2){ cout |