URAL 1635 思路:区间dp+贪心,先n^2处理出每段区间是否是回文串,然后贪心地找每一段1到i的最少分割. 代码: #include<bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mem(a,b) memset(a,b,sizeof(a)) ; string s; int n; int dp[N][N]; int ans[N]; int pre[N]; void…
C - Anniversary FireworkTime Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hust.edu.cn/vjudge/contest/view.action?cid=87643#problem/B Description Denis has to prepare the Ural State University 90th anniversary firework. He bought n rockets and s…
1814: Ural 1519 Formula 1 Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 942 Solved: 356[Submit][Status][Discuss] Description Regardless of the fact, that Vologda could not get rights to hold the Winter Olympic games of 20**, it is well-known, that t…