DP就是每次在原序列右边加一个city的时候 (此时n个city) 只要看前一个状态 (n-1个city) 最右边的city的情况
也就是记录n个city时的三个状态 xxxV xxx> xxx<
xxxV 和 xxx< 的数量和就是要求的结果, xxx>是记录一下如果允许向右流水那么方案的数量
状态转移即为右图
然后dp[100]结果超过long long, 于是用BigInteger, 写这个报告的原因也是第一次用Java交OJ..
代码:
[java]
import java.math.*;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
BigInteger dp[][]=new BigInteger[101][2];
dp[1][0]=BigInteger.ONE;
dp[1][1]=BigInteger.ZERO;
for(int i=2;i<=100;i++) {
dp[i][0]=dp[i-1][0].add(dp[i-1][0]).add(dp[i-1][1]);
dp[i][1]=dp[i-1][0].add(dp[i-1][1]);
}
Scanner sc=new Scanner(System.in);
while(sc.hasNext()) {
int a=sc.nextInt();
System.out.println(dp[a][0].add(dp[a][1]));
}
}
}
[/java]
References:
Legiano Casinio maps.google.sn
References:
Monro Casino Legal http://stove.ru
References:
Hitnspin casino paysafecard http://images.google.co.th
References:
Monro Casino Turniere http://0.pexeburay.com/
References:
Hitnspin willkommensbonus https://williz.info/
References:
Hitnspin free spins http://addstudio.lk/
References:
Hitnspin casino seriös mail.yandex.ru
References:
Hitnspin casino no deposit bonus https://vsekottedzhi.com.ua/ua/go?https://forum.xnxx.com/proxy.php?link=https://de.trustpilot.com/review/der-wikinger-shop.de
References:
Hitnspin casino seriös http://images.google.com.ua/
References:
Hitnspin casino demo inlinehokej.sh10w2.esports.cz
References:
Hitnspin auszahlung dauer https://www.tomfarr.com/redirect.php?url=https://isowindows.net/user/blackfoam6/
References:
Hit n spin casino deutsch http://cds.zju.edu.cn/addons/cms/go/index.html?url=https://clipjournal.space/item/hitnspin-casino-test-2026-ist-es-seri-s
References:
Hitnspin casino auszahlung erfahrungen http://www.prosvetlenie.org/
References:
Hit n spin freispiele https://shatunamur.ru/
References:
Hitnspin casino anmeldung http://forum.xnxx.com/
References:
Hit’n’spin casino login aster.scandwap.xtgem.com
References:
Hitnspin free spins https://soundingames.dei.uc.pt/api.php?action=bom.so/xf4Ovihttp://www.qazaqpen-club.kz/en/user/quiltbait1/
References:
Hit’n spin casino http://chat.chat.ru
References:
Hitnspin casino auszahlungslimit https://pharmvestnik.ru
References:
Hit n spin casino login https://forums.playstarbound.com
References:
Lollybet Casino PayPal https://skyblock.net/proxy.php?link=https://www.canaddatv.com/@quinnschwing57?page=about
References:
Lollybet Support rufox.ru
References:
Lollybet Startguthaben https://pdaf.awi.de/trac/search?q=https://1mailbox.in/anonym/redirect.php?url=https://lollybet.com.de/
References:
Lollybet Casino Auszahlungsdauer http://www.google.bg/
References:
Lollybet Casino Seriös https://priuschat.com
References:
Lollybet Casino Erfahrungen clients1.google.tk
References:
Lollybet Casino Verifizierung garagebiz.ru
References:
Lollybet Casino Spielautomaten clients1.google.ci
References:
Hitnspin willkommensbonus http://cse.google.co.th/
References:
Hitnspin casino spielautomaten http://cse.google.ac
References:
Hitnspin casino sign up bonus http://clients1.google.mv
References:
Hitnspin casino no deposit bonus http://clients1.google.co.cr/
References:
Hitnspin anmelden cse.google.kz
References:
Lollybet Bonus ohne Einzahlung img.2chan.net
References:
Video poker game career.braincode.com.bd
References:
Saratoga springs casino whizzjobs.com
References:
Lollybet Casino Sicherheit http://cse.google.sk/url?sa=i&url=https://thehrguardians.com/employer/top-paysafecard-casinos-2026-️-im-online-casino-mit-paysafe-zahlen/