随笔分类 - ~~编程之美~~
摘要:证明过程参考编程之美2015资格赛题解题目1 :2月19日时间限制:2000ms单点时限:1000ms内存限制:256MB描述给定两个日期,计算这两个日期之间有多少个2月29日(包括起始日期)。只有闰年有2月29日,满足以下一个条件的年份为闰年:1. 年份能被4整除但不能被100整除2. 年份能被4...
阅读全文
摘要:Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".click to show clarification.Clarification:What constitutes a word?A sequence of non-space characters constitutes a word.Could the input string contain leading o
阅读全文
摘要:1 #include <iostream> 2 #include <map> 3 #include <vector> 4 #include <sstream> 5 #include <string> 6 using namespace std; 7 8 int main(){ 9 int T;10 cin>>T;11 for(int iCase = 1; iCase <= T; iCase ++){12 int N,M;13 cin>>N>>M;14 map<string,string&
阅读全文