题意:纸牌顺子:连续的3张或连续的4张或连续的5张为顺子.手中的牌共有n个数字,每个数字是a[i]个,能不能把手中所有的牌都是属于顺子. 1 ≤ T ≤ 100. 1 ≤ N ≤ 2 × 105. 0 ≤ ai ≤ 109. . #include <bits/stdc++.h> #define rep(i, a, b) for(int i = a; i <= b; i++) #define ll long long using namespace std; const int maxn…
跟一个博客刷: http://blog.csdn.net/cc_again/article/details/25866971 一.简单基础dp 1.递推 HDU 2084 #include <bits/stdc++.h> using namespace std; ; int dp[MAXN][MAXN]; int towel[MAXN][MAXN]; int main(){ int t; scanf("%d", &t); while(t--){ memset(tow…
目录 Contest Info Solutions B. Counting Inversion C. Divisors of the Divisors of An Integer E. Helping the HR F. Path Intersection G. Techland H. Tile Game J. VAT Man Contest Info Practice Link Solved A B C D E F G H I J 7/10 - O O - O O O Ø - O O 在比赛中…
J. Deck Shuffling Time Limit: 2 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100187/problem/J Description The world famous scientist Innokentiy continues his innovative experiments with decks of cards. Now he has a deck of n cards and k…
Problem J. Triatrip Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/gym/100342/attachments Description The travel agency “Four Russians” is offering the new service for their clients. Unlike other agencies that only suggest one-way…