随笔分类 - 模拟
摘要:题目:http://ac.jobdu.com/problem.php?pid=1553/* 分别算出时针和分针的度数,做差之后分几种情况讨论,(-360,-180),[-180,0),[0,180],(180,360). */#include int main(){ int h,m; while (~scanf("%d:%d",&h,&m)) { double hd,md,mdd; hd = (h%12)*30; md = m*6; mdd = ((double)m)/2; double temp = hd ...
阅读全文
摘要:/* 题意就是要找到包含“bear”的子串,计算出个数,需要注意的地方就是不要计算重复。 */ 1 #include 2 #include 3 #include 4 #define maxn 5005 5 6 char str[maxn]; 7 int pos[maxn]; 8 int main() 9 {10 while(~scanf("%s",str))11 {12 int p = 1;13 memset(pos, 0, sizeof(int));14 int len = (int)strlen(str);15 ...
阅读全文
摘要:题目:http://codeforces.com/contest/304/problem/B#include <iostream>#include <stdio.h>#include <string>#include <string.h>#include <algorithm>#include <math.h>#include <fstream>#include <vector>#include <map>#include <queue>#include <stack&
阅读全文

浙公网安备 33010602011771号