流水依依

希望朋友们有个好的身体,开开心心工作与学习。

博客园 首页 新随笔 联系 订阅 管理

2014年10月1日 #

摘要: http://acm.fzu.edu.cn/problem.php?pid=1342dp[i][j] , i位尾巴为j的概率const int maxn = 1008 ;double dp[maxn][12] ;int main(){ int i , j , n , k ; ... 阅读全文
posted @ 2014-10-01 12:36 流水依依 阅读(157) 评论(0) 推荐(0) 编辑

摘要: http://acm.fzu.edu.cn/problem.php?pid=1348const int maxn = 1008 ;int a[maxn] , c[maxn] ;int main(){ int i , n , m ; while(cin>>n){ ... 阅读全文
posted @ 2014-10-01 12:28 流水依依 阅读(166) 评论(0) 推荐(0) 编辑

2014年3月6日 #

摘要: 问题:给定一个十进制正整数N,写下从1开始,到N的所有整数,然后数一下其中出现的所有“1”的个数。例如:N= 2,写下1,2。这样只出现了1个“1”。N= 12,我们会写下1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12。这样,1的个数是5。 阅读全文
posted @ 2014-03-06 16:13 流水依依 阅读(321) 评论(0) 推荐(0) 编辑

摘要: typedef unsigned long long LL ;map fibo ;map ::iterator it ;LL my_pow(LL x , LL y){ LL ans = 1 ; for(; y; y>>=1 ){ if(y&1) ans *= x ; x*=x ; } return ans ;}void init(){ fibo.clear() ; LL x1 = 4 ; LL x2 = 3 ; fibo[1] = 4 ; fibo[2] = 3 ; int id =... 阅读全文
posted @ 2014-03-06 15:21 流水依依 阅读(258) 评论(0) 推荐(0) 编辑

2014年3月4日 #

摘要: int Node_Size ;struct Node{ int x ; Node *next ;};Node * make_list(int n){ int i , j ; stack stk ; Node *before , *root ; root = before = (Node *)malloc(sizeof(Node)) ; before->x = 1 ; before->next = NULL ; Node_Size = 1 ; for(i = 2 ; i x = stk.top() ; ... 阅读全文
posted @ 2014-03-04 20:38 流水依依 阅读(293) 评论(1) 推荐(0) 编辑

2014年3月1日 #

摘要: D. On Sum of FractionsLet's assume thatv(n)is the largest prime number, that does not exceedn;u(n)is the smallest prime number strictly greater thann.Find.InputThe first line contains integert(1 ≤ t ≤ 500)— the number of testscases.Each of the followingtlines of the input contains integern(2 ≤ n 阅读全文
posted @ 2014-03-01 20:06 流水依依 阅读(219) 评论(0) 推荐(0) 编辑

2014年2月28日 #

摘要: 描述:给定平面上的n个点,任意做一条直线,求至多能有几个点恰好落在直线上。输入:包含多组测试数据,每组测试数据由一个整数n(0 mp ; //Node 为分数。 做分数->int的映射。 map ::iterator it ; mp.clear() ; for(i = 1 ; i second) ; return ans + 1 ;}int main(){ int i , ans ; while(cin>>n){ for(i = 1 ; i >p[i].x>>p[i].y ; ans = 0 ; for(i = ... 阅读全文
posted @ 2014-02-28 15:22 流水依依 阅读(438) 评论(1) 推荐(1) 编辑

2014年2月26日 #

摘要: 先载入一张图片, .。ID为IDB_BITMAP1CBrush m_brBk;//在public中定义#pragma once// LoginDlg 对话框class LoginDlg : public CDialog{ DECLARE_DYNAMIC(LoginDlg)public: LoginDlg(CWnd* pParent = NULL); // 标准构造函数 virtual ~LoginDlg();// 对话框数据 enum { IDD = IDD_DIALOG_LogIn };protected: virtual void DoDataExchan... 阅读全文
posted @ 2014-02-26 17:05 流水依依 阅读(299) 评论(0) 推荐(0) 编辑

2014年2月21日 #

摘要: void CSjtestDlg::OnBnClickedButtonAdd(){ // TODO: 在此添加控件通知处理程序代码 this->ShowWindow(SW_HIDE); DigAdd dig ; dig.DoModal() ; this->ShowWindow(SW_SHOW); m_Grid.DeleteAllItems() ; ADOConn m_Adoconn ; m_Adoconn.OnInitADOConn() ; CString sql ; sql.Format(_T("select * from employees order by 员工编号 阅读全文
posted @ 2014-02-21 23:09 流水依依 阅读(841) 评论(1) 推荐(1) 编辑

摘要: 如果用MFC的话,请尽量使用afxmessagebox,因为这个全局的对话框最安全,也最方便。 但是在WIN32 SDK的情况下只能使用MESSAGEBOX。MessageBox()是Win32API函数.后者是mfc中的全局函数.在MFC中能用MessageBox()的地方都能用AfxMessageBox().afxmessagebox更多的时候是用于调试AfxMessageBox 比 MessageBox 方便! MessageBox 比 AfxMessageBox 灵活(如指定对话框标题等)! MessageBox 是 Win32 API ,可以直接使用;AfxMessageBox是MF 阅读全文
posted @ 2014-02-21 23:02 流水依依 阅读(236) 评论(0) 推荐(0) 编辑