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

题意:日历需要多少列。

  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int num[] = {,,,,,,,,,,,};
  6.  
  7. int main()
  8. {
  9. int m,d;
  10. scanf("%d%d",&m,&d);
  11.  
  12. int day = num[m-];
  13.  
  14. int ans = ;
  15. day = day - (-d+);
  16.  
  17. if(day%)
  18. ans+=(day/+);
  19. else ans+=(day/);
  20. printf("%d\n",ans);
  21.  
  22. return ;
  23. }

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. 转 python 的常用函数replace, split(),enumerate() 函数

    1.execmd = "su - " + ou + " -c 'sqlplus / as sysdba << EOF\n " + execmd3 + ...

  2. RobotFramework读取mysql和oracle数据库

    一.robotframework连接mysql数据库 1.安装databaselibrary.pymysql 通过cmd命令执行:pip install robotframework-database ...

  3. Linpack之HPL测试

    平台信息 Description: CentOS Linux release 7.6.1810 (Core) 注意事项 安装HPL之前需要配置好: GCC/Fortran77 编译器 BLAS/CBL ...

  4. inventor删除不干净

    AUTODESK系列软件着实令人头疼,安装失败之后不能完全卸载!!!(比如maya,cad,3dsmax等).有时手动删除注册表重装之后还是会出现各种问题,每个版本的C++Runtime和.NET f ...

  5. Unity [SerializeField]

    在Unity3d中Unity3D 中提供了非常方便的功能可以帮助用户将 成员变量 在Inspector中显示,并且定义Serialize关系. 也就是说凡是显示在Inspector 中的属性都同时具有 ...

  6. OpenStack Weekly Rank 2015.08.24

    Module Reviews Drafted Blueprints Completed Blueprints Filed Bugs Resolved Bugs Cinder 5 1 1 6 13 Sw ...

  7. 10个常见的Redis面试"刁难"问题--转

    高可用架构 导读:在程序员面试过程中Redis相关的知识是常被问到的话题.作为一名在互联网技术行业打击过成百上千名的资深技术面试官,本文作者总结了面试过程中经常问到的问题.十分值得一读. 作者简介:钱 ...

  8. Powershell(1)

    PowerShell cmdlets: Verb-Noun的命令形式, Verb一般是set, get, start, stop, invoke, 使用get-verb显示所有的动词 通过别名机制, ...

  9. Devexpress Xtrareports 创建多栏报表

    根据官方回答:多列或多行(取决于当前的多栏设置)呈现数据的报表 这种报表是有用的,例如,当每个明细区都只显示少量数据.并且需要在一列的右侧打印下一个明细区时,这样就能充分利用整个页面的宽度,此外,当创 ...

  10. MVC中的验证码

    下面是一个完整的mvc controller类 public class CodeController : Controller { private const string CODE = " ...