- 博客(9)
- 收藏
- 关注
原创 3252 Lowest Unique Price
Lowest Unique Price Time Limit: 1000 ms Memory Limit: 65536 KiB Problem DescriptionRecently my buddies and I came across an idea! We want to build a website to sell things in a new way.For each ...
2018-05-04 11:00:02 127
原创 Fibonacci Numbers 取模的规律
F[0] = 0,F[1] = 1; n =0,1; F[i] = F[i-1]+F[i-2] i>=2; 斐波那契数列的每个数都取模后会出现循环,循环节的大小由MOD决定;#include<iostream>#include<stdio.h>#include<string.h>using namespa...
2018-05-02 20:53:43 478
原创 3566 Triple Nim
Triple Nim Time Limit: 2000 ms Memory Limit: 65536 KiB Submit Statistic Discuss Problem Description Alice and Bob are always playing all kinds of Nim games and Alice always goes first. Here is t...
2018-05-02 19:10:00 184
原创 Codeforces A. Aramic script
题目链接:http://codeforces.com/contest/975/problem/A 第一题就错了,C++STL该好好补补了 题目大意:给多个字符串,对于每个字符串,找出它的“Root”,即不考虑重复的字母,所有的字符串共有几个不同的“根”;题解:STL中map关联字符串和数字,用vis数组标记 代码#include<iostream>#include&...
2018-05-02 13:16:46 254
原创 HDU1231 最大连续子序列DP
最大连续子序列Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 37574 Accepted Submission(s): 16939Problem Description 给定K个整数的序列{ ...
2018-05-01 17:00:34 142
原创 HDU 1576 A+B(逆元)
A/B Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7660 Accepted Submission(s): 6097Problem Description 要求(A/B)%9973,但由于A很大,我们只给出n(n=A...
2018-05-01 15:23:15 232
转载 数论之逆元
转自:http://www.cnblogs.com/linyujun/p/5194184.htm 数论倒数,又称逆元(因为我说习惯逆元了,下面我都说逆元)数论中的倒数是有特别的意义滴你以为a的倒数在数论中还是1/a吗(・∀・)哼哼~天真 先来引入求余概念 (a + b) % p = (a%p + b%p) %p ...
2018-05-01 14:50:33 291
原创 Codeforces 550B Preparing Olympiad
B. Preparing Olympiadtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output You have n problems. You have estimated the difficul...
2018-05-01 11:15:21 215
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人