AtCoder Beginner Contest 259 https://atcoder.jp/contests/abc259 A - Growth Record 按照题意模拟: #include <bits/stdc++.h> using namespace std; int main () { int n, m, x, t, d; cin >> n >> m >> x >> t >> d; if (m >= x) cout << t; else cout << t - (x-m...
C - XX to XXX 给定两个串 S 和T ,每次可以向 S 中相邻且相同的两个字符中间塞一个相同的字符。问若干次操作后 S 是否能变成 T 。 考虑双指针 (ptr_s, ptr_t) ,从头对齐往后扫描,每次先不考虑扩张,能不能匹配上。 如果不能匹配上,即 S[ptr_s] \ne T[ptr_t] ,那么 T[ptr_t] 只能往回看...
lldfs(intx,intdst,ll flow){if(x==dst)returnflow;for(int&i=iter[x];i<g[x].size();i++){ edge &e=g[x][i];if(e.cap&&dis[x]<dis[e.to]&&flow){ ll cflow=dfs(e.to,dst,min(flow,e.cap)); e.cap-=cflow; g[e.to][e.rev].cap+=cflow;if(cflow)returncflow; } }return...
bool iscir(int i, int X, int Y) { if((LL)(x[i] - X) * (x[i] - X) + (LL)(y[i] - Y) * (y[i] - Y) == (LL)r[i] * r[i]) return 1; else return 0; } bool isxj(int i, int j) { LL d = (x[i] - x[j]) * (x[i] - x[j]) + (y[i] - y[...
·AtCoder Beginner Contest (ABC) 这是最频繁且最简单的入门赛,通常情况下每月至少举行2次。2019年4月27日(含)之前,每场比赛共4题,时长100分钟,满分1000分且Rating超过1199的选手不计Rating值。自2019年5月19日起改版升级为6道题目,时长不变,满分2100分且Rating值超过1999的选手不计Rating值。改版之后比赛质量...
We will hold Tokio Marine & Nichido Fire Insurance Programming Contest 2024(AtCoder Beginner Contest 355). Contest URL:https://atcoder.jp/contests/abc355 Start Time:http://www.timeanddate.com/worldclock/fixedtime.html?iso=20240525T2100&p1=248 ...
ex- 001 ,010,110 you only need shop 1 and 3 to fill the mask but your approach is greedy picking which is wrong and you will end up taking 1,2,3 hint-use bitmask
AtCoder Beginner Contest 269「A」「B」「C 二进制枚举」「D 暴力dfs」「E 二分答案」「F 等差数列+推式子」 https://suryxin.blog.csdn.net/article/details/126974824 AtCoder Beginner Contest 269(E-EX) https://www.bilibili.com/opus/707445585544740886 ...
水题 intcheck(intx,inta,intc,intb){intt=x-(x/(a+c)*(a+c));if(t==0)return0;if(t>=a)returnb*a;returnt*b;}voidsolve(){inta,b,c,d,e,f,x;cin>>a>>b>>c>>d>>e>>f>>x;intans1=x/(a+c)*a*b,ans2=x/(d+f)*d*e;ans1+=check(x,a,c,b);ans2+=check(x,d,f...
AtCoder Beginner Contest 048 题解 比赛链接:https://atcoder.jp/contests/abc048 A - AtCoder *** Contest 题目大意: 输入三个字符串,输出 'A' + 第二个字符串的首字母 + 'C'。 示例程序: #include <bits/stdc++.h> using namespac AtCoder 字符串 示例程序 #include AtCoder Beginner Contest 36...