D.Distribution of Days The Gregorian calendar is internationally the most widely used civil calendar. It is named after Pope Gregory XIII, who introduced it in October 1582. In the Gregorian calendar, there are 28 days in February in a common year an…
C.Cheering To boost contestants' performances in the 20th La Salle - Pui Ching Programming Challenge, the organizers have bought N robots to cheer for them. Each robot is supposed to display cheering slogans, letter by letter. Unfortunately, due to s…
A. Ambiguous Dates There are two popular formats for representing a date: day/month/year or month/day/year. For example, today can be represented as 15/8/2017 or 8/15/2017. Sometimes (like on today), using one way or another should pose no confusion…
西瓜队(划掉),Kuma Rider久违的第一场训练,四小时瞎打.jpg A.水题,排序 #include<cstdio> #include<iostream> #include<algorithm> #include<queue> #include<cstring> #include<string> #include<vector> #include<map> #include<functional&g…
题目链接:http://codeforces.com/problemset/problem/1167/C 题意:大概就是分成几个小团体,给每个人用1 - n编号,当对某个人传播消息的时候,整个小团体就知道这个消息,输出 分别对1 - n编号的某个人传递消息时,有多少人知道这个消息. 思路:题目可理解为输出1 - n每个号码所在团体总人数,利用并查集不断向集合添加成员,记录每个集合的人数,保存在根节点的sum[]中,查询每个节点的根节点,输出根节点sum[]: 总结:初看好像是简单并查集,于是敲了…
题目链接:https://codeforces.com/contest/1090/problem/A A conglomerate consists of n companies. To make managing easier, their owners have decided to merge all companies into one. By law, it is only possible to merge two companies, so the owners plan to s…
1.EXTRACT(抽取年/月/日/时/分/秒)  //抽取年/月/日/时/分/秒 SELECT EXTRACT (YEAR FROM CURRENT_DATE); SELECT EXTRACT (MONTH FROM CURRENT_DATE+); SELECT EXTRACT (DAY FROM '1996-12-12'); 选项:YEAR | MONTH | DAY | HOUR | MINUTE | SECOND | TIMEZONE_HOUR | TIMEZONE_MINUTE 2. …
from datetime import datetime, date, timedelta, timezone from time import time, ctime, localtime, strftime, strptime, mktime ''' %Y %m %d %H %M %S 年月日时分秒 %A %a 全写星期 简写星期 ''' # 生成当前时区日期事件字符串 tct = ctime() print(tct,type(tct)) print(tct.strip(),type(tc…
如何正确处理时间 现实生活的世界里,时间是不断向前的,如果向前追溯时间的起点,可能是宇宙出生时,又或是是宇宙出现之前, 但肯定是我们目前无法找到的,我们不知道现在距离时间原点的精确距离.所以我们要表示时间, 就需要人为定义一个原点. 原点被规定为,格林威治时间(GMT)1970年1月1日的午夜 为起点,之于为啥是GMT时间,大概是因为本初子午线在那的原因吧. Java中的时间 如果你跟你朋友说:“我们 1484301456 一起去吃饭,别迟到!”,而你朋友能马上理解你说的时间,表示时间就会很简单…
B. Ancient Berland Hieroglyphs 题目连接: http://codeforces.com/problemset/problem/164/B Descriptionww.co Polycarpus enjoys studying Berland hieroglyphs. Once Polycarp got hold of two ancient Berland pictures, on each of which was drawn a circle of hierog…