题目链接:http://codeforces.com/problemset/problem/760/A

题意:日历需要多少列。

 #include <bits/stdc++.h>

 using namespace std;

 int num[] = {,,,,,,,,,,,};

 int main()
{
int m,d;
scanf("%d%d",&m,&d); int day = num[m-]; int ans = ;
day = day - (-d+); if(day%)
ans+=(day/+);
else ans+=(day/);
printf("%d\n",ans); return ;
}

Codeforces 760A Petr and a calendar的更多相关文章

  1. 【codeforces 760A】Petr and a calendar

    time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard o ...

  2. codeforces C1. The Great Julya Calendar 解题报告

    题目链接:http://codeforces.com/problemset/problem/331/C1 这是第一次参加codeforces比赛(ABBYY Cup 3.0 - Finals (onl ...

  3. CodeForces 113B Petr#

    题目链接:http://codeforces.com/problemset/problem/113/B 题目大意: 多组数据每组给定3个字符串T,Sbeg,Sed,求字符串T中有多少子串是以Sbeg开 ...

  4. Codeforces 987E Petr and Permutations(数组的置换与复原 、结论)

    题目连接: Petr and Permutations 题意:给出一个1到n的序列,Petr打乱了3n次,Um_nik打乱了7n+1次,现在给出被打乱后的序列,求是谁打乱的. 题解:因为给出了一个3* ...

  5. CodeForces - 987E Petr and Permutations (思维+逆序对)

    题意:初始有一个序列[1,2,...N],一次操作可以将任意两个位置的值互换,Petr做3*n次操作:Alxe做7*n+1次操作.给出最后生成的新序列,问是由谁操作得到的. 分析:一个序列的状态可以归 ...

  6. Codeforces 986B. Petr and Permutations(没想到这道2250分的题这么简单,早知道就先做了)

    这题真的只能靠直觉了,我没法给出详细证明. 解题思路: 1.交换3n次或者7n+1次,一定会出现一个为奇数,另一个为偶数. 2.用最朴素的方法,将n个数字归位,计算交换次数. 3.判断交换次数是否与3 ...

  7. 【63.63%】【codeforces 724A】Checking the Calendar

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  8. Codeforces 986B - Petr and Permutations

    Description\text{Description}Description Given an array a[], swap random 2 number of them for 3n or  ...

  9. CodeForces - 113B Petr# (后缀数组)

    应该算是远古时期的一道题了吧,不过感觉挺经典的. 题意是给出三一个字符串s,a,b,求以a开头b结尾的本质不同的字符串数. 由于n不算大,用hash就可以搞,不过这道题是存在复杂度$O(nlogn)$ ...

随机推荐

  1. jq得到总价

    <html><head> <title></title> {load href="/static/js/jquery-1.9.1.min.js ...

  2. Java学习笔记day05_方法重载

    1.方法的重载overload 在同一个类中, 允许出现同名的方法, 只要方法的参数列表不同即可. 参数列表不同: 参数个数不同, 参数类型不同, 顺序不同. public class MethodO ...

  3. derby

    /** * @Title: T.java * @Package test * @Description: TODO please write your description <BR> * ...

  4. BigDecimal的使用举例,包括阶乘的相加求法思路

    对于高精度要求或者运算数较大的的计算,应该使用bigdecimal类实现 import java.math.BigDecimal; public class TestSysin { public st ...

  5. 打开fiddler 电脑无法上网问题

    Fiddler下Firefox提示“您的连接并不安全”的解决办法 一.版本信息 Firefox 最新版本V46.0.1 Fiddler 最新版本V4.6.2.3 二.错误信息 开启fiddlers的h ...

  6. Linux的cron服务

    可以用以下命令启动和停止服务: /sbin/service crond start /sbin/service crond stop /sbin/service crond restart /sbin ...

  7. POJ 1236——Network of Schools——————【加边形成强连通图】

    Network of Schools Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64u ...

  8. Facebook TSDB论文Gorilla分析

    Facebook TSDB论文Gorilla分析 背景 TSDB时序数据库用于存储时间相关的数据,常用于监控系统的数据存储,分布式的TSDB提供了海量的数据存储能力,如InfluxDB.OpenTSD ...

  9. 解决navicate 连接mysql数据库中文乱码的问题

    以下均是ubuntu12.04为准 1.修改mysql的配置文件. 1.1.vi  /etc/mysql/my.conf找到[client]在其下面添加 default-character-set=u ...

  10. angularjs ui-grid如何动态设置行高

    自己开发的公众号,可以领取淘宝内部优惠券 在用ui-grid的时候我们可以用rowHeight设置行高,可是每一行的高度都是一样的,无法根据行内的内容进行自适应.如下图 为了解决这个问题,google ...