南阳219----An problem about date】的更多相关文章

An problem about date 时间限制:2000 ms  |  内存限制:65535 KB 难度:2   描述 acm的iphxer经常忘记某天是星期几,但是他记那天的具体日期,他希望你能写个程序帮帮他.   输入 每行有三个整数 year,month,day,日期在1600年1月1日到9600年1月1日之间; 输出 输出对应的星期,用一个整数表示;(星期一到星期六用1-6表示,星期日用0表示) 样例输入 2011 3 6 1949 10 1 2011 4 1 1945 8 15…
/* 1600年一月一日为星期6,所以算出ymd与1600-1-1差多少天对7取余即可 */ #include<stdio.h> ]={}; int main() { ,ans; ; i<; i+=) { != || i%==) ++t; a[i-] = a[i-] = a[i-] = a[i-] = t; } while(~scanf("%d%d%d",&y,&m,&d)) { ans = + (y-)* + a[y-]; switch(m)…
/W = (d+2*m+3*(m+1)/5+y+y/4-y/100+y/400) mod 7(1.2月需要看作上一年的13.14月) #include<stdio.h> #include<string.h> #include<math.h> #include<iostream> #include<algorithm> #include<queue> #include<vector> #include<set>…
Time Limit: 500MS   Memory Limit: 1572864KB   64bit IO Format: %lld & %llu Description You are given a sequence A of N(N <= 100,000) positive integers. There sum will be less than 1018. On this sequence you have to apply M (M <= 100,000) operati…
Time Limit: 1000MS   Memory Limit: 1572864KB   64bit IO Format: %lld & %llu Description Being a completist and a simplist, kid Yang Zhe cannot solve but get Wrong Answer from most of the OI problems. And he refuse to write two program of same kind at…
今天项目上利用运行netca创建监听时报错,(运行netmgr可以弹出窗口,未测试是否可以建立监听) 报错信息: [oracle@BSS-WG2 ~]$netca Oracle Net Services Configuration: # # An unexpected error has been detected by HotSpot Virtual Machine: # #  SIGSEGV (0xb) at pc=0x002bb9b3, pid=6447, tid=4160280784 #…
最近发现一个很奇怪的问题: 创建了一个DB_LINK连接另一个Oracle数据库. select * from tablename@dblinkname; 单句执行没问题,但是把这句SQL写到存储过程内: create or replace procedure prc_testisbegininsert into testselect * from tablename@dblinkname;commit; end; 就发生如下错误,存储过程编译不通过: 报错如下:PACKAGE BODY SKS…
注:时间有点忙,直接copy 过来的,要查看原址: http://www.developer.com/net/dealing-with-json-dates-in-asp.net-mvc.html Introduction Most of the time, data transfer during Ajax communication is facilitated using JSON format. While JSON format is text based, lightweight a…
介绍MySQL的调优手段,主要包括慢日志查询分析与Explain查询分析SQL执行计划 1.MySQL优化 1.慢日志查询分析 首先需要对慢日志进行一些设置,如下: SHOW VARIABLES LIKE 'slow_query_log'; -- 查看是否开启了慢查询 SET GLOBAL slow_query_log_file='/var/lib/mysql/mysql-slow.log'; -- 设置慢查询日志的位置 SET GLOBAL log_queries_not_using_inde…
网页跳转 解析啥的以后会有的 目录 ·T1活动安排 ·T2种树 ·T3喷水装置 T1活动安排 /* problem:yibentong10000 date:2019/4/21 author:Lonely.Devil */ #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; ; struct node{ int s,f,di…