现在位置: 首页 > agama发表的所有文章
  • 11月
  • 15日
综合 ⁄ 共 3090字 评论关闭
题意:询问不同区间不同值的个数 //思路1 700+ms #include<iostream> #include<string> #include<algorithm> using namespace std; #define CL(a,b) memset(a,b,sizeof(a)) const int M(100010); const int N(1020); int f[N],r[M]; struct data{ int x,sub; }a[M]; struct dat{ int l,r; int sub; }ans[N]; int vis[M]; bool cmp(data x,data y) { return x.x<y.x; } bool cm(dat x,dat y ) { return x.l<y.l||(x.l==y.l&&x.r<y.r); } int main() { int m,i,n,j,q; while(scanf("%d",......
阅读全文
  • 08月
  • 09日
综合 ⁄ 共 244字 评论关闭
今天码代码的时候遇到了这个问题,因为oracle用的比较少,所在查询了一下。 顿时傻眼,有很多的贴子说是因为nls_date_language的问题,还要改会话级的NLS_DATE_LANGUAGE设置为简体中文,还有些别的,等等。我当时就无语了,我觉得大部分楼主都是在自己玩玩oracle的吧,虽然也算是因素,但如果是在正经项目中,谁会让你去改这种东西?! 后来发现了正确的做法,如下: to_date('2014-06-24 00:00:00','yyyy-mm-dd hh24:mi:ss')
阅读全文
  • 07月
  • 30日
综合 ⁄ 共 2172字 评论关闭
一、简介   UDP是一个简单的面向数据包的运输层协议:进程的每个输出操作都正好产生一个UDP数据报,并组装成一份待发送的IP数据报。这与面向流字符的协议不同,如TCP,应用程序产生的全体数据与真正发送的单个IP数据报可能没有什么关系。   UDP数据报封装成的IP数据报格式如下所示:   UDP不提供可靠性,它把应用程序传给IP的数据发送出去,但并不保证他们能到达目的地。其次,应用程序必须关心IP数据报的长度,如果它超过网络的最大传输单元(Maximum Transmission Unit,MTU),那么就要对IP数据报进行分片。 二、UDP首部......
阅读全文
  • 06月
  • 01日
数据库 ⁄ 共 36088字 评论关闭
一个项目用到的50个SQL语句 转载 说明:以下五十个语句都按照测试数据进行过测试,最好每次只单独运行一个语句。 问题及描述: --1.学生表 Student(Sid,Sname,Sage,Ssex)--Sid学生编号,Sname学生姓名,Sage出生年月,Ssex 学生性别 --2.课程表 Course(Cid,Cname,Tid)--Cid --课程编号,Cname课程名称,Tid教师编号 --3.教师表 Teacher(Tid,Tname) --Tid 教师编号,Tname 教师姓名 --4.成绩表 SC(Sid,Cid,score) --Sid 学生编号,Cid 课程编号,score分数 */ --创建测试数据 createtable Student(Sidvarchar(10),Snamenvarchar(10),Saged......
阅读全文
  • 12月
  • 12日
综合 ⁄ 共 2542字 评论关闭
http://blog.csdn.net/wxyztuv/article/details/7965556 三个函数,find_prime() 是利用素数表的方法,寻找素数的,find_prime_stupid()是利用另一种传统方法寻找素数的,test_func()用于测试两个函数的速度 测试数据分别是 1000,5000,10000,50000,100000,500000,1000000,2000000,5000000 以内的素数。 [cpp] view plaincopy #include <stdio.h>   #include <stdlib.h>   #include <windows.h>   #include <math.h>   #include <time.h>      #define SIZE 10000000      ......
阅读全文
  • 05月
  • 09日
综合 ⁄ 共 1817字 评论关闭
原先不熟悉jquery时,总在寻找无刷新的方法,在此不断的积累自己所知道的jquery属性,常用方法。以下为jquery实现的无刷新联动事件 分公司: <select id="SelectCom"> <option value="">--请选择分公司-- </option> </select> 电厂: <select id="SelectORG"> ......
阅读全文
  • 04月
  • 28日
综合 ⁄ 共 11219字 评论关闭
   作为一名大二狗,已经参加了3次算比较大的数模比赛了,每次都是操刀把玩MATLAB,虽不能说是高玩,但是能力也是拥有的了,下来就说说在比赛中和练习过程中对于matlab 的使用和了解~ ----- 一,绘图部分 Matlab绘图 强大的绘图功能是Matlab的特点之一,Matlab提供了一系列的绘图函数,用户不需要过多的考虑绘图的细节,只需要给出一些基本参数就能得到所需图形,这类函数称为高层绘图函数。此外,Matlab还提供了直接对图形句柄进行操作的低层绘图操作。这类操作将图形的每个图形元素(如坐标轴、曲线、文字等)看做一个独立的......
阅读全文
  • 04月
  • 13日
综合 ⁄ 共 4197字 评论关闭
一.题目 Sum of Consecutive Prime Numbers Time Limit: 1000MS Memory Limit: 65536K Description Some positive integers can be represented by a sum of one or more consecutive prime numbers. How many such representations does a given positive integer have? For example, the integer 53 has two representations 5 + 7 + 11 + 13 + 17 and 53. The integer 41 has three representations 2+3+5+7+11+13, 11+13+17, and 41. The integer 3 has only one representation, which is 3. The integer 20 has ......
阅读全文
  • 02月
  • 21日
综合 ⁄ 共 3147字 评论关闭
Stockbroker Grapevine Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 27547   Accepted: 15264 Description Stockbrokers are known to overreact to rumours. You have been contracted to develop a method of spreading disinformation amongst the stockbrokers to give your employer the tactical edge in the stock market. For maximum effect, you have to spread the rumours in the fastest possible way. Unfortunately for you, stockbrokers only trust information coming from their......
阅读全文
  • 02月
  • 13日
综合 ⁄ 共 4825字 评论关闭
看到的一些好的文章和资源分享下 有些链接需要注册登录才能正常浏览下载。 http://www.apkbus.com/android-102775-1-1.html iOS开发Object-c 课程-无线互联 http://www.cocoachina.com/bbs/read.php?tid=105689  开发一年的经验  http://www.cocoachina.com/newbie/tutorial/2012/0720/4475.html 抽屉式导航,让用户专注于核心的功能 http://www.cocoachina.com/newbie/tutorial/2012/0719/4467.html UITableView实现划动删除 http://www.cocoachina.com/newbie/tutorial/2012/0607/4334.html 使用SQLite3存储和读取数据......
阅读全文
  • 02月
  • 01日
综合 ⁄ 共 707字 评论关闭
首先把这三个资源下载下来: <link href="/css/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" /> <script src="/js/jquery-1.7.2.min.js" type="text/javascript"></script> <script src="/js/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script> 然后页面初始化的时候,调用这个js方法: $( "#sortable" ).sortable(); 如果希望把序列的值返回给后台的话,需要把ul元素的id写成key_value的形式,实例如下: <ul id="sortable" style="float:none;"> ......
阅读全文
  • 01月
  • 11日
综合 ⁄ 共 1933字 评论关闭
PC/UVA 110102/10189 水题。看样例输入输出即可明白题意。我的做法是用一个hash直接处理就成 //author: CHC //First Edit Time: 2014-01-10 23:39 //Last Edit Time: 2014-01-10 23:39 //Filename:1.cpp #include <iostream> #include <cstdio> #include <string.h> #include <queue> #include <algorithm> using namespace std; int n,m; char map[120][120]; int main() { int cas=0; int flag=0; while(~scanf("%d%d",&n,&m)&&(n||m)) { if(f......
阅读全文