usaco-friday
来源:互联网 发布:bilibili for mac 编辑:程序博客网 时间:2024/06/06 03:53
决定开始自己的usaco之旅~~~~
水题,就当时练练usaco的格式了~
/*ID: rowanha3LANG: C++TASK: friday*/#include<stdio.h>#include<string.h>#include<iostream>#include<algorithm>using namespace std;int day[13]={0,31,28,31,30,31,30,31,31,30,31,30,31};int main(){ freopen("friday.in","r",stdin); freopen("friday.out","w",stdout); int s[10]; int leap,n,i,j; memset(s,0,sizeof(s)); cin>>n; leap=1; for(i=1900;i<=1900+n-1;i++) { for(j=1;j<=12;j++) { leap=leap+13-1; s[leap%7]++; if(j==2&&((i%100!=0&&i%4==0)||i%400==0)) { leap=leap+day[j]-13+1+1; } else leap=leap+day[j]-13+1; leap=leap%7; } } printf("%d",s[6]); for(i=0;i<6;i++) { printf(" %d",s[i]); } printf("\n"); fclose(stdin); fclose(stdout); return 0;}
- usaco-friday
- USACO friday
- usaco friday
- usaco——Friday
- Friday the Thirteenth(USACO)
- usaco--Friday the Thirteenth
- USACO 1.1 friday
- [USACO] Friday the Thirteenth
- usaco Friday the Thirteenth
- USACO Friday the Thirteenth
- USACO 1.1 friday
- USACO:Friday the Thirteenth
- USACO -Friday the Thirteenth
- USACO Friday the Thirteenth
- USACO--1.1friday
- USACO Friday the Thirteenth
- USACO--Friday the Thirteenth
- USACO 1.1 friday
- iptables 规则的删除
- uboot中配置并使用tftp命令
- mac版本android SDK,路径
- 用法总结:NSArray,NSSet,NSDictionary
- linux 一些常见的命令
- usaco-friday
- 褚时健-夕阳的逆袭
- linux守护进程及其创建
- (2)单一职责原则和(3)开放-封闭原则
- 关于H.264开源 三种类型
- JPA Query
- jquery easyui datagrid 分页 详解
- 逐步积累openCV基本操作
- git使用ssh密钥