Coupons and Discounts】的更多相关文章

Coupons and Discounts time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The programming competition season has already started and it's time to train for ICPC. Sereja coaches his teams for a…
B. Coupons and Discounts time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The programming competition season has already started and it's time to train for ICPC. Sereja coaches his teams for…
题目链接 Coupons and Discounts 逐步贪心即可. 若当前位为奇数则当前位的下一位减一,否则不动. #include <bits/stdc++.h> using namespace std; #define rep(i,a,b) for(int i(a); i <= (b); ++i) ]; int n; int main(){ memset(a, , sizeof a); scanf("%d", &n); rep(i, , n) scanf…
time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output The programming competition season has already started and it's time to train for ICPC. Sereja coaches his teams for a number of year and he know…
题意:有n个队参加CCPC,然后有两种优惠方式,一种是一天买再次,一种是买两天,现在让你判断能不能找到一种方式,使得优惠不剩余. 析:直接模拟,如果本次是奇数,那么就得用第二种,作一个标记,再去计算下一个. 代码如下: #pragma comment(linker, "/STACK:1024000000,1024000000") #include <cstdio> #include <string> #include <cstdlib> #inclu…
A. Night at the Museum time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Grigoriy, like the hero of one famous comedy film, found a job as a night security guard at the museum. At first night…
http://codeforces.com/contest/731 不发题面了,自己点链接 总结一下 考场上 原以为这次要加很多raiting... 但FST狗记邓,只加了58rating 总结一下 ABC切得很快(保持) B题WA了2发不应该,没有想清楚 F题写了大暴力,但不优美,虽然过了P,但就没有想了,很严重问题,得意忘形,虽然知道FST,但有侥幸心里,真正考试就完了 以为拿到了分就不干事了,严重问题,真正考试一定要写暴力拍 后来没有干事,既没有hack又没有去写DE不应该 A Night…
本文版权归ljh2000和博客园共有,欢迎转载,但须保留此声明,并给出原文链接,谢谢合作. 本文作者:ljh2000 作者博客:http://www.cnblogs.com/ljh2000-jump/转载请注明出处,侵权必究,保留最终解释权! Description All our characters have hobbies. The same is true for Fedor. He enjoys shopping in the neighboring supermarket. The…
D. Fedor and coupons time limit per test 4 seconds memory limit per test 256 megabytes input standard input output standard output All our characters have hobbies. The same is true for Fedor. He enjoys shopping in the neighboring supermarket. The goo…
题目链接: 传送门 Discounts time limit per test:3 second     memory limit per test:256 megabytes Description One day Polycarpus stopped by a supermarket on his way home. It turns out that the supermarket is having a special offer for stools. The offer is as…