AC日记——T-Shirt Hunt codeforces 807b】的更多相关文章

T-Shirt Hunt 思路: 水题: 代码: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; ],ans; bool check(int xx) { if(xx<y) return false; )%; ;j<=;j++) { i=(i*+)%; +i) return true; } retur…
Dynamic Problem Scoring 思路: 水题: 代码: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define maxn 130 ],ac[],cnt,all,last1,last2; ][]; inline void in(int &now) { ;now=; char Cge…
E. Sign on Fence time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output Bizon the Champion has recently finished painting his wood fence. The fence consists of a sequence of n panels of 1 meter w…
812B - Sagheer, the Hausmeister 思路: 搜索: 代码: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define maxn 20 #define maxm 105 #define INF 0x7fffffff ],num[maxn],ans=INF,k,sum[maxn],…
812A - Sagheer and Crossroads 思路: 模拟: 代码: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define Yes {puts("YES\n");return 0;} ][]; int main() { ;i<=;i++) { scanf(],&…
Is it rated? 思路: 水题: 代码: #include <cstdio> #include <cstring> using namespace std; ],b[],last=; int main() { scanf("%d",&n); ;i<=n;i++) { scanf("%d%d",&a[i],&b[i]); if(a[i]!=b[i]) { printf("rated");…
803B - Distances to Zero 思路: 水题: 代码: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define maxn 200005 int ai[maxn],bi[maxn],ci[maxn],n; inline void in(int &now) { ; ') Cget=…
797F - Mice and Holes 思路: XXYXX: 代码: #include <cmath> #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define maxn 5005 #define ll long long struct HoleType { ll x,c; }; stru…
803E - Roma and Poker 思路: 赢或输或者平的序列: 赢和平的差的绝对值不得超过k: 结束时差的绝对值必须为k: 当“?”时可以自己决定为什么状态: 输出最终序列或者NO: dp(随便搞搞): 来,上代码: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; ][],m; ]; int main…
G - Periodic RMQ Problem 思路: 题目给一段序列,然后序列复制很多次: 维护序列很多次后的性质: 线段树动态开点: 来,上代码: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; #define maxn 100005 struct TreeNodeType { int l, r, mid…