地址:http://acm.hdu.edu.cn/showproblem.php?pid=1563题意:找n个数里只出现了1次的数。mark:hash搞之。大于200的最小素数是211。代码:# include <stdio.h># include <string.h>int dp[211][2] ;void insert (int n){ int idx = n % 211 ; while (dp[idx][0] != n && dp[idx][1] != 0) idx++ ; dp[idx][0] = n ; dp[idx][1] ++ ;}int
转载 2012-01-08 05:25:00
12阅读
https://vjudge.net/problem/UVA-1563 高斯消元解同余方程组 就是把原来的除法换成逆元,其他的都一样 #include<bits/stdc++.h> using namespace std; const int N = 110; int n, p; int a[N][
转载 2017-05-10 12:36:00
16阅读
2评论
//364K 0MS G++#include #include using namespace std;double fatigueFactor;double slideDistance;double climbDistan
原创 2023-05-23 15:55:19
32阅读
An anagram of a string is any string that can be formed using the
原创 2022-11-10 08:12:43
88阅读
P<=10一开始是吓死我了 后来想到这就是一个经典的决策单调性解决1d1d动态规划的题目 像决策单调性完全可以打表找规律,这里有一篇严谨的证明https://www.byvoid.com/blog/noi-2009-poet 关于1d1d动归的优化可以看《1d1d动态规划优化初步》 注意可能会爆longlong,所以用extended计算 1 type node=record 2
转载 2015-06-30 17:00:00
74阅读
2评论
一、内容Find your present! In the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them w...
原创 2022-02-03 11:33:53
38阅读
一、内容Find your present! In the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them w...
原创 2021-08-27 14:22:48
59阅读
题目描述小南有一
原创 2023-01-03 11:44:54
87阅读
标准的1d/1d形式,具有决策单调性,二分栈优化nlogn。
转载 2017-03-23 09:42:00
57阅读
2评论
/*1563计算蜗牛爬的距离,看是否能过总高度H,每天白天上爬H,每天晚上下降D,但每天上爬距离减少f=F/100.0*U */#includemain(){ int H,D,F,day; float dis,f,U; while(scanf("%d%f%d%d",&H,&U,&D,&F),H) { day=0;
原创 2023-08-21 16:46:27
62阅读
Find your present!Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K
原创 2022-08-30 15:20:23
34阅读
Find your present!Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4
原创 2023-02-20 10:26:45
24阅读
题目:原题链接(困难)标签:动态规划、记忆化递归解法时间复杂度空间复杂度执行用时Ans 1 (Python)O(N3)O(N^3)O(N3)O(N2)O(N^2)O(N2)超出时间限制(118/131)Ans 2 (Python)O(N3)O(N^3)O(N3)O(N2)O(N^2)O(N2)9944ms (5.75%)Ans 3 (Python)
P1653疯狂的方格取数Accepted标签:天才的talent[显示标签]背景Due to the talent of talent123,当talent123做完NOIP考了两次的二取方格数和vijos中的三取方格数后,突发奇想....描述在一个宽M,长N的矩阵中,请你编一个程序,n次从矩阵的左... Read More
转载 2014-07-13 17:39:00
29阅读
这个题一看数字就很
原创 2022-08-31 18:20:05
82阅读
题目:原题链接(困难)标签:动态规划、记忆化递归解法时间复杂度空间复杂度执行用时Ans 1 (Python)O(N3)O(N^3)O(N3)O(N2)O(N^2)O(N2)超出时间限制(118/131)Ans 2 (Python)O(N3)O(N^3)O(N3)O(N2)O(N^2)O(N2)9944ms (5.75%)Ans 3 (Python)解法一:class Solution: def stoneGameV(self, sto
Problem Description In the new year party, everybody will get a “special present”.Now it’s your turn to get your special present, a lot of presents now putting on the desk, and only one of them will b
原创 2022-05-14 12:49:56
26阅读
P1563 玩具谜题题解:nnn个玩具围成一个圈,但是方向有的朝内有的朝外,因此每个玩具的
原创 2022-11-30 13:11:27
55阅读
就是一个简单模拟
原创 2021-07-15 15:03:20
38阅读
#includeint main(){int n,m,s;while(scanf("%d",&n),n) { s=0; while(n--) { scanf("%d",&m); s^=m; } printf("%d\n",s);}return 0;}
转载 2013-08-16 10:17:00
43阅读
  • 1
  • 2
  • 3
  • 4